8a1eff7f by simon

Merge branch 'master' of 120.27.44.69:dev/pingan-life-index-pro

2 parents f27a6b1e 99cdf947
......@@ -282,13 +282,16 @@ module.exports = {
value: "6"
}, {
name: "外國人永久居留身份證",
value: "0"
value: "O"
}, {
name: "港澳台居民居住證",
value: "V"
}, {
name: "台灣居民居住證",
value: "W"
}, {
name: "其他",
value: "0"
}]
},
successMsg: "更新成功",
......
......@@ -280,13 +280,16 @@ module.exports = {
value: "6"
}, {
name: "外國人永久居留身份證",
value: "0"
value: "O"
}, {
name: "港澳台居民居住證",
value: "V"
}, {
name: "台灣居民居住證",
value: "W"
}, {
name: "其他",
value: "0"
}]
},
successMsg: "更新成功",
......
......@@ -280,13 +280,16 @@ module.exports = {
value: "6"
}, {
name: "外国人永久居留身份证",
value: "0"
value: "O"
}, {
name: "港澳居民居住证",
value: "V"
}, {
name: "台湾居民居住证",
value: "W"
}, {
name: "其他",
value: "0"
}]
},
successMsg: "更新成功",
......
......@@ -68,7 +68,8 @@ export default {
this.modalContent = content;
this.modalVisiable = true;
},
initData() {},
initData() {
},
onUpdateHandler() {
let b1 = this.checkCnName();
let b2 = this.checkIdNo();
......@@ -168,33 +169,35 @@ export default {
message = this.i18n.infomationImprove.errorTips.e6;
let idNo = this.information.idNo + "";
switch (this.information.idType) {
case "0": // 外國人永久居留身份證
// if (/[a-z][A-Z]{3}[0-9]{12}/.test(idNo)) {
// message = "";
// }
message = "";
break;
case "1": // 身份證
case "1": // 身份證
message = idNo.length == 18 ? "" : message;
break;
case "2": // 護照
case "2": // 護照
message = idNo.length > 3 && idNo.length < 50 ? "" : message;
break;
case "3": // 軍官證或士兵證
case "3": // 軍官證或士兵證
message = idNo.length > 6 && idNo.length < 50 ? "" : message;
break;
case "6": // 港澳通行證/回鄉證或台胞證
message = idNo.length > 5 && idNo.length < 50 ? "" : message;
case "6": // 港澳通行證/回鄉證或台胞證
if (idNo.indexOf("81") == 0 || idNo.indexOf("82") == 0) {
if ((/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo))) {
message = "";
}
}
break;
case "V": // 港澳台居民居住證
// if ((/8[1|2]0000\\d{11}/.text(idNo) && (/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo)))) {
message = "";
// }
case "V": // 港澳居民居住證
if (idNo.indexOf("81") == 0 || idNo.indexOf("82") == 0) {
if ((/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo))) {
message = "";
}
}
break;
case "W": //台灣居民居住證
// if ((/830000\\d{11}/.text(idNo) && (/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo)))) {
message = "";
// }
case "W": //台灣居民居住證
if (idNo.indexOf("83") == 0 || idNo.indexOf("82") == 0) {
if ((/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo))) {
message = "";
}
}
break;
default:
message = "";
......@@ -231,5 +234,5 @@ export default {
this.errorTips.e5 = "";
}
},
created() {}
created() { }
}
......