|
|
|
@ -5,24 +5,43 @@ |
|
|
|
|
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="width90" v-for="recod in recordInfo" :key="recod.id"> |
|
|
|
|
<view class="width100 font15 height20 mart10"> |
|
|
|
|
<view class="flleft width50 fcor666"> |
|
|
|
|
积分充值 |
|
|
|
|
</view> |
|
|
|
|
<view class="flright width50 fotrt fcorred" v-if="typeId == 1"> |
|
|
|
|
+{{recod.gold}} |
|
|
|
|
<view class="width94 backcorfff mart20" style="border-radius: 8px;"> |
|
|
|
|
<view class="width94 alijus fotct font15 fcor333 paddtop20" v-if="recordInfo != ''" > |
|
|
|
|
<view class="width50" @click="changestu(1)">积分收支明细</view> |
|
|
|
|
<view class="width50" @click="changestu(2)">7天即将过期积分</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width94 paddtop15" v-if="recordInfo != ''" > |
|
|
|
|
<view class="width50 flleft fotct" v-if="typeId == 1"> |
|
|
|
|
<view class="width40w" style="height: 2px;background-color: red;"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="flright width50 fotrt fcorred" v-else> |
|
|
|
|
-{{recod.gold}} |
|
|
|
|
<view class="width50 flright fotct" v-if="typeId == 2"> |
|
|
|
|
<view class="width40w" style="height: 2px;background-color: red;"></view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width100 fcor999 font14 mart5"> |
|
|
|
|
{{recod.createTime | formatDate('-')}} |
|
|
|
|
<view class="width100 line1 marb20" v-if="recordInfo != ''"></view> |
|
|
|
|
<view class="width100" v-for="recod in recordInfo" :key="recod.id"> |
|
|
|
|
<view class="width94 font15 mart10 alijusstart"> |
|
|
|
|
<view class="width70"> |
|
|
|
|
<view class="fcor666"> |
|
|
|
|
积分充值 |
|
|
|
|
</view> |
|
|
|
|
<view class="fcor999 font14 mart10"> |
|
|
|
|
{{recod.createTime | formatDate('-')}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="width30"> |
|
|
|
|
<view class="font20 fotrt fcorred" v-if="typeId == 1"> |
|
|
|
|
+{{recod.gold}} |
|
|
|
|
</view> |
|
|
|
|
<view class=" font20 fotrt fcor41c" v-else> |
|
|
|
|
-{{recod.gold}} |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line1f2 mart10"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="line1f2 mart15"></view> |
|
|
|
|
</view> |
|
|
|
|
<view class="loading-text">{{ loadingText }}</view> |
|
|
|
|
<view class="height60"></view> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -34,27 +53,26 @@ |
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
typeId: '', |
|
|
|
|
typeId: 1, |
|
|
|
|
recordInfo: [], |
|
|
|
|
imagewxUrl: app.globalData.imageWxImg, |
|
|
|
|
imgadres:'noorder.png', |
|
|
|
|
imgadres: 'noorder.png', |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
isNoMoreData: false, |
|
|
|
|
loadingText: '' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(option) { |
|
|
|
|
this.typeId = option.id; |
|
|
|
|
if (this.typeId == 1) { |
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
|
title: '充值记录' |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
|
title: '消费记录' |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// this.typeId = option.id; |
|
|
|
|
// if (this.typeId == 1) { |
|
|
|
|
uni.setNavigationBarTitle({ |
|
|
|
|
title: '积分记录' |
|
|
|
|
}) |
|
|
|
|
// } else { |
|
|
|
|
// uni.setNavigationBarTitle({ |
|
|
|
|
// title: '消费记录' |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
this.getUserGoldRecLists(); |
|
|
|
|
}, |
|
|
|
|
filters: { |
|
|
|
@ -79,13 +97,16 @@ |
|
|
|
|
this.getUserGoldRecLists(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
//切换状态 |
|
|
|
|
changestu(item) { |
|
|
|
|
this.typeId = item; |
|
|
|
|
}, |
|
|
|
|
getUserGoldRecLists() { |
|
|
|
|
uni.showLoading({ |
|
|
|
|
title: '加载中...' |
|
|
|
|
}) |
|
|
|
|
if (this.isNoMoreData) { |
|
|
|
|
uni.hideLoading() |
|
|
|
|
this.loadingText = '到底了'; |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
let pagenum = this.pageNum; |
|
|
|
@ -98,7 +119,7 @@ |
|
|
|
|
if (res.return_code == '000000') { |
|
|
|
|
uni.hideLoading(); |
|
|
|
|
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; |
|
|
|
|
if(res.return_data.total == (this.pageNum * this.pageSize)){ |
|
|
|
|
if (res.return_data.total == (this.pageNum * this.pageSize)) { |
|
|
|
|
this.isNoMoreData = true; |
|
|
|
|
} |
|
|
|
|
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum; |
|
|
|
@ -115,28 +136,13 @@ |
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
|
page { |
|
|
|
|
background-color: #f8f8f9; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.loading-text { |
|
|
|
|
width: 100%; |
|
|
|
|
display: flex; |
|
|
|
|
justify-content: center; |
|
|
|
|
align-items: center; |
|
|
|
|
height: 60upx; |
|
|
|
|
color: #979797; |
|
|
|
|
font-size: 24upx; |
|
|
|
|
background-color: #f6f6f6; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.bordr { |
|
|
|
|
border-top: 1px solid #fcfcfc; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.height60 { |
|
|
|
|
height: 60px; |
|
|
|
|
line-height: 60px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.pictime { |
|
|
|
|
margin-left: 20px; |
|
|
|
|
} |
|
|
|
|