diff --git a/API/UserLog.go b/API/UserLog.go index ae81cb3..41ccc59 100644 --- a/API/UserLog.go +++ b/API/UserLog.go @@ -25,6 +25,7 @@ import ( // @Param SystemType ios string true "ios,android(存放于http.header中)" // @Param SystemVersion 13.01 string true "手机版本(存放于http.header中)" // @Param SystemModel iphone8 string true "手机型号(存放于http.header中)" +// @Param AppVersion 1.0 string true "app版本号" // @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":"ok"}" // @Failure 500 {object} tools.ResponseError "{"errcode":1,"errmsg":"错误原因"}" // @Router /UserLog? [post] @@ -52,6 +53,7 @@ func UserLog(c *gin.Context) { c.Request.Header.Get("SystemType"), c.Request.Header.Get("SystemVersion"), c.Request.Header.Get("SystemModel"), + c.Request.Header.Get("AppVersion"), }, }) diff --git a/DB/db.go b/DB/db.go index e7c2d78..6980b34 100644 --- a/DB/db.go +++ b/DB/db.go @@ -67,6 +67,7 @@ type SDevice struct { SystemType string `bson:"SystemType" json:"SystemType"` //ios,android SystemVersion string `bson:"SystemVersion" json:"SystemVersion"` //系统版本 SystemModel string `bson:"SystemModel" json:"SystemModel"` //机型 + AppVersion string `bson:"AppVersion" json:"AppVersion"` //app版本 } type SUserLog struct { Type string `bson:"Type" json:"Type"` // Log(事件)类型 diff --git a/README.md b/README.md index 6e9a266..0c3aa9a 100644 --- a/README.md +++ b/README.md @@ -721,6 +721,7 @@ | SystemType | ios | string | ios,android(存放于http.header中) | Yes | | SystemVersion | 13.01 | string | 手机版本(存放于http.header中) | Yes | | SystemModel | iphone8 | string | 手机型号(存放于http.header中) | Yes | +| AppVersion | 1.0 | string | app版本号 | Yes | | Code | Type | Model | Message | -- libgit2 0.21.0