[关闭]
@931876502 2016-06-14T17:22:05.000000Z 字数 13356 阅读 486

ALADIN API


aladinApi

版本号:1.5.0
部门:研发部
岗位:服务端开发人员
姓名:杨松
建立日期:2016-2-17
更新日期:2016-4-6 20:30


POSTMAN 测试接口:https://www.getpostman.com/collections/2971e0c220a3d570580a


DOMAIN 主机域名定义 env


{{HOSTNAME}}

TEST =
DEVE = http://aladinsrv.dev.dlhis.com
PREPRO
PRODUCTION


接口文档连接


API.RS01、业务数据接口


  1. {
  2. "data": {
  3. "bzDataApi": {
  4. "dateTime": "2016-02-25 15:27:59",
  5. "hotelName": "迪联大酒店",
  6. "roomInfos": [
  7. {
  8. "rmiAvl": 1,
  9. "rmiCode": "A11",
  10. "rmiMark": "海景天窗",
  11. "rmiName": "呵呵房",
  12. "rmiTitleImg": "1",
  13. "tableBody": {
  14. "price0": "8888",
  15. "price1": "6666"
  16. }
  17. },
  18. {
  19. "rmiAvl": 1,
  20. "rmiCode": "A12",
  21. "rmiMark": "",
  22. "rmiName": "嘎嘎房",
  23. "rmiTitleImg": "1",
  24. "tableBody": {
  25. "price0": "8888",
  26. "price1": "6666"
  27. }
  28. }
  29. ],
  30. "scrollTime": "10000",
  31. "scrollTxt": "欢迎光临!",
  32. "tableHead": {
  33. "col0": "房型",
  34. "col1": "门市价",
  35. "col2": "今日价"
  36. },
  37. "weather": [
  38. {
  39. "cityCode": "CN101210101",
  40. "tempMax": "9",
  41. "tempMin": "1",
  42. "type1": "多云",
  43. "type2": "多云",
  44. "updateTime": "2016-02-24 11:22:43",
  45. "wthDate": "2016-02-24 00:00:00",
  46. "wthIcon": "wi-day-cloudy",
  47. "wthId": 1
  48. },
  49. {
  50. "cityCode": "CN101210101",
  51. "tempMax": "12",
  52. "tempMin": "4",
  53. "type1": "多云",
  54. "type2": "阴",
  55. "updateTime": "2016-02-24 11:22:43",
  56. "wthDate": "2016-02-25 00:00:00",
  57. "wthIcon": "wi-day-cloudy",
  58. "wthId": 2
  59. },
  60. {
  61. "cityCode": "CN101210101",
  62. "tempMax": "14",
  63. "tempMin": "5",
  64. "type1": "阴",
  65. "type2": "多云",
  66. "updateTime": "2016-02-24 11:22:43",
  67. "wthDate": "2016-02-26 00:00:00",
  68. "wthIcon": "wi-day-windy",
  69. "wthId": 3
  70. },
  71. {
  72. "cityCode": "CN101210101",
  73. "tempMax": "17",
  74. "tempMin": "5",
  75. "type1": "阴",
  76. "type2": "多云",
  77. "updateTime": "2016-02-24 11:22:43",
  78. "wthDate": "2016-02-27 00:00:00",
  79. "wthIcon": "wi-day-windy",
  80. "wthId": 4
  81. },
  82. {
  83. "cityCode": "CN101210101",
  84. "tempMax": "16",
  85. "tempMin": "4",
  86. "type1": "多云",
  87. "type2": "多云",
  88. "updateTime": "2016-02-24 11:22:43",
  89. "wthDate": "2016-02-28 00:00:00",
  90. "wthIcon": "wi-day-cloudy",
  91. "wthId": 5
  92. },
  93. {
  94. "cityCode": "CN101210101",
  95. "tempMax": "16",
  96. "tempMin": "5",
  97. "type1": "晴",
  98. "type2": "晴",
  99. "updateTime": "2016-02-24 11:22:43",
  100. "wthDate": "2016-02-29 00:00:00",
  101. "wthIcon": "wi-day-sunny",
  102. "wthId": 6
  103. },
  104. {
  105. "cityCode": "CN101210101",
  106. "tempMax": "20",
  107. "tempMin": "5",
  108. "type1": "晴",
  109. "type2": "晴",
  110. "updateTime": "2016-02-24 11:22:43",
  111. "wthDate": "2016-03-01 00:00:00",
  112. "wthIcon": "wi-day-sunny",
  113. "wthId": 7
  114. }
  115. ],
  116. "weekday": "星期四"
  117. }
  118. },
  119. "err": "nothing",
  120. "msg": "success",
  121. "re": {},
  122. "reErr": {},
  123. "statusNo": 200
  124. }

