wx.js 630 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import request from '@/utils/request'
  2. // #ifdef H5
  3. // 微信分享信息
  4. export function share(data) {
  5. return request({
  6. url: '/api/share',
  7. method: 'get',
  8. data
  9. });
  10. }
  11. //微信配置
  12. export function wechatConfig(data) {
  13. console.log(data)
  14. return request({
  15. url: '/api/wechat/config',
  16. method: 'get',
  17. data
  18. });
  19. }
  20. // 微信code地址
  21. export function wechatAuth(data) {
  22. return request({
  23. url: '/api/wechat/auth',
  24. method: 'get',
  25. data
  26. });
  27. }
  28. // #endif
  29. // #ifdef MP-WEIXIN
  30. // 微信code地址
  31. export function wechatMpAuth(data) {
  32. return request({
  33. url: '/api/wechat/mp_auth',
  34. method: 'post',
  35. data
  36. });
  37. }
  38. // #endif