Browse Source

下载页面

master
huangjiajun 5 days ago
parent
commit
74e0391d0f
2 changed files with 30 additions and 3 deletions
  1. +25
    -0
      app/hdl/hdl_config.go
  2. +5
    -3
      app/router/router.go

+ 25
- 0
app/hdl/hdl_config.go View File

@@ -91,6 +91,31 @@ func Version(c *gin.Context) {
e.OutSuc(c, res, nil)
return
}
func DownloadList(c *gin.Context) {
appVersion := svc.GetSysCfgStr("app_version")
version := make([]md.Version, 0)
json.Unmarshal([]byte(appVersion), &version)
newVersion := make([]md.Version, 0)
for _, v := range version {
if v.Url == "" {
continue
}
v.Img = svc.GetOssUrl("default_icon/" + v.Type + "_icon.png")
newVersion = append(newVersion, v)
}
res := md.VersionResp{Version: newVersion, IsAuditVersion: "0"}
NewCloudBundleDb := implement.NewCloudBundleDb(db.Db)
os := "1"
if c.GetHeader("platform") == "iOS" {
os = "2"
}
data, _ := NewCloudBundleDb.GetCloudBundleVersion(os, c.GetHeader("appversionname"))
if data != nil {
res.IsAuditVersion = utils.IntToStr(data.IsAuditing)
}
e.OutSuc(c, res, nil)
return
}

// Start
// @Summary 打开app调用


+ 5
- 3
app/router/router.go View File

@@ -64,9 +64,11 @@ func route(r *gin.RouterGroup) {
r.Use(mw.Limiter) //进行限流
r.Use(mw.CheckSign)
r.Any("/testCreateSign", hdl.TestCreateSign)
r.GET("/openApp/start", hdl.Start) //打开app调用
r.GET("/config", hdl.Config) //基本配置
r.GET("/version", hdl.Version) //版本数据
r.GET("/openApp/start", hdl.Start) //打开app调用
r.GET("/config", hdl.Config) //基本配置
r.GET("/version", hdl.Version) //版本数据
r.GET("/downloadList", hdl.DownloadList) //版本数据

{
r.GET("/advertising", hdl.Advertising) //广告位
r.POST("/advertising/detail", hdl.AdvertisingDetail) //广告位


Loading…
Cancel
Save