API.RS02、模板数据接口


 - 接口参数:`IMEI`
 - 请求类型:`GET` 
 - 请求地址:`{{HOSTNAME}}/api/resource/templetdata/{IMEI}`,IMEI是参数
 - 返回值
    - 返回值类型:`json`
    - 返回值结构: 例
  1. {
  2. "data": {
  3. "templetApi": {
  4. "files": {
  5. "cssFiles": {"css":"tmp1.css"},
  6. "imgFiles": {"bg_img":"bg_img.jpg"},
  7. "jsFiles": {"js":"tmp1.js"},
  8. "otherFiles": {"icon1":"icon1.png"},
  9. "styleData": {"font_color": "#f1d096"}
  10. },
  11. "startUrl": "/#/index/2",
  12. "tplIndex": "0"
  13. }
  14. },
  15. "err": "nothing",
  16. "msg": "success",
  17. "re": {},
  18. "reErr": {},
  19. "statusNo": 200
  20. }
 -  - 返回值说明:
        - 参数:
            1. `startUrl`:设备启动链接
            2. `tplIndex`: 模板更新索引
            3. `files`:模板文件
                - `imgFiles`: 图片文件
                - `cssFiles`: 样式文件 
                - `jsFiles`: js文件
                - `otherFiles`: 其他文件

API.RS03、详情页数据接口


  1. {
  2. "data": {
  3. "detailApi": {
  4. "details": [
  5. {
  6. "des": "床品描述",
  7. "img": "",
  8. "title": "床铺位"
  9. },
  10. {
  11. "des": "景观描述",
  12. "img": "",
  13. "title": "阳台景观"
  14. }
  15. ],
  16. "rmiCode": "A11",
  17. "showTime": "60000"
  18. }
  19. },
  20. "err": "nothing",
  21. "msg": "success",
  22. "re": {},
  23. "reErr": {},
  24. "statusNo": 200
  25. }

