认证方式
This commit is contained in:
parent
198d5b5d9d
commit
afcd0a537e
|
@ -49,6 +49,15 @@
|
|||
</u-form-item>
|
||||
</u-form>
|
||||
</view>
|
||||
<view class=" padding bg radius margin" style="padding-top: 20rpx; margin-top: 20rpx;">
|
||||
<view class="margin-top-sm">请选择认证类型</view>
|
||||
<view class="guke-list">
|
||||
<view class="guke-btn huiBtn" :class="{ lanBtn: selected.includes(item) }"
|
||||
@click="gukeBtn(item)" v-for="(item,index) in typeList" :key="index">
|
||||
{{item.value}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class=" padding bg radius margin"
|
||||
style="padding-top: 20rpx; margin-top: 20rpx;">
|
||||
<view class="margin-top-sm">上传身份证正面</view>
|
||||
|
@ -244,6 +253,7 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
selected:[],
|
||||
showAgree: false,
|
||||
form: {
|
||||
name: '',
|
||||
|
@ -314,9 +324,10 @@
|
|||
closeable: true,
|
||||
XCXIsSelect: '否',
|
||||
renzhengStatus: false,
|
||||
typeList:[],
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
onLoad() {
|
||||
this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
|
||||
if (this.XCXIsSelect != '否') {
|
||||
uni.setNavigationBarTitle({
|
||||
|
@ -327,9 +338,10 @@
|
|||
title: '关于我们'
|
||||
})
|
||||
}
|
||||
if (e.id) {
|
||||
this.typeId = e.id;
|
||||
}
|
||||
// if (e.id) {
|
||||
// this.typeId = e.id;
|
||||
// }
|
||||
this.fuwuType()
|
||||
this.getUserInfo()
|
||||
|
||||
this.renzheng = uni.getStorageSync("renzheng")
|
||||
|
@ -369,6 +381,31 @@
|
|||
this.checkRenzhengStatus();
|
||||
},
|
||||
methods: {
|
||||
gukeBtn(item) {
|
||||
var index = this.selected.indexOf(item);
|
||||
if (index === -1) {
|
||||
this.selected.push(item);
|
||||
} else {
|
||||
this.selected.splice(index, 1);
|
||||
}
|
||||
var data = [];
|
||||
for (var i = 0; i < this.selected.length; i++) {
|
||||
data.push(this.selected[i].id)
|
||||
}
|
||||
this.typeId = data.join(",")
|
||||
console.log("this.typeId",this.typeId)
|
||||
},
|
||||
fuwuType(){
|
||||
this.$Request.get("/app/dict/list", {
|
||||
type: '服务类型'
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data) {
|
||||
this.typeList = res.data
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
checkRenzhengStatus() {
|
||||
if ((this.renzheng == 0 || this.renzheng == 3) && (this.renzheng !== 1 || this.renzheng !== 2)) {
|
||||
this.renzhengStatus = false;
|
||||
|
@ -502,6 +539,14 @@
|
|||
})
|
||||
return;
|
||||
}
|
||||
if (!this.typeId) {
|
||||
uni.showToast({
|
||||
title: '请输选择认证类型!',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
return;
|
||||
}
|
||||
let regX =
|
||||
/^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
||||
if (!regX.test(this.form.idNumber)) {
|
||||
|
@ -645,7 +690,7 @@
|
|||
this.form.idNumber = res.data.idNumber ? res.data.idNumber : ''
|
||||
this.form.front = res.data.front ? res.data.front : ''
|
||||
this.form.back = res.data.back ? res.data.back : ''
|
||||
this.classify = res.data.classify
|
||||
this.classify = res.data.classify;
|
||||
this.form.address = res.data.address
|
||||
this.form.describes = res.data.individualResume
|
||||
this.form.birthdate = res.data.birthdate
|
||||
|
@ -690,29 +735,48 @@
|
|||
success: res => {
|
||||
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
||||
that.$queue.showLoading("上传中...");
|
||||
uni.uploadFile({ // 上传接口
|
||||
//url: websocketUtils.uploadFileUrl(), //真实的接口地址
|
||||
url: urlName,
|
||||
filePath: res.tempFilePaths[i],
|
||||
name: 'file',
|
||||
success: (uploadFileRes) => {
|
||||
if (e == 3) {
|
||||
if (that.infantImg.length <= 5) {
|
||||
that.infantImg.push(JSON.parse(uploadFileRes.data)
|
||||
.data)
|
||||
|
||||
uni.getFileInfo({
|
||||
filePath: res.tempFilePaths[i],
|
||||
success: (infoRes) => {
|
||||
const size = infoRes.size;
|
||||
if (size / 1024 / 1024 > 2) {
|
||||
// 图片大于2MB
|
||||
uni.showToast({
|
||||
icon:'error',
|
||||
title:'图片超出2MB限制,请重新选择'
|
||||
})
|
||||
} else {
|
||||
// 图片小于等于2MB
|
||||
uni.uploadFile({ // 上传接口
|
||||
//url: websocketUtils.uploadFileUrl(), //真实的接口地址
|
||||
url: urlName,
|
||||
filePath: res.tempFilePaths[i],
|
||||
name: 'file',
|
||||
success: (uploadFileRes) => {
|
||||
if (e == 3) {
|
||||
if (that.infantImg.length <= 5) {
|
||||
that.infantImg.push(JSON.parse(uploadFileRes.data)
|
||||
.data)
|
||||
|
||||
}
|
||||
} else if (e == 2) {
|
||||
if (that.certificateImg.length <= 5) {
|
||||
that.certificateImg.push(JSON.parse(uploadFileRes.data)
|
||||
.data)
|
||||
// that.image = JSON.parse(uploadFileRes.data)
|
||||
// .data
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
}
|
||||
} else if (e == 2) {
|
||||
if (that.certificateImg.length <= 5) {
|
||||
that.certificateImg.push(JSON.parse(uploadFileRes.data)
|
||||
.data)
|
||||
// that.image = JSON.parse(uploadFileRes.data)
|
||||
// .data
|
||||
}
|
||||
}
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
cons.log("上传失败")
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -725,23 +789,42 @@
|
|||
success: res => {
|
||||
for (let i = 0; i < res.tempFilePaths.length; i++) {
|
||||
that.$queue.showLoading("上传中...");
|
||||
uni.uploadFile({ // 上传接口
|
||||
url: websocketUtils.uploadFileUrl(), //真实的接口地址
|
||||
filePath: res.tempFilePaths[i],
|
||||
name: 'file',
|
||||
success: (uploadFileRes) => {
|
||||
if (e == 1) {
|
||||
that.form.front = JSON.parse(uploadFileRes.data).data
|
||||
} else if (e == 2) {
|
||||
that.form.back = JSON.parse(uploadFileRes.data).data
|
||||
} else if (e == 4) {
|
||||
that.form.headImg = JSON.parse(uploadFileRes.data).data
|
||||
console.log(that.form.headImg)
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
||||
}
|
||||
uni.getFileInfo({
|
||||
filePath: res.tempFilePaths[i],
|
||||
success: (infoRes) => {
|
||||
const size = infoRes.size;
|
||||
if (size / 1024 / 1024 > 2) {
|
||||
// 图片大于2MB
|
||||
uni.showToast({
|
||||
icon:'error',
|
||||
title:'图片超出2MB限制,请重新选择'
|
||||
})
|
||||
} else {
|
||||
// 图片小于等于2MB
|
||||
uni.uploadFile({ // 上传接口
|
||||
url: websocketUtils.uploadFileUrl(), //真实的接口地址
|
||||
filePath: res.tempFilePaths[i],
|
||||
name: 'file',
|
||||
success: (uploadFileRes) => {
|
||||
if (e == 1) {
|
||||
that.form.front = JSON.parse(uploadFileRes.data).data
|
||||
} else if (e == 2) {
|
||||
that.form.back = JSON.parse(uploadFileRes.data).data
|
||||
} else if (e == 4) {
|
||||
that.form.headImg = JSON.parse(uploadFileRes.data).data
|
||||
console.log(that.form.headImg)
|
||||
}
|
||||
uni.hideLoading();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
fail: () => {
|
||||
cons.log("上传失败")
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -926,7 +1009,36 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style scoped>
|
||||
.huiBtn {
|
||||
color:#333;
|
||||
background: #f3f3f3;
|
||||
// color: #333333;
|
||||
}
|
||||
.lanBtn {
|
||||
color:#fff;
|
||||
background: #049F89;
|
||||
}
|
||||
.guke-btn {
|
||||
width:30%;
|
||||
line-height:34px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
font-size:11px;
|
||||
border-radius: 6px;
|
||||
margin-top:5px;
|
||||
margin-right:6px;
|
||||
}
|
||||
.guke-list {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
page {
|
||||
background-color: #F7F7F7;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
<!-- <view class="flex margin-left-sm " style="font-size: 22rpx;font-weight: 500;"
|
||||
v-if="XCXIsSelect != '否'">
|
||||
<view v-if="renzheng == 0" @click.stop="goNav('/my/renzheng/rzType')">
|
||||
<view v-if="renzheng == 0" @click.stop="goNav('/my/renzheng/index')">
|
||||
暂未实名认证
|
||||
</view>
|
||||
<view v-if="renzheng == 1" @click.stop="goNav('/my/renzheng/index')">
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<view class="flex margin-left-sm margin-top-xs" v-if="XCXIsSelect != '否'"
|
||||
style="font-size: 22rpx;">
|
||||
<view class="online-tag" v-if="renzheng == 0" @click.stop="goNav('/my/renzheng/rzType')">
|
||||
<view class="online-tag" v-if="renzheng == 0" @click.stop="goNav('/my/renzheng/index')">
|
||||
暂未实名认证
|
||||
</view>
|
||||
<view class="online-tag" v-if="renzheng == 1" @click.stop="goNav('/my/renzheng/index')">
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
goRenZheng() {
|
||||
if (this.renzheng == 0) {
|
||||
uni.navigateTo({
|
||||
url: '/my/renzheng/rzType'
|
||||
url: '/my/renzheng/index'
|
||||
});
|
||||
} else if (this.renzheng != 0) {
|
||||
if(this.renzheng == 1){
|
||||
|
|
|
@ -31,16 +31,16 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="flex margin-left-sm margin-top-xs">
|
||||
<view class="online-tag" v-if="renzheng == 0" @click.stop="goNav('/my/renzheng/index?classify=' + 1)">
|
||||
<view class="online-tag" v-if="renzheng == 0" @click.stop="goNav('/my/renzheng/index')">
|
||||
暂未实名认证
|
||||
</view>
|
||||
<view class="online-tag" v-if="renzheng == 1" @click.stop="goNav('/my/renzheng/index?classify=' + 1)">
|
||||
<view class="online-tag" v-if="renzheng == 1" @click.stop="goNav('/my/renzheng/index')">
|
||||
实名审核中
|
||||
</view>
|
||||
<view class="online-tag" v-if="renzheng == 2">
|
||||
<view class="online-tag" v-if="renzheng == 2" @click.stop="goNav('/my/renzheng/index')">
|
||||
已实名认证
|
||||
</view>
|
||||
<view class="online-tag" v-if="renzheng == 3" @click.stop="goNav('/my/renzheng/index?classify=' + 1)">
|
||||
<view class="online-tag" v-if="renzheng == 3" @click.stop="goNav('/my/renzheng/index')">
|
||||
实名已拒绝
|
||||
</view>
|
||||
</view>
|
||||
|
|
Loading…
Reference in New Issue