Compare commits
4 Commits
b2275c2636
...
4f6426dc02
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f6426dc02 | |||
| 6ca716e56c | |||
| f5f6885318 | |||
| 5379380d33 |
@@ -174,8 +174,13 @@
|
||||
this.resetAndLoad();
|
||||
},
|
||||
formatMoney(val) {
|
||||
if (!val && val !== 0) return '—';
|
||||
return '¥' + Number(val).toFixed(2);
|
||||
if (val === null || val === undefined || isNaN(val)) return '—';
|
||||
val = Number(val);
|
||||
if (val >= 100000) {
|
||||
const wan = val / 10000;
|
||||
return '¥' + wan + '万';
|
||||
}
|
||||
return '¥' + val.toFixed(2);
|
||||
},
|
||||
resetAndLoad(){
|
||||
this.loadStatus = 'more';
|
||||
|
||||
@@ -162,8 +162,9 @@
|
||||
formatMoney(val) {
|
||||
if (val === null || val === undefined || isNaN(val)) return '—';
|
||||
val = Number(val);
|
||||
if (val >= 10000) {
|
||||
return '¥' + (val / 10000).toFixed(2) + '万';
|
||||
if (val >= 100000) {
|
||||
const wan = val / 10000;
|
||||
return '¥' + wan + '万';
|
||||
}
|
||||
return '¥' + val.toFixed(2);
|
||||
},
|
||||
@@ -255,14 +256,14 @@
|
||||
signType: order.miniPayRequest.signType,
|
||||
paySign: order.miniPayRequest.paySign,
|
||||
success: () => {
|
||||
this.isPaying = false;
|
||||
billList.forEach(b => b.checked = false);
|
||||
this.updateSelected();
|
||||
this.refresh();
|
||||
this.isPaying = false;
|
||||
},
|
||||
fail: (err) => {
|
||||
this.payFailCallback(err, orderId);
|
||||
this.isPaying = false;
|
||||
this.payFailCallback(err, orderId);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -282,10 +283,8 @@
|
||||
reason = "支付失败,请重试";
|
||||
}
|
||||
|
||||
this.$u.get(`/bill/paycallback`, {
|
||||
orderId: orderId,
|
||||
payResult: "FAIL"
|
||||
}, { WT: this.$getToken() }).then(res => {
|
||||
this.$u.post(`/bill/paycallback?orderId=${orderId}&payResult=FAIL`, {}, {
|
||||
WT: this.$getToken() }).then(res => {
|
||||
console.log("回调成功", res)
|
||||
}).catch(err => {
|
||||
console.log("回调失败", err)
|
||||
|
||||
@@ -164,8 +164,9 @@
|
||||
formatMoney(val) {
|
||||
if (val === null || val === undefined || isNaN(val)) return '—';
|
||||
val = Number(val);
|
||||
if (val >= 10000) {
|
||||
return '¥' + (val / 10000).toFixed(2) + '万';
|
||||
if (val >= 100000) {
|
||||
const wan = val / 10000;
|
||||
return '¥' + wan + '万';
|
||||
}
|
||||
return '¥' + val.toFixed(2);
|
||||
},
|
||||
@@ -257,14 +258,14 @@
|
||||
signType: order.miniPayRequest.signType,
|
||||
paySign: order.miniPayRequest.paySign,
|
||||
success: () => {
|
||||
this.isPaying = false;
|
||||
billList.forEach(b => b.checked = false);
|
||||
this.updateSelected();
|
||||
this.refresh();
|
||||
this.isPaying = false;
|
||||
},
|
||||
fail: (err) => {
|
||||
this.payFailCallback(err, orderId);
|
||||
this.isPaying = false;
|
||||
this.payFailCallback(err, orderId);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -284,10 +285,8 @@
|
||||
reason = "支付失败,请重试";
|
||||
}
|
||||
|
||||
this.$u.get(`/bill/paycallback`, {
|
||||
orderId: orderId,
|
||||
payResult: "FAIL"
|
||||
}, { WT: this.$getToken() }).then(res => {
|
||||
this.$u.post(`/bill/paycallback?orderId=${orderId}&payResult=FAIL`, {}, {
|
||||
WT: this.$getToken() }).then(res => {
|
||||
console.log("回调成功", res)
|
||||
}).catch(err => {
|
||||
console.log("回调失败", err)
|
||||
|
||||
@@ -161,8 +161,9 @@
|
||||
formatMoney(val) {
|
||||
if (val === null || val === undefined || isNaN(val)) return '—';
|
||||
val = Number(val);
|
||||
if (val >= 10000) {
|
||||
return '¥' + (val / 10000).toFixed(2) + '万';
|
||||
if (val >= 100000) {
|
||||
const wan = val / 10000;
|
||||
return '¥' + wan + '万';
|
||||
}
|
||||
return '¥' + val.toFixed(2);
|
||||
},
|
||||
@@ -233,14 +234,14 @@
|
||||
signType: order.miniPayRequest.signType,
|
||||
paySign: order.miniPayRequest.paySign,
|
||||
success: () => {
|
||||
this.isPaying = false;
|
||||
billList.forEach(b => b.checked = false);
|
||||
this.updateSelected();
|
||||
this.refresh();
|
||||
this.isPaying = false;
|
||||
},
|
||||
fail: (err) => {
|
||||
this.payFailCallback(err, orderId);
|
||||
this.isPaying = false;
|
||||
this.payFailCallback(err, orderId);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -259,10 +260,7 @@
|
||||
reason = "支付失败,请重试";
|
||||
}
|
||||
|
||||
this.$u.get(`/bill/paycallback`, {
|
||||
orderId: orderId,
|
||||
payResult: "FAIL"
|
||||
}, {
|
||||
this.$u.post(`/bill/paycallback?orderId=${orderId}&payResult=FAIL`, {}, {
|
||||
WT: this.$getToken()
|
||||
}).then(res => {
|
||||
console.log("回调成功")
|
||||
|
||||
@@ -145,6 +145,8 @@
|
||||
opacity: 0,
|
||||
extraIcons: [] // 右侧额外图标
|
||||
},
|
||||
// 用户信息(响应式)
|
||||
userInfo: uni.getStorageSync('userInfo') || {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -164,7 +166,7 @@
|
||||
return this.$config.staticUrl
|
||||
},
|
||||
user() {
|
||||
return uni.getStorageSync('userInfo') || {}
|
||||
return this.userInfo
|
||||
}
|
||||
|
||||
},
|
||||
@@ -210,14 +212,17 @@
|
||||
}).then(obj => {
|
||||
if(obj.flag){
|
||||
console.log("更新缓存中用户信息")
|
||||
uni.setStorageSync('userInfo', {
|
||||
const newUserInfo = {
|
||||
userType: obj.data.userType,
|
||||
oaAuth: obj.data.oaAuth,
|
||||
cusNo: obj.data.cusNo,
|
||||
userName: obj.data.userName,
|
||||
openId: obj.data.openId,
|
||||
subscribe: obj.data.subscribeMsg
|
||||
})
|
||||
}
|
||||
uni.setStorageSync('userInfo', newUserInfo)
|
||||
// 更新响应式数据
|
||||
this.userInfo = newUserInfo
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB |
Reference in New Issue
Block a user