模板协议样例

  1. {
  2. "templateId": 123,
  3. "theme": "blue",
  4. "templateName": "模板名称",
  5. "platform": [{ "label": "5G商城·云网商城", "value": "1" }],
  6. "moduleList": [
  7. {
  8. "moduleId": 123,
  9. "moduleCode": "topNav",
  10. "sort": 0,
  11. "anchor": {
  12. "show": true,
  13. "title": "左侧电梯导航中的模块名称"
  14. },
  15. "contentAttrs": [{}],
  16. "displayAttrs": [{}]
  17. }
  18. ]
  19. }

模板协议

属性 类型 默认值 说明
templateId Number -
templateName String -
theme String blue 首页主题,可选项:blue、orange、red
platform Object[] 模板被投放的平台信息。如:[{ “label”: “5G商城·云网商城”, “value”: “1” }]
moduleList Object[] - 模块信息,如:顶栏,轮播、重点推荐、商品等

moduleList

属性 类型 默认值 说明
moduleId Number 模块id
moduleCode String - 可选值:topNav、slideshow、productList、solution、news、partner、certification、recommend
sort Number - 排序(即索引顺序)
anchor Object {
show: false,
text: “标题”
}
是否在左侧电梯中显示;
显示时的标题 ,8个字符
contentAttrs Object - 内容属性
displayAttrs Object - 显示属性

不同moduleCode值, 对应的contentAttrsdisplayAttrs 对象会有不同。

topNav - 顶栏

  1. {
  2. "moduleId": 0,
  3. "sort":0,
  4. "anchor":{
  5. "show":false
  6. },
  7. "moduleCode":"topNav",
  8. "contentAttrs":{
  9. "logo":{
  10. "picture":[
  11. {
  12. "fileId": "1399298959351156738",
  13. "fileName": "logo.png",
  14. "fileUrl": "http://172.21.96.66:18888/group1/M00/00/1A/rBVgQmC0rlWAY5qiAAAVD-2zbDQ464.png"
  15. }
  16. ],
  17. "slogon": ""
  18. }
  19. }
  20. }

slideshow - 轮播

  1. {
  2. "moduleId": 1,
  3. "sort":1,
  4. "anchor":{
  5. "show":false
  6. },
  7. "moduleCode": "slideshow",
  8. "contentAttrs": {
  9. "group": [
  10. {
  11. "picture": "http://xxx.jpg",
  12. "title": "轮播主题",
  13. "description": "轮播简介",
  14. "buttons": [
  15. {
  16. "text": "按钮名称",
  17. "url": "链接地址"
  18. }
  19. ],
  20. "url":"点击轮播图片的跳转地址"
  21. }
  22. ]
  23. },
  24. "displayAttrs": {
  25. "height": 535, // 535250两个可选值
  26. "title": {
  27. "show": true,
  28. "text": "轮播标题"
  29. },
  30. "description": {
  31. "show": true,
  32. "text": "轮播简介"
  33. }
  34. }
  35. }

