This commit is contained in:
2025-04-05 23:47:00 +08:00
commit 8001f8eaeb
215 changed files with 14655 additions and 0 deletions

View File

@@ -0,0 +1,71 @@
var t = getApp(), e = require("../../utils/login.js");
Page({
data: {
showLoding: !0,
type: "",
list: [],
loading: !1,
page: {
next_page: 1
}
},
onLoad: function(a) {
var n = this;
this.setData({
type: a.type
}), wx.setNavigationBarTitle({
title: "invest" == a.type ? "充值记录" : "消费明细"
}), e.pageStart(t).then(function(t) {
n.getContent();
});
},
onShow: function() {
this.refresh && this.refreshPage();
},
refreshPage: function() {
this.setData({
list: [],
page: {
next_page: 1
}
}), this.getContent();
},
onPullDownRefresh: function() {
if (!t.globalData.canGetData) return !1;
this.refreshPage(), wx.stopPullDownRefresh();
},
onReachBottom: function() {
if (!t.globalData.canGetData) return !1;
this.getContent();
},
onShareAppMessage: function() {},
getContent: function() {
if (!this.data.page.next_page || this.data.loading) return !1;
wx.showLoading({
title: ""
});
var a = this, n = "invest" == this.data.type ? t.globalData.config.recharge.log : t.globalData.config.consume.init;
e.request(n, {
page: this.data.page.next_page
}, !0).then(function(t) {
if (wx.hideLoading(), 200 != t.code) return wx.showModal({
title: "提示",
content: t.message
}), !1;
a.setData({
showLoding: !1,
list: a.data.list.concat(t.data.list),
user: t.data.user,
page: t.data.page
}, function() {});
}).catch(function(t) {
wx.hideLoading();
});
},
toPage: function() {
this.refresh = 1, wx.navigateTo({
url: "/pages/voucher/voucher"
});
}
});

View File

@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "聚美汽服",
"enablePullDownRefresh": true,
"usingComponents": {
"service-tel": "../../template/serviceTel/serviceTel",
"my-money": "../../template/myMoney/myMoney",
"page-loding": "../../template/pageLoding/pageLoding"
}
}

View File

@@ -0,0 +1,21 @@
<page-loding wx:if="{{showLoding}}"></page-loding>
<view class="{{types=='voucher'?'container voucher-container':'container'}}">
<view class="money">
<my-money user="{{user}}"></my-money>
</view>
<view class="list-box">
<view class="item" wx:for="{{list}}" wx:key="index">
<view class="name">{{item.message}}</view>
<view class="footer">
<view class="time">{{item.timestamp}}</view>
<view class="num">{{item.symbol}}{{item.amount}}</view>
</view>
</view>
</view>
<view class="no-content" wx:if="{{list.length==0&&!loading}}">
<image src="/img/nocontent.png"></image>
<view>暂无相关数据</view>
</view>
<service-tel></service-tel>
<view bindtap="toPage" class="scan-btn" wx:if="{{type=='invest'}}"> 立即充值 </view>
</view>

View File

@@ -0,0 +1,46 @@
.container {
background: #fafafa;
box-sizing: border-box;
min-height: 100vh;
padding: 0rpx 0 40rpx;
}
.voucher-container {
padding-bottom: 170rpx;
}
.money {
margin: 36rpx 27rpx 0;
}
.list-box {
padding: 18rpx 27rpx 48rpx;
}
.item {
background: #fff;
border-bottom: 1px solid #eee;
padding: 16rpx 20rpx 12rpx 18rpx;
}
.item .name {
color: #666;
font-size: 26rpx;
margin-bottom: 4rpx;
}
.item .footer {
align-items: flex-end;
color: #999;
display: flex;
justify-content: space-between;
}
.item .footer .time {
display: inline-flex;
font-size: 22rpx;
}
.item .footer .num {
font-size: 33rpx;
}