更新
This commit is contained in:
@@ -6,19 +6,17 @@
|
||||
</cu-custom>
|
||||
<view class="" v-show="accountStatus">
|
||||
<view class="placeholder bg-main-oil">
|
||||
|
||||
</view>
|
||||
<view class="move-top">
|
||||
|
||||
<view class="flex radius margin my-shadow position-re">
|
||||
<view class="basis-sm text-center padding bg-gradual-black">
|
||||
我的油卡
|
||||
</view>
|
||||
<view class="basis-lg padding bg-white">
|
||||
总余额:<text class="text-red">{{userTotal.oilCardTotalPrice|moneyFormat}}元</text><text class="cu-tag yu-tag-right position-ab sm">{{cardList.length>0?cardList.length:1}}张</text>
|
||||
总余额:<text class="text-red">{{userTotal.oilCardTotalPrice|moneyFormat}}元</text><text
|
||||
class="cu-tag yu-tag-right position-ab sm">{{cardList.length>0?cardList.length:1}}张</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="flex radius margin my-shadow position-re">
|
||||
<view class="basis-sm text-center padding bg-gradual-black">
|
||||
自营公司油卡
|
||||
@@ -38,12 +36,10 @@
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class=" margin-bottom-lg">
|
||||
<swiper class="screen-swiper square-dot" @change="cardSwiper" :indicator-dots="true" :circular="true" :autoplay="false"
|
||||
interval="5000" duration="500">
|
||||
<swiper class="screen-swiper square-dot" @change="cardSwiper" :indicator-dots="true" :circular="true"
|
||||
:autoplay="false" interval="5000" duration="500">
|
||||
<swiper-item v-for="(item,index) in cardList" :key="index" :class="cardCur==index?'cur':''">
|
||||
<!-- <image :src="imgURL+ (item.type=='zs'?'card-zs.png':'card-other.png')" mode="aspectFill">
|
||||
</image> -->
|
||||
@@ -58,16 +54,13 @@
|
||||
<view class="text-red padding-bottom-sm text-bold text-lg">
|
||||
共享企业余额
|
||||
</view>
|
||||
|
||||
<text class="text-grey">单日加油额度:{{cardList[cardCur].orderAmountToplimit}}元;单日加油升数额度:{{cardList[cardCur].orderVolumeToplimit}}L</text>
|
||||
<text
|
||||
class="text-grey">单日加油额度:{{cardList[cardCur].orderAmountToplimit}}元;单日加油升数额度:{{cardList[cardCur].orderVolumeToplimit}}L</text>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="text-center padding">
|
||||
<!-- <view class="text-red text-bold text-lg">
|
||||
{{userTotal.oilCardTotalPrice|moneyFormat}}元
|
||||
</view> -->
|
||||
|
||||
<text class="">交易记录</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,7 +68,6 @@
|
||||
<view class="cu-list menu" v-if="cardList[cardCur].historyList.length>0">
|
||||
<view class="cu-item" v-for="detail in cardList[cardCur].historyList" :key="detail.id">
|
||||
<view class="content padding-tb-sm">
|
||||
|
||||
<view class="text-gray text-sm">
|
||||
{{detail.createTime}}
|
||||
</view>
|
||||
@@ -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,10 +214,10 @@
|
||||
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
|
||||
}
|
||||
|
||||
@@ -248,11 +234,12 @@
|
||||
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 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.boxsingForCard{
|
||||
.boxsingForCard {
|
||||
position: relative;
|
||||
}
|
||||
.inCard{
|
||||
|
||||
.inCard {
|
||||
position: absolute;
|
||||
right: 11%;
|
||||
bottom: 17%;
|
||||
@@ -348,6 +336,7 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tower-swiper .tower-item {
|
||||
transform: scale(calc(0.5 + var(--index) / 10));
|
||||
margin-left: calc(var(--left) * 100upx - 150upx);
|
||||
|
||||
Reference in New Issue
Block a user