优化好店中点击显示二维码的显示逻辑

This commit is contained in:
赵毅 2025-10-13 16:25:35 +08:00
parent bd1d95db52
commit 1bc846be31

View File

@ -180,7 +180,25 @@ export default {
// 'custom-header': 'hello' // // 'custom-header': 'hello' //
}, },
success: (res) => { success: (res) => {
this.createQrcode2(res.data.access_token) // access_token
if (res.data && res.data.access_token) {
this.createQrcode2(res.data.access_token)
} else {
uni.hideLoading();
uni.showToast({
title: '获取二维码失败,请重试',
icon: 'none'
});
console.error('获取微信access_token失败:', res);
}
},
fail: (err) => {
console.error('获取微信access_token失败:', err);
uni.hideLoading();
uni.showToast({
title: '获取二维码失败,请重试',
icon: 'none'
});
} }
}); });
}, },