API.WI01、获取天气信息接口


  1. {
  2. "data": {
  3. "forecast": [
  4. {
  5. "cityCode": "CN101210101",
  6. "tempMax": "9",
  7. "tempMin": "1",
  8. "type1": "多云",
  9. "type2": "多云",
  10. "updateTime": "2016-02-24 11:22:43",
  11. "wthDate": "2016-02-24 00:00:00",
  12. "wthIcon": "wi-day-cloudy",
  13. "wthId": 1
  14. },
  15. {
  16. "cityCode": "CN101210101",
  17. "tempMax": "12",
  18. "tempMin": "4",
  19. "type1": "多云",
  20. "type2": "阴",
  21. "updateTime": "2016-02-24 11:22:43",
  22. "wthDate": "2016-02-25 00:00:00",
  23. "wthIcon": "wi-day-cloudy",
  24. "wthId": 2
  25. },
  26. {
  27. "cityCode": "CN101210101",
  28. "tempMax": "14",
  29. "tempMin": "5",
  30. "type1": "阴",
  31. "type2": "多云",
  32. "updateTime": "2016-02-24 11:22:43",
  33. "wthDate": "2016-02-26 00:00:00",
  34. "wthIcon": "wi-day-windy",
  35. "wthId": 3
  36. },
  37. {
  38. "cityCode": "CN101210101",
  39. "tempMax": "17",
  40. "tempMin": "5",
  41. "type1": "阴",
  42. "type2": "多云",
  43. "updateTime": "2016-02-24 11:22:43",
  44. "wthDate": "2016-02-27 00:00:00",
  45. "wthIcon": "wi-day-windy",
  46. "wthId": 4
  47. },
  48. {
  49. "cityCode": "CN101210101",
  50. "tempMax": "16",
  51. "tempMin": "4",
  52. "type1": "多云",
  53. "type2": "多云",
  54. "updateTime": "2016-02-24 11:22:43",
  55. "wthDate": "2016-02-28 00:00:00",
  56. "wthIcon": "wi-day-cloudy",
  57. "wthId": 5
  58. },
  59. {
  60. "cityCode": "CN101210101",
  61. "tempMax": "16",
  62. "tempMin": "5",
  63. "type1": "晴",
  64. "type2": "晴",
  65. "updateTime": "2016-02-24 11:22:43",
  66. "wthDate": "2016-02-29 00:00:00",
  67. "wthIcon": "wi-day-sunny",
  68. "wthId": 6
  69. },
  70. {
  71. "cityCode": "CN101210101",
  72. "tempMax": "20",
  73. "tempMin": "5",
  74. "type1": "晴",
  75. "type2": "晴",
  76. "updateTime": "2016-02-24 11:22:43",
  77. "wthDate": "2016-03-01 00:00:00",
  78. "wthIcon": "wi-day-sunny",
  79. "wthId": 7
  80. }
  81. ]
  82. },
  83. "err": "nothing",
  84. "msg": "success",
  85. "re": {},
  86. "reErr": {},
  87. "statusNo": 200
  88. }
     - 参数:
         1. `forecast`:未来七天天气预报
             - `wthId`:天气代码
             - `cityCode`: 城市编码
             - `wthDate`: 天气日期 
             - `tempMax`: 最高温度
             - `tempMin`: 最低温度
             - `type1`: 天气类型1 
             - `type2`: 天气类型2 
             - `wthIcon`: 天气图标
             - `updateTime`:更新时间

API.WI02、更新天气数据接口


  1. {
  2. "data": "恭喜你!共2个城市天气更新已完成!",
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 200
  8. }
  1. {
  2. "data": {
  3. "updateData": [
  4. {
  5. "cityCode": "CN101210101",
  6. "tempMax": "13",
  7. "tempMin": "4",
  8. "type1": "多云",
  9. "type2": "多云",
  10. "updateTime": "2016-02-25 15:43:04",
  11. "wthDate": "2016-02-25 00:00:00",
  12. "wthIcon": "wi-day-cloudy",
  13. "wthId": 1
  14. },
  15. {
  16. "cityCode": "CN101210101",
  17. "tempMax": "14",
  18. "tempMin": "6",
  19. "type1": "阴",
  20. "type2": "多云",
  21. "updateTime": "2016-02-25 15:43:04",
  22. "wthDate": "2016-02-26 00:00:00",
  23. "wthIcon": "wi-day-windy",
  24. "wthId": 2
  25. },
  26. {
  27. "cityCode": "CN101210101",
  28. "tempMax": "18",
  29. "tempMin": "8",
  30. "type1": "多云",
  31. "type2": "多云",
  32. "updateTime": "2016-02-25 15:43:04",
  33. "wthDate": "2016-02-27 00:00:00",
  34. "wthIcon": "wi-day-cloudy",
  35. "wthId": 3
  36. },
  37. {
  38. "cityCode": "CN101210101",
  39. "tempMax": "19",
  40. "tempMin": "6",
  41. "type1": "多云",
  42. "type2": "阴",
  43. "updateTime": "2016-02-25 15:43:04",
  44. "wthDate": "2016-02-28 00:00:00",
  45. "wthIcon": "wi-day-cloudy",
  46. "wthId": 4
  47. },
  48. {
  49. "cityCode": "CN101210101",
  50. "tempMax": "12",
  51. "tempMin": "3",
  52. "type1": "多云",
  53. "type2": "晴",
  54. "updateTime": "2016-02-25 15:43:04",
  55. "wthDate": "2016-02-29 00:00:00",
  56. "wthIcon": "wi-day-cloudy",
  57. "wthId": 5
  58. },
  59. {
  60. "cityCode": "CN101210101",
  61. "tempMax": "14",
  62. "tempMin": "6",
  63. "type1": "晴",
  64. "type2": "多云",
  65. "updateTime": "2016-02-25 15:43:04",
  66. "wthDate": "2016-03-01 00:00:00",
  67. "wthIcon": "wi-day-sunny",
  68. "wthId": 6
  69. },
  70. {
  71. "cityCode": "CN101210101",
  72. "tempMax": "17",
  73. "tempMin": "9",
  74. "type1": "晴",
  75. "type2": "阴",
  76. "updateTime": "2016-02-25 15:43:04",
  77. "wthDate": "2016-03-02 00:00:00",
  78. "wthIcon": "wi-day-sunny",
  79. "wthId": 7
  80. }
  81. ]
  82. },
  83. "err": "nothing",
  84. "msg": "success",
  85. "re": {},
  86. "reErr": {},
  87. "statusNo": 200
  88. }

