/*
 * 接口
 * */
import request from './request'
/*
 * 微信
 */

// 微信授权
export const wxAuth = (url = location.href) => request({
  method: 'GET',
  url: '/customer/auth',
  params: {
    next: encodeURIComponent(url)
  }
})

/**
 * 获取微信签名
 */

export const getWxSign = (url = location.href) => request({
  method: 'GET',
  url: '/wechat/signature',
  params: {
    url: url,
    wechatAccount: location.href.indexOf('/partner') > -1 ? 'partner' : 'default'
  }
})
