|
|
@@ -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调用 |
|
|
|