home.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. // 获取部门数据
  2. export function fakePosition() {
  3. return new Promise((resolute, reject) => {
  4. try {
  5. const detail = {
  6. position: "研发部",
  7. positionArr: ['研发部', '产品部']
  8. }
  9. resolute(detail);
  10. } catch (e) {
  11. //模拟接口请求失败
  12. reject(e);
  13. }
  14. })
  15. }
  16. // 获取公告数据
  17. export function fakeBannerList() {
  18. return new Promise((resolute, reject) => {
  19. try {
  20. const list = [{
  21. id: '1',
  22. img: '/static/images/home/banner1.png',
  23. url: 'https://bladex.vip'
  24. }, {
  25. id: '2',
  26. img: '/static/images/home/banner2.png',
  27. url: 'https://bladex.vip'
  28. }, {
  29. id: '3',
  30. img: '/static/images/home/banner3.png',
  31. url: 'https://sns.bladex.vip'
  32. }];
  33. resolute(list);
  34. } catch (e) {
  35. //模拟接口请求失败
  36. reject(e);
  37. }
  38. })
  39. }
  40. // 获取公告数据
  41. export function fakeNoticeList() {
  42. return new Promise((resolute, reject) => {
  43. try {
  44. const list = [{
  45. id: '1',
  46. img: '/static/images/home/focus.png',
  47. title: '天舟五号创造多个航天新纪录'
  48. }, {
  49. id: '2',
  50. img: '/static/images/home/service.png',
  51. title: '全国累计报告接种新冠疫苗超9亿剂次'
  52. }];
  53. resolute(list);
  54. } catch (e) {
  55. //模拟接口请求失败
  56. reject(e);
  57. }
  58. })
  59. }
  60. // 获取顶部按钮数据
  61. export function fakeNavButton() {
  62. return new Promise((resolute, reject) => {
  63. try {
  64. const list = [{
  65. name: '公积金',
  66. img: '/static/images/home/n1.png',
  67. url: ''
  68. },
  69. {
  70. name: '社保',
  71. img: '/static/images/home/n2.png',
  72. url: ''
  73. },
  74. {
  75. name: '医保',
  76. img: '/static/images/home/n3.png',
  77. url: ''
  78. },
  79. {
  80. name: '企业',
  81. img: '/static/images/home/n4.png',
  82. url: ''
  83. },
  84. {
  85. name: '教育',
  86. img: '/static/images/home/n5.png',
  87. url: ''
  88. }
  89. ];
  90. resolute(list);
  91. } catch (e) {
  92. //模拟接口请求失败
  93. reject(e);
  94. }
  95. })
  96. }
  97. // 获取服务按钮数据
  98. export function fakeServiceButton() {
  99. return new Promise((resolute, reject) => {
  100. try {
  101. const list = [{
  102. name: '工作流',
  103. img: '/static/images/home/s1.png',
  104. url: '/pages/plugin/workflow/pages/workbench/index'
  105. },
  106. {
  107. name: '工商年报',
  108. img: '/static/images/home/s2.png',
  109. url: ''
  110. },
  111. {
  112. name: '税务登记',
  113. img: '/static/images/home/s3.png',
  114. url: ''
  115. },
  116. {
  117. name: '健康码',
  118. img: '/static/images/home/s4.png',
  119. url: ''
  120. },
  121. {
  122. name: '便民服务',
  123. img: '/static/images/home/s5.png',
  124. url: ''
  125. },
  126. {
  127. name: '通办大厅',
  128. img: '/static/images/home/s6.png',
  129. url: ''
  130. },
  131. {
  132. name: '智能问答',
  133. img: '/static/images/home/s7.png',
  134. url: ''
  135. }
  136. ];
  137. resolute(list);
  138. } catch (e) {
  139. //模拟接口请求失败
  140. reject(e);
  141. }
  142. })
  143. }