修复支付宝支付问题

This commit is contained in:
2025-05-22 13:48:13 +08:00
parent 79c51b37ae
commit 096eba61e5
2 changed files with 3 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ export const Memberpay = defineStore('memberpay', {
// #endif // #endif
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
payType: 'aliPay', payType: 'aliPay',
openId: uni.cache.get('alipayOpenId').alipayOpenId, openId: uni.cache.get('alipayOpenId'),
// #endif // #endif
returnUrl: data.returnUrl, returnUrl: data.returnUrl,
buyerRemark: data.buyerRemark, buyerRemark: data.buyerRemark,

View File

@@ -58,6 +58,7 @@ export const Storelogin = defineStore('login', {
// 支付宝小程序环境 // 支付宝小程序环境
// my.getAuthUserInfo({ // my.getAuthUserInfo({
// success: async (infoRes) => { // success: async (infoRes) => {
console.log('MP-ALIPAY',data);
let res = await APIuserlogin({ let res = await APIuserlogin({
code: data.authCode, //临时登录凭证 code: data.authCode, //临时登录凭证
// rawData: JSON.stringify(infoRes), // rawData: JSON.stringify(infoRes),
@@ -68,7 +69,7 @@ export const Storelogin = defineStore('login', {
this.miniAppOpenId = res.userInfo.miniAppOpenId this.miniAppOpenId = res.userInfo.miniAppOpenId
this.userInfo = res.userInfo this.userInfo = res.userInfo
uni.cache.set('token', res.token); uni.cache.set('token', res.token);
uni.cache.set('openId', res.userInfo uni.cache.set('alipayOpenId', res.userInfo
.alipayOpenId) .alipayOpenId)
uni.cache.set('userInfo', res.userInfo); uni.cache.set('userInfo', res.userInfo);
resolve(true); resolve(true);