[关闭]
@myyzs 2017-10-24T09:27:35.000000Z 字数 1807 阅读 17

温馨提示语接口

1、数据库

配置库:wzs_work_tips、wzs_work_tips_group、wzs_work_tips_img

2、提示语接口

1、index(展示接口)

url:http://host/banner/tip/index
返回值

  1. {
  2. "isSuccess": 1,
  3. "message": "获取成功",
  4. "result": {
  5. "normal": [{
  6. "id": "101",
  7. "content": "一无所知的世界,走下去,才有惊喜",
  8. "create_time": "2017-10-23 09:16:58",
  9. "update_time": "2017-10-23 09:16:58",
  10. "is_disabled": "0",
  11. "group_id": "1"
  12. }],
  13. "time": [{
  14. "id": "201",
  15. "content": "美好的一天开始了,幸福的味道满满的",
  16. "create_time": "2017-10-23 09:16:59",
  17. "update_time": "2017-10-23 09:16:59",
  18. "is_disabled": "0",
  19. "group_id": "2"
  20. }],
  21. "festival": [{
  22. "id": "301",
  23. "content": "年年岁岁,今朝当为贵",
  24. "create_time": "2017-10-23 09:16:59",
  25. "update_time": "2017-10-23 09:16:59",
  26. "is_disabled": "0",
  27. "group_id": "7"
  28. }]
  29. },
  30. "sub_ticket": ""
  31. }

2、save(保存)

url:http://host/banner/tip/save
请求方式:POST

  1. {
  2. type_id:3,
  3. id:123 (新增操作不传或者穿空即可)
  4. }

返回值

  1. {
  2. "isSuccess": 1,
  3. "message": "保存成功",
  4. }

3、del(删除)

url:http://host/banner/tip/del?type_id=xxx&tip_id=xxx&group_id=xxx
请求方式:GET
参数说明

参数名 类型 必 填 描述
type_id int 提示语类型(1-节假日 2-时间段 3-常规)
tip_id int 常规提示,该参数必传
group_id 节假日、时间段,则该参数必传

返回值

  1. {
  2. "isSuccess": 1,
  3. "message": "删除成功",
  4. }

4、edit(编辑)

url:http://host/banner/tip/edit?type_id=xxx&tip_id=xxx&group_id=xxx
请求方式:GET
参数说明

参数名 类型 必 填 描述
type_id int 提示语类型(1-节假日 2-时间段 3-常规)
tip_id int 常规提示,该参数必传
group_id 节假日、时间段,则该参数必传

返回值(页面渲染方式)

  1. $this->render('add', ['tip'=>$tips, 'group'=>$group_info]);

返回值说明:如果是常规提示,则不包含group节点

3、背景图和分享图片接口

1、index(展示接口)

url:http://host/banner/tip-bg/index
返回值

  1. $this->render('index',['list'=>$list]);

2、save(保存)

url:http://host/banner/tip-bg/save
请求方式:POST

  1. {
  2. id:123 (新增操作不传或者穿空即可)
  3. }

返回值

  1. {
  2. "isSuccess": 1,
  3. "message": "保存成功",
  4. }

3、del(删除)

url:http://host/banner/tip-bg/del?id=xxx
请求方式:GET
参数说明

参数名 类型 必 填 描述
id int 需要删除行的id

返回值

  1. {
  2. "isSuccess": 1,
  3. "message": "删除成功",
  4. }

4、edit(编辑)

url:http://host/banner/tip-bg/edit?id=xxx
请求方式:GET
参数说明

参数名 类型 必 填 描述
id int 该参数必传

返回值(页面渲染方式)

  1. $this->render('add', ['banner'=>$bg]);

5、upload(上传图片)

url:http://host/banner/tip-bg/upload
返回值

  1. {
  2. "isSuccess": 1,
  3. "message": "上传成功",
  4. "img_url":"xxxxxxx";
  5. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注