|
@@ -244,16 +244,6 @@
|
|
|
>
|
|
|
文件大小≤2M
|
|
|
</text>
|
|
|
- <!-- :max-size="2097152" -->
|
|
|
- <!-- @on-list-change="
|
|
|
- item.fieldKey === 'recent_photos'
|
|
|
- ? changePhotoListHeader1($event)
|
|
|
- : item.fieldKey === 'idcard_face_photo'
|
|
|
- ? changePhotoListHeader2($event)
|
|
|
- : item.fieldKey === 'idcard_national_photo'
|
|
|
- ? changePhotoListHeader3($event)
|
|
|
- : ''
|
|
|
- " -->
|
|
|
<u-upload
|
|
|
:show-progress="false"
|
|
|
:ref="
|
|
@@ -345,7 +335,7 @@
|
|
|
label-position="top"
|
|
|
:prop="item.required ? item.fieldKey : ''"
|
|
|
>
|
|
|
- <div style="width:100%">
|
|
|
+ <div style="width: 100%">
|
|
|
<view class="dis_stys">
|
|
|
<text style="color: #999999">请在下方签名区进行签名</text>
|
|
|
<text @click="retDraw" mode="">清空</text>
|
|
@@ -1039,7 +1029,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
async uploadDatas(data) {
|
|
|
- console.log("sfsfg---data", data);
|
|
|
if (this.form.recent_photos && this.form.idcard_face_photo) {
|
|
|
let base64 = await this.$method.imageToBase64(
|
|
|
this.form.idcard_face_photo
|
|
@@ -1304,31 +1293,37 @@ export default {
|
|
|
data.working_years =
|
|
|
this.dictObj["working_years"][Number(data.working_years)];
|
|
|
}
|
|
|
- if (data["recent_photos"]) {
|
|
|
- data.recent_photos = await this.$method.uploadFile(
|
|
|
- data.recent_photos,
|
|
|
- 0
|
|
|
- );
|
|
|
- }
|
|
|
- if (data["idcard_face_photo"]) {
|
|
|
+ if (
|
|
|
+ data["idcard_face_photo"] &&
|
|
|
+ data["idcard_face_photo"].indexOf("oss/images") == -1
|
|
|
+ ) {
|
|
|
data.idcard_face_photo = await this.$method.uploadFile(
|
|
|
data.idcard_face_photo,
|
|
|
0
|
|
|
);
|
|
|
}
|
|
|
- if (data["idcard_national_photo"]) {
|
|
|
+ if (
|
|
|
+ data["idcard_national_photo"] &&
|
|
|
+ data["idcard_national_photo"].indexOf("oss/images") == -1
|
|
|
+ ) {
|
|
|
data.idcard_national_photo = await this.$method.uploadFile(
|
|
|
data.idcard_national_photo,
|
|
|
0
|
|
|
);
|
|
|
}
|
|
|
- if (data["commitment_electr_signature"]) {
|
|
|
+ if (
|
|
|
+ data["commitment_electr_signature"] &&
|
|
|
+ data["commitment_electr_signature"].indexOf("oss/images") == -1
|
|
|
+ ) {
|
|
|
data.commitment_electr_signature = await this.$method.uploadFile(
|
|
|
data.commitment_electr_signature,
|
|
|
0
|
|
|
);
|
|
|
}
|
|
|
- if (data["commitment_seal"]) {
|
|
|
+ if (
|
|
|
+ data["commitment_seal"] &&
|
|
|
+ data["commitment_seal"].indexOf("oss/images") == -1
|
|
|
+ ) {
|
|
|
data.commitment_seal = await this.$method.uploadFile(
|
|
|
data.commitment_seal,
|
|
|
0
|
|
@@ -1399,7 +1394,6 @@ export default {
|
|
|
};
|
|
|
const index = map[key];
|
|
|
if (lists.length) {
|
|
|
- this["fileList" + index] = lists;
|
|
|
// #ifdef MP-WEIXIN
|
|
|
const isJPG =
|
|
|
lists[0].url.indexOf("//tmp") !== -1 ||
|
|
@@ -1411,10 +1405,10 @@ export default {
|
|
|
lists[0].file.type === "image/png" ||
|
|
|
lists[0].file.type === "image/jpg";
|
|
|
// #endif
|
|
|
-
|
|
|
if (isJPG) {
|
|
|
let size = lists[0].file.size;
|
|
|
if (size < 2 * 1024 * 1024) {
|
|
|
+ this["fileList" + index] = lists;
|
|
|
if (index == 1) {
|
|
|
let url = lists[0].url;
|
|
|
// #ifdef MP-WEIXIN
|
|
@@ -1439,6 +1433,7 @@ export default {
|
|
|
this.checkIdCard(index - 1, url, titleMsg, key);
|
|
|
}
|
|
|
} else {
|
|
|
+ this.$refs[key][0].remove(0);
|
|
|
uni.showModal({
|
|
|
title: "提示",
|
|
|
content: "上传图片大小不能超过 2MB!",
|
|
@@ -1448,158 +1443,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- this.fileList3 = [];
|
|
|
- this.$set(this.form, "idcard_national_photo", "");
|
|
|
- }
|
|
|
- this.openVerify = false;
|
|
|
- this.$nextTick(function () {
|
|
|
- this.resultForm();
|
|
|
- });
|
|
|
- },
|
|
|
- async changePhotoListHeader1(lists, name) {
|
|
|
- if (lists.length) {
|
|
|
- this.fileList1 = lists;
|
|
|
- // console.log(lists, "lists1");
|
|
|
- if (
|
|
|
- lists[0].url.indexOf("//tmp") !== -1 ||
|
|
|
- lists[0].url.indexOf("//temp") !== -1
|
|
|
- ) {
|
|
|
- if (lists[0].file.size < 2 * 1024 * 1024) {
|
|
|
- // 以前的
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "recent_photos",
|
|
|
- await this.$method.imageInfos(lists[0].url)
|
|
|
- );
|
|
|
- } else {
|
|
|
- // 需要压缩
|
|
|
- let canvasId = "zipCanvas";
|
|
|
- let imagePath = lists[0].url; //原图的路径
|
|
|
- let limitSize = 2048; //大小限制2048kb
|
|
|
- let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
|
|
|
- getLessLimitSizeImage(
|
|
|
- canvasId,
|
|
|
- imagePath,
|
|
|
- limitSize,
|
|
|
- drawWidth,
|
|
|
- async (resPath) => {
|
|
|
- //resPath就是压缩后图片的路径
|
|
|
- this.$set(
|
|
|
- this.form,
|
|
|
- "recent_photos",
|
|
|
- await this.$method.imageInfos(resPath)
|
|
|
- );
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.fileList1 = [];
|
|
|
- this.$set(this.form, "recent_photos", "");
|
|
|
- }
|
|
|
- this.openVerify = false;
|
|
|
- this.$nextTick(function () {
|
|
|
- this.resultForm();
|
|
|
- });
|
|
|
- },
|
|
|
- async changePhotoListHeader2(lists, name) {
|
|
|
- // console.log('身份证照片zhengmian:', lists, this.$refs.idcard_face_photo)
|
|
|
- if (lists.length) {
|
|
|
- this.fileList2 = lists;
|
|
|
- if (
|
|
|
- lists[0].url.indexOf("//tmp") !== -1 ||
|
|
|
- lists[0].url.indexOf("//temp") !== -1
|
|
|
- ) {
|
|
|
- let url = lists[0].url;
|
|
|
- let size = lists[0].file.size;
|
|
|
- this.$refs.idcard_face_photo[0].remove(0);
|
|
|
-
|
|
|
- // console.log('url', url, size)
|
|
|
- let titleMsg = "请上传正确清晰的身份证人像面照片";
|
|
|
- if (size < 2 * 1024 * 1024) {
|
|
|
- this.checkIdCard(1, url, titleMsg, "idcard_face_photo");
|
|
|
- } else {
|
|
|
- // 需要压缩
|
|
|
- let canvasId = "zipCanvas";
|
|
|
- let imagePath = url; //原图的路径
|
|
|
- let limitSize = 2048; //大小限制2048kb
|
|
|
- let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
|
|
|
- getLessLimitSizeImage(
|
|
|
- canvasId,
|
|
|
- imagePath,
|
|
|
- limitSize,
|
|
|
- drawWidth,
|
|
|
- async (resPath) => {
|
|
|
- //resPath就是压缩后图片的路径
|
|
|
- this.checkIdCard(1, resPath, titleMsg, "idcard_face_photo");
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.fileList2 = [];
|
|
|
- this.$set(this.form, "idcard_face_photo", "");
|
|
|
- }
|
|
|
- this.openVerify = false;
|
|
|
- this.$nextTick(function () {
|
|
|
- this.resultForm();
|
|
|
- });
|
|
|
- },
|
|
|
- async changePhotoListHeader3(lists, name) {
|
|
|
- if (lists.length) {
|
|
|
- this.fileList3 = lists;
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- const isJPG =
|
|
|
- lists[0].url.indexOf("//tmp") !== -1 ||
|
|
|
- lists[0].url.indexOf("//temp") !== -1;
|
|
|
- // #endif
|
|
|
- // #ifdef H5
|
|
|
- const isJPG =
|
|
|
- lists[0].file.type === "image/jpeg" ||
|
|
|
- lists[0].file.type === "image/png" ||
|
|
|
- lists[0].file.type === "image/jpg";
|
|
|
- // #endif
|
|
|
-
|
|
|
- if (isJPG) {
|
|
|
- console.log("//tem", lists[0]);
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- let url = lists[0].url;
|
|
|
- // #endif
|
|
|
- // #ifdef H5
|
|
|
- let url = lists[0].file;
|
|
|
- // #endif
|
|
|
- let size = lists[0].file.size;
|
|
|
- this.$refs.idcard_national_photo[0].remove(0);
|
|
|
- let titleMsg = "请上传正确清晰的身份证国徽面照片";
|
|
|
- if (size < 2 * 1024 * 1024) {
|
|
|
- this.checkIdCard(2, url, titleMsg, "idcard_national_photo");
|
|
|
- } else {
|
|
|
- uni.showModal({
|
|
|
- title: "提示",
|
|
|
- content: "上传图片大小不能超过 2MB!",
|
|
|
- showCancel: false,
|
|
|
- });
|
|
|
- return;
|
|
|
- // 需要压缩
|
|
|
- let canvasId = "zipCanvas";
|
|
|
- let imagePath = url; //原图的路径
|
|
|
- let limitSize = 2048; //大小限制2048kb
|
|
|
- let drawWidth = wx.getSystemInfoSync().windowWidth; //初始绘画区域是画布自身的宽度也就是屏幕宽度
|
|
|
- getLessLimitSizeImage(
|
|
|
- canvasId,
|
|
|
- imagePath,
|
|
|
- limitSize,
|
|
|
- drawWidth,
|
|
|
- async (resPath) => {
|
|
|
- //resPath就是压缩后图片的路径
|
|
|
- this.checkIdCard(2, resPath, titleMsg, "idcard_national_photo");
|
|
|
- }
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.fileList3 = [];
|
|
|
- this.$set(this.form, "idcard_national_photo", "");
|
|
|
+ this["fileList" + index] = [];
|
|
|
+ this.$set(this.form, key, "");
|
|
|
}
|
|
|
this.openVerify = false;
|
|
|
this.$nextTick(function () {
|
|
@@ -1615,22 +1460,25 @@ export default {
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- 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;
|
|
|
+ if (cardSide == 1) {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
this.$refs[paramType][0].lists = [
|
|
|
{
|
|
|
url: this.$method.splitImgHost(res.data.IdImgPath),
|