实名相关更新

This commit is contained in:
GaoHao 2025-01-08 19:56:39 +08:00
parent 7cbadc5638
commit 84c66e6529
4 changed files with 344 additions and 88 deletions

View File

@ -141,15 +141,12 @@
"path": "pages/me/withdraw/index",
"style": {
"navigationBarTitleText": "申请提现",
"navigationBarTextStyle": "#fff",
"navigationBarBackgroundColor": "rgb(255, 117, 129)",
"titleNView": {
"buttons": [{
"text": "规则",
"fontSize": "30rpx",
"onclick": "onNavigationBarButtonTap"
}]
}
"navigationStyle": "custom"
}
}, {
"path": "pages/me/withdraw/realName",
"style": {
"navigationBarTitleText": "实名认证"
}
}, {
"path": "pages/me/withdraw/alipay",

View File

@ -1,19 +1,17 @@
<template>
<view class="containerView">
<up-cell-group>
<up-cell title="收款人姓名">
<up-cell-group :border="false">
<up-cell title="收款人姓名">
<template #right-icon> <up-input border="none" v-model="data.zhiFuBaoName" placeholder="请输入支付宝收款人姓名"></up-input> </template>
</up-cell>
<up-cell title="支付宝账号">
<template #right-icon> <up-input border="none" v-model="data.zhiFuBao" placeholder="请输入要绑定的支付宝手机号"></up-input> </template>
</up-cell>
</up-cell-group>
<button :class="data.zhiFuBao&&data.zhiFuBaoName?'confirm-btn':'confirm-btn1'" @click="toLogin"
:disabled="logining">绑定账户</button>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;;margin-bottom: 10rpx;">身份证姓名需与支付宝姓名一致</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx">否则将无法正常收款请须知</view>
<button class="confirm-btn" @click="toLogin"
:disabled="data.logining">绑定账户</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的支付宝账户和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
</view>
</template>
@ -25,14 +23,14 @@
import { commonType } from '@/api/init.js';
let data = reactive({
zhiFuBao: '',
zhiFuBaoName: '',
zhiFuBao: null,
zhiFuBaoName: null,
logining: false
})
onLoad(() => {
this.zhiFuBao = uni.getStorageSync('userInfo').zhiFuBao;
this.zhiFuBaoName = uni.getStorageSync('userInfo').zhiFuBaoName;
data.zhiFuBao = uni.getStorageSync('userInfo').zhiFuBao;
data.zhiFuBaoName = uni.getStorageSync('userInfo').zhiFuBaoName;
})
function inputChange(e) {
@ -69,7 +67,7 @@
icon: 'none',
complete() {
setTimeout(function() {
// uni.navigateBack();
uni.navigateBack();
}, 1000)
}
})
@ -87,7 +85,7 @@
}
.containerView {
padding-top: 32upx;
padding:30rpx;
position: relative;
width: 100%;
height: 100%;
@ -107,7 +105,7 @@
font-size: 32rpx;
&:after {
border-radius: 60px;
border: none;
}
}
@ -122,9 +120,9 @@
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
border: none;
&:after {
border-radius: 60px;
border: none;
}
}
</style>

View File

