优化好店中点击显示二维码的显示逻辑
This commit is contained in:
parent
bd1d95db52
commit
1bc846be31
@ -180,7 +180,25 @@ export default {
|
||||
// 'custom-header': 'hello' //自定义请求头信息
|
||||
},
|
||||
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'
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user