|
@@ -267,8 +267,8 @@
|
|
|
"
|
|
|
@on-list-change="changePhotoListHeader($event, item.fieldKey)"
|
|
|
:auto-upload="false"
|
|
|
- custom-btn="true"
|
|
|
- :action="action"
|
|
|
+ :custom-btn="true"
|
|
|
+ action="#"
|
|
|
:file-list="
|
|
|
item.fieldKey === 'recent_photos'
|
|
|
? fileList1
|
|
@@ -280,7 +280,7 @@
|
|
|
"
|
|
|
width="120"
|
|
|
height="120"
|
|
|
- size-type="['compressed']"
|
|
|
+ :size-type="['compressed']"
|
|
|
max-count="1"
|
|
|
>
|
|
|
<template v-slot:addBtn>
|
|
@@ -511,7 +511,7 @@ export default {
|
|
|
showTableDown: false,
|
|
|
gradeId: 0,
|
|
|
errorType: ["message"],
|
|
|
- agreementModal: false,
|
|
|
+ agreementModal: true,
|
|
|
goodsData: {},
|
|
|
itemStyle: {
|
|
|
marginTop: "20px",
|
|
@@ -751,11 +751,9 @@ export default {
|
|
|
userInfo(val, oldVal) {
|
|
|
//普通的watch监听
|
|
|
if (val) {
|
|
|
- console.log(val, "val");
|
|
|
this.listData.forEach((item) => {
|
|
|
if (item.fieldKey == "idcard") {
|
|
|
this.form.idcard = this.userInfo.idCard;
|
|
|
- console.log("监听监听111");
|
|
|
}
|
|
|
if (item.fieldKey == "telphone") {
|
|
|
this.form.telphone = this.userInfo.telphone;
|
|
@@ -763,7 +761,6 @@ export default {
|
|
|
|
|
|
if (item.fieldKey == "name") {
|
|
|
this.form.name = this.userInfo.realname;
|
|
|
- console.log("监听监听");
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -1144,196 +1141,8 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- return
|
|
|
- }
|
|
|
- return;
|
|
|
- if (this.form.recent_photos && this.form.idcard_face_photo) {
|
|
|
- uni.downloadFile({
|
|
|
- url: this.$method.splitImgHost(this.form.idcard_face_photo),
|
|
|
- success: async (res) => {
|
|
|
- console.log(res, 8585858);
|
|
|
- if (res.statusCode === 200) {
|
|
|
- let resData = await this.faceCertificationIDCardOCR(
|
|
|
- 1,
|
|
|
- res.tempFilePath
|
|
|
- );
|
|
|
- if (!resData.data.data) {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "身份证人像面照片异常,请重新上传",
|
|
|
- showCancel: false,
|
|
|
- });
|
|
|
- this.isUploading = false;
|
|
|
- return;
|
|
|
- }
|
|
|
- uni.downloadFile({
|
|
|
- url: this.$method.splitImgHost(this.form.recent_photos),
|
|
|
- success: (res) => {
|
|
|
- if (res.statusCode === 200) {
|
|
|
- console.log("下载成功");
|
|
|
- let fileSystem = uni.getFileSystemManager();
|
|
|
- fileSystem.readFile({
|
|
|
- filePath: res.tempFilePath,
|
|
|
- encoding: "base64",
|
|
|
- position: 0,
|
|
|
- success: (res) => {
|
|
|
- let base64 = "data:image/jpg;base64," + res.data;
|
|
|
- let newdata = {
|
|
|
- urlA: this.form.idcard_face_photo,
|
|
|
- oneInchPhotos: base64,
|
|
|
- };
|
|
|
-
|
|
|
- this.$api
|
|
|
- .faceCertificationIdCardCompareFace(newdata)
|
|
|
- .then((res1) => {
|
|
|
- if (res1.data.data >= 70) {
|
|
|
- var self = this;
|
|
|
- if (self.remarkStatus) {
|
|
|
- var arsty = {};
|
|
|
- for (let k in data) {
|
|
|
- for (let j in self.copyData) {
|
|
|
- if (k === j) {
|
|
|
- if (self.copyData[j].value === data[k]) {
|
|
|
- arsty[k] = {
|
|
|
- fieldKey: k,
|
|
|
- value: data[k],
|
|
|
- fieldName: (function () {
|
|
|
- for (
|
|
|
- let i = 0;
|
|
|
- i < self.listData.length;
|
|
|
- i++
|
|
|
- ) {
|
|
|
- if (
|
|
|
- self.listData[i].fieldKey == k
|
|
|
- ) {
|
|
|
- return self.listData[i]
|
|
|
- .fieldName;
|
|
|
- }
|
|
|
- }
|
|
|
- })(),
|
|
|
- status: 0,
|
|
|
- };
|
|
|
- } else {
|
|
|
- arsty[k] = {
|
|
|
- fieldKey: k,
|
|
|
- value: data[k],
|
|
|
- fieldName: (function () {
|
|
|
- for (
|
|
|
- let i = 0;
|
|
|
- i < self.listData.length;
|
|
|
- i++
|
|
|
- ) {
|
|
|
- if (
|
|
|
- self.listData[i].fieldKey == k
|
|
|
- ) {
|
|
|
- return self.listData[i]
|
|
|
- .fieldName;
|
|
|
- }
|
|
|
- }
|
|
|
- })(),
|
|
|
- status: 1,
|
|
|
- };
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- var datas = {
|
|
|
- id: this.id,
|
|
|
- goodsId: this.goodsId,
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- keyValue: JSON.stringify(arsty),
|
|
|
- };
|
|
|
- console.log(datas, "datas0");
|
|
|
- // this.isUploading = false;
|
|
|
- // return;
|
|
|
- this.$api
|
|
|
- .editbaseprofiletp(datas)
|
|
|
- .then((res) => {
|
|
|
- this.isUploading = false;
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.$method.showToast("提交成功");
|
|
|
- this.getUserInfo();
|
|
|
- setTimeout(() => {
|
|
|
- console.log("延迟");
|
|
|
- uni.navigateBack();
|
|
|
- }, 1500);
|
|
|
- } else {
|
|
|
- this.$method.showToast(res.data.msg);
|
|
|
- this.isUploading = false;
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- var objs = {};
|
|
|
- for (let k in data) {
|
|
|
- objs[k] = {
|
|
|
- fieldKey: k,
|
|
|
- value: data[k],
|
|
|
- fieldName: (function () {
|
|
|
- for (
|
|
|
- let i = 0;
|
|
|
- i < self.listData.length;
|
|
|
- i++
|
|
|
- ) {
|
|
|
- if (self.listData[i].fieldKey == k) {
|
|
|
- return self.listData[i].fieldName;
|
|
|
- }
|
|
|
- }
|
|
|
- })(),
|
|
|
- status: 0,
|
|
|
- };
|
|
|
- }
|
|
|
- var datas = {
|
|
|
- goodsId: this.goodsId,
|
|
|
- profileTpId: this.goodsId,
|
|
|
- orderGoodsId: this.orderGoodsId,
|
|
|
- keyValue: JSON.stringify(objs),
|
|
|
- };
|
|
|
-
|
|
|
- console.log(data, "datas");
|
|
|
- // this.isUploading = false;
|
|
|
- // return;
|
|
|
- this.$api
|
|
|
- .addbaseprofiletp(datas)
|
|
|
- .then((res) => {
|
|
|
- this.isUploading = false;
|
|
|
- if (res.data.code === 200) {
|
|
|
- this.$method.showToast("提交成功");
|
|
|
- this.getUserInfo();
|
|
|
- setTimeout(() => {
|
|
|
- console.log("延迟");
|
|
|
- uni.navigateBack();
|
|
|
- }, 1500);
|
|
|
- } else {
|
|
|
- this.$method.showToast(res.data.msg);
|
|
|
- this.isUploading = false;
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.isUploading = false;
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "个人近照和身份证人像面照片不匹配",
|
|
|
- showCancel: false,
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- fail(err) {
|
|
|
- this.isUploading = false;
|
|
|
- console.error(err, "err");
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
- });
|
|
|
-
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
var self = this;
|
|
|
if (self.remarkStatus) {
|
|
|
var arsty = {};
|
|
@@ -1388,8 +1197,6 @@ export default {
|
|
|
};
|
|
|
|
|
|
console.log(datas, "datas1");
|
|
|
-
|
|
|
- return;
|
|
|
this.$api.editbaseprofiletp(datas).then((res) => {
|
|
|
this.isUploading = false;
|
|
|
if (res.data.code === 200) {
|
|
@@ -1587,7 +1394,6 @@ export default {
|
|
|
url = await this.$method.uploadFile(url, 0);
|
|
|
// #endif
|
|
|
this.$set(this.form, "recent_photos", url);
|
|
|
- console.log(url, 789);
|
|
|
} else {
|
|
|
// #ifdef MP-WEIXIN
|
|
|
let url = lists[0].url;
|
|
@@ -1781,19 +1587,19 @@ export default {
|
|
|
}
|
|
|
let { IdName, IdNum } = res.data;
|
|
|
if (IdName != this.form.name || IdNum != this.form.idcard) {
|
|
|
- // uni.showModal({
|
|
|
- // content:
|
|
|
- // IdName != this.form.name
|
|
|
- // ? "输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
|
|
|
- // : "输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服",
|
|
|
- // showCancel: false,
|
|
|
- // success: (resultst) => {
|
|
|
- // if (resultst.confirm) {
|
|
|
- // uni.navigateBack();
|
|
|
- // }
|
|
|
- // },
|
|
|
- // });
|
|
|
- // return;
|
|
|
+ uni.showModal({
|
|
|
+ content:
|
|
|
+ IdName != this.form.name
|
|
|
+ ? "输入的姓名和身份证人像面照片姓名不匹配,请联系客服"
|
|
|
+ : "输入的身份证号和身份证人像面照片身份证号不匹配,请联系客服",
|
|
|
+ showCancel: false,
|
|
|
+ success: (resultst) => {
|
|
|
+ if (resultst.confirm) {
|
|
|
+ uni.navigateBack();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ return;
|
|
|
}
|
|
|
this.$refs[paramType][0].lists = [
|
|
|
{
|
|
@@ -1810,6 +1616,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getarrays(key) {
|
|
|
+ if (!this.dictObj) return;
|
|
|
if (key === "sex") {
|
|
|
return this.dictObj["sys_user_sex"];
|
|
|
}
|
|
@@ -1821,6 +1628,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
returnName(key) {
|
|
|
+ if (!this.dictObj) return;
|
|
|
if (key === "sex") {
|
|
|
if (this.form[key]) {
|
|
|
return this.dictObj["sys_user_sex"][Number(this.form[key])];
|
|
@@ -1847,40 +1655,31 @@ export default {
|
|
|
* getbaseprofiletpgetInfo接口返回值result.data.data不存在的话说明是第一次填写资料
|
|
|
*/
|
|
|
getInfo() {
|
|
|
- console.log("getInfo", this.userInfo);
|
|
|
return new Promise((resolve) => {
|
|
|
var self = this;
|
|
|
this.$api.getbaseprofiletpId(this.goodsId).then((res) => {
|
|
|
self.listData = JSON.parse(res.data.data.keyValue);
|
|
|
var ast = JSON.parse(res.data.data.keyValue2);
|
|
|
self.listData = [...self.listData, ...ast];
|
|
|
- console.log(self.listData, "listData");
|
|
|
self.listData.forEach((item) => {
|
|
|
if (item.fieldKey == "idcard") {
|
|
|
- console.log(this.userInfo.idCard, "this.userInfo.idCard");
|
|
|
this.form.idcard = this.userInfo.idCard;
|
|
|
this.disCard = this.form.idcard ? true : false;
|
|
|
- console.log(this.form.idcard);
|
|
|
}
|
|
|
if (item.fieldKey == "telphone") {
|
|
|
- console.log(this.userInfo.telphone, "this.userInfo.telphone");
|
|
|
this.form.telphone = this.userInfo.telphone;
|
|
|
- console.log(this.form.telphone);
|
|
|
}
|
|
|
|
|
|
if (item.fieldKey == "name") {
|
|
|
- console.log(this.userInfo.realname, "this.userInfo.realname");
|
|
|
this.form.name = this.userInfo.realname;
|
|
|
this.disName = this.form.name ? true : false;
|
|
|
- console.log("this.disName", this.form.name, this.disName);
|
|
|
}
|
|
|
});
|
|
|
self.isRequired = self.listData.every((ims) => {
|
|
|
return ims.required === false;
|
|
|
});
|
|
|
- console.log(self.isRequired, "self.isRequired ");
|
|
|
this.$nextTick(() => {
|
|
|
- // this.agreementModal = true;
|
|
|
+ this.agreementModal = true;
|
|
|
});
|
|
|
self.$api
|
|
|
.getbaseprofiletpgetInfo({
|
|
@@ -1977,12 +1776,10 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- console.log(result.data.data, "result.data.data");
|
|
|
if (result.data.data && result.data.data.status === 3) {
|
|
|
self.remark = result.data.data.text;
|
|
|
self.remarkStatus = true;
|
|
|
self.id = result.data.data.id;
|
|
|
- console.log(result.data.data, "result.data.data");
|
|
|
var arrays = JSON.parse(result.data.data.keyValue);
|
|
|
// var arrays1 = JSON.parse(result.data.data.keyValue2);
|
|
|
self.copyData = JSON.parse(JSON.stringify(arrays));
|
|
@@ -2053,20 +1850,20 @@ export default {
|
|
|
(result.data.data.status === 1 ||
|
|
|
result.data.data.status === 2)
|
|
|
) {
|
|
|
- // uni.showModal({
|
|
|
- // showCancel: false,
|
|
|
- // content:
|
|
|
- // result.data.data.status === 1
|
|
|
- // ? "该商品审核资料已通过,不可重复提交资料"
|
|
|
- // : result.data.data.status === 2
|
|
|
- // ? "该商品审核资料处于待审核状态,不可重复提交资料"
|
|
|
- // : "请联系管理员",
|
|
|
- // success: function (k) {
|
|
|
- // if (k.confirm) {
|
|
|
- // uni.navigateBack();
|
|
|
- // }
|
|
|
- // },
|
|
|
- // });
|
|
|
+ uni.showModal({
|
|
|
+ showCancel: false,
|
|
|
+ content:
|
|
|
+ result.data.data.status === 1
|
|
|
+ ? "该商品审核资料已通过,不可重复提交资料"
|
|
|
+ : result.data.data.status === 2
|
|
|
+ ? "该商品审核资料处于待审核状态,不可重复提交资料"
|
|
|
+ : "请联系管理员",
|
|
|
+ success: function (k) {
|
|
|
+ if (k.confirm) {
|
|
|
+ uni.navigateBack();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -2103,7 +1900,6 @@ export default {
|
|
|
subCanvas() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
var self = this;
|
|
|
- console.log(self.form, "self.form");
|
|
|
if (self.form.commitment_electr_signature) {
|
|
|
resolve();
|
|
|
return;
|