Commit 869149fa13676aaaf20cf2c62c1c69d61bec9c77
1 parent
483ade81
Exists in
v1.2
and in
1 other branch
..
Showing
5 changed files
with
8 additions
and
14 deletions
Show diff stats
API/SystemInfo.go
... | ... | @@ -3,7 +3,6 @@ package Api |
3 | 3 | import ( |
4 | 4 | "github.com/aarongao/tools" |
5 | 5 | "github.com/gin-gonic/gin" |
6 | - "letu/Config" | |
7 | 6 | "letu/DB" |
8 | 7 | ) |
9 | 8 | |
... | ... | @@ -11,7 +10,7 @@ import ( |
11 | 10 | // @Description 查询系统信息接口 |
12 | 11 | // @Accept json |
13 | 12 | // @Produce json |
14 | -// @Success 200 {object} tools.ResponseSeccess "Version=最新版本号UpdateLocationInterval上报位置时间间隔(秒)" | |
13 | +// @Success 200 {object} tools.ResponseSeccess "ApiVersion=最新的api版本号SupportVersion=支持最低的app版本号UpdateLocationInterval上报位置时间间隔(秒)" | |
15 | 14 | // @Failure 500 {object} tools.ResponseError "{"errcode":1,"errmsg":"错误原因"}" |
16 | 15 | // @Router /SystemInfo? [get] |
17 | 16 | func SystemInfo(c *gin.Context) { |
... | ... | @@ -19,12 +18,11 @@ func SystemInfo(c *gin.Context) { |
19 | 18 | c.Header("Access-Control-Allow-Credentials", "true") |
20 | 19 | |
21 | 20 | info := make(map[string]interface{}) |
22 | - info["ApiVersion"] = Config.Info.ApiVersion | |
21 | + ApiVersion := DB.Redis.Get("ApiVersion") | |
22 | + info["ApiVersion"] = ApiVersion | |
23 | 23 | |
24 | - info["SupportVersion"] = Config.Info.SupportVersion | |
25 | - | |
26 | - //SupportVersion := DB.Redis.Get("SupportVersion") | |
27 | - //info["SupportVersion"] = SupportVersion | |
24 | + SupportVersion := DB.Redis.Get("SupportVersion") | |
25 | + info["SupportVersion"] = SupportVersion | |
28 | 26 | |
29 | 27 | UpdateLocationInterval := DB.Redis.Get("UpdateLocationInterval") |
30 | 28 | info["UpdateLocationInterval"] = UpdateLocationInterval | ... | ... |
Config/config.go
Config/config.json
README.md
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | ## 乐游图后端接口文档 |
3 | 3 | | Specification | Value | |
4 | 4 | |-----|-----| |
5 | -| API Version | 1.0.0 | | |
5 | +| API Version | 1.1.0 | | |
6 | 6 | | BasePath | 正式 leyoutu.st-i.com.cn; 测试 leyoutu.sti-uat.com | |
7 | 7 | |
8 | 8 | |
... | ... | @@ -880,7 +880,7 @@ |
880 | 880 | |
881 | 881 | | Code | Type | Model | Message | |
882 | 882 | |-----|-----|-----|-----| |
883 | -| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | Version=最新版本号UpdateLocationInterval上报位置时间间隔(秒) | | |
883 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | ApiVersion=最新的api版本号SupportVersion=支持最低的app版本号UpdateLocationInterval上报位置时间间隔(秒) | | |
884 | 884 | | 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | |
885 | 885 | |
886 | 886 | ... | ... |
No preview for this file type