简要描述:

更新用户中心首页的指定配置块

涉及到的数据表:

enet_cms_user_info // 用户信息(token来源)
enet_classic_scheme_library

请求URL:

  1. http://localhost:8081/service/api/cms/userCenter/preview/chunk/update

请求方式:

  • POST
  • 参数

    • curl -POST
      1. http://localhost:8081/service/api/cms/userCenter/preview/chunk/update?accessKey=mini_profile__app6546d23ef636e_a449006c-a570-4ec5-9082-179660a795c3&userFlag=5d55e70ee071a533b06770291f388eb0_357

      表头:

      1. Content-Typeapplication/json

      URL参数:

      | 参数名 | 类型 | 说明 | | —- | —- | —- | | accessKey | String | 用户token | | userFlag | String | 用户唯一标识 |
  • 以上参数用作用户Token校验。

用户唯一标识

请求参数:

参数名 是否必须 类型 说明
id false Long scheme主键,默认是64
chunkName true String 用户中心首页块节点名称
chunkContent true String 更新后的用户中心首页JSON(必须是JSON字符串)

输入实例:

  1. {
  2. "id": 64,
  3. "chunkName": "schlibPage",
  4. "chunkContent": "{\"ability\":{\"name\":\"Feature\",\"list\":[{\"name\":\"Cameras\",\"num\":\"100\",\"unit\":\"\"}]},\"specialFunction\":{\"name\":\"Advantage\",\"version\":2,\"list\":[{\"name\":\"Largebufferandnodelay\",\"num\":\"Most24-port100Munmanagedswitchescanonlyconnectwith162MPcameras,butwith2Mbuffer,Real-Easyswitcheskeephighspeedwithallportsconnected.\",\"unit\":\"\"}]},\"specialProduct\":{\"name\":\"Product\",\"list\":[{\"name\":\"RG-NBS2028G-E\",\"num\":\"Meantimebetweenfailuresisover200thousandhours\nLargebufferandnodelay\nLightningprotection\",\"unit\":\"\"},{\"name\":\"RG-NBS1826GC-P\",\"num\":\"StandardSFPuplinkwhichavoidsSPoFandreducecostsby20%\nLargebufferforCCTV\nAutopowerselectionandshortcircuitprotection\",\"unit\":\"\"}]},\"networkRule\":{\"name\":\"SchemeOption\",\"ruleTable1\":{\"name\":\"列优先3*3表格,行*列\",\"type\":\"column\",\"row\":5,\"column\":3,\"list\":[{\"index\":1,\"name\":\"第1列\",\"list\":[{\"index\":1,\"name\":\"Cameras\",\"num\":\"\",\"unit\":\"\"},{\"index\":2,\"name\":\"CoreSwitch\",\"num\":\"\",\"unit\":\"\"},{\"index\":3,\"name\":\"Switch\",\"num\":\"\",\"unit\":\"\"}]},{\"index\":2,\"name\":\"第2列\",\"list\":[{\"index\":1,\"name\":\"1002MPCameras\",\"num\":\"\",\"unit\":\"\"},{\"index\":2,\"name\":\"RG-NBS2028G-E\",\"num\":\"\",\"unit\":\"\"},{\"index\":3,\"name\":\"RG-NBS1826GC-P\",\"num\":\"\",\"unit\":\"\"}]},{\"index\":3,\"name\":\"第3列\",\"list\":[{\"index\":1,\"name\":\"2002MPCameras\",\"num\":\"\",\"unit\":\"\"},{\"index\":2,\"name\":\"RG-NBS5628XG\",\"num\":\"\",\"unit\":\"\"},{\"index\":3,\"name\":\"RG-NBS1826GC-P\",\"num\":\"\",\"unit\":\"\"}]}]}},\"imgs\":{\"topologicalImgs\":{\"name\":\"Topology\",\"list\":[{\"title\":\"Topology1\",\"path\":\"/admin/resources/skin/default/images/weixin/schlib/监控场景_拓扑图.png\"}]},\"layoutImgs\":{\"list\":[{\"path\":\"/admin/resources/skin/default/images/weixin/schlib/监控场景_户型图1.png\",\"title\":\"Floorplan1\"}],\"name\":\"Floorplan\"}},\"selectButtons\":{\"name\":\"可选按钮\",\"list\":[{\"name\":\"DeviceListfor1002MPCameras\",\"schemeId\":42,\"version\":6},{\"name\":\"DeviceListfor2002MPCameras\",\"schemeId\":43,\"version\":66}]}}"
  5. }

返回参数:

参数名 是否必须 类型 说明
status_msg true String 错误信息
status_code true String 错误代码
-0正确
-1001无块节点名称
-1002没有找到该主页
-1003主页无此JSON属性

返回示例:

  1. {
  2. "status_msg": "ok",
  3. "status_code": 0
  4. }