|
@@ -23,6 +23,7 @@
|
|
|
:class="item.class"
|
|
|
@click="goOrderDetails(item.id)" :key="item.id">
|
|
|
<view class="top u-flex u-row-between">
|
|
|
+ <text v-if="item.orderType==2">[积分]</text>
|
|
|
<text>订单号:{{item.orderNum||''}}</text>
|
|
|
<text class="status">{{item.status|filterOrderState}}</text>
|
|
|
</view>
|
|
@@ -77,11 +78,11 @@
|
|
|
tabsCurrent:1,
|
|
|
tabsList:[
|
|
|
{name:'全部',status:'',},
|
|
|
- {name:'待付款',status:'0',},
|
|
|
- {name:'待出库',status:'1',},
|
|
|
- {name:'待收货',status:'2'},
|
|
|
- {name:'待评价',status:'3'},
|
|
|
- {name:'退款/售后',status:'7'}
|
|
|
+ {name:'待付款',status:'0',badge:{isDot:false}},
|
|
|
+ {name:'待出库',status:'1',badge:{isDot:false}},
|
|
|
+ {name:'待收货',status:'2',badge:{isDot:false}},
|
|
|
+ {name:'待评价',status:'3',badge:{isDot:false}},
|
|
|
+ {name:'退款/售后',status:'7',badge:{isDot:false}}
|
|
|
],
|
|
|
status:'',
|
|
|
dataList:[],
|
|
@@ -94,7 +95,14 @@
|
|
|
5:[{name:'查看退款',fun:'viewRefund',class:'green'}],
|
|
|
// 6:[{name:'查看退款',fun:'viewRefund',class:'green'}],
|
|
|
7:[{name:'查看退款',fun:'viewRefund',class:'green'}]
|
|
|
- }
|
|
|
+ },
|
|
|
+ orderBadge:{
|
|
|
+ noPayNum:0,
|
|
|
+ deliverNum:0,
|
|
|
+ collectNum:0,
|
|
|
+ commentNum:0,
|
|
|
+ refundNum:0,
|
|
|
+ },
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -126,7 +134,8 @@
|
|
|
onShow() {
|
|
|
setTimeout(()=>{
|
|
|
this.hasfetch&&this.reloadList()
|
|
|
- },500)
|
|
|
+ },500);
|
|
|
+ this.statisticsOrder();
|
|
|
},
|
|
|
methods: {
|
|
|
leftClick(){
|
|
@@ -299,6 +308,33 @@
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ statisticsOrder(){
|
|
|
+ this.$u.api.statisticsOrder().then(res=>{
|
|
|
+ let data = res.data || {};
|
|
|
+ this.orderBadge = Object.assign(this.orderBadge,data);
|
|
|
+ let {noPayNum,deliverNum,collectNum,commentNum,refundNum} = res.data;
|
|
|
+ let noPayNumindex = this.tabsList.findIndex(item => item.status == 0);
|
|
|
+ if(noPayNum>0){
|
|
|
+ this.tabsList[1].badge.isDot = true;
|
|
|
+ }
|
|
|
+ if(deliverNum>0){
|
|
|
+ this.tabsList[2].badge.isDot = true;
|
|
|
+ }
|
|
|
+ if(collectNum>0){
|
|
|
+ this.tabsList[3].badge.isDot = true;
|
|
|
+ }
|
|
|
+ if(commentNum>0){
|
|
|
+ this.tabsList[4].badge.isDot = true;
|
|
|
+ }
|
|
|
+ if(refundNum>0){
|
|
|
+ this.tabsList[5].badge.isDot = true;
|
|
|
+ }
|
|
|
+ // console.log('statisticsOrder',res.data);
|
|
|
+ // console.log('this.orderBadge',this.orderBadge);
|
|
|
+ }).catch(err=>{
|
|
|
+ console.log('memberInfo',err.data);
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|