@ -1,48 +1,38 @@
<template>
<view class="cash">
<view class=""
style="background-color: #ff7581;height: 400upx;border-bottom-right-radius: 40upx;border-bottom-left-radius: 40upx;">
<view style="font-size: 32upx;color: #FFFFFF;padding-top: 100upx;">可提现总额</view>
<view style="font-size: 40upx;color: #FFFFFF;padding-top: 20upx;">¥ {{ data.mayMoney }}</view>
<view
style="width: 90%;height: max-content;margin-left: 40upx;background-color: #FFFFFF;box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;margin-top: 50upx;border-radius: 20upx;">
<view class="container">
<view class="nav">
<up-icon name="arrow-left" color="#fff" size="20" @click="back"></up-icon>
<view class="navTitle">申请提现</view>
<view class="ruleBtn" @click="data.ruleShow = true">规则</view>
</view>
<view class="content">
<view class="title">可提现总额</view>
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
<view class="val" style="">
<view style="display: flex;flex-direction: row;padding: 20upx;">
<view style="font-size: 32upx;color: #333333;">提现金额
</view>
<view style="font-size: 32upx;color: #333333;">提现金额</view>
</view>
<view
style="display: flex;flex-direction: row;padding: 20upx;justify-content: space-between;align-items: center;">
<view class="input" style="">
<view style="display: flex;align-items: center;">
<view style="font-size: 40upx;color: #333333;">¥</view>
<input type="number" v-model="data.money" placeholder="请输入金额" @input="moneyInput"
style="font-size: 40upx;color: #333333;text-align: left;margin-left: 10upx;width: 80%;" />
<input type="number" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
</view>
<view @click="setAllMoney" style="font-size: 30rpx;color: #333333;background: #ff7581;color: white;border-radius: 10rpx;padding: 7rpx 15rpx;flex-shrink: 0;">
<view class="allbtn" @click="setAllMoney">
全部
</view>
</view>
<view style="background: #E6E6E6;width: 100%;height: 1upx;"></view>
</view>
<view @click="goWithdraw" style="margin: 32upx;font-size: 18px;background: #ff7581;color: white;border-radius: 10px;height: 40px;line-height: 40px;">
{{!data.isWithdraw?'观看广告提现':'立即提现'}}
<view class="witBtn" @click="goWithdraw"> {{!data.isWithdraw?'观看广告提现':'立即提现'}} </view>
<view class="tab" style="">
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
<view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view>
<view @click="linkTo('/pages/me/withdraw/moneyList?moneyType=1&viewType=2')">红包明细</view>
</view>
<view style="display: flex;width: 100%;justify-content: space-around;width: 100%;">
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="navTo('/pages/me/withdraw/alipay')">
提现账号
</view>
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="navTo('/pages/me/withdraw/moneyList?moneyType=1&viewType=2')">
红包明细
</view>
</view>
<view style="text-align: left" class="moneyList u-p-b-30">
<view class="moneyList u-p-b-30">
<view v-if="data.list.length" v-for="(item, index) in data.list" :key="index" class="item">
<view>
<view style="margin-bottom: 8upx;text-align: right;">
@ -78,7 +68,7 @@
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title-style="{fontWeight:'700'}" @confirm="data.ruleShow=false" confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;" >
<rich-text class="color-666" :nodes="data.ruleInfo"></rich-text>
<rich-text style="text-align: justify;font-size: 14px;color: #333;" :nodes="data.ruleInfo"></rich-text>
</scroll-view>
</view>
@ -97,6 +87,7 @@
import { onReady,onLoad,onShow,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
import { commonType } from '@/api/init.js';
import { linkTo } from '@/utils/app.js';
let data = reactive({
ruleShow: true,
@ -104,7 +95,7 @@
用户在平台中对奖励提现的适用以下规则
<br/>
<br/>
1用户的收益达到最低提现金额要求后可以申请提现每日发起前10笔提现为自动到账超出则需第二个工作日后到账
1用户的收益达到最低提现金额要求后可以申请提现每日只可以提现一笔
<br/>
2用户需要通过支付宝提现需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息请确保提供的信息准确无误以免提现失败
<br/>
@ -155,7 +146,9 @@
data.list = []
data.getMoneyDetail();
})
function back() {
uni.navigateBack()
}
/**
* 获取看广告状态
*/
@ -308,7 +301,7 @@
icon: 'none'
})
setTimeout(function() {
navTo('/pages/me/withdraw/alipay')
linkTo('/pages/me/withdraw/alipay')
}, 1500)
}
@ -325,20 +318,50 @@
});
return;
}
if (uni.getStorageSync('userInfo').zhiFuBao && uni.getStorageSync('userInfo').zhiFuBaoName) {
uni.showToast({ icon: 'none', title: "请先绑定支付宝" });
setTimeout(()=>{
linkTo('/pages/me/withdraw/alipay')
},1500)
return;
}
if (uni.getStorageSync('userInfo').certName && uni.getStorageSync('userInfo').mobile && uni.getStorageSync('userInfo').certNo && uni.getStorageSync('userInfo').accountNo) {
uni.showToast({ icon: 'none', title: "请先实名认证" });
setTimeout(()=>{
linkTo('/pages/me/withdraw/realName')
},1500)
return;
}
if (that.zhifubao && that.zhifubaoName) {
uni.navigateTo({
url: "/me/invite/zhifubao"
})
return;
}
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + uni.getStorageSync('userInfo').zhiFuBaoName + '\n\n提现金额:' + data
.money + '元\n\n收款人账号' + uni.getStorageSync('userInfo').zhiFuBao + '',
content: '每日只可提现一次',
success: (e) => {
if (e.confirm) {
getMoney();
getMoneyDetail();
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + uni.getStorageSync('userInfo').zhiFuBaoName + '\n\n提现金额:' + data
.money + '元\n\n收款人账号' + uni.getStorageSync('userInfo').zhiFuBao + '',
success: (e) => {
if (e.confirm) {
getMoney();
getMoneyDetail();
}
}
});
}
}
});
} else {
uni.showToast({
@ -353,14 +376,117 @@
});
}
} else {
navTo('/pages/me/withdraw/alipay')
linkTo('/pages/me/withdraw/alipay')
}
}
</script>
<style lang="scss" scoped>
// @import '../../static/css/index.css';
.container {
text-align: center;
background: white;
position: absolute;
width: 100%;
.nav{
width: 100%;
height: 96rpx;
line-height: 96rpx;
position: absolute;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
.navTitle{
color: #fff;
font-size: 32rpx;
font-weight: bold;
}
.ruleBtn{
font-size: 30rpx;
color: #fff;
}
}
.content{
background-color: #ff7581;
height: 400rpx;
border-bottom-right-radius: 40rpx;
border-bottom-left-radius: 40rpx;
.title{
font-size: 32rpx;
color: #FFFFFF;
padding-top: 140rpx;
}
.mayMoney{
font-size: 40rpx;
color: #FFFFFF;
padding-top: 20rpx;
}
.val{
width: 90%;
height: max-content
;margin-left: 40rpx;
background-color: #FFFFFF;
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
margin-top: 50rpx;
border-radius: 20rpx;
.input{
display: flex;
padding: 20rpx;
justify-content: space-between;
align-items: center;
}
.allbtn{
font-size: 28rpx;
color: #333333;
background: #ff7581;
color: white;
border-radius: 10rpx;
padding: 7rpx 15rpx;
flex-shrink: 0;
}
}
.witBtn{
margin: 32rpx;
font-size: 36rpx;
background: #ff7581;
color: white;
border-radius: 20rpx;
height: 80rpx;
line-height: 80rpx;
}
.tab{
width: 100%;
display: flex;
width: 100%;
justify-content: space-around;
>view{
font-size: 28rpx;
color: #666;
padding-bottom: 60rpx;
padding-top: 20rpx;
}
}
.moneyList{
text-align: left
}
}
.cash-top {
padding: 32upx 32upx 50upx 32upx;
/* border-bottom: 1px solid gainsboro; */
background: #5074FF;
}
.leiji {
font-size: 14px;
color: #ffffff;
margin-bottom: 10px;
}
}
.rule-btn {
font-size: 16px;
// padding: 2rpx 10rpx;
@ -381,26 +507,6 @@
margin-left: 50upx;
}
.cash {
text-align: center;
background: white;
height: 100%;
position: absolute;
width: 100%;
.cash-top {
padding: 32upx 32upx 50upx 32upx;
/* border-bottom: 1px solid gainsboro; */
background: #5074FF;
}
.leiji {
font-size: 14px;
color: #ffffff;
margin-bottom: 10px;
}
}
.moneyList {
.item {
background: white;

View File

@ -0,0 +1,155 @@
<template>
<view class="containerView">
<up-cell-group label-width="80" :border="false">
<up-cell :label-style="{ width: '100rpx' }" title="姓名">
<template #right-icon> <up-input border="none" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
</up-cell>
<up-cell title="身份证号码">
<template #right-icon> <up-input border="none" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
</up-cell>
<up-cell title="银行卡号码">
<template #right-icon> <up-input border="none" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
</up-cell>
<up-cell title="手机号">
<template #right-icon> <up-input border="none" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
</up-cell>
</up-cell-group>
<button class="confirm-btn" @click="toLogin"
:disabled="data.logining">认证</button>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;margin-top: 32rpx;margin-bottom: 10rpx;">请正确填写收款人的银行卡号和真实的收款人姓名</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">手机号需是银行卡银行卡预留手机号</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">银行卡号需与收款人姓名一致</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 15rpx">否则将无法正常收款请须知</view>
</view>
</template>
<script setup>
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
import { updateUser } from '@/api/me/withdraw.js';
import { commonType } from '@/api/init.js';
let data = reactive({
certName: null,
mobile: null,
certNum: null,
accountNo: null,
logining: false
})
onLoad(() => {
data.certName = uni.getStorageSync('userInfo').certName;
data.mobile = uni.getStorageSync('userInfo').mobile;
data.certNum = uni.getStorageSync('userInfo').certNo;
data.accountNo = uni.getStorageSync('userInfo').accountNo;
})
function inputChange(e) {
const key = e.currentTarget.dataset.key;
data[key] = e.detail.value;
}
async function toLogin() {
if (!data.certName) {
uni.showToast({
title: '请设置收款人姓名',
icon: 'none'
})
} else if (!data.mobile) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else if (!data.certNum) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else if (!data.accountNo) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else {
data.logining = true
let res = await updateUser({
certName: data.certName,
mobile: data.mobile,
certNum: data.certNum,
accountNo: data.accountNo.replace(/\s+/g, ''),
})
if( res) {
data.logining = false
let userInfo = uni.getStorageSync('userInfo')
userInfo.mobile = data.mobile
userInfo.mobile = data.mobile
userInfo.certNo = data.certNum
userInfo.accountNo = data.accountNo
uni.setStorageSync('userInfo', userInfo)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
uni.navigateBack();
}, 1000)
}
})
}
}
}
</script>
<style lang='scss'>
page {
background: #FFFFFF;
}
.containerView {
padding:30rpx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
/* background: whitesmoke; */
background: #ff7581;
color: #FFFFFF;
font-size: 32rpx;
&:after {
border: none;
}
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
border: none;
&:after {
border: none;
}
}
</style>