import request from '@/utils/request' import Qs from 'qs'; //微信支付 export function wxpay(orderId) { return request({ url: '/wxPay/wxJsapiPay', data: { id: orderId }, method: 'get', }) } //根据code换取openid export function getDataByCode(code) { return request({ url: '/wechat/findUserInfo/' + code, params: {}, method: 'get', }) } //获取用户信息 export function getDataByOpenId(openId) { return request({ url: '/mobile/personInfoApi/findByOpenId', data: Qs.stringify({ openId: openId }), method: 'post', }) } //获得配置 export function getConfig() { return request({ url: '/wechat/getConfig', data: { url: window.location.href.split('#')[0] }, method: 'get', }) }