Links.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266
  1. // 常量:链接类型 - 页面
  2. const LINK_TYPE_PAGE = 'PAGE'
  3. // 基础页面
  4. const basics = {
  5. title: '基础页面',
  6. key: 'basics',
  7. data: [
  8. {
  9. id: 'cb344ba',
  10. title: '商城首页',
  11. type: LINK_TYPE_PAGE,
  12. param: {
  13. path: 'pages/index/index'
  14. }
  15. },
  16. {
  17. id: 'c37c2ee',
  18. title: '分类页',
  19. type: LINK_TYPE_PAGE,
  20. param: {
  21. path: 'pages/category/index'
  22. }
  23. },
  24. {
  25. id: 'bb2f7f1',
  26. title: '购物车',
  27. type: LINK_TYPE_PAGE,
  28. param: {
  29. path: 'pages/cart/index'
  30. }
  31. },
  32. {
  33. id: 'a013c9e',
  34. title: '个人中心',
  35. type: LINK_TYPE_PAGE,
  36. param: {
  37. path: 'pages/user/index'
  38. }
  39. },
  40. {
  41. id: '593fe1f',
  42. title: '会员登录页',
  43. type: LINK_TYPE_PAGE,
  44. param: {
  45. path: 'pages/login/index'
  46. }
  47. }
  48. ]
  49. }
  50. // 商城页面
  51. const store = {
  52. title: '商城页面',
  53. key: 'store',
  54. data: [
  55. {
  56. id: '995bf1c',
  57. title: '商品列表页',
  58. type: LINK_TYPE_PAGE,
  59. param: {
  60. path: 'pages/goods/list',
  61. query: {}
  62. },
  63. form: [
  64. {
  65. key: 'query.categoryId',
  66. lable: '分类ID',
  67. tips: '商品管理 -> 商品分类'
  68. },
  69. {
  70. key: 'query.search',
  71. lable: '关键词',
  72. tips: '搜索的关键词,用于匹配商品名称'
  73. }
  74. ]
  75. },
  76. {
  77. id: '6wawb10',
  78. title: '商品详情页',
  79. type: LINK_TYPE_PAGE,
  80. param: {
  81. path: 'pages/goods/detail',
  82. query: {}
  83. },
  84. form: [
  85. {
  86. key: 'query.goodsId',
  87. lable: '商品ID',
  88. required: true,
  89. // value: '10001', // 默认值
  90. tips: '商品管理 - 商品列表' // 字段提示
  91. }
  92. ]
  93. },
  94. {
  95. id: '88lxeey',
  96. title: '商品搜索页',
  97. type: LINK_TYPE_PAGE,
  98. param: {
  99. path: 'pages/search/index'
  100. }
  101. },
  102. {
  103. id: '56sswhq',
  104. title: '领券中心',
  105. type: LINK_TYPE_PAGE,
  106. param: {
  107. path: 'pages/coupon/index'
  108. }
  109. }
  110. ]
  111. }
  112. // 个人中心
  113. const personal = {
  114. title: '个人中心',
  115. key: 'personal',
  116. data: [
  117. {
  118. id: '7b345f6',
  119. title: '我的订单',
  120. type: LINK_TYPE_PAGE,
  121. param: {
  122. path: 'pages/order/index',
  123. query: {}
  124. },
  125. form: [
  126. {
  127. key: 'query.dataType',
  128. lable: '订单类型',
  129. required: true,
  130. value: 'all', // 默认值
  131. tips: 'all 全部<br>payment 待支付<br>delivery 待发货<br>received 待收货' // 字段提示
  132. }
  133. ]
  134. },
  135. {
  136. id: 'c4f630d',
  137. title: '我的钱包页',
  138. type: LINK_TYPE_PAGE,
  139. param: {
  140. path: 'pages/wallet/index'
  141. }
  142. },
  143. {
  144. id: '792db19',
  145. title: '充值中心页',
  146. type: LINK_TYPE_PAGE,
  147. param: {
  148. path: 'pages/wallet/recharge/index'
  149. }
  150. },
  151. {
  152. id: '03b9290',
  153. title: '我的优惠券',
  154. type: LINK_TYPE_PAGE,
  155. param: {
  156. path: 'pages/my-coupon/index'
  157. }
  158. },
  159. {
  160. id: '569b0b0',
  161. title: '会员积分明细',
  162. type: LINK_TYPE_PAGE,
  163. param: {
  164. path: 'pages/points/log'
  165. }
  166. },
  167. {
  168. id: '0c25051',
  169. title: '收货地址',
  170. type: LINK_TYPE_PAGE,
  171. param: {
  172. path: 'pages/address/index'
  173. }
  174. },
  175. {
  176. id: '3558c27',
  177. title: '帮助中心',
  178. type: LINK_TYPE_PAGE,
  179. param: {
  180. path: 'pages/help/index'
  181. }
  182. }
  183. ]
  184. }
  185. // 其他页面
  186. const other = {
  187. title: '其他页面',
  188. key: 'other',
  189. data: [
  190. {
  191. id: '91th4ss',
  192. title: '自定义页',
  193. type: LINK_TYPE_PAGE,
  194. param: {
  195. path: 'pages/custom/index',
  196. query: {}
  197. },
  198. form: [
  199. {
  200. key: 'query.pageId',
  201. lable: '页面ID',
  202. required: true,
  203. tips: '店铺管理 -> 店铺页面'
  204. }
  205. ]
  206. },
  207. {
  208. id: 'ugrauzv',
  209. title: '资讯列表页',
  210. type: LINK_TYPE_PAGE,
  211. param: {
  212. path: 'pages/article/index',
  213. query: {}
  214. },
  215. form: [
  216. {
  217. key: 'query.categoryId',
  218. lable: '分类ID',
  219. tips: '内容管理 -> 文章分类',
  220. value: ''
  221. }
  222. ]
  223. },
  224. {
  225. id: 'u1v6aux',
  226. title: '资讯详情页',
  227. type: LINK_TYPE_PAGE,
  228. param: {
  229. path: 'pages/article/detail',
  230. query: {}
  231. },
  232. form: [
  233. {
  234. key: 'query.articleId',
  235. lable: '文章ID',
  236. required: true,
  237. tips: '内容管理 -> 文章列表'
  238. }
  239. ]
  240. }
  241. ]
  242. }
  243. // // 门店 - 拨打电话 - 暂未实现
  244. // const callPhone = {
  245. // id: 'cb344ba',
  246. // title: '拨打电话',
  247. // type: 'callPhone',
  248. // param: {
  249. // phoneNumber: '13212341234'
  250. // },
  251. // form: [
  252. // {
  253. // key: 'phoneNumber',
  254. // lable: '电话号码',
  255. // tips: ''
  256. // }
  257. // ]
  258. // }
  259. export const linkList = [basics, store, personal, other]