|
@@ -127,24 +127,16 @@
|
|
let user = that.user;
|
|
let user = that.user;
|
|
if (config) {
|
|
if (config) {
|
|
if (user && user._id) {
|
|
if (user && user._id) {
|
|
- for (let val of config.my_orderList) {
|
|
|
|
- let res;
|
|
|
|
- if (val.status == '0') {
|
|
|
|
- res = await that.$api(`/order`, 'GET', {
|
|
|
|
- status: val.status,
|
|
|
|
- customer: user._id,
|
|
|
|
- limit: 1
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- res = await that.$api(`/orderDetail`, 'GET', {
|
|
|
|
- status: val.status,
|
|
|
|
- customer: user._id,
|
|
|
|
- limit: 1
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- if (res.errcode == '0') {
|
|
|
|
- val.num = res.total
|
|
|
|
- that.$forceUpdate()
|
|
|
|
|
|
+ let res = await that.$api(`/viewUser/toDeal`, 'GET');
|
|
|
|
+ if (res.errcode == '0') {
|
|
|
|
+ for (let val of config.my_orderList) {
|
|
|
|
+ if (val.type == "order") {
|
|
|
|
+ if (val.status == '0') val.num = res.data.notPay
|
|
|
|
+ if (val.status == '1') val.num = res.data.isPay
|
|
|
|
+ if (val.status == '2') val.num = res.data.allSend
|
|
|
|
+ } else {
|
|
|
|
+ val.num = res.data.afterSale;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|