Commit d631c7b6d2a4cb44bc220c02296d94f36eb476b2

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

..

Showing 3 changed files with 24 additions and 18 deletions   Show diff stats
API/SysAds.go
... ... @@ -17,7 +17,7 @@ import (
17 17 // @Accept json
18 18 // @Produce json
19 19 // @Param id 5dfb03070a9ac17ac7a82054 string true "id"
20   -// @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":{"Id":"5e82d2539561231535f72958","Title":"系统广告2","Url":"http://www.google.cn","CreateTime":1585631827,"UpdateTime":0,"Expiry":1585670400,"ExpiryString":"今天"}}"
  20 +// @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":{"Id":"5e858c09b1d67b2d117e2e58","Site":"景区选择页","Size":{"Width":100,"Height":100},"Type":"轮播","Picture":[{"Src":"/Upload/1585820891339307000.png","Link":"222"}],"Video":[]}}"
21 21 // @Failure 500 {object} tools.ResponseError "{"errcode":1,"errmsg":"错误原因"}"
22 22 // @Router /SysAds/Info? [get]
23 23 func SysAdsInfo(c *gin.Context) {
... ... @@ -38,7 +38,7 @@ func SysAdsInfo(c *gin.Context) {
38 38 // @Description 查询系统广告-列表
39 39 // @Accept json
40 40 // @Produce json
41   -// @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":[{"Id":"5e82c27f41914b0fdcac489f","Title":"系统广告","Url":"http://www.google.cn","CreateTime":1585627775,"UpdateTime":0,"Expiry":1585670400,"ExpiryString":"今天"}...]}"
  41 +// @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":[{"Id":"5e858c09b1d67b2d117e2e58","Site":"景区选择页","Size":{"Width":100,"Height":100},"Type":"轮播","Picture":[{"Src":"/Upload/1585820891339307000.png","Link":"222"}],"Video":[]}]}"
42 42 // @Failure 500 {object} tools.ResponseError "{"errcode":1,"errmsg":"错误原因"}"
43 43 // @Router /SysAds/List? [get]
44 44 func SysAdsList(c *gin.Context) {
... ... @@ -67,15 +67,17 @@ func SysAdsList(c *gin.Context) {
67 67 }
68 68  
69 69  
70   -// @Title 修改系统广告
71   -// @Description 修改系统广告
  70 +// @Title 修改平台广告
  71 +// @Description 修改平台广告
72 72 // @Accept json
73 73 // @Produce json
74   -// @Param id 5dfb03070a9ac17ac7a82054 string true "系统广告id"
75   -// @Param ScenicId wgergejfwe string true "景区id"
76   -// @Param Title 营业时间系统广告 string true "系统广告名称"
77   -// @Param Url http://abc.com string true "系统广告链接"
78   -// @Param ExpiryString http://abc.com string true "有效期(15分钟|1小时|今天|今年)"
  74 +// @Param id 5dfb03070a9ac17ac7a82054 string true "平台广告id"
  75 +// @Param Site Height string true "位置"
  76 +// @Param Height 100 string true "尺寸"
  77 +// @Param Width 100 string true "尺寸"
  78 +// @Param Type 单视频 string true "类型(轮播|单图|单视频)"
  79 +// @Param Picture [{"Src":"/Upload/1585820891339307000.png","Link":"222"}] string true "图片"
  80 +// @Param Video [{"Src":"../plugins/images/defaultpic.png","Link":"22","Title":"22","VideoPicture":"/Upload/1585821569540095000.png"}] string true "视频"
79 81 // @Param Token wgergejfwe string true "用户token"
80 82 // @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":"ok"}"
81 83 // @Failure 500 {object} tools.ResponseError "{"errcode":1,"errmsg":"错误原因"}"
... ...
README.md
... ... @@ -45,7 +45,7 @@
45 45 1. [发送短信验证码](#sms-send-post)
46 46 1. [查询系统广告-单条](#sysads-info-get)
47 47 1. [查询系统广告-列表](#sysads-list-get)
48   -1. [修改系统广告](#sysads-modify-post)
  48 +1. [修改平台广告](#sysads-modify-post)
49 49 1. [查询系统信息接口](#systeminfo-get)
50 50 1. [标签 - 增加标签](#tag-create-post)
51 51 1. [标签 - 删除标签](#tag-remove-post)
... ... @@ -778,7 +778,7 @@
778 778  
779 779 | Code | Type | Model | Message |
780 780 |-----|-----|-----|-----|
781   -| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e82d2539561231535f72958","Title":"系统广告2","Url":"http://www.google.cn","CreateTime":1585631827,"UpdateTime":0,"Expiry":1585670400,"ExpiryString":"今天"}} |
  781 +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":{"Id":"5e858c09b1d67b2d117e2e58","Site":"景区选择页","Size":{"Width":100,"Height":100},"Type":"轮播","Picture":[{"Src":"/Upload/1585820891339307000.png","Link":"222"}],"Video":[]}} |
782 782 | 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |
783 783  
784 784  
... ... @@ -791,7 +791,7 @@
791 791  
792 792 | Code | Type | Model | Message |
793 793 |-----|-----|-----|-----|
794   -| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Id":"5e82c27f41914b0fdcac489f","Title":"系统广告","Url":"http://www.google.cn","CreateTime":1585627775,"UpdateTime":0,"Expiry":1585670400,"ExpiryString":"今天"}...]} |
  794 +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":[{"Id":"5e858c09b1d67b2d117e2e58","Site":"景区选择页","Size":{"Width":100,"Height":100},"Type":"轮播","Picture":[{"Src":"/Upload/1585820891339307000.png","Link":"222"}],"Video":[]}]} |
795 795 | 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} |
796 796  
797 797  
... ... @@ -800,15 +800,17 @@
800 800 #### /SysAds/Modify (POST)
801 801  
802 802  
803   -修改系统广告
  803 +修改平台广告
804 804  
805 805 | Param Name | Example | Data Type | Description | Required? |
806 806 |-----|-----|-----|-----|-----|
807   -| id | 5dfb03070a9ac17ac7a82054 | string | 系统广告id | Yes |
808   -| ScenicId | wgergejfwe | string | 景区id | Yes |
809   -| Title | 营业时间系统广告 | string | 系统广告名称 | Yes |
810   -| Url | http://abc.com | string | 系统广告链接 | Yes |
811   -| ExpiryString | http://abc.com | string | 有效期(15分钟|1小时|今天|今年) | Yes |
  807 +| id | 5dfb03070a9ac17ac7a82054 | string | 平台广告id | Yes |
  808 +| Site | Height | string | 位置 | Yes |
  809 +| Height | 100 | string | 尺寸 | Yes |
  810 +| Width | 100 | string | 尺寸 | Yes |
  811 +| Type | 单视频 | string | 类型(轮播|单图|单视频) | Yes |
  812 +| Picture | [{"Src":"/Upload/1585820891339307000.png","Link":"222"}] | string | 图片 | Yes |
  813 +| Video | [{"Src":"../plugins/images/defaultpic.png","Link":"22","Title":"22","VideoPicture":"/Upload/1585821569540095000.png"}] | string | 视频 | Yes |
812 814 | Token | wgergejfwe | string | 用户token | Yes |
813 815  
814 816  
... ...
Version.md
... ... @@ -55,6 +55,8 @@
55 55  
56 56 9. 后台增加管理员日志功能
57 57  
  58 +10. 增加/SysAds/List获取平台广告信息接口
  59 +
58 60  
59 61  
60 62 ##### 发布流程:
... ...