添加实名认证

This commit is contained in:
duan
2025-01-09 10:07:24 +08:00
parent ed3d624c2c
commit 7c35389f27
4 changed files with 203 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
const ROOTPATH1 = "https://dj-api.hnsiyao.cn/czg"; //
const ROOTPATH = "https://dj-api.hnsiyao.cn/czg"; //后台服务域名
const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "https://dj-api.hnsiyao.cn/czg"; //
// const ROOTPATH = "https://dj-api.hnsiyao.cn/czg"; //后台服务域名
// const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "https://video.hnsiyao.cn/sqx_fast/"; //
// const ROOTPATH = "https://video.hnsiyao.cn/sqx_fast/"; //后台服务域名
@@ -13,9 +13,9 @@ const ROOTPATH2 = "https://dj-h5.hnsiyao.cn"; //后台服务域名
// const ROOTPATH1 = "http://192.168.1.41:8100/czg"; //
// const ROOTPATH = "http://192.168.1.41:8100/czg"; //后台服务域名
// 测试
// const ROOTPATH1 = "https://web-api.hnsiyao.cn/czg"; //
// const ROOTPATH = "https://web-api.hnsiyao.cn/czg"; //后台服务域名
// const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
const ROOTPATH1 = "https://web-api.hnsiyao.cn/czg"; //
const ROOTPATH = "https://web-api.hnsiyao.cn/czg"; //后台服务域名
const ROOTPATH2 = "https://video-h5.hnsiyao.cn"; //后台服务域名
module.exports = {

177
me/yaoqing/realName.vue Normal file
View File

@@ -0,0 +1,177 @@
<template>
<view class="containerView">
<list-cell title="姓名" type="text" placeholder="请输入姓名" v-model="certName"></list-cell>
<list-cell title="身份证号码" type="text" placeholder="请输入身份证号码" v-model="certNum"></list-cell>
<list-cell title="银行卡号码" type="text" placeholder="请输入银行卡号码" v-model="accountNo"></list-cell>
<list-cell title="手机号" type="text" placeholder="请输入银行预留号码" v-model="mobile"></list-cell>
<button v-if="!user.accountNo" class="confirm-btn" @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;;margin-bottom: 10rpx;">身份证信息仅可使用一次</view>
<view style="font-size: 24upx;color: #999999;padding: 0 64rpx">否则将无法正常收款请须知</view>
</view>
</template>
<script>
import listCell from '@/me/components/com-input';
export default {
components: {
listCell
},
data() {
return {
certName: '',
mobile: '',
certNum: '',
accountNo: '',
user: {},
logining: false
}
},
onLoad() {
let userId = uni.getStorageSync('userId');
if (userId) {
this.$u.api.userinfo().then(res => {
if (res.code === 0) {
this.user = res.data
if (res.data.certName) {
this.certName = res.data.certName;
}
if (res.data.mobile) {
this.mobile = res.data.mobile;
}
if (res.data.accountNo) {
this.certNum = res.data.certNo;
this.accountNo = res.data.accountNo;
}
}
})
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
toLogin() {
if (!this.certName) {
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
} else if (!this.mobile) {
uni.showToast({
title: '请输入手机号',
icon: 'none'
})
} else if (!this.certNum) {
uni.showToast({
title: '请输入身份证账号',
icon: 'none'
})
} else if (!this.accountNo) {
uni.showToast({
title: '请请输入银行卡号',
icon: 'none'
})
} else {
this.logining = true
this.$u.post('app/user/realNameAuth?certName=' + this.certName + '&mobile=' + this.mobile + '&certNum=' + this.certNum + '&accountNo=' + this.accountNo.replace(/\s+/g, '')).then(
res => {
this.logining = false
console.log(res);
if(res.code===0){
uni.setStorageSync('certName', this.certName)
uni.setStorageSync('mobile', this.mobile)
uni.setStorageSync('certNum', this.certNum)
uni.setStorageSync('accountNo', this.accountNo)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
uni.navigateBack();
}, 1000)
}
})
}else{
uni.showToast({
title:res.msg||'修改失败',
icon:'none'
})
}
});
}
},
},
}
</script>
<style lang='scss'>
page {
background: #FFFFFF;
}
.containerView {
padding-top: 32upx;
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-radius: 60px;
}
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
</style>

View File

@@ -46,12 +46,15 @@
</view>
<view class="flex w-full justify-center ">
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoaliZhiFuBao">
<!-- <view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoaliZhiFuBao">
提现账号
</view>
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoqianbao">
红包明细
</view>
</view> -->
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="shimingrenzhi">
实名认证
</view>
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoqianbao">
红包明细
</view>
<!-- <view style="color: grey;padding-bottom: 30px;padding-top: 20upx;width: 33%;" @click="ymfgojilu">提现记录
</view> -->
</view>
@@ -201,6 +204,11 @@ export default {
// this.list();
},
methods: {
shimingrenzhi(){
uni.navigateTo({
url:'/me/yaoqing/realName'
})
},
onNavigationBarButtonTap() {
this.showRule()
},

View File

@@ -825,6 +825,13 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path" : "yaoqing/realName",
"style" :
{
"navigationBarTitleText" : ""
}
}
]
},