实名认证页面,优化提交实名认证逻辑,可以在当页面快速提交,不必退出到个人中心页面解锁,添加刷新实名状态按钮
This commit is contained in:
parent
281df0a116
commit
fcea02505e
|
|
@ -24,10 +24,14 @@
|
|||
您当前已完成实名认证
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="!isReal" class="anniu" @click="btnshiming">
|
||||
<!-- <text>进入人脸识别</text> -->
|
||||
<text>提交</text>
|
||||
</view>
|
||||
<view v-if="isRefresh" class="refresh" @click="getshuaxin">
|
||||
<text>刷新实名状态</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -40,6 +44,7 @@ import {
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
isRefresh: false,
|
||||
isReal: false,
|
||||
bgc: {
|
||||
backgroundColor: '',
|
||||
|
|
@ -64,6 +69,7 @@ export default {
|
|||
// this.getshuaxin();
|
||||
// this.backData = null; // 重置
|
||||
// }
|
||||
this.smflag = true
|
||||
},
|
||||
methods: {
|
||||
// 刷新人脸识别是否成功
|
||||
|
|
@ -112,30 +118,42 @@ export default {
|
|||
userName: this.name,
|
||||
idCard: this.zfzh,
|
||||
}
|
||||
console.log('<UNK>', data)
|
||||
putRealName(data).then(res => {
|
||||
if (res.code === 200) {
|
||||
let https = encodeURIComponent(res.data.jumpUrl)
|
||||
this.backData = true
|
||||
uni.navigateTo({
|
||||
url: '/page_user/facialRecognition/facialRecognition?https=' + https,
|
||||
})
|
||||
} else if (res.code === 500 && res.msg === null) {
|
||||
uni.showToast({
|
||||
title: '已提交,请等待系统反馈',
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
console.log('身份信息', data)
|
||||
putRealName(data)
|
||||
.then(res => {
|
||||
if (res.code === 200) {
|
||||
let https = encodeURIComponent(res.data.jumpUrl)
|
||||
this.backData = true
|
||||
uni.navigateTo({
|
||||
url: '/page_user/facialRecognition/facialRecognition?https=' + https,
|
||||
})
|
||||
this.isRefresh = true
|
||||
}
|
||||
// else if (res.code === 500 && res.msg === null) {
|
||||
// uni.showToast({
|
||||
// title: '已提交,请等待系统反馈',
|
||||
// icon: 'none',
|
||||
// duration: 2000,
|
||||
// })
|
||||
// this.smflag = true
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: res.msg,
|
||||
// icon: 'none',
|
||||
// duration: 2000,
|
||||
// })
|
||||
// this.smflag = true
|
||||
// }
|
||||
})
|
||||
.catch(error => {
|
||||
if (error.code === 500 && error === null) {
|
||||
uni.showToast({ title: '已提交,请等待系统反馈', icon: 'none' })
|
||||
} else {
|
||||
uni.showToast({ title: error || '系统错误', icon: 'none' })
|
||||
console.log('@@@@@@@@', error)
|
||||
}
|
||||
this.smflag = true
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000,
|
||||
})
|
||||
this.smflag = true
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// this.$u.put(`/app/realName/realName`,data).then(res =>{ //人脸
|
||||
|
|
@ -185,6 +203,28 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
.refresh {
|
||||
width: 250rpx;
|
||||
height: 174rpx;
|
||||
|
||||
line-height: 174rpx;
|
||||
text-align: center;
|
||||
padding: 0 250rpx;
|
||||
|
||||
text {
|
||||
display: inline-block;
|
||||
width: 250rpx;
|
||||
height: 84rpx;
|
||||
background: #f15a04;
|
||||
border-radius: 42rpx 42rpx 42rpx 42rpx;
|
||||
text-align: center;
|
||||
line-height: 84rpx;
|
||||
font-weight: 600;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.sfxx {
|
||||
width: 676rpx;
|
||||
height: 480rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user