third.js 1013 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import request from '@/sheep/request';
  2. export default {
  3. // 微信相关
  4. wechat: {
  5. // 小程序订阅消息
  6. subscribeTemplate: (params) =>
  7. request({
  8. url: 'third/wechat/subscribeTemplate',
  9. method: 'GET',
  10. params: {
  11. platform: 'miniProgram',
  12. },
  13. custom: {
  14. showError: false,
  15. showLoading: false,
  16. },
  17. }),
  18. // 获取微信小程序码
  19. getWxacode: async (path, query) => {
  20. return await request({
  21. url: '/member/social-user/wxa-qrcode',
  22. method: 'POST',
  23. data: {
  24. scene: query,
  25. path,
  26. checkPath: false, // TODO 开发环境暂不检查 path 是否存在
  27. },
  28. });
  29. },
  30. },
  31. // 苹果相关
  32. apple: {
  33. // 第三方登录
  34. login: (data) =>
  35. request({
  36. url: 'third/apple/login',
  37. method: 'POST',
  38. data,
  39. custom: {
  40. showSuccess: true,
  41. loadingMsg: '登陆中',
  42. },
  43. }),
  44. },
  45. };