diff --git a/BagMoney/pages/oilCards/oilCards.vue b/BagMoney/pages/oilCards/oilCards.vue index 6f3320c..464efa4 100644 --- a/BagMoney/pages/oilCards/oilCards.vue +++ b/BagMoney/pages/oilCards/oilCards.vue @@ -6,19 +6,17 @@ - - 我的油卡 - 总余额:{{userTotal.oilCardTotalPrice|moneyFormat}}元{{cardList.length>0?cardList.length:1}}张 + 总余额:{{userTotal.oilCardTotalPrice|moneyFormat}}元{{cardList.length>0?cardList.length:1}}张 - - - - + @@ -58,16 +54,13 @@ 共享企业余额 - - 单日加油额度:{{cardList[cardCur].orderAmountToplimit}}元;单日加油升数额度:{{cardList[cardCur].orderVolumeToplimit}}L + 单日加油额度:{{cardList[cardCur].orderAmountToplimit}}元;单日加油升数额度:{{cardList[cardCur].orderVolumeToplimit}}L - - - 交易记录 @@ -75,7 +68,6 @@ - {{detail.createTime}} @@ -109,7 +101,7 @@ }, data() { return { - hideCard:[], + hideCard: [], loadStatus: 'load', userTotal: {}, historyList: [], @@ -178,7 +170,7 @@ onReachBottom() { if (this.cardList[this.cardCur].loadStatus == 'more') { setTimeout(() => { - this.getMoneyDetail(this.cardList[this.cardCur],this.cardCur) + this.getMoneyDetail(this.cardList[this.cardCur], this.cardCur) }, 100) } else { uni.showToast({ @@ -213,13 +205,7 @@ oilCardType: card.oilCardType } } - console.log('++++++++++++++') - console.log(data2) - console.log('++++++++++++++') accountApi.getOilCardRecordByPage(data2).then(res => { - console.log('++++++++++++++') - console.log(res) - console.log('++++++++++++++') if (res.code == 20000) { if (res.data.list.length < 20) { this.cardList[index].loadStatus = 'nomore' @@ -228,31 +214,32 @@ this.cardList[index].currentPage++ } // this.cardList[index].historyList = [] - - if(this.cardList[index].currentPage!==1){ - this.cardList[index].historyList = this.cardList[index].historyList.concat(res.data.list) - } else{ + if (this.cardList[index].currentPage !== 1) { + this.cardList[index].historyList = this.cardList[index].historyList.concat(res.data + .list) + } else { this.cardList[index].historyList = res.data.list } - + } }) }, async getCards() { - await accountApi.getSyncDeductions().then(res => { - if (res.code == 20000) { - this.hideCard = res.data.companyIds - } - }) - await accountApi.getUserAccount().then(res => { + await accountApi.getSyncDeductions().then(res => { + if (res.code == 20000) { + this.hideCard = res.data.companyIds + } + }) + await accountApi.getUserAccount().then(res => { if (res.code == 20000) { if (res.data.length > 0) { this.cardList = res.data - this.cardList = this.cardList.filter(item=>!this.hideCard.includes(item.companyId)) + this.cardList = this.cardList.filter(item => !this.hideCard.includes(item + .companyId)) this.cardList.forEach(item => { - this.$set(item,'currentPage',1) - this.$set(item,'loadStatus','more') - this.$set(item,'historyList',[]) + this.$set(item, 'currentPage', 1) + this.$set(item, 'loadStatus', 'more') + this.$set(item, 'historyList', []) }) console.log(this.cardList) setTimeout(() => { @@ -332,10 +319,11 @@