修改实名认证

This commit is contained in:
duan 2025-03-21 15:24:18 +08:00
parent 0714342cee
commit b24bc98e1c
2 changed files with 98 additions and 48 deletions

View File

@ -2,8 +2,8 @@
"name" : "斯耀短剧",
"appid" : "__UNI__E0B05B1",
"description" : "",
"versionName" : "1.2.9",
"versionCode" : 129,
"versionName" : "1.3.0",
"versionCode" : 130,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@ -2,36 +2,60 @@
<view class="containerView">
<up-cell-group label-width="80" :border="false">
<up-cell>
<template #title> <view style="width: 90px;">姓名</view></template>
<template #right-icon> <up-input border="none" :disabled="data.certName" v-model="data.certName" placeholder="请输入姓名"></up-input> </template>
<template #title>
<view style="width: 90px;">姓名</view>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.certName"
placeholder="请输入姓名"></up-input>
</template>
</up-cell>
<up-cell>
<template #title> <view style="width: 90px;">身份证号码</view></template>
<template #right-icon> <up-input border="none" :disabled="data.certNum" v-model="data.certNum" placeholder="请输入身份证号码"></up-input> </template>
<template #title>
<view style="width: 90px;">身份证号码</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.certNum" :disabled="setinput()"
placeholder="请输入身份证号码"></up-input>
</template>
</up-cell>
<up-cell>
<template #title> <view style="width: 90px;">银行卡号码</view></template>
<template #right-icon> <up-input border="none" :disabled="data.accountNo" v-model="data.accountNo" placeholder="请输入银行卡号码"></up-input> </template>
<template #title>
<view style="width: 90px;">银行卡号码</view>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.accountNo"
placeholder="请输入银行卡号码"></up-input> </template>
</up-cell>
<up-cell>
<template #title> <view style="width: 90px;">手机号</view></template>
<template #right-icon> <up-input border="none" :disabled="data.mobile" v-model="data.mobile" placeholder="请输入银行预留号码"></up-input> </template>
<template #title>
<view style="width: 90px;">手机号</view>
</template>
<template #right-icon> <up-input border="none" :disabled="setinput()" v-model="data.mobile"
placeholder="请输入银行预留号码"></up-input> </template>
</up-cell>
<up-cell>
<template #title> <view style="width: 90px;">开户省份</view></template>
<template #right-icon> <up-input border="none" v-model="data.province" placeholder="请输入银行开户省份"></up-input> </template>
<template #title>
<view style="width: 90px;">开户省份</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.province"
placeholder="请输入银行开户省份"></up-input> </template>
</up-cell>
<up-cell>
<template #title> <view style="width: 90px;">开户市区</view></template>
<template #right-icon> <up-input border="none" v-model="data.city" placeholder="请输入银行开户市区"></up-input> </template>
<template #title>
<view style="width: 90px;">开户市区</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.city" placeholder="请输入银行开户市区"></up-input>
</template>
</up-cell>
<up-cell>
<template #title> <view style="width: 90px;">开户行</view></template>
<template #right-icon> <up-input border="none" v-model="data.bankBranch" placeholder="请输入银行开户行"></up-input> </template>
<template #title>
<view style="width: 90px;">开户行</view>
</template>
<template #right-icon> <up-input border="none" v-model="data.bankBranch"
placeholder="请输入银行开户行"></up-input> </template>
</up-cell>
</up-cell-group>
<button v-if="data.isAccountNo" 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-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>
@ -40,12 +64,26 @@
</template>
<script setup>
import { reactive, nextTick, ref } from 'vue';
import { onReady,onLoad,onShow } from '@dcloudio/uni-app'
import { realNameAuth } from '@/api/me/withdraw.js';
import { selectUserById } from '@/api/user/user.js';
import { commonType } from '@/api/init.js';
import {
reactive,
nextTick,
ref
} from 'vue';
import {
onReady,
onLoad,
onShow
} from '@dcloudio/uni-app'
import {
realNameAuth
} from '@/api/me/withdraw.js';
import {
selectUserById
} from '@/api/user/user.js';
import {
commonType
} from '@/api/init.js';
let data = reactive({
certName: null,
mobile: null,
@ -53,42 +91,51 @@
accountNo: null,
isAccountNo: true,
logining: false,
province:null,
city:null,
bankBranch:null
province: null,
city: null,
bankBranch: null
})
let inputdata = ref()
onLoad(() => {
getUserInfo()
})
function getUserInfo () {
selectUserById().then(res=>{
if(res){
function setinput() {
if (data.accountNo) {
return data.accountNo.indexOf('****') != -1
} else {
return false
}
}
function getUserInfo() {
selectUserById().then(res => {
if (res) {
data.certName = res.certName;
data.mobile = res.mobile;
if ( res.accountNo ) {
if (res.accountNo) {
inputdata.value = res
data.accountNo = res.accountNo;
data.certNum = res.certNo;
}
if(res.accountNo&& res.province&& res.city && res.bankBranch){
if (res.accountNo && res.province && res.city && res.bankBranch) {
data.province = res.province;
data.city = res.city;
data.bankBranch = res.bankBranch;
data.isAccountNo = false
data.isAccountNo = false
}
}
})
}
function inputChange(e) {
const key = e.currentTarget.dataset.key;
data[key] = e.detail.value;
}
async function toLogin() {
if (!data.certName) {
uni.showToast({
title: '请设置收款人姓名',
@ -116,11 +163,11 @@
mobile: data.mobile,
certNum: data.certNum,
accountNo: data.accountNo.replace(/\s+/g, ''),
province:data.province,
city:data.city,
bankBranch:data.bankBranch
province: data.province,
city: data.city,
bankBranch: data.bankBranch
})
if( res) {
if (res) {
data.logining = false
let userInfo = uni.getStorageSync('userInfo')
userInfo.mobile = data.mobile
@ -140,10 +187,10 @@
} else {
data.logining = false
}
}
}
</script>
@ -151,11 +198,13 @@
page {
background: #FFFFFF;
}
.u-cell__body__content{
flex: 0!important;
.u-cell__body__content {
flex: 0 !important;
}
.containerView {
padding:30rpx;
padding: 30rpx;
position: relative;
width: 100%;
height: 100%;
@ -191,6 +240,7 @@
color: #ffffff;
font-size: 32rpx;
border: none;
&:after {
border: none;
}