Commit 9d7c3c88eda39e6cfe9e40e7ff1e082e68c288a4

Authored by aarongao
1 parent d631c7b6
Exists in v1.2 and in 1 other branch v1.1

..

Showing 2 changed files with 36 additions and 9 deletions   Show diff stats
API/Line.go
... ... @@ -31,7 +31,7 @@ func LineInfo(c *gin.Context) {
31 31 return
32 32 }
33 33  
34   - var SLine DB.SLine
  34 + var SLine = DB.SLine{}
35 35 objID, _ := primitive.ObjectIDFromHex(c.Query("id"))
36 36 DB.CLine.FindOne(tools.GetContext(), bson.M{"_id": objID}).Decode(&SLine)
37 37  
... ... @@ -53,18 +53,21 @@ func AllLine(c *gin.Context) {
53 53 c.Header("Access-Control-Allow-Origin", c.Request.Header.Get("Origin"))
54 54 c.Header("Access-Control-Allow-Credentials", "true")
55 55  
56   - var aLine []DB.SLine
  56 + var aLine = []*DB.SLine{}
57 57 cur, err := DB.CLine.Find(tools.GetContext(), bson.M{"ScenicId": c.Query("ScenicId")})
58 58 defer cur.Close(tools.GetContext())
59 59 if err == nil {
60 60 for cur.Next(tools.GetContext()) {
61   - var e DB.SLine
  61 + var e *DB.SLine
62 62 cur.Decode(&e)
63 63 aLine = append(aLine, e)
64 64 }
65 65 }
66 66  
67   - c.JSON(200, aLine)
  67 + c.JSON(200, tools.ResponseSeccess{
  68 + 0,
  69 + aLine,
  70 + })
68 71  
69 72 }
70 73  
... ...
Version.md
... ... @@ -57,6 +57,35 @@
57 57  
58 58 10. 增加/SysAds/List获取平台广告信息接口
59 59  
  60 +11. /AllLine推荐线路接口返回结果变更,增加固定结构。
  61 +
  62 + ```
  63 + {
  64 + errcode: 0,
  65 + result: [ ]
  66 + }
  67 + ```
  68 +
  69 +
  70 +
  71 +
  72 +
  73 +##### 数据结构变更:
  74 +
  75 +1、标签表
  76 +
  77 +2、平台广告表初始数据
  78 +
  79 +2、root用户增加新模块权限
  80 +
  81 +
  82 +
  83 +##### 销毁流程
  84 +
  85 +1.
  86 +
  87 +
  88 +
60 89  
61 90  
62 91 ##### 发布流程:
... ... @@ -67,8 +96,3 @@
67 96 4. 使用 “生产环境地址” 打包公测版本至TestFlight
68 97 5. 发布至商店
69 98  
70   -
71   -
72   -##### 销毁说明
73   -
74   -1.
75 99 \ No newline at end of file
... ...