|
@@ -81,14 +81,14 @@
|
|
|
shopInfo: {},
|
|
|
zfbInfo: {},
|
|
|
shopId: "",
|
|
|
- localUserInfo: {}
|
|
|
+ localUserInfo: {}
|
|
|
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.zfbInfo = options
|
|
|
this.shopId = options.shopId
|
|
|
- let info = localStorage.getItem('userInfo');
|
|
|
+ let info = localStorage.getItem('aliPayUserInfo');
|
|
|
this.localUserInfo = JSON.parse(info)
|
|
|
if (this.localUserInfo) {
|
|
|
this.vidTokenExist()
|
|
@@ -110,7 +110,7 @@
|
|
|
this.getShopInfo();
|
|
|
} else {
|
|
|
uni.$u.toast('登录已过期,请重新登录!');
|
|
|
- localStorage.removeItem('userInfo');
|
|
|
+ localStorage.removeItem('aliPayUserInfo');
|
|
|
setTimeout(() => {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/index?shopId=' + this.shopId
|
|
@@ -125,7 +125,7 @@
|
|
|
);
|
|
|
if (res.data.code == 200) {
|
|
|
this.userInfo = res.data.data;
|
|
|
- localStorage.setItem('userInfo', JSON.stringify(this.userInfo))
|
|
|
+ localStorage.setItem('aliPayUserInfo', JSON.stringify(this.userInfo))
|
|
|
if (this.userInfo.bindPhoneStatus == 0) {
|
|
|
this.showPhone = true
|
|
|
} else {
|
|
@@ -172,8 +172,10 @@
|
|
|
`alipays://platformapi/startapp?appId=20000067&url=${encodeURIComponent(pay.data.data.result)}`
|
|
|
// window.close(); // 关闭当前页面
|
|
|
// ap.popWindow()
|
|
|
+
|
|
|
} else {
|
|
|
- uni.$u.toast('支付失败!');
|
|
|
+ uni.hideLoading();
|
|
|
+ uni.$u.toast(pay.data.msg);
|
|
|
}
|
|
|
} else {
|
|
|
uni.$u.toast('创建线下支付订单失败!');
|
|
@@ -216,7 +218,11 @@
|
|
|
uni.$u.toast('请输入验证码');
|
|
|
}
|
|
|
const res = await axios.post(
|
|
|
- `${requestConfig.BaseUrl}user/app/v1/user/bindPhone?phone=${this.phone}&code=${this.yzm}&alipayUserId=${this.userInfo.alipayUserId}`
|
|
|
+ `${requestConfig.BaseUrl}user/app/v1/user/bindPhone?
|
|
|
+ phone=${this.phone}
|
|
|
+ &code=${this.yzm}
|
|
|
+ &alipayUserId=${this.userInfo.alipayUserId}
|
|
|
+ `
|
|
|
);
|
|
|
if (res.data.code == 200) {
|
|
|
uni.$u.toast('绑定手机号成功');
|