征信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
zhengxinApplets/pages/user/payList.vue

147 lines
2.8 KiB

3 months ago
<template>
<view class="pay">
2 months ago
<view class="item" v-for="(a,i) in list" :key="i">
3 months ago
<view class="a">
<view class="fl">订单号</view>
2 months ago
<view class="fr">{{a.order_no}}</view>
3 months ago
</view>
<view class="a">
<view class="fl">事件标题</view>
2 months ago
<view class="fr">{{a.title}}</view>
3 months ago
</view>
<view class="a">
<view class="fl">支付时间</view>
2 months ago
<view class="fr">{{a.paytime}}</view>
3 months ago
</view>
<view class="a">
<view class="fl">订单金额</view>
2 months ago
<view class="fr frs">{{a.money}}<text @click="openPage(a.content_id)">查看事件</text></view>
3 months ago
</view>
</view>
2 months ago
<view class="empty" v-if="total == 0">
<image src="https://www.lijkj.cn/static/empty.png"></image>
2 months ago
<view class="txt">暂无数据 ~</view>
</view>
3 months ago
</view>
</template>
<script>
export default {
data() {
return {
2 months ago
offset: 1,
total: 1,
list: [],
3 months ago
};
},
2 months ago
mounted() {
this.getList();
},
onReachBottom() {
const that = this;
uni.showLoading({
title: "加载中"
})
if(this.list.length <= this.total){
that.offset ++;
setTimeout(function() {
that.getList(1);
}, 1000);
}
},
3 months ago
methods: {
2 months ago
//数组对象去重
arrayUnique (arr, name) {
var hash = {};
return arr.reduce(function (item, next) {
hash[next[name]]
? ""
: (hash[next[name]] = true && item.push(next));
return item;
}, []);
},
async getList(type) {
const that = this;
const { code, data } = await that.$api.getorderlist({
offset: this.offset,
limit: 20,
token: uni.getStorageSync("token")
})
if(code == 1){
if(type==1){
uni.hideLoading();
}
that.list = this.arrayUnique([...that.list,...data.rows],'order_no');
that.total = data.total;
}
},
3 months ago
openPage(id){
uni.navigateTo({
url: "/pages/release/detail?id="+id
})
},
}
}
</script>
<style scoped lang="scss">
.pay{
padding: 0 25rpx 25rpx;
overflow: hidden;
2 months ago
.empty{
padding: 150rpx 0;
text-align: center;
font-size: 26rpx;
color: #666;
image{
width: 460rpx;
height: 400rpx;
margin-bottom: 30rpx;
}
}
3 months ago
.item{
width: 100%;
height: 257rpx;
background: #FFFFFF;
box-shadow: 0px 3rpx 10rpx 0px rgba(9,44,39,0.05);
border-radius: 20rpx;
padding: 20rpx 30rpx;
box-sizing: border-box;
margin-top: 20rpx;
.a{
font-weight: 500;
font-size: 28px;
color: #999999;
display: flex;
align-items: center;
justify-content: space-between;
line-height: 55rpx;
.fl{
width: 140rpx;
text-align: left;
font-weight: 500;
font-size: 28rpx;
color: #999999;
}
.fr{
flex: 1;
font-weight: 500;
font-size: 28rpx;
color: #333333;
text{
float: right;
font-weight: 500;
font-size: 28rpx;
color: #00C6A9;
float: right;
}
}
.frs{
color: #D80C0C;
}
}
}
}
</style>