Browse Source

下载中心

herolist
huangjiajun 3 weeks ago
parent
commit
b875598337
2 changed files with 14 additions and 4 deletions
  1. +7
    -4
      app/hdl/hdl_config.go
  2. +7
    -0
      app/md/md_config.go

+ 7
- 4
app/hdl/hdl_config.go View File

@@ -105,11 +105,14 @@ func DownloadList(c *gin.Context) {
json.Unmarshal([]byte(appVersion), &version)
newVersion := make([]md.Version, 0)
for _, v := range version {
if v.Url == "" || v.Type != "station" {
continue
for _, v1 := range md.PhonePlatform {
if v1["type"] == v.Type {
v.Name = v1["name"]
v.Url = v1["url"]
v.Img = ""
newVersion = append(newVersion, v)
}
}
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)


+ 7
- 0
app/md/md_config.go View File

@@ -1,5 +1,12 @@
package md

var PhonePlatform = []map[string]string{
{"type": "station", "name": "浏览器下载", "url": "https://www.pgyer.com/0KxUvTBd"},
{"type": "yingyongbao", "name": "应用宝商店", "url": "https://a.app.qq.com/o/simple.jsp?pkgname=com.ddstaros.www"},
{"type": "xiaomi", "name": "小米应用商店", "url": "https://m.malink.cn/s/Q7nEzy"},
{"type": "aliApp", "name": "豌豆荚", "url": "https://m.wandoujia.com/apps/8431371"},
}

type ConfigResp struct {
Title string `json:"title" example:"软件使用协议标题"`
Content string `json:"content" example:"软件使用协议内容"`


Loading…
Cancel
Save