wx.js 489 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * 接口
  3. * */
  4. import request from './request'
  5. /*
  6. * 微信
  7. */
  8. // 微信授权
  9. export const wxAuth = (url = location.href) => request({
  10. method: 'GET',
  11. url: '/customer/auth',
  12. params: {
  13. next: encodeURIComponent(url)
  14. }
  15. })
  16. /**
  17. * 获取微信签名
  18. */
  19. export const getWxSign = (url = location.href) => request({
  20. method: 'GET',
  21. url: '/wechat/signature',
  22. params: {
  23. url: url,
  24. wechatAccount: location.href.indexOf('/partner') > -1 ? 'partner' : 'default'
  25. }
  26. })