|
|
@@ -135,9 +135,25 @@ export default {
|
|
|
}
|
|
|
this.getMyRecharge()
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 用接口返回的各状态数量刷新顶部 Tab。
|
|
|
+ * 与 app-mall /recharge/list 约定:all / waitPay / recharged / cancelled。
|
|
|
+ */
|
|
|
+ applyTabCounts(data) {
|
|
|
+ if (!data) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.tabs[0].value = Number(data.all) || 0
|
|
|
+ this.tabs[1].value = Number(data.waitPay) || 0
|
|
|
+ this.tabs[2].value = Number(data.recharged) || 0
|
|
|
+ this.tabs[3].value = Number(data.cancelled) || 0
|
|
|
+ },
|
|
|
getMyRecharge () {
|
|
|
return getRechargeList({ status: this.status,page: this.list.page,searchTime: this.searchTime,startTime: this.startTime,endTime: this.endTime,hdId:this.hdId}).then(res => {
|
|
|
this.completes(res)
|
|
|
+ if (res && res.code == 1) {
|
|
|
+ this.applyTabCounts(res.data)
|
|
|
+ }
|
|
|
if (this.$util.isEmpty(res.data)){
|
|
|
return false
|
|
|
}
|