API.WI03、更新全部天气数据接口 1.5.0


  1. {
  2. "data": "恭喜你!共2个城市天气更新已完成!",
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 200
  8. }

API.SMS01、通用发送短信接口


  1. {
  2. "data": {},
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {
  6. "Code": 0,
  7. "Descript": "短信提交成功"
  8. },
  9. "reErr": {},
  10. "statusNo": 200
  11. }

API.RS04、设备信息数据接口


  1. {
  2. "data": {
  3. "deviceinfoApi": {
  4. "APKPATH": null,
  5. "deviceinfo": {
  6. "authEndtime": "2017-02-02 15:37:32",
  7. "conn_id": {
  8. "apk": "bb1a7c27-161f-49aa-b049-39adde803cba",
  9. "detail": "4d5bd08d-8ba1-4808-b6a4-f3b6fd245e52"
  10. },
  11. "createTime": "2016-02-02 15:37:32",
  12. "dvcId": 3,
  13. "dvcName": "设备1",
  14. "dvc_imei": "1",
  15. "hotelId": "123456",
  16. "lastOntime": "2016-02-02 15:37:32",
  17. "logTime": "2016-02-02 15:37:32",
  18. "resIndex": 1,
  19. "scrollTime": 10000,
  20. "scrollTxt": "欢迎光临!",
  21. "sta": "T",
  22. "starturl": "/#/index/1",
  23. "targetVersion": "1.0.0",
  24. "thisVersion": "1.0.0",
  25. "tplId": 1,
  26. "uId": 1
  27. }
  28. }
  29. },
  30. "err": "nothing",
  31. "msg": "success",
  32. "re": {},
  33. "reErr": {},
  34. "statusNo": 200
  35. }

API.RS05、更新模板文件接口


  1. {
  2. "data": {},
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 200
  8. }

