|
|
|
@ -57,7 +57,7 @@ |
|
|
|
|
<view class="text-center"> |
|
|
|
|
<text class="text-sm">您一共有 |
|
|
|
|
<text |
|
|
|
|
class="oil-main-color padding-left-xs padding-right-xs">{{userTotal.oilCardNumber}}</text> |
|
|
|
|
class="oil-main-color padding-left-xs padding-right-xs">{{cardSum.length}}</text> |
|
|
|
|
张油卡</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -139,6 +139,9 @@ |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
showCard:[], |
|
|
|
|
hideCard:[], |
|
|
|
|
cardSum:[], |
|
|
|
|
yellowURL: this.global.yellowURL, |
|
|
|
|
imgURL: this.global.imgURL, |
|
|
|
|
starUrl: this.global.starUrl, |
|
|
|
@ -195,15 +198,30 @@ |
|
|
|
|
toCards() { |
|
|
|
|
if(Number(this.userTotal.oilCardNumber)<=0) return |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/BagMoney/pages/oilCards/oilCards' |
|
|
|
|
url: '/BagMoney/pages/oilCards/oilCards' |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getAmount() { |
|
|
|
|
accountApi.getTotalOilCardInfo().then(res => { |
|
|
|
|
async getAmount() { |
|
|
|
|
|
|
|
|
|
await accountApi.getTotalOilCardInfo().then(res => { |
|
|
|
|
console.log(1) |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.userTotal = res.data |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
await accountApi.getUserAccount().then(res => { |
|
|
|
|
console.log(2) |
|
|
|
|
this.showCard = [] |
|
|
|
|
res.data.forEach(item=>{ |
|
|
|
|
this.showCard.push(item.companyId) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
await accountApi.getSyncDeductions().then(res => { |
|
|
|
|
console.log(3) |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.cardSum = this.showCard.filter(item=>!res.data.companyIds.includes(item)) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
copy() { |
|
|
|
|
uni.setClipboardData({ |
|
|
|
|