Files
video_app/me/yaoqing/redPack-mingxi.vue
2024-12-31 16:14:19 +08:00

139 lines
2.9 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<view class="u-text-left">
<view v-if="list.length" v-for="(item, index) in list" :key="index" class="item">
<view>
<view class="color-000 u-font-28" >
<view class="u-m-t-8"> 类型 {{item.title}}</view>
<view class="u-m-t-8"> 内容 {{item.content}}</view>
<view class="u-m-t-8"> 时间 {{item.createTime}}</view>
<view class="u-m-t-8 u-text-right" >
<!-- 提现金额 -->
<text v-if="item.type===2" class="coor-666 u-font-32" style="font-weight: 600"> - {{item.money}}</text>
<text v-if="item.type===1" class="u-font-32" style="color: #FD6416;font-weight: 600">+ {{item.money}}</text>
</view>
</view>
</view>
</view>
<view class="page-box" v-if="!list.length">
<view class="centre">
<image src="../../static/images/learn/none.png" mode=""></image>
<view class="tips">
暂无明细
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
page: 1,
limit: 10,
totalCount: 0,
moneyType: null,
viewType: null,
}
},
onLoad: function(e) {
console.log(e)
if (e.moneyType) {
this.moneyType = e.moneyType
uni.setNavigationBarTitle({
title: e.moneyType === 1 ? '红包明细' : '金币明细'
});
}
if (e.viewType) {
this.viewType = e.viewType
}
this.getMoney();
},
methods: {
getMoney() {
let that = this;
let token = uni.getStorageSync('token')
if (token) {
let data = {
page : that.page,
limit : that.limit,
moneyType : this.moneyType,
viewType: this.viewType,
}
this.$Request.getT('/app/moneyDetails/queryUserMoneyDetails', data).then(res => {
this.totalCount = res.data.total;
if ( res.data.records.length > 0) {
this.list = [...this.list,...res.data.records];
}
})
}
},
},
onReachBottom: function() {
if (this.page*this.limit < this.totalCount) {
this.page = this.page + 1;
this.getMoney();
}
},
onPullDownRefresh: function() {
this.page = 1;
// that.list = []
this.getMoney();
},
}
</script>
<style lang='scss' scoped>
/* @import "../../static/css/index.css"; */
page {
background: #FFFFFF;
}
.item {
background: white;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
.centre {
text-align: center;
padding: 200rpx 0;
font-size: 32rpx;
box-sizing: border-box;
image {
width: 360rpx;
height: 360rpx;
// margin-bottom: 20rpx;
margin: 0 auto 20rpx;
// border: 1px dotted #000000;
}
.tips {
font-size: 34rpx;
color: #999999;
margin-top: 20rpx;
}
.btn {
margin: 80rpx auto;
width: 600rpx;
border-radius: 32rpx;
line-height: 90rpx;
color: #ffffff;
font-size: 34rpx;
background: #5074FF;
}
}
</style>