提现页面优化

This commit is contained in:
高健 2021-09-22 09:29:16 +08:00
parent 992aae5583
commit 1b020d8f04
6 changed files with 113 additions and 22 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

BIN
images/ic_wechat_icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

View File

@ -1,7 +1,47 @@
<cu-custom isBack="{{true}}"> <cu-custom isBack="{{true}}">
<view slot="content">立即提现</view> <view slot="content">立即提现</view>
</cu-custom> </cu-custom>
<view class="page-box" style="padding: 0rpx;"> <view class="page-box">
<view class="content-box">
<view style="font-size: 32rpx;padding: 20rpx;">可提现金额(元)</view>
<view style="margin-left: 23rpx;">
<text style="font-size: 40rpx;line-height: 80rpx;">¥</text>
<text
style="font-size: 80rpx;line-height: 80rpx;margin-left: 15rpx;">{{accountInfo.accountMoney/100}}</text>
</view>
<view class="content-bottom-box">
<view>
<view>最低提现金额(元)</view>
<view style="height: 40rpx;text-align: left;line-height: 40rpx;">¥1.00</view>
</view>
<view bindtap="toRecord">
<view>查看提现记录</view>
<image src="/images/ic_take_cash_record.png" style="width: 40rpx;height: 40rpx;" mode="scaleToFill">
</image>
</view>
</view>
</view>
<view class="cash-box">
<view class="title-box">
<view class="title">提现金额</view>
</view>
<view class="input-box">
<text style="text-align: left;font-size: 40rpx;line-height: 40rpx;">¥</text>
<input type="digit" value="{{takeValue}}" bindinput="inputWatch" />
<view catchtap="takeAll" style="font-size: 28rpx;color: #E6B980;">全部提现</view>
</view>
<view class="cash-bottom-box">
<view>提现至微信零钱</view>
<image src="/images/ic_wechat_icon.png" style="width: 40rpx;height: 40rpx;" mode="scaleToFill"></image>
</view>
</view>
<view style="width: 100%;margin-top: 70rpx;">
<button class="cu-btn bg-blue" style="width:100%" bindtap="doCash">申请提现</button>
</view>
</view>
<!-- <view class="page-box" style="padding: 0rpx;">
<view class="content-box"> <view class="content-box">
<view> <view>
<view class="money"> <view class="money">
@ -27,4 +67,4 @@
</view> </view>
<view class="foot" style="padding: 15rpx;"> <view class="foot" style="padding: 15rpx;">
<button class="cu-btn bg-blue" style="width:100%" bindtap="doCash">申请提现</button> <button class="cu-btn bg-blue" style="width:100%" bindtap="doCash">申请提现</button>
</view> </view> -->

View File

@ -3,21 +3,25 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: flex-start;
width: 100%; width: 100%;
background-color: #E6B980; background-color: #E6B980;
text-align: center; border-radius: 10rpx;
min-height: 400rpx; color: #ffffff;
} }
.content-box .money { .content-bottom-box {
color: #fff; display: flex;
} flex-direction: row;
align-items: center;
.content-box .hint { justify-content: space-between;
width: 100%;
background-color: #D6A970;
border-bottom-left-radius: 10rpx;
border-bottom-right-radius: 10rpx;
padding: 25rpx;
font-size: 28rpx; font-size: 28rpx;
margin-top: 15rpx; margin-top: 25rpx;
color: #fff;
} }
.cash-box { .cash-box {
@ -26,32 +30,45 @@
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
align-items: flex-start; align-items: flex-start;
width: 90%; width: 100%;
background-color: #fff; background-color: #fff;
border-radius: 15rpx; border-radius: 5rpx;
position: absolute;
top: 450rpx;
box-shadow: 0 4rpx 8rpx 0 #DFDBDB, 0 6rpx 20rpx 0 #DFDBDB; box-shadow: 0 4rpx 8rpx 0 #DFDBDB, 0 6rpx 20rpx 0 #DFDBDB;
margin-top: 15rpx;
} }
.cash-box .title { .cash-box .title {
font-size: 32rpx; font-size: 32rpx;
} }
.cash-bottom-box {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 100%;
border-top: 1rpx solid #f3f3f3;
padding: 20rpx 20rpx 0rpx 20rpx;
}
.input-box { .input-box {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: flex-end;
justify-content: space-between; justify-content: flex-start;
font-size: 80rpx; font-size: 80rpx;
padding: 20rpx;
line-height: 80rpx;
} }
.input-box input { .input-box input {
width: 100%; width: 80%;
text-align: center; text-align: left;
line-height: 80rpx; line-height: 80rpx;
height: 80rpx; height: 80rpx;
font-size: 80rpx;
padding-left: 15rpx;
} }
.title-box { .title-box {
@ -61,4 +78,5 @@
align-items: center; align-items: center;
width: 100%; width: 100%;
font-size: 32rpx; font-size: 32rpx;
padding: 0rpx 20rpx 20rpx 20rpx;
} }

View File

@ -651,6 +651,7 @@ Page({
}) })
.then(res => { .then(res => {
wx.setStorageSync('usercode', res.data.userCode) wx.setStorageSync('usercode', res.data.userCode)
wx.setStorageSync('userId', res.data.userId)
}) })
.catch(err => { .catch(err => {
console.log(err) console.log(err)

View File

@ -18,7 +18,8 @@ Page({
code: '', code: '',
isOpen: true, isOpen: true,
payState: {}, payState: {},
accountInfo: undefined accountInfo: undefined,
userId: ''
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
@ -32,9 +33,11 @@ Page({
try { try {
var isBind = wx.getStorageSync('bindPhone') var isBind = wx.getStorageSync('bindPhone')
var code = wx.getStorageSync('usercode') var code = wx.getStorageSync('usercode')
var userId = wx.getStorageSync('userId')
if (code && code.length > 0) { if (code && code.length > 0) {
_self.setData({ _self.setData({
code: code code: code,
userId: userId
}) })
} }
_self.setData({ _self.setData({
@ -257,6 +260,35 @@ Page({
this.getItemList() this.getItemList()
this.getPayState() this.getPayState()
this.getAccountInfo() this.getAccountInfo()
this.getBaseInfo()
},
getBaseInfo() {
var _self = this
app.http.get(app.urls.getMainMoment.format({
configColumnId: 'de7b5e22-64f9-4c60-a1f9-6ac004dfb9a8'
}), {
header: {
token: app.globalData.token
},
data: {
userId: _self.data.userId
}
})
.then(res => {
if (res.data.length > 0) {
res.data[0].list.forEach(it => {
switch (it.name) {
case 'cardtitle':
wx.setStorageSync('cardtitle', it.value)
break
case 'postertitle':
wx.setStorageSync('postertitle', it.value)
break
}
})
} else {}
})
.catch(err => {})
}, },
//跳转到二级栏目页面 //跳转到二级栏目页面
goColumnList(e) { goColumnList(e) {