master
xingyy 9 months ago
parent b9538f5b28
commit 7dcfc919e2

@ -4,7 +4,7 @@
*/ */
export default { export default {
config: { config: {
baseUrl: "https://stock.szjixun.cn", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",//测试 'https://warehouse.szjixun.cn' 正式 https://stock.szjixun.cn baseUrl: "https://warehouse.szjixun.cn", //"http://172.16.100.93:8017", //"http://192.168.88.175:9021",//测试 'https://warehouse.szjixun.cn' 正式 https://stock.szjixun.cn
header: { header: {
"Content-Type": "application/json;charset=UTF-8", "Content-Type": "application/json;charset=UTF-8",
// 'Content-Type':'application/x-www-form-urlencoded' // 'Content-Type':'application/x-www-form-urlencoded'

@ -8,6 +8,13 @@ export const login = (data) => {
data, data,
}); });
}; };
export const configFun = (data) => {
return http.request({
url: "/api/config",
method: "POST",
data,
});
};
// 获取手机号 // 获取手机号
export const getTel = (data) => { export const getTel = (data) => {
return http.request({ return http.request({

@ -48,7 +48,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="face"> <view v-if="needPersonSecret" class="face">
<view class="faceTitle">人脸识别</view> <view class="faceTitle">人脸识别</view>
<view class="recognition" @click="camera" v-if="!video"> <view class="recognition" @click="camera" v-if="!video">
<view style="color: #fff;margin-right:10rpx">前往认证</view> <view style="color: #fff;margin-right:10rpx">前往认证</view>
@ -90,9 +90,11 @@
<script> <script>
import http from "@/http/api"; import http from "@/http/api";
import {configFun} from "../../http/login";
export default { export default {
data() { data() {
return { return {
needPersonSecret:false,
name: "", name: "",
num: "", num: "",
checked: [], checked: [],
@ -104,14 +106,13 @@ export default {
// show:false // show:false
}; };
}, },
// onLoad(options) { async onLoad() {
// console.log(this.isFddSuccess) const res= await configFun()
// if (this.isFddSuccess) { if (res.code===200){
// this.nextTick(() => { this.needPersonSecret=res.data.needPersonSecret
}
// }) console.log(res.data.needPersonSecret,'res.data.needPersonSecret')
// } },
// },
async onShow() { async onShow() {
this.checkFdd() this.checkFdd()
if (uni.getStorageSync('tempVideoPath')) { if (uni.getStorageSync('tempVideoPath')) {
@ -163,16 +164,14 @@ export default {
realIDImgA: this.fileList[0]?.url, realIDImgA: this.fileList[0]?.url,
realIDImgB: this.fileList2[0]?.url realIDImgB: this.fileList2[0]?.url
}) })
this.checkFdd().then((res) => { const res1=await this.checkFdd()
if (!res) return this.$common.msgToast("法大大验证未通过") if (!res1) 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.name) return this.$common.msgToast("请输入姓名");
if (!this.num) return this.$common.msgToast("请输入身份证号"); if (!this.num) return this.$common.msgToast("请输入身份证号");
if (!this.fileList.length) return this.$common.msgToast("请上传身份证人面像"); if (!this.fileList.length) return this.$common.msgToast("请上传身份证人面像");
if (!this.fileList2.length) return this.$common.msgToast("请上传身份国徽面"); if (!this.fileList2.length) return this.$common.msgToast("请上传身份国徽面");
if (!this.video) return this.$common.msgToast("请上传人脸识别视频"); if (this.needPersonSecret&&!this.video) return this.$common.msgToast("请上传人脸识别视频");
const res = await this.$api.login.register({ const res = await this.$api.login.register({
user: { user: {
telNum: uni.getStorageSync("telNum"), telNum: uni.getStorageSync("telNum"),
@ -461,4 +460,4 @@ export default {
} }
} }
} }
</style> </style>

Loading…
Cancel
Save