package thirdParty import ( "applet/app/e" "applet/app/md/setCenter" "applet/app/svc" "github.com/gin-gonic/gin" ) // GetBasic // @Summary 基础设置-网站信息-基本设置(获取) // @Tags 基础设置 // @Description 网站信息-基本设置(获取) // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @Success 200 {object} setCenter.KuaizhanBasicResp "设置列表" // @Failure 400 {object} md.Response "具体错误" // @Router /api/settCenter/kuaizhan/getBasic [get] func GetBasic(c *gin.Context) { resp := setCenter.KuaizhanBasicResp{ KuaizhanUrl: svc.GetSysCfgStr("kuaizhan_url"), } e.OutSuc(c, resp, nil) } // SetBasic // @Summary 基础设置-网站信息-基本设置(更新) // @Tags 基础设置 // @Description 基本设置(更新) // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" // @param req body setCenter.KuaizhanBasicReq true "上传需要修改的信息" // @Success 200 {string} "success" // @Failure 400 {object} md.Response "具体错误" // @Router /api/settCenter/kuaizhan/setBasic [post] func SetBasic(c *gin.Context) { var req *setCenter.KuaizhanBasicReq if err1 := c.ShouldBindJSON(&req); err1 != nil { e.OutErr(c, e.ERR_INVALID_ARGS, err1.Error()) return } if req.KuaizhanUrl != "" { svc.SetSysCfgStr("kuaizhan_url", req.KuaizhanUrl) } e.OutSuc(c, "success", nil) return }