Commit 3c3b8675 authored by liwei's avatar liwei

实名认证相关代码

parent 00100efb
......@@ -21,3 +21,14 @@ export function userDetail(data){
url: '/app/open/memInfo/detail/'+ data,
});
}
/**
* 实名认证
*/
export function realAuth(data){
return request({
method: "put",
url: '/memInfo/updateIdCard/'+ data.businessId,
data: data,
});
}
......@@ -49,6 +49,21 @@
}
],
"subPackages": [
{
"root": "webView",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": "webView",
"backgroundColor": "#F4F5F9",
"backgroundColorTop": "#F4F5F9",
"navigationBarBackgroundColor": "#F4F5F9",
"navigationStyle": "custom"
}
}
]
},
{
"root": "pagesUser",
"pages": [
......
......@@ -9,10 +9,10 @@
<view class="auth-con-2" v-if="userInfo.identityAuth=='REFUSE'">已拒绝</view>
<view class="auth-con-2" v-if="userInfo.identityAuth==null">未认证</view>
</view>
<view class="auth-btn" @click="gosf()" v-if="userInfo.identityAuth=='EXAMINE'">修改认证</view>
<view class="auth-btn" @click="gosf()" v-if="userInfo.identityAuth=='PASS'">重新认证</view>
<view class="auth-btn" @click="gosf()" v-if="userInfo.identityAuth=='REFUSE'">修改认证</view>
<view class="auth-btn" @click="gosf()" v-if="userInfo.identityAuth==null">立即认证</view>
<view class="auth-btn" @click="goIdentityAuth()" v-if="userInfo.identityAuth=='EXAMINE'">修改认证</view>
<view class="auth-btn" @click="goIdentityAuth()" v-if="userInfo.identityAuth=='PASS'">重新认证</view>
<view class="auth-btn" @click="goIdentityAuth()" v-if="userInfo.identityAuth=='REFUSE'">修改认证</view>
<view class="auth-btn" @click="goIdentityAuth()" v-if="userInfo.identityAuth==null">立即认证</view>
</view>
<view class="auth-item">
<image class="auth-img" :src="baseUrl+'/user/xlauth.png'"></image>
......@@ -23,10 +23,10 @@
<view class="auth-con-2" v-if="userInfo.educationAuth=='REFUSE'">已拒绝</view>
<view class="auth-con-2" v-if="userInfo.educationAuth==null">未认证</view>
</view>
<view class="auth-btn" @click="goli()" v-if="userInfo.educationAuth=='EXAMINE'">修改认证</view>
<view class="auth-btn" @click="goli()" v-if="userInfo.educationAuth=='PASS'">重新认证</view>
<view class="auth-btn" @click="goli()" v-if="userInfo.educationAuth=='REFUSE'">修改认证</view>
<view class="auth-btn" @click="goli()" v-if="userInfo.educationAuth==null">立即认证</view>
<view class="auth-btn" @click="goEducationAuth()" v-if="userInfo.educationAuth=='EXAMINE'">修改认证</view>
<view class="auth-btn" @click="goEducationAuth()" v-if="userInfo.educationAuth=='PASS'">重新认证</view>
<view class="auth-btn" @click="goEducationAuth()" v-if="userInfo.educationAuth=='REFUSE'">修改认证</view>
<view class="auth-btn" @click="goEducationAuth()" v-if="userInfo.educationAuth==null">立即认证</view>
</view>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view>
......@@ -52,34 +52,23 @@
this.getUserIno();
},
methods: {
gosf() {
//身份认证
goIdentityAuth() {
uni.navigateTo({
url: "/pagesme/me/identityauthentication"
})
},
goli() {
//学历认证
goEducationAuth() {
uni.navigateTo({
url: "/pagesme/me/educationcertification"
})
},
async getUserIno() {
const res = await this.$myRequest({
url: '/nostalgia/fruser/doubleAuth',
withToken: true,
method: 'GET',
});
if (res.data.code == 200) {
this.userInfo = res.data.data
} else {
this.tipMsg = res.data.msg;
this.$refs.elm.showDialog();
}
},
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.content {
width: 100%;
box-sizing: border-box;
......
<template>
<view>
<view class="title-txt">上传身份证照片</view>
<view class="con-txt">根据监管要求身份证照片仅用于实名认证</view>
<image class="zheng-image" :src="baseUrl+'/user/zheng.png'" @click="chooseImg('z')" mode="aspectFill"></image>
<image class="fan-image" :src="baseUrl+'/user/fan.png'" @click="chooseImg('f')" mode="aspectFill"></image>
<view class="title-txt">请输入身份信息</view>
<view class="con-txt">根据监管要求身份信息仅用于实名认证</view>
<!-- <view class="title-txt">上传身份证照片</view>-->
<!-- <view class="con-txt">根据监管要求身份证照片仅用于实名认证</view>-->
<!-- <image class="zheng-image" :src="baseUrl+'/user/zheng.png'" @click="chooseImg('z')" mode="aspectFill"></image>-->
<!-- <image class="fan-image" :src="baseUrl+'/user/fan.png'" @click="chooseImg('f')" mode="aspectFill"></image>-->
<view class="form">
<u--form
labelPosition="left"
:model="form"
ref="form1"
labelWidth="80"
>
<u-form-item
label="真实姓名"
prop="userInfo.memNickName"
borderBottom
ref="item1"
>
<u--input
v-model="form.memRealName"
border="none"
placeholder="请输入真实姓名"
></u--input>
</u-form-item>
<u-form-item
label="身份证号"
prop="userInfo.memNickName"
borderBottom
ref="item1"
>
<u--input
v-model="form.memIdcard"
border="none"
placeholder="请输入身份证号"
></u--input>
</u-form-item>
</u--form>
</view>
<view class="to-btn" @click="authadd">
提交
</view>
<ELM ref="elm" :msg="tipMsg" :isConfirm="isConfirm" @confirm="confirm"></ELM>
</view>
</template>
<script>
import ELM from '@/components/elm-toast/index.vue';
import {realAuth} from "../../api/user";
export default {
data() {
return {
form:{},
//图片路径
baseUrl: this.$store.state.imgUrl,
updatezImg: "",
......@@ -30,33 +66,32 @@
ELM
},
onLoad() {
var that = this;
that.loadPage();
},
methods: {
async loadPage() {
var that = this;
const res = await that.$myRequest({
url: '/nostalgia/fruserauth/info',
withToken: true,
method: 'GET',
});
console.log(res);
if (res.data.code == 200) {
if (res.data.data.identityImgList != null) {
if (res.data.data.identityImgList.length > 0) {
that.zhengimageUrl = res.data.data.identityImgList[0]
}
if (res.data.data.identityImgList.length > 1) {
that.fanimageUrl = res.data.data.identityImgList[1]
}
}
} else {
this.tipMsg = res.data.msg;
this.$refs.elm.showDialog();
}
// var that = this;
// const res = await that.$myRequest({
// url: '/nostalgia/fruserauth/info',
// withToken: true,
// method: 'GET',
// });
// console.log(res);
// if (res.data.code == 200) {
// if (res.data.data.identityImgList != null) {
// if (res.data.data.identityImgList.length > 0) {
// that.zhengimageUrl = res.data.data.identityImgList[0]
// }
// if (res.data.data.identityImgList.length > 1) {
// that.fanimageUrl = res.data.data.identityImgList[1]
// }
//
// }
//
// } else {
// this.tipMsg = res.data.msg;
// this.$refs.elm.showDialog();
// }
},
chooseImg(type) {
console.log(type);
......@@ -104,45 +139,65 @@
}
},
async authadd() {
var that = this;
var imgList = [];
if (!that.updatezImg) {
this.tipMsg = "请上传正面照片";
this.$refs.elm.showDialog();
return false;
} else {
imgList.push(that.updatezImg)
}
if (!that.updatefImg) {
this.tipMsg = "请上传反面照片";
this.$refs.elm.showDialog();
return false;
} else {
imgList.push(that.updatefImg)
}
var data = {
"authType": "IdentityAuth",
"imgList": imgList
}
uni.showLoading({
title: "提交中"
uni.navigateTo({
url: "/webView/index"
})
const res = await that.$myRequest({
url: '/nostalgia/fruserauth/add',
withToken: true,
data: data,
method: 'POST',
});
uni.hideLoading();
if (res.data.code == 200) {
this.isConfirm=true;
this.tipMsg = "提交成功";
this.$refs.elm.showDialog();
// const userInfo = uni.getStorageSync('userInfo')
// const params = {
// businessId: userInfo.businessId,
// memRealName: this.form.memRealName,
// memIdcard: this.form.memIdcard
// }
// realAuth(params).then(res => {
// if (res.data.code == 200){
// uni.navigateTo({
// url: "/webView/index"
// })
// }else {
//
// }
// })
} else {
this.tipMsg = res.data.msg;
this.$refs.elm.showDialog();
}
// var that = this;
// var imgList = [];
// if (!that.updatezImg) {
// this.tipMsg = "请上传正面照片";
// this.$refs.elm.showDialog();
// return false;
// } else {
// imgList.push(that.updatezImg)
// }
// if (!that.updatefImg) {
// this.tipMsg = "请上传反面照片";
// this.$refs.elm.showDialog();
// return false;
// } else {
// imgList.push(that.updatefImg)
// }
// var data = {
// "authType": "IdentityAuth",
// "imgList": imgList
// }
// uni.showLoading({
// title: "提交中"
// })
// const res = await that.$myRequest({
// url: '/nostalgia/fruserauth/add',
// withToken: true,
// data: data,
// method: 'POST',
// });
// uni.hideLoading();
// if (res.data.code == 200) {
// this.isConfirm=true;
// this.tipMsg = "提交成功";
// this.$refs.elm.showDialog();
//
// } else {
// this.tipMsg = res.data.msg;
// this.$refs.elm.showDialog();
// }
},
confirm() {
this.isConfirm=false;
......@@ -152,9 +207,12 @@
}
</script>
<style lang="scss">
page {
<style lang="scss" scoped>
.form{
padding:20rpx 60rpx;
}
page {
background-color: #ffffff;
}
......
<template>
<view>
<web-view :src="'http://localhost:8080/test.html?token='+token"></web-view>
</view>
</template>
<script>
export default {
name: "index",
data() {
return {
token:uni.getStorageSync('token'),
};
},
onLoad() {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment