新增分享,找回密码,实名认证,签约

This commit is contained in:
唐明明
2023-08-25 14:04:31 +08:00
parent 32cc588ae7
commit 0f7c37d548
106 changed files with 2130 additions and 1313 deletions

View File

@@ -9,23 +9,26 @@ Page({
* 页面的初始数据
*/
data: {
logsArr : [], //列表数据
score : '', //数据
page : {}, //分页信息
lodingStats : false, //加载状态
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
account : {
all_in : '0.00',
balance : '0.00',
frozen : '0.00'
},
logsArr : [],
page : { current: 1 },
pageLoding : false,
needSign : false
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// 页面数据
this.setData({
logsArr: [],
page : { current: 1 }
})
// 获取账户信息
this.accountInfo()
},
@@ -33,32 +36,20 @@ Page({
/**
* 获取账户信息
*/
accountInfo(page) {
accountInfo() {
wx.$api.user.account({
page: page
page: this.data.page.current
}).then(res => {
console.log(res.data)
let listArr = this.data.logsArr,
newData = []
if(page == 1 || page == undefined) listArr = []
newData = listArr.concat(res.data.logs.data)
let { all_in, balance, frozen, need_sign, logs } = res.data
this.setData({
score : res.data,
logsArr : newData,
page : res.data.logs.page,
lodingStats : false
account : { all_in, balance, frozen },
needSign : need_sign,
logsArr : logs.page.current == 1 ? logs.data : this.data.logsArr.concat(logs.data),
page : logs.page,
pageLoding : !logs.page.has_more
})
wx.stopPullDownRefresh()
}).catch(err => { })
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
// 获取账户信息
this.accountInfo();
})
},
/**
@@ -66,13 +57,42 @@ Page({
*/
onReachBottom(){
this.setData({
lodingStats: true
pageLoding: true
})
let pageNumber = this.data.page.current
if(this.data.page.has_more){
pageNumber++
// 获取账户信息
this.accountInfo(pageNumber);
let atpage = this.data.page
atpage.current += 1
this.setData({
page: atpage
})
this.accountInfo()
}
},
/**
* 提现
*/
onWithdraw(){
console.log(this.data.needSign)
if(this.data.needSign){
wx.showModal({
title : '提示',
content : '您还未完成实名认证与签约成为VIP用户暂时无法提现',
cancelText : '稍后完成',
confirmText : '立即完善',
confirmColor : '#da2b54',
complete : res => {
if (res.confirm) {
wx.navigateTo({
url: '/pages/idcard/idcard'
})
}
}
})
return
}
wx.navigateTo({
url: '/pages/withdraw/withdraw'
})
}
})

View File

@@ -1,50 +1,37 @@
<view class="top">
<view class="topSee">
<view class="topSee-name">账户余额(元)<image src="/static/icons/see_active.png" mode="widthFix"></image>
</view>
<view class="topSee-number">{{score.balance}}</view>
<view class="topSee-name">账户余额(元)</view>
<view class="topSee-number">{{account.balance}}</view>
</view>
<view class="topBtn" wx:if="{{score.can_withdraw}}">提现</view>
<view class="topBtn" bind:tap="onWithdraw">提现</view>
</view>
<view class="content">
<view class="tab">
<view class="tab-item">
<view class="tab-name">待发放(元)</view>
<view class="tab-number">{{score.frozen}}</view>
</view>
<view class="tab-item">
<view class="tab-name">总收入(元)</view>
<view class="tab-number">{{score.all_in}}</view>
</view>
<!-- 账户统计 -->
<view class="tab">
<view class="tab-item">
<view class="tab-name">待发放(元)</view>
<view class="tab-number">{{account.frozen}}</view>
</view>
<view class="tab-item">
<view class="tab-name">总收入(元)</view>
<view class="tab-number">{{account.all_in}}</view>
</view>
</view>
<!-- 收益明细 -->
<view class="detailed active">
<view class="listTitle">
收益明细
</view>
<view class="listTitle">收益明细</view>
<view class="list" wx:if="{{logsArr.length > 0}}">
<view class="list-item" wx:for="{{logsArr}}" wx:key="logsArr">
<view class="item-top">
<view class="item-name">
当月贡献发放
</view>
<view class="item-time">
2023-05-22
</view>
</view>
<view class="item-number">
+100
<view class="item-text">
<view class="item-name">{{item.remark}}</view>
<view class="item-time">{{item.created_at}}</view>
</view>
<view class="item-number">{{item.amount}}</view>
</view>
<view class="pagesLoding" wx:if="{{lodingStats}}">
<block wx:if="{{page.has_more}}">
<image class="pagesLoding-icon" src="/static/icon/refresh_loding.gif" mode="widthFix"></image>加载中...
</block>
<block wx:else>
没有更多了~
</block>
<view class="pagesLoding" wx:if="{{pageLoding}}">
<view wx:if="{{page.has_more}}"><image class="pagesLoding-icon" src="/static/icons/refresh_loding.gif" mode="widthFix"></image>加载中...</view>
<view wx:else>没有更多了~</view>
</view>
</view>
<view class="pages-no" wx:else>

View File

@@ -1,126 +1,27 @@
page {
background-color: #f6f6f6;
}
page { background-color: #f6f6f6; }
.top {
background-image: linear-gradient(to bottom, #dc3159, #f46284);
color: #ffffff;
padding: 40rpx 40rpx 120rpx;
box-sizing: border-box;
display: flex;
}
/* 账户余额 */
.top { background-image: linear-gradient(to bottom, #dc3159, #f46284); color: #ffffff; padding: 40rpx 40rpx 120rpx; box-sizing: border-box; display: flex; align-items: center; }
.topSee { width: calc(100% - 180rpx); padding-right: 30rpx; box-sizing: border-box; }
.topSee-name { line-height: 40rpx; font-size: 30rpx; align-items: center; }
.topSee-number { font-size: 64rpx; letter-spacing: 2rpx; font-weight: bold; }
.topBtn { background-color: #ffffff; display: inline-block; color: #da2b54; line-height: 74rpx; border-radius: 37rpx; width: 180rpx; text-align: center; font-weight: bold; font-size: 32rpx; }
.topSee {
flex: 1;
}
/* 账户统计 */
.tab { background-color: #ffffff; border-radius: 20rpx; padding: 40rpx 30rpx; box-sizing: border-box; display: flex; margin: -70rpx 30rpx 0; }
.tab-item { text-align: center; width: 50%; }
.tab-name{ font-size: 28rpx; color: gray; }
.tab-number { font-size: 34rpx; font-weight: bold; margin-top: 5rpx; }
.topSee-name {
display: flex;
line-height: 40rpx;
}
.topSee-name image {
width: 34rpx;
margin: 5rpx 20rpx;
filter: grayscale(100%);
-webkit-filter: grayscale(100%);
filter: brightness(0%) invert(100%);
-webkit-filter: brightness(0%) invert(100%);
}
.topSee-number {
font-size: 60rpx;
margin-top: 20rpx;
letter-spacing: 2rpx;
}
.topBtn {
background-color: #ffffff;
display: inline-block;
color: #da2b54;
padding: 0 50rpx;
border-radius: 80rpx;
height: 68rpx;
line-height: 68rpx;
margin-top: 40rpx;
}
.content {
padding: 0 30rpx;
box-sizing: border-box;
margin-top: -70rpx;
}
.tab {
background-color: #ffffff;
border-radius: 20rpx;
padding: 40rpx 10rpx;
box-sizing: border-box;
display: flex;
}
.tab-item {
text-align: center;
flex: 2;
}
.tab-number {
font-size: 44rpx;
margin-top: 20rpx;
}
.listTitle {
padding: 30rpx 30rpx 0;
font-weight: 600;
box-sizing: border-box;
font-size: 32rpx;
}
.list {
padding: 30rpx;
box-sizing: border-box;
}
.list-item {
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 30rpx;
padding: 30rpx;
box-sizing: border-box;
display: flex;
}
.item-top {
flex: 1;
}
.item-name {
font-size: 30rpx;
}
.item-number {
color: #da2b54;
font-weight: 600;
font-size: 38rpx;
line-height: 90rpx;
}
.item-time {
color: #999999;
font-size: 28rpx;
margin-top: 15rpx;
}
/* 收益明细 */
.listTitle { padding: 30rpx 30rpx 0; font-weight: 600; box-sizing: border-box; font-size: 30rpx; }
.list { padding: 30rpx; box-sizing: border-box;}
.list-item { background-color: #fff; border-radius: 20rpx; margin-bottom: 20rpx; padding: 30rpx; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; }
.item-text{ width: calc(100% - 200rpx); }
.item-name { font-size: 30rpx; font-weight: bold; line-height: 40rpx; }
.item-time { font-size: 28rpx; line-height: 40rpx; color: gray; margin-top: 5rpx; }
.item-number { color: #da2b54; font-size: 34rpx; font-weight: bold; width: 200rpx; text-align: right; padding-left: 20rpx; box-sizing: border-box; }
/* 暂无数据 */
.pages-no {
background-color: #fff;
margin-top: 30rpx;
text-align: center;
padding: 120rpx 0;
color: #6d6d6d;
font-size: 28rpx;
}
.pages-no image {
width: 180rpx;
}
.pages-no { background-color: #fff; margin: 30rpx; border-radius: 20rpx; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #6d6d6d; font-size: 28rpx; height: 55vh; }
.pages-no image { width: 180rpx; height: 180rpx; }