first commit
This commit is contained in:
1
衣莎项目/源码/YiShaXiYi/user/withdrawalsRecord/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/user/withdrawalsRecord/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
46e3d06f-0286-45de-99ed-0dd9345521f8
|
||||
104
衣莎项目/源码/YiShaXiYi/user/withdrawalsRecord/withdrawalsRecord.js
Normal file
104
衣莎项目/源码/YiShaXiYi/user/withdrawalsRecord/withdrawalsRecord.js
Normal file
@@ -0,0 +1,104 @@
|
||||
// user/withdrawalsRecord/withdrawalsRecord.js
|
||||
const app = getApp();
|
||||
const util = app.loadUtils("util")
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "提现记录", //头部标题
|
||||
isBack: true,//显示返回
|
||||
moneyHistory: [],//提现列表
|
||||
page: 1,
|
||||
isPage: false,//判断是否还有数据
|
||||
},
|
||||
async cashOutRecord() {
|
||||
if (this.data.isPage) {
|
||||
wx.showToast({
|
||||
title: '已经到底了哦!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
page: this.data.page
|
||||
}
|
||||
let res = await http.http.request2({ url: `${http.api.cashOutRecord}`, method: "POST", data: data })
|
||||
let rel = res.data.data.list
|
||||
if (rel.length < 10) {
|
||||
this.setData({
|
||||
isPage: true
|
||||
})
|
||||
}
|
||||
let moneyHistory = this.data.moneyHistory
|
||||
this.setData({
|
||||
moneyHistory: [...moneyHistory, ...rel]
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.cashOutRecord()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
if (!this.data.isPage) {
|
||||
this.setData({
|
||||
page: ++this.data.page
|
||||
})
|
||||
this.cashOutRecord()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- user/withdrawalsRecord/withdrawalsRecord.wxml -->
|
||||
<view class="withdrawalsRecord">
|
||||
<view class="recommender mt20">
|
||||
<view wx:for="{{moneyHistory}}" wx:key="{{index}}" class="recom_list">
|
||||
<view class="recom_list_row">
|
||||
<view>
|
||||
<view class="mode">提现</view>
|
||||
<view class="mode_time mt10">{{item.create_time}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="recom_list_row recom_row_r">-{{item.total_money}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{ isPage }}" class="ending">没有更多了</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
@@ -0,0 +1,70 @@
|
||||
/* user/withdrawalsRecord/withdrawalsRecord.wxss */
|
||||
.recommender{
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.recom_list{
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.recom_list_row{
|
||||
flex: 2;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
.recom_list_row image{
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.recom_list_row span{
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.recom_row_r{
|
||||
text-align: right;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
-webkit-justify-content: flex-end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.mode{
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.mode_time{
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.ending{
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
text-align: center;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
position: relative;
|
||||
}
|
||||
.ending::after{
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 50rpx;
|
||||
height: 4rpx;
|
||||
background-color: #cccccc;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -2rpx 0 0 100rpx;
|
||||
}
|
||||
.ending::before{
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 50rpx;
|
||||
height: 4rpx;
|
||||
background-color: #cccccc;
|
||||
top: 50%;
|
||||
right: 50%;
|
||||
margin: -2rpx 100rpx 0 0;
|
||||
}
|
||||
Reference in New Issue
Block a user