|
|
@ -61,14 +61,14 @@
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="face">
|
|
|
|
<view class="face">
|
|
|
|
<view class="faceTitle">法大大认证</view>
|
|
|
|
<view class="faceTitle">法大大认证</view>
|
|
|
|
<view class="recognition" >
|
|
|
|
<view class="recognition" @click="fddRealName" v-if="!isFdd || video">
|
|
|
|
<view style="color: #fff;margin-right:10rpx">前往认证</view>
|
|
|
|
<view style="color: #fff;margin-right:10rpx">前往认证</view>
|
|
|
|
<u-icon name="arrow-right-double" color="#fff"></u-icon>
|
|
|
|
<u-icon name="arrow-right-double" color="#fff"></u-icon>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- <view class="recognition">
|
|
|
|
<view class="recognition" @click="fddRealName" v-else>
|
|
|
|
<view style="color: #fff;margin-right:10rpx">认证成功</view>
|
|
|
|
<view style="color: #fff;margin-right:10rpx">认证成功</view>
|
|
|
|
<u-icon name="checkmark-circle" color="#fff"></u-icon>
|
|
|
|
<u-icon name="checkmark-circle" color="#fff"></u-icon>
|
|
|
|
</view> -->
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="agreement">
|
|
|
|
<view class="agreement">
|
|
|
|
<u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458">
|
|
|
|
<u-checkbox-group v-model="checked" iconPlacement="left" placement="row" inactiveColor="#76C458">
|
|
|
@ -97,19 +97,30 @@ export default {
|
|
|
|
fileList: [],
|
|
|
|
fileList: [],
|
|
|
|
fileList2: [],
|
|
|
|
fileList2: [],
|
|
|
|
video: '',
|
|
|
|
video: '',
|
|
|
|
isfinish: false
|
|
|
|
isfinish: false,
|
|
|
|
|
|
|
|
isChecked: false
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onLoad(options) {
|
|
|
|
async onLoad(options) {
|
|
|
|
if (options.tempVideoPath) {
|
|
|
|
if (options.tempVideoPath) {
|
|
|
|
this.isfinish = JSON.parse(options.isfinish) || false
|
|
|
|
this.isfinish = JSON.parse(options.isfinish) || false
|
|
|
|
this.video = options.tempVideoPath;
|
|
|
|
this.video = await this.uploadFilePromise(options.tempVideoPath)
|
|
|
|
this.uploadFilePromise(options.tempVideoPath,'video')
|
|
|
|
console.log('this.video',this.video)
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
num: uni.getStorageSync("info").name || '',
|
|
|
|
|
|
|
|
name: uni.getStorageSync("info").num || '',
|
|
|
|
|
|
|
|
fileList: uni.getStorageSync("info").fileList || [],
|
|
|
|
|
|
|
|
fileList2: uni.getStorageSync("info").fileList2,
|
|
|
|
|
|
|
|
video: this.video
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
uni.setStorageSync("info", data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.name = uni.getStorageSync("info").name || ''
|
|
|
|
this.name = uni.getStorageSync("info").name || ''
|
|
|
|
this.num = uni.getStorageSync("info").num || ''
|
|
|
|
this.num = uni.getStorageSync("info").num || ''
|
|
|
|
this.fileList = uni.getStorageSync("info").fileList || []
|
|
|
|
this.fileList = uni.getStorageSync("info").fileList || []
|
|
|
|
this.fileList2 = uni.getStorageSync("info").fileList2 || []
|
|
|
|
this.fileList2 = uni.getStorageSync("info").fileList2 || []
|
|
|
|
|
|
|
|
this.video = uni.getStorageSync("info").video || ''
|
|
|
|
|
|
|
|
// this.isFdd = uni.getStorageSync("isFdd") || false
|
|
|
|
uni.removeStorageSync("info")
|
|
|
|
uni.removeStorageSync("info")
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -132,13 +143,6 @@ export default {
|
|
|
|
uni.setStorageSync("info", data)
|
|
|
|
uni.setStorageSync("info", data)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async completeRegistration() {
|
|
|
|
async completeRegistration() {
|
|
|
|
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
|
|
|
|
|
|
|
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
|
|
|
|
|
|
|
if (!this.name) return this.$common.msgToast("请输入姓名");
|
|
|
|
|
|
|
|
if (!this.num) return this.$common.msgToast("请输入身份证号");
|
|
|
|
|
|
|
|
if (!this.fileList.length) return this.$common.msgToast("请上传身份证人面像");
|
|
|
|
|
|
|
|
if (!this.fileList2.length) return this.$common.msgToast("请上传身份国徽面");
|
|
|
|
|
|
|
|
if (!this.video) return this.$common.msgToast("请上传人脸识别视频");
|
|
|
|
|
|
|
|
console.log({
|
|
|
|
console.log({
|
|
|
|
telNum: uni.getStorageSync("telNum"),
|
|
|
|
telNum: uni.getStorageSync("telNum"),
|
|
|
|
realNameIDName: this.num,
|
|
|
|
realNameIDName: this.num,
|
|
|
@ -147,14 +151,27 @@ export default {
|
|
|
|
realIDImgA: this.fileList[0]?.url,
|
|
|
|
realIDImgA: this.fileList[0]?.url,
|
|
|
|
realIDImgB: this.fileList2[0].url
|
|
|
|
realIDImgB: this.fileList2[0].url
|
|
|
|
})
|
|
|
|
})
|
|
|
|
const res = await this.$api.login.register({user:{
|
|
|
|
this.checkFdd().then((res) => {
|
|
|
|
|
|
|
|
if (!res) return this.$common.msgToast("法大大验证未通过")
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
|
|
|
|
|
|
|
if (!this.checked.length) return this.$common.msgToast("请阅读并勾选协议");
|
|
|
|
|
|
|
|
if (!this.name) return this.$common.msgToast("请输入姓名");
|
|
|
|
|
|
|
|
if (!this.num) return this.$common.msgToast("请输入身份证号");
|
|
|
|
|
|
|
|
if (!this.fileList.length) return this.$common.msgToast("请上传身份证人面像");
|
|
|
|
|
|
|
|
if (!this.fileList2.length) return this.$common.msgToast("请上传身份国徽面");
|
|
|
|
|
|
|
|
if (!this.video) return this.$common.msgToast("请上传人脸识别视频");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const res = await this.$api.login.register({
|
|
|
|
|
|
|
|
user: {
|
|
|
|
telNum: uni.getStorageSync("telNum"),
|
|
|
|
telNum: uni.getStorageSync("telNum"),
|
|
|
|
realNameIDName: this.num,
|
|
|
|
realNameIDName: this.num,
|
|
|
|
realName: this.name,
|
|
|
|
realName: this.name,
|
|
|
|
video: this.video,
|
|
|
|
video: this.video,
|
|
|
|
realIDImgA: this.fileList[0]?.url,
|
|
|
|
realIDImgA: this.fileList[0]?.url,
|
|
|
|
realIDImgB: this.fileList2[0]?.url
|
|
|
|
realIDImgB: this.fileList2[0]?.url
|
|
|
|
}})
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
if (res.status === 0) {
|
|
|
|
if (res.status === 0) {
|
|
|
|
uni.switchTab({
|
|
|
|
uni.switchTab({
|
|
|
|
url: '/pages/home/index'
|
|
|
|
url: '/pages/home/index'
|
|
|
@ -185,7 +202,8 @@ export default {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
for (let i = 0; i < lists.length; i++) {
|
|
|
|
for (let i = 0; i < lists.length; i++) {
|
|
|
|
const result = await this.uploadFilePromise(lists[i].url)
|
|
|
|
const result = await this.uploadFilePromise(lists[i].url, 'check')
|
|
|
|
|
|
|
|
console.log(result)
|
|
|
|
let item = this[`fileList`][fileListLen]
|
|
|
|
let item = this[`fileList`][fileListLen]
|
|
|
|
this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
|
|
|
|
this[`fileList`].splice(fileListLen, 1, Object.assign(item, {
|
|
|
|
status: 'success',
|
|
|
|
status: 'success',
|
|
|
@ -218,23 +236,70 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
uploadFilePromise(url, type = null) {
|
|
|
|
uploadFilePromise(url, type = null) {
|
|
|
|
console.log(url)
|
|
|
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
uni.uploadFile({
|
|
|
|
uni.uploadFile({
|
|
|
|
url: http.baseUrl + "/api/wxuser/uploadpic",
|
|
|
|
url: http.baseUrl + "/api/wxuser/uploadpic",
|
|
|
|
filePath: url,
|
|
|
|
filePath: url,
|
|
|
|
name: "file",
|
|
|
|
name: "file",
|
|
|
|
success: (res) => {
|
|
|
|
success: (res) => {
|
|
|
|
console.log(9999999999999999999,res)
|
|
|
|
const { path } = JSON.parse(res.data).data;
|
|
|
|
res.data = JSON.parse(res.data);
|
|
|
|
console.log('@@@@', path)
|
|
|
|
resolve(res.data.data.path);
|
|
|
|
resolve(path);
|
|
|
|
if(type ==='video'){
|
|
|
|
if (type === 'check') {
|
|
|
|
this.video = res.data.data.path
|
|
|
|
this.chenckId(path)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
async chenckId(realIDImgA) {
|
|
|
|
|
|
|
|
const res = await this.$api.login.chenckId({ realIDImgA })
|
|
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
|
|
|
this.num = res.data.iDNum
|
|
|
|
|
|
|
|
this.name = res.data.realName
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$common.msgToast(res.msg)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
async fddRealName() {
|
|
|
|
|
|
|
|
const data = {
|
|
|
|
|
|
|
|
num: this.num,
|
|
|
|
|
|
|
|
name: this.name,
|
|
|
|
|
|
|
|
fileList: this.fileList,
|
|
|
|
|
|
|
|
fileList2: this.fileList2,
|
|
|
|
|
|
|
|
video: this.video
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(data, 'data')
|
|
|
|
|
|
|
|
uni.setStorageSync("info", data)
|
|
|
|
|
|
|
|
const mobile = uni.getStorageSync("telNum")
|
|
|
|
|
|
|
|
const res = await this.$api.login.fddRealName({
|
|
|
|
|
|
|
|
customerName: this.name,
|
|
|
|
|
|
|
|
customerIdentNo: this.num,
|
|
|
|
|
|
|
|
mobile
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
|
|
|
uni.setStorage({
|
|
|
|
|
|
|
|
key: "fddUrl",
|
|
|
|
|
|
|
|
data: res.data?.url,
|
|
|
|
|
|
|
|
success: function () {
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
|
|
url: "/pages/realName/FDDRegister",
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$common.msgToast(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
checkFdd() {
|
|
|
|
|
|
|
|
return this.$api.login.checkFdd().then((res) => {
|
|
|
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
|
|
|
return res.data.isVerify
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.$common.msgToast(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|