goods.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. const List = [
  2. /* {
  3. uuid: '@uuid',
  4. svg: 'https://gitee.com/chu1204505056/image/raw/master/logo/vdb.svg',
  5. title: 'vue-datav-beautiful-pro',
  6. price: '敬请期待',
  7. label: ['vue', 'element-ui', '数据大屏'],
  8. company: 'vdb',
  9. url: 'https://github.com/vue-datav-beautiful',
  10. }, */
  11. {
  12. uuid: '@uuid',
  13. svg: 'https://gitee.com/chu1204505056/image/raw/master/logo/vab.svg',
  14. title: 'vue-admin-beautiful',
  15. price: '免费',
  16. label: ['vue', 'element-ui', 'MIT协议'],
  17. company: 'vab',
  18. url: 'https://github.com/chuzhixin/vue-admin-beautiful',
  19. },
  20. {
  21. uuid: '@uuid',
  22. image: 'https://gitee.com/chu1204505056/image/raw/master/goods/uview.gif',
  23. title: 'uview',
  24. price: '免费',
  25. label: ['uniapp', '跨平台', '组件'],
  26. company: '言信网络',
  27. url: 'http://uviewui.com',
  28. },
  29. {
  30. uuid: '@uuid',
  31. title: 'form-generator',
  32. icon: 'newspaper-line',
  33. price: '免费',
  34. label: ['element-ui', '表单设计器'],
  35. company: 'form-generator',
  36. url: 'https://mrhj.gitee.io/form-generator',
  37. },
  38. {
  39. uuid: '@uuid',
  40. title: 'OPSLI',
  41. image: 'https://gitee.com/chu1204505056/image/raw/master/goods/OPSLI.png',
  42. price: '免费',
  43. label: ['spring-boot', 'vue-admin-beautiful'],
  44. company: 'OPSLI',
  45. url: 'http://demo.opsli.arcinbj.com/',
  46. },
  47. {
  48. uuid: '@uuid',
  49. title: 'artemis',
  50. icon: 'compass-2-line',
  51. price: '免费',
  52. label: ['spring-boot', 'vue-admin-beautiful'],
  53. company: '迈特云',
  54. url: 'https://cloud.mate.vip/',
  55. },
  56. ]
  57. module.exports = [
  58. {
  59. url: '/goods/getList',
  60. type: 'get',
  61. response(config) {
  62. const { title, pageNo = 1, pageSize = 20 } = config.query
  63. const mockList = List.filter(
  64. (item) => !(title && item.title.indexOf(title) < 0)
  65. )
  66. const list = mockList.filter(
  67. (item, index) =>
  68. index < pageSize * pageNo && index >= pageSize * (pageNo - 1)
  69. )
  70. return {
  71. code: 200,
  72. msg: 'success',
  73. data: { list, ...{ total: mockList.length } },
  74. }
  75. },
  76. },
  77. ]