API.RS06、更新模板文件和模板视图接口 1.4.0版本废弃


  1. tplCode=tpl00002
  2. tplFiles={
  3. "imgFiles": {
  4. "bg": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-bg-aladdin-back02.jpg",
  5. "border01": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_01.png",
  6. "border02": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_02.png"
  7. },
  8. "cssFiles": [
  9. {"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-base-v100.min.css"},
  10. {"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-partial-v100.min.css"},
  11. {"css": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tpl-tpl00002.css"}
  12. ],
  13. "jsFiles": {"js": "tmp1.js"},
  14. "otherFiles": {"icon1": "icon1.png"},
  15. "styleData": {"font_color": "#dc4bd1"}
  16. }
  17. tplViewImg=["http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tplView-tpl00002.jpg"]
  1. {
  2. "data": "更新成功!",
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 200
  8. }
  1. {
  2. "data": {},
  3. "err": "TPLCODE IS NOT ESISTS!",
  4. "msg": "TPLCODE不存在,请检查后重试!",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 400
  8. }

API.RS07、更新模板文件接口 1.4.0


  1. {
  2. "tplCode": "tpl00002",
  3. "tplFiles": {
  4. "imgFiles": {
  5. "bg": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-bg-aladdin-back02.jpg",
  6. "border01":"http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_01.png",
  7. "border02":"http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_02.png"
  8. },
  9. "cssFiles": [
  10. {"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-base-v100.min.css"},
  11. {"css": "http://qiniu-aladin.dlhis.com/css%2Faladin-partial-v100.min.css"},
  12. {"css": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tpl-tpl00002.css"}
  13. ],
  14. "jsFiles": [{"js": "tmp1.js"}],
  15. "otherFiles": {"icon1": "icon1.png"},
  16. "styleData": {"font_color": "#dc4bd1"}
  17. }
  18. }
  1. {
  2. "data": "更新成功!",
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 200
  8. }
  1. {
  2. "data": {},
  3. "err": "TPLCODE IS NOT ESISTS!",
  4. "msg": "TPLCODE不存在,请检查后重试!",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 400
  8. }

API.RS08、更新模板预览图接口 1.4.0


  1. {
  2. "tplCode": "tpl00002",
  3. "tplViewImg": ["http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tplView-tpl00002.jpg"]
  4. }
  1. {
  2. "data": "更新成功!",
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 200
  8. }
  1. {
  2. "data": {},
  3. "err": "TPLCODE IS NOT ESISTS!",
  4. "msg": "TPLCODE不存在,请检查后重试!",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 400
  8. }

API.RS09、添加模板接口 1.5.0


  1. {
  2. "tplName": "添加测试",
  3. "tplDes": "免费模板-测试",
  4. "tplFiles": {
  5. "imgFiles": {
  6. "bg": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-bg-aladdin-back02.jpg",
  7. "border01": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_01.png",
  8. "border02": "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-border-light-02_02.png"
  9. },
  10. "cssFiles": [
  11. "http://qiniu-aladin.dlhis.com/css%2Faladin-base-v100.min.css",
  12. "http://qiniu-aladin.dlhis.com/css%2Faladin-partial-v100.min.css",
  13. "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tpl-tpl00002.css"
  14. ],
  15. "jsFiles": [
  16. "tmp1.js"
  17. ],
  18. "otherFiles": {
  19. "icon1": "icon1.png"
  20. },
  21. "styleData": {
  22. "font_color": "#dc4bd1"
  23. }
  24. },
  25. "tplViewImg": [
  26. "http://qiniu-aladin.dlhis.com/aladin-v-0.0.1-tplView-tpl00002.jpg"
  27. ]
  28. }
  1. {
  2. "data": "添加成功!",
  3. "err": "nothing",
  4. "msg": "success",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 200,
  8. "version": "1.4.0"
  9. }
  1. {
  2. "data": {},
  3. "err": "IMGFILES IS WRONG FORMAT!",
  4. "msg": "IMGFILES不符合格式,请仔细检查格式!",
  5. "re": {},
  6. "reErr": {},
  7. "statusNo": 400,
  8. "version": "1.4.0"
  9. }

API.WS01、桌面通知


DOMAIN 主机域名定义 env
{{WSAPI}}
TEST =
DEVE = http://ws.dev.dlhis.com
PREPRO
PRODUCTION
- 请求类型:POST
- 请求地址(url):{{WSAPI}}/sock/order
- 接口参数:RequestBody json型

参数 中文名称 类型 举例 说明
u_id 推送用户 String "36"
icon 通知图标 String "http://qiniu-aladin.dlhis.com/dlhis_logo.png?imageView2/1/w/90/h/90" 图标在七牛的链接地址
title 通知标题 String "标题"
body 通知内容 String "内容"
url 通知的连接地址 String "" 没有就为空
  1. {
  2. "u_id":"36",
  3. "icon": "http://qiniu-aladin.dlhis.com/dlhis_logo.png?imageView2/1/w/90/h/90",
  4. "title": "标题",
  5. "body": "内容",
  6. "url": ""
  7. }
  1. {
  2. "msg": "success"
  3. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注