app.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import request from '@/sheep/request';
  2. import { baseUrl } from '@/sheep/config';
  3. export default {
  4. // TODO 芋艿:测试
  5. test: () =>
  6. request({
  7. url: '/app-api/promotion/decorate/list',
  8. params: {
  9. page: 1
  10. },
  11. custom: {
  12. showError: false,
  13. showLoading: false,
  14. },
  15. }),
  16. // 系统初始化
  17. init: (templateId) =>
  18. request({
  19. url: 'init',
  20. params: {
  21. templateId,
  22. },
  23. custom: {
  24. showError: false,
  25. showLoading: false,
  26. },
  27. }),
  28. // 同步客户端页面到后端
  29. pageSync: (pages) =>
  30. request({
  31. url: 'pageSync',
  32. method: 'POST',
  33. data: {
  34. pages,
  35. },
  36. custom: {
  37. showError: false,
  38. showLoading: false,
  39. },
  40. }),
  41. // 发送短信
  42. sendSms: (data) =>
  43. request({
  44. url: 'sendSms',
  45. method: 'POST',
  46. data,
  47. custom: {
  48. showSuccess: true,
  49. loadingMsg: '发送中',
  50. },
  51. }),
  52. // 自定义页面
  53. page: (id) =>
  54. request({
  55. url: 'page/' + id,
  56. method: 'GET',
  57. }),
  58. //小程序直播
  59. mplive: {
  60. getRoomList: (ids) =>
  61. request({
  62. url: 'app/mplive/getRoomList',
  63. method: 'GET',
  64. params: {
  65. ids: ids.join(','),
  66. }
  67. }),
  68. getMpLink: () =>
  69. request({
  70. url: 'app/mplive/getMpLink',
  71. method: 'GET'
  72. }),
  73. },
  74. };