蛋蛋星球 后台端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

svc_img_base.go 716 B

4 weeks ago
2 weeks ago
4 weeks ago
2 weeks ago
2 weeks ago
4 weeks ago
1234567891011121314151617181920212223242526272829303132
  1. package cloud_bundle
  2. import (
  3. "applet/app/db"
  4. "applet/app/e"
  5. "applet/app/md"
  6. "applet/app/svc"
  7. "applet/app/svc/sys_cfg"
  8. "applet/app/utils"
  9. "encoding/json"
  10. "github.com/gin-gonic/gin"
  11. )
  12. func ImgBase(c *gin.Context) {
  13. appCloudBundleData := svc.GetSysCfgStr("app_cloud_bundle_data")
  14. res := md.CloudBundleImgResp{}
  15. json.Unmarshal([]byte(appCloudBundleData), &res)
  16. e.OutSuc(c, res, nil)
  17. return
  18. }
  19. func ImgBaseSave(c *gin.Context) {
  20. var req md.CloudBundleImgResp
  21. if err := c.ShouldBindJSON(&req); err != nil {
  22. e.OutErr(c, e.ERR_INVALID_ARGS, err)
  23. return
  24. }
  25. cfgDb := sys_cfg.NewSysCfgDb(db.Db)
  26. cfgDb.SysCfgUpdate("app_cloud_bundle_data", utils.SerializeStr(req))
  27. e.OutSuc(c, "success", nil)
  28. return
  29. }