Commit d633d4d08aa54d072f4a0a134c6148a5cd8f78f3

Authored by aarongao
1 parent a4680f1e
Exists in v1.2 and in 2 other branches master, v1.1

..

Showing 3 changed files with 4 additions and 0 deletions   Show diff stats
API/UserLog.go
... ... @@ -25,6 +25,7 @@ import (
25 25 // @Param SystemType ios string true "ios,android(存放于http.header中)"
26 26 // @Param SystemVersion 13.01 string true "手机版本(存放于http.header中)"
27 27 // @Param SystemModel iphone8 string true "手机型号(存放于http.header中)"
  28 +// @Param AppVersion 1.0 string true "app版本号"
28 29 // @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":"ok"}"
29 30 // @Failure 500 {object} tools.ResponseError "{"errcode":1,"errmsg":"错误原因"}"
30 31 // @Router /UserLog? [post]
... ... @@ -52,6 +53,7 @@ func UserLog(c *gin.Context) {
52 53 c.Request.Header.Get("SystemType"),
53 54 c.Request.Header.Get("SystemVersion"),
54 55 c.Request.Header.Get("SystemModel"),
  56 + c.Request.Header.Get("AppVersion"),
55 57 },
56 58 })
57 59  
... ...
DB/db.go
... ... @@ -67,6 +67,7 @@ type SDevice struct {
67 67 SystemType string `bson:"SystemType" json:"SystemType"` //ios,android
68 68 SystemVersion string `bson:"SystemVersion" json:"SystemVersion"` //系统版本
69 69 SystemModel string `bson:"SystemModel" json:"SystemModel"` //机型
  70 + AppVersion string `bson:"AppVersion" json:"AppVersion"` //app版本
70 71 }
71 72 type SUserLog struct {
72 73 Type string `bson:"Type" json:"Type"` // Log(事件)类型
... ...
README.md
... ... @@ -721,6 +721,7 @@
721 721 | SystemType | ios | string | ios,android(存放于http.header中) | Yes |
722 722 | SystemVersion | 13.01 | string | 手机版本(存放于http.header中) | Yes |
723 723 | SystemModel | iphone8 | string | 手机型号(存放于http.header中) | Yes |
  724 +| AppVersion | 1.0 | string | app版本号 | Yes |
724 725  
725 726  
726 727 | Code | Type | Model | Message |
... ...