product - 爆款商品

  1. {
  2. "moduleId": 2,
  3. "sort": 2,
  4. "anchor": {
  5. "show": true,
  6. "text": "爆款商品"
  7. },
  8. "moduleCode": "product",
  9. "contentAttrs": {
  10. "group": [
  11. {
  12. "title": "热门", // 品类名称
  13. "headline": {
  14. "show": true,
  15. "activity": {
  16. "title": "活动标题",
  17. "description": "简介",
  18. "link": {
  19. "text": "",
  20. "url": ""
  21. }
  22. },
  23. "product": [
  24. {
  25. "label": "商品名称",
  26. "value": "productTitle"
  27. },
  28. {
  29. "label": "商品简介",
  30. "value": "productDesc"
  31. },
  32. {
  33. "label": "商品特性",
  34. "value": "productDesc"
  35. },
  36. {
  37. "label": "商品简介",
  38. "value": "productFeature"
  39. }
  40. ]
  41. },
  42. "productList": [
  43. {
  44. "productId": 1,
  45. "productName": "商品名称",
  46. "businessType": "业务类型",
  47. "tags": [
  48. { "label": "hot", "value": "hot" },
  49. { "label": "new", "value": "new" }
  50. ]
  51. }
  52. ],
  53. "tags": [
  54. { "label": "hot", "value": "hot" },
  55. { "label": "new", "value": "new" }
  56. ],
  57. "dir": { "label": "一级目录", "value": 1 }
  58. }
  59. ]
  60. },
  61. "displayAttrs": {
  62. "layout": "style1", // 布局风格,值style1,style2类推
  63. "sectionTitle": {
  64. "show": true,
  65. "text": "段落标题"
  66. },
  67. "sectionDesc": {
  68. "show": true,
  69. "text": "段落简介"
  70. },
  71. "more": {
  72. "show": true,
  73. "text": "段落简介",
  74. "url": "链接"
  75. }
  76. }
  77. }

solution - 解决方案

  1. {
  2. "moduleId": 3,
  3. "sort": 3,
  4. "anchor": {
  5. "show": true,
  6. "text": "解决方案"
  7. },
  8. "moduleCode": "solution",
  9. "contentAttrs": {
  10. "group": [
  11. {
  12. "category": "应用场景",
  13. "solutionTitleCN": "方案名称 - 中文",
  14. "solutionTitleEN": "方案名称 - 英文",
  15. "solutionDesc": "方案简介1",
  16. "customerTitle": "方案简介2",
  17. "customerDesc": "客户简介",
  18. "solutionLogo":"图标地址",
  19. "customerLogo":"图标地址",
  20. "relaProdocts": [
  21. {
  22. "productId": 1,
  23. "productName": "产品名称"
  24. }
  25. ]
  26. }
  27. ]
  28. },
  29. "displayAttrs": {
  30. "layout": "style1", // 布局风格,值style1,style2类推
  31. "sectionTitle": {
  32. "show": true,
  33. "text": "段落标题"
  34. },
  35. "sectionDesc": {
  36. "show": true,
  37. "text": "段落简介"
  38. },
  39. "more": {
  40. "show": true,
  41. "text": "段落简介",
  42. "url": "链接"
  43. }
  44. }
  45. }

news - 最新动态

  1. {
  2. "moduleId": 4,
  3. "sort": 4,
  4. "anchor": {
  5. "show": true,
  6. "text": "最新动态"
  7. },
  8. "moduleCode": "news",
  9. "contentAttrs": {
  10. "group": [
  11. {
  12. "title": "资讯标题",
  13. "id":1,
  14. "createDate": "2021-04-24",
  15. "img":"资讯配图",
  16. }
  17. ]
  18. },
  19. "displayAttrs": {
  20. "layout": "style1", // 布局风格,值style1,style2类推
  21. "sectionTitle": {
  22. "show": true,
  23. "text": "段落标题"
  24. },
  25. "sectionDesc": {
  26. "show": true,
  27. "text": "段落简介"
  28. },
  29. "more": {
  30. "show": true,
  31. "text": "段落简介",
  32. "url": "链接"
  33. }
  34. }
  35. }

partner - 合作伙伴

  1. {
  2. "moduleId": 5,
  3. "sort": 5,
  4. "anchor": {
  5. "show": true,
  6. "text": "合作伙伴"
  7. },
  8. "moduleCode": "partner",
  9. "contentAttrs": {
  10. "group": [
  11. {
  12. "id":1,
  13. "name": "合作伙伴名称",
  14. "logo": "logo图片"
  15. }
  16. ]
  17. },
  18. "displayAttrs": {
  19. "layout": "style1", // 布局风格,值style1,style2类推
  20. "sectionTitle": {
  21. "show": true,
  22. "text": "段落标题"
  23. },
  24. "sectionDesc": {
  25. "show": true,
  26. "text": "段落简介"
  27. },
  28. "more": {
  29. "show": true,
  30. "text": "段落简介",
  31. "url": "链接"
  32. }
  33. }
  34. }

certification - 资质证明

  1. {
  2. "moduleId": 6,
  3. "sort": 6,
  4. "anchor": {
  5. "show": true,
  6. "text": "资质证明"
  7. },
  8. "moduleCode": "certification",
  9. "contentAttrs": {
  10. "group": [
  11. {
  12. "Id":1,
  13. "name": "资质名称",
  14. "logo": "logo图片"
  15. }
  16. ]
  17. },
  18. "displayAttrs": {
  19. "layout": "style1", // 布局风格,值style1,style2类推
  20. "sectionTitle": {
  21. "show": true,
  22. "text": "段落标题"
  23. },
  24. "sectionDesc": {
  25. "show": true,
  26. "text": "段落简介"
  27. },
  28. "more": {
  29. "show": true,
  30. "text": "段落简介",
  31. "url": "链接"
  32. }
  33. }
  34. }

recommend - 重点推荐

  1. {
  2. "moduleId": 6,
  3. "sort": 6,
  4. "anchor": {
  5. "show": true,
  6. "text": "重点推荐"
  7. },
  8. "moduleCode": "recommend",
  9. "contentAttrs": {
  10. "group": [
  11. {
  12. "Id":1,
  13. "name": "资质名称",
  14. "logo": "logo图片"
  15. }
  16. ]
  17. },
  18. "displayAttrs": {
  19. "layout": "style1", // 布局风格,值style1,style2类推
  20. "sectionTitle": {
  21. "show": true,
  22. "text": "段落标题"
  23. },
  24. "sectionDesc": {
  25. "show": true,
  26. "text": "段落简介"
  27. },
  28. "more": {
  29. "show": true,
  30. "text": "段落简介",
  31. "url": "链接"
  32. }
  33. }
  34. }

获取模板(待补充)

请求地址 /api/homePageTemplate/getHomePageTemplate
请求方式 post

入参:

  1. {
  2. "templateId":"1397456704411709442"
  3. }

回参:

  1. {
  2. "resultCode": "0",
  3. "resultMsg": "SUCCESS",
  4. "resultData": {
  5. "moduleList": [
  6. {
  7. "displayAttrs": [
  8. {}
  9. ],
  10. "moduleCode": "模块名称",
  11. "anchor": {
  12. "show": true,
  13. "title": "左侧电梯导航中的模块名称"
  14. },
  15. "contentAttrs": [
  16. {}
  17. ],
  18. "sort": 0
  19. }
  20. ],
  21. "templateName": "4模4板测试",
  22. "theme": "blue",
  23. "templateId": "1397179293673664514",
  24. "platform": [
  25. {
  26. "label": "5G商城·云网商城",
  27. "value": "1"
  28. }
  29. ],
  30. "status": 0
  31. },
  32. "resultMsgCode": null
  33. }

保存模板(待补充)

请求地址 /api/homePageTemplate/saveTemplateContent
请求方式 post

入参:

  1. {
  2. "templateId": "1397179293673664514",
  3. "theme": "blue",
  4. "templateName": "4模4板测试",
  5. "status": 0,
  6. "platform": [{ "label": "5G商城·云网商城", "value": "1" }],
  7. "moduleList": [
  8. {
  9. "moduleCode": "模块名称",
  10. "sort": 0,
  11. "anchor": {
  12. "show": true,
  13. "title": "左侧电梯导航中的模块名称"
  14. },
  15. "contentAttrs": [{}],
  16. "displayAttrs": [{}]
  17. }
  18. ]
  19. }

回参:

  1. {
  2. "resultCode": "0",
  3. "resultMsg": "SUCCESS",
  4. "resultData": null,
  5. "resultMsgCode": null
  6. }