|
@ -1,236 +1,284 @@ |
|
|
<template> |
|
|
<template> |
|
|
<view class="page"> |
|
|
<view class="page"> |
|
|
<navbar title="提现" |
|
|
|
|
|
bgColor="#A3D250" |
|
|
|
|
|
color="#fff" |
|
|
|
|
|
leftClick |
|
|
|
|
|
@leftClick="$utils.navigateBack" /> |
|
|
|
|
|
|
|
|
|
|
|
<view class="bg"/> |
|
|
|
|
|
|
|
|
|
|
|
<view class="price"> |
|
|
|
|
|
<!-- <view class="title"> |
|
|
|
|
|
请输入提现金额(元) |
|
|
|
|
|
</view> --> |
|
|
|
|
|
<view class="input-box"> |
|
|
|
|
|
<view class="input"> |
|
|
|
|
|
<input type="number" v-model="form.money" |
|
|
|
|
|
placeholder="请输入提现金额"/> |
|
|
|
|
|
</view> |
|
|
|
|
|
<view class="" |
|
|
|
|
|
@click="selectAll"> |
|
|
|
|
|
全部提现 |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- 导航栏 --> |
|
|
|
|
|
<navbar title="提现" leftClick @leftClick="$utils.navigateBack" bgColor="#E3441A" color="#fff" /> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 佣金信息 --> |
|
|
|
|
|
<view class="b-relative center font-m"> |
|
|
|
|
|
<image src="@/pages_order/static/withdraw/cz.png" /> |
|
|
|
|
|
|
|
|
|
|
|
<view class="user-money"> |
|
|
|
|
|
<view class="title">总佣金</view> |
|
|
|
|
|
<view class="money">999999元</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="input-box"> |
|
|
|
|
|
<view class="input"> |
|
|
|
|
|
<input type="text" v-model="form.bankName" |
|
|
|
|
|
placeholder="请输入开户行"/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="operation"> |
|
|
|
|
|
<view class="operation-item"> |
|
|
|
|
|
余额记录 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="input-box"> |
|
|
|
|
|
<view class="input"> |
|
|
|
|
|
<input type="text" v-model="form.bankNo" |
|
|
|
|
|
placeholder="请输入银行卡号"/> |
|
|
|
|
|
|
|
|
| |
|
|
|
|
|
<view class="operation-item"> |
|
|
|
|
|
提现记录 |
|
|
|
|
|
</view> |
|
|
|
|
|
| |
|
|
|
|
|
<view class="operation-item"> |
|
|
|
|
|
佣金记录 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="num"> |
|
|
|
|
|
可提现金额:{{ riceInfo.canWithdraw || 0 }} |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="cell"> |
|
|
|
|
|
<view class="cell-top">提现说明</view> |
|
|
|
|
|
<view style="padding: 0 20rpx;"> |
|
|
|
|
|
<uv-parse :content="configList.withdrawal_instructions"></uv-parse> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 我要提现 --> |
|
|
|
|
|
<view class="from-body"> |
|
|
|
|
|
<view>我要提现</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="money"> |
|
|
|
|
|
<van-cell-group inset> |
|
|
|
|
|
<van-field type="number" v-model="form.price" placeholder="请输入提现金额" |
|
|
|
|
|
style="background-color: #F5F5F5; margin: 10rpx 0px; border-radius: 20px;" /> |
|
|
|
|
|
<van-field v-model="form.bank" placeholder="请输入开户行" |
|
|
|
|
|
style="background-color: #F5F5F5; margin: 10rpx 0px; border-radius: 20px;" /> |
|
|
|
|
|
<van-field v-model="form.card" placeholder="请输入卡号" |
|
|
|
|
|
style="background-color: #F5F5F5; margin: 10rpx 0px; border-radius: 20px;" /> |
|
|
|
|
|
</van-cell-group> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view v-html="withdrawalStatement" class="withdrawal-statement"></view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="uni-color-btn" |
|
|
|
|
|
@click="submit"> |
|
|
|
|
|
提现 |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="cell"> |
|
|
|
|
|
<view class="cell-top">提现记录</view> |
|
|
|
|
|
<view class="cell-box" |
|
|
|
|
|
:key="index" |
|
|
|
|
|
v-for="(item,index) in list"> |
|
|
|
|
|
<uv-cell-group> |
|
|
|
|
|
<uv-cell |
|
|
|
|
|
:title="item.title" |
|
|
|
|
|
:label="item.createTime" |
|
|
|
|
|
:center="true"> |
|
|
|
|
|
<template #value> |
|
|
|
|
|
<view class="cell-text"> |
|
|
|
|
|
|
|
|
|
|
|
<view class="price-text" |
|
|
|
|
|
v-if="item.type">{{ type[item.type] }}{{ item.money }}</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="price-text add" |
|
|
|
|
|
v-else>{{ type[item.type] }}{{ item.money }}</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="tips">{{ state[item.state] }}</view> |
|
|
|
|
|
</view> |
|
|
|
|
|
</template> |
|
|
|
|
|
</uv-cell> |
|
|
|
|
|
</uv-cell-group> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="recharge"> |
|
|
|
|
|
<view @click="withdraw" class="btn"> |
|
|
|
|
|
立即提现 |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import mixinsList from '@/mixins/list.js' |
|
|
import mixinsList from '@/mixins/list.js' |
|
|
import { mapState } from 'vuex' |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
mapState |
|
|
|
|
|
} from 'vuex' |
|
|
export default { |
|
|
export default { |
|
|
mixins : [mixinsList], |
|
|
|
|
|
|
|
|
mixins: [mixinsList], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
mixinsListApi : 'getWaterPageList', |
|
|
|
|
|
list : [], |
|
|
|
|
|
type : ['+', '-'], |
|
|
|
|
|
state : ['未到账', '已到账'], |
|
|
|
|
|
form : { |
|
|
|
|
|
money : '', |
|
|
|
|
|
bankNo : '', |
|
|
|
|
|
bankName : '', |
|
|
|
|
|
|
|
|
mixinsListApi: 'getWaterPageList', |
|
|
|
|
|
list: [], |
|
|
|
|
|
type: ['+', '-'], |
|
|
|
|
|
state: ['未到账', '已到账'], |
|
|
|
|
|
form: { |
|
|
|
|
|
money: '', |
|
|
|
|
|
bankNo: '', |
|
|
|
|
|
bankName: '', |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(['userInfo', 'riceInfo']), |
|
|
...mapState(['userInfo', 'riceInfo']), |
|
|
}, |
|
|
}, |
|
|
|
|
|
data() { |
|
|
|
|
|
return { |
|
|
|
|
|
withdrawalStatement: '', //充值说明 |
|
|
|
|
|
form: { |
|
|
|
|
|
type: 1, |
|
|
|
|
|
price: undefined, |
|
|
|
|
|
bank: '', |
|
|
|
|
|
card: '' |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onShow() { |
|
|
onShow() { |
|
|
this.$store.commit('getUserInfo') |
|
|
|
|
|
this.$store.commit('getRiceInfo') |
|
|
|
|
|
|
|
|
this.getConfig() |
|
|
|
|
|
this.getUserInfo() |
|
|
|
|
|
this.getTenRealName() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
selectAll(){ |
|
|
|
|
|
this.form.money = this.riceInfo.canWithdraw |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getConfig() { //获取配置信息 |
|
|
|
|
|
this.$api('getConfig', {}, res => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
res.result.forEach(item => { |
|
|
|
|
|
if (item.keyValue === 'withdraw') { |
|
|
|
|
|
this.withdrawalStatement = item.content |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
submit(){ |
|
|
|
|
|
|
|
|
|
|
|
if(this.$utils.verificationAll(this.form, { |
|
|
|
|
|
money : '请输入金额', |
|
|
|
|
|
bankName : '请输入开户行', |
|
|
|
|
|
bankNo : 'bankNo', |
|
|
|
|
|
})){ |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(this.form.money <= 0){ |
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
title: '输入金额必须大于0', |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
withdraw() { //立即提现 |
|
|
|
|
|
let isOk = this.parameterVerification(); |
|
|
|
|
|
if (isOk && !isOk.auth) { |
|
|
|
|
|
return uni.showToast({ |
|
|
|
|
|
title: isOk.title, |
|
|
icon: 'none' |
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.$api('withdraw', this.form, res => { |
|
|
|
|
|
if(res.code == 200){ |
|
|
|
|
|
|
|
|
this.$api('recharge', this.form, res => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
uni.showToast({ |
|
|
uni.showToast({ |
|
|
title: '提现成功', |
|
|
title: '提现成功', |
|
|
icon : 'none' |
|
|
|
|
|
|
|
|
icon: 'none' |
|
|
}) |
|
|
}) |
|
|
this.form.money = '' |
|
|
|
|
|
this.$store.commit('getUserInfo') |
|
|
|
|
|
this.$store.commit('getRiceInfo') |
|
|
|
|
|
this.getData() |
|
|
|
|
|
|
|
|
this.getUserInfo() |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getTenRealName() { //获取技师实名认证 |
|
|
|
|
|
this.$api('getTenRealName', {}, res => { |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
let result = res.result; |
|
|
|
|
|
if (result && result.bank && result.card) { |
|
|
|
|
|
this.form.bank = result.bank |
|
|
|
|
|
this.form.card = result.card |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
parameterVerification() { //验证用户参数合法性 |
|
|
|
|
|
let { |
|
|
|
|
|
price, |
|
|
|
|
|
bank, |
|
|
|
|
|
card |
|
|
|
|
|
} = this.form |
|
|
|
|
|
if (!price) { |
|
|
|
|
|
return { |
|
|
|
|
|
title: '请填写提现金额', |
|
|
|
|
|
auth: false |
|
|
|
|
|
} |
|
|
|
|
|
} else if (price <= 0) { |
|
|
|
|
|
return { |
|
|
|
|
|
title: '提现金额必须大于0', |
|
|
|
|
|
auth: false |
|
|
|
|
|
} |
|
|
|
|
|
} else if (price > this.userInfo.price) { |
|
|
|
|
|
return { |
|
|
|
|
|
title: '提现金额大于余额', |
|
|
|
|
|
auth: false |
|
|
|
|
|
} |
|
|
|
|
|
} else if (bank.trim() == '') { |
|
|
|
|
|
return { |
|
|
|
|
|
title: '请填写开户行', |
|
|
|
|
|
auth: false |
|
|
|
|
|
} |
|
|
|
|
|
} else if (card.trim() == '') { |
|
|
|
|
|
return { |
|
|
|
|
|
title: '请填写卡号', |
|
|
|
|
|
auth: false |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return { |
|
|
|
|
|
title: '验证通过', |
|
|
|
|
|
auth: true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.page{ |
|
|
|
|
|
.bg{ |
|
|
|
|
|
background-color: $uni-color; |
|
|
|
|
|
height: 640rpx; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
width: 100%; |
|
|
|
|
|
z-index: -1; |
|
|
|
|
|
border-bottom-left-radius: 30rpx; |
|
|
|
|
|
border-bottom-right-radius: 30rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.price{ |
|
|
|
|
|
color: #FFFFFF; |
|
|
|
|
|
padding: 40rpx; |
|
|
|
|
|
.title{ |
|
|
|
|
|
color: #eee; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
|
|
|
.page { |
|
|
|
|
|
|
|
|
|
|
|
// 佣金信息 |
|
|
|
|
|
.center { |
|
|
|
|
|
position: relative; |
|
|
|
|
|
width: 710rpx; |
|
|
|
|
|
height: 316rpx; |
|
|
|
|
|
margin: 20rpx auto; |
|
|
} |
|
|
} |
|
|
.input-box{ |
|
|
|
|
|
background-color: #FFFFFF; |
|
|
|
|
|
color: $uni-color; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.center image { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
top: 0; |
|
|
|
|
|
width: 710rpx; |
|
|
|
|
|
height: 316rpx; |
|
|
|
|
|
border-radius: 12rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.center .user-money { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 50%; |
|
|
|
|
|
transform: translateY(-50%); |
|
|
|
|
|
z-index: 9; |
|
|
|
|
|
color: white; |
|
|
|
|
|
padding-left: 50rpx; |
|
|
|
|
|
box-sizing: border-box; |
|
|
|
|
|
|
|
|
|
|
|
.title { |
|
|
|
|
|
font-size: 36rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.money { |
|
|
|
|
|
font-size: 40rpx; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.operation { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
bottom: 20rpx; |
|
|
|
|
|
left: 0rpx; |
|
|
|
|
|
width: 100%; |
|
|
display: flex; |
|
|
display: flex; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
border-radius: 30rpx; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
padding: 10rpx; |
|
|
|
|
|
margin: 20rpx 0; |
|
|
|
|
|
.input{ |
|
|
|
|
|
color: #000; |
|
|
|
|
|
// font-size: 40rpx; |
|
|
|
|
|
// font-weight: 900; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
input{ |
|
|
|
|
|
flex: 1; |
|
|
|
|
|
padding: 14rpx 20rpx; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
color: white; |
|
|
|
|
|
|
|
|
|
|
|
.operation-item { |
|
|
|
|
|
margin: 0rpx 20rpx; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.num{ |
|
|
|
|
|
font-size: 30rpx; |
|
|
|
|
|
font-weight: 900; |
|
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 我要提现 |
|
|
|
|
|
.from-body { |
|
|
|
|
|
padding: 40rpx 20rpx; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
text-align: left; |
|
|
|
|
|
color: #333333; |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.cell { |
|
|
|
|
|
margin: 20rpx; |
|
|
|
|
|
background-color: #FFFFFF; |
|
|
|
|
|
border-radius: 16rpx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.cell-top { |
|
|
|
|
|
padding: 40rpx 34rpx; |
|
|
|
|
|
color: #474747; |
|
|
|
|
|
font-size: 34rpx; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
position: relative; |
|
|
|
|
|
&::after{ |
|
|
|
|
|
content: ''; |
|
|
|
|
|
display: block; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
left: 55rpx; |
|
|
|
|
|
bottom: 38rpx; |
|
|
|
|
|
height: 10rpx; |
|
|
|
|
|
width: 120rpx; |
|
|
|
|
|
background: linear-gradient(to right, #fff, $uni-color); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.money { |
|
|
|
|
|
margin: 20rpx 0rpx; |
|
|
} |
|
|
} |
|
|
.cell-text{ |
|
|
|
|
|
text-align: right; |
|
|
|
|
|
.price-text{ |
|
|
|
|
|
font-size: 32rpx; |
|
|
|
|
|
font-weight: 900; |
|
|
|
|
|
} |
|
|
|
|
|
.add{ |
|
|
|
|
|
color: #f40; |
|
|
|
|
|
} |
|
|
|
|
|
.tips{ |
|
|
|
|
|
font-size: 22rpx; |
|
|
|
|
|
color: #aaa; |
|
|
|
|
|
margin-top: 10rpx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.money .van-cell-group--inset { |
|
|
|
|
|
margin: 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.money .van-field { |
|
|
|
|
|
padding: auto 0rpx; |
|
|
|
|
|
margin-bottom: 30rpx !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.recharge { |
|
|
|
|
|
position: fixed; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
left: 0; |
|
|
|
|
|
bottom: 0; |
|
|
|
|
|
width: 750rpx; |
|
|
|
|
|
height: 100rpx; |
|
|
|
|
|
background: white; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.recharge .btn { |
|
|
|
|
|
width: 85%; |
|
|
|
|
|
height: 80rpx; |
|
|
|
|
|
border-radius: 40rpx; |
|
|
|
|
|
color: white; |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
line-height: 80rpx; |
|
|
|
|
|
font-size: 28rpx; |
|
|
|
|
|
background: $uni-color; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media all and (min-width: 961px) { |
|
|
|
|
|
.recharge { |
|
|
|
|
|
left: 50% !important; |
|
|
|
|
|
transform: translateX(-50%); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
</style> |
|
|
|
|
|
|
|
|
</style> |