充值更新

This commit is contained in:
GaoHao
2024-11-18 14:59:20 +08:00
parent bca2b6a3f7
commit 919350c2c0
4 changed files with 71 additions and 34 deletions

View File

@@ -8,8 +8,10 @@ const proxyApi = "/api"
// const proxyApiwws = 'ws://192.168.1.15:9888/netty' // 测试
// const proxyApi = 'https://wxcashiertest.sxczgkj.cn/cashierService' // 测试
// const proxyApiwws = 'wss://wxcashiertest.sxczgkj.cn/netty' // 测试
const proxyApi = 'https://pre-cashier.sxczgkj.cn/cashierService' // 预发布
const proxyApiwws = 'wss://pre-cashier.sxczgkj.cn/netty' // 预发布
// const proxyApi = 'https://pre-cashier.sxczgkj.cn/cashierService' // 预发布
// const proxyApiwws = 'wss://pre-cashier.sxczgkj.cn/netty' // 预发布
const proxyApi = 'https://cashier.sxczgkj.cn/cashierService' // 预发布
const proxyApiwws = 'wss://cashier.sxczgkj.cn/netty' // 预发布
// #endif
// #ifdef H5

View File

@@ -267,28 +267,28 @@ const getUserInfo = function (successCallback, failCallback) {
// #endif
// #ifdef MP-ALIPAY
return new Promise((resolve, reject) => {
my.getAuthCode({
scopes: 'auth_user',
success: (data) => {
console.log(data)
// 支付宝小程序环境
my.getAuthUserInfo({
success: async (infoRes) => {
let res = await Api.userwxlogin({
code: data.authCode, //临时登录凭证
rawData: JSON.stringify(infoRes),
source: 'alipay'
})
if (res.code == 0) {
resolve(res)
}
},
fail: (err) => {}
});
}
});
})
return new Promise((resolve, reject) => {
my.getAuthCode({
scopes: 'auth_base',
success: async (data) => {
console.log(data)
// 支付宝小程序环境
// my.getAuthUserInfo({
// success: async (infoRes) => {
let res = await Api.userwxlogin({
code: data.authCode, //临时登录凭证
// rawData: JSON.stringify(infoRes),
source: 'alipay'
})
if (res.code == 0) {
resolve(res)
}
// },
// fail: (err) => {}
// });
}
});
})
// #endif
}