|
- package cloud_bundle
-
- import (
- "applet/app/e"
- "applet/app/hdl/comm"
- "applet/app/svc"
- "applet/app/svc/cloud_bundle"
- "github.com/gin-gonic/gin"
- "strings"
- )
-
-
-
-
-
-
-
-
-
-
-
- func Base(c *gin.Context) {
- cloud_bundle.Base(c)
- }
-
-
-
-
-
-
-
-
-
-
-
-
- func UpdateState(c *gin.Context) {
- cloud_bundle.UpdateState(c)
- }
-
-
-
-
-
-
-
-
-
-
-
-
- func Upload(c *gin.Context) {
- var args comm.ImgReqUploadReq
- err := c.ShouldBindJSON(&args)
- if err != nil {
- err = svc.HandleValidateErr(err)
- err1 := err.(e.E)
- e.OutErr(c, err1.Code, err1.Error())
- return
- }
- if strings.Contains(args.FileName, ".apk") == false && strings.Contains(args.FileName, ".ipa") == false {
- e.OutErr(c, 400, e.NewErr(400, "请上传APK 或IPA格式"))
- return
- }
- comm.CommOss(c, args)
- }
|