50bec270 by joe

修改注册的证件类型

1 parent 45c07229
...@@ -13,6 +13,8 @@ import { ...@@ -13,6 +13,8 @@ import {
13 } from 'vuex'; 13 } from 'vuex';
14 14
15 15
16 import { getUserIdTypeList } from "@utils/biz.js";
17
16 import Auth from '@components/auth/auth.vue'; 18 import Auth from '@components/auth/auth.vue';
17 import modalComp from '@/components/modal-comp/modal-comp.vue'; 19 import modalComp from '@/components/modal-comp/modal-comp.vue';
18 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue'; 20 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
...@@ -88,8 +90,8 @@ export default { ...@@ -88,8 +90,8 @@ export default {
88 return i18n.infomationImprove.candidates.sex; 90 return i18n.infomationImprove.candidates.sex;
89 }, 91 },
90 idTypeCandidates() { 92 idTypeCandidates() {
91 let i18n = this.$i18n.messages[this.$i18n.locale]; 93 // let i18n = this.$i18n.messages[this.$i18n.locale];
92 return i18n.infomationImprove.candidates.idType; 94 return getUserIdTypeList(this.$i18n.locale);
93 }, 95 },
94 submitBtnDisabled() { 96 submitBtnDisabled() {
95 let b1 = !checkName(this.information.firstName) ? true : false; 97 let b1 = !checkName(this.information.firstName) ? true : false;
......
...@@ -3641,6 +3641,39 @@ let policyIdTypeEnList = [ ...@@ -3641,6 +3641,39 @@ let policyIdTypeEnList = [
3641 { v: "9", n: "Others" } 3641 { v: "9", n: "Others" }
3642 ]; 3642 ];
3643 3643
3644 /** 用户体系的证件类型映射 **/
3645 let userIdTypeList = [
3646 { value: "33", name: "香港身份证号" },
3647 { value: "1", name: "大陆身份证号(18位)" },
3648 { value: "34", name: "澳门身份证号" },
3649 { value: "2", name: "护照" },
3650 { value: "51", name: "香港出生证明" },
3651 { value: "52", name: "中国出生证" },
3652 { value: "0", name: "其他" }
3653 ];
3654
3655 /** 用户体系的证件类型映射 **/
3656 let userIdTypeTcList = [
3657 { value: "33", name: "香港身份證號" },
3658 { value: "1", name: "大陸身份證號(18位)" },
3659 { value: "34", name: "澳門身份證號" },
3660 { value: "2", name: "護照" },
3661 { value: "51", name: "香港出生證明" },
3662 { value: "52", name: "中國出生證" },
3663 { value: "0", name: "其他" }
3664 ];
3665
3666 /** 用户体系的证件类型映射 **/
3667 let userIdTypeEnList = [
3668 { value: "33", name: "HK ID No." },
3669 { value: "1", name: "Mainland ID No. (18 digits)" },
3670 { value: "34", name: "Macao ID No." },
3671 { value: "2", name: "Passport" },
3672 { value: "51", name: "HK birth certificate" },
3673 { value: "52", name: "Chinese birth certificate" },
3674 { value: "0", name: "Others" }
3675 ];
3676
3644 let relationList = [ 3677 let relationList = [
3645 { v: "22", n: "本人" }, 3678 { v: "22", n: "本人" },
3646 { v: "23", n: "父母" }, 3679 { v: "23", n: "父母" },
...@@ -3963,6 +3996,22 @@ export function getPolicyIdTypeList(lan) { ...@@ -3963,6 +3996,22 @@ export function getPolicyIdTypeList(lan) {
3963 } 3996 }
3964 } 3997 }
3965 3998
3999
4000 /**
4001 * 获取用户体系证件类型列表
4002 * @param {String} lan
4003 */
4004 export function getUserIdTypeList(lan) {
4005 switch (lan) {
4006 case "zh":
4007 return userIdTypeList;
4008 case "en":
4009 return userIdTypeEnList;
4010 default:
4011 return userIdTypeTcList;
4012 }
4013 }
4014
3966 export function getNationsByCode(code) { 4015 export function getNationsByCode(code) {
3967 let n = ""; 4016 let n = "";
3968 nationsList.forEach(element => { 4017 nationsList.forEach(element => {
...@@ -3984,24 +4033,24 @@ export function getInsuredPeriod(lan, t, v) { ...@@ -3984,24 +4033,24 @@ export function getInsuredPeriod(lan, t, v) {
3984 lan == "zh" 4033 lan == "zh"
3985 ? v + "年" 4034 ? v + "年"
3986 : lan == "tc" 4035 : lan == "tc"
3987 ? v + "年" 4036 ? v + "年"
3988 : "" + v + " " + (v > 1 ? "years" : "year"); 4037 : "" + v + " " + (v > 1 ? "years" : "year");
3989 break; 4038 break;
3990 case "3": 4039 case "3":
3991 value = 4040 value =
3992 lan == "zh" 4041 lan == "zh"
3993 ? v + "岁" 4042 ? v + "岁"
3994 : lan == "tc" 4043 : lan == "tc"
3995 ? v + "歲" 4044 ? v + "歲"
3996 : "Up to " + v + " " + (v > 1 ? "years" : "year") + " old"; 4045 : "Up to " + v + " " + (v > 1 ? "years" : "year") + " old";
3997 break; 4046 break;
3998 case "4": 4047 case "4":
3999 value = 4048 value =
4000 lan == "zh" 4049 lan == "zh"
4001 ? v + "月" 4050 ? v + "月"
4002 : lan == "tc" 4051 : lan == "tc"
4003 ? v + "月" 4052 ? v + "月"
4004 : " " + v + " " + (v > 1 ? "months" : "month"); 4053 : " " + v + " " + (v > 1 ? "months" : "month");
4005 break; 4054 break;
4006 default: 4055 default:
4007 value = lan == "zh" ? "无关" : lan == "tc" ? "無關" : "NA"; 4056 value = lan == "zh" ? "无关" : lan == "tc" ? "無關" : "NA";
...@@ -4081,16 +4130,16 @@ export function getPayPeriod(lan, t, v) { ...@@ -4081,16 +4130,16 @@ export function getPayPeriod(lan, t, v) {
4081 lan == "zh" 4130 lan == "zh"
4082 ? "缴" + v + "年" 4131 ? "缴" + v + "年"
4083 : lan == "tc" 4132 : lan == "tc"
4084 ? "繳" + v + "年" 4133 ? "繳" + v + "年"
4085 : "" + v + " " + (v > 1 ? "years" : "year"); 4134 : "" + v + " " + (v > 1 ? "years" : "year");
4086 break; 4135 break;
4087 case "3": 4136 case "3":
4088 value = 4137 value =
4089 lan == "zh" 4138 lan == "zh"
4090 ? "缴至" + v + "岁" 4139 ? "缴至" + v + "岁"
4091 : lan == "tc" 4140 : lan == "tc"
4092 ? "繳至" + v + "歲" 4141 ? "繳至" + v + "歲"
4093 : "Pay to" + v + " " + (v > 1 ? "years" : "year") + " old"; 4142 : "Pay to" + v + " " + (v > 1 ? "years" : "year") + " old";
4094 break; 4143 break;
4095 default: 4144 default:
4096 value = lan == "zh" ? "缴终身" : lan == "tc" ? "繳終身" : "Whole life"; 4145 value = lan == "zh" ? "缴终身" : lan == "tc" ? "繳終身" : "Whole life";
...@@ -4127,8 +4176,8 @@ export function getMoneyName(lan, t) { ...@@ -4127,8 +4176,8 @@ export function getMoneyName(lan, t) {
4127 lan == "zh" 4176 lan == "zh"
4128 ? moneyNameList 4177 ? moneyNameList
4129 : lan == "tc" 4178 : lan == "tc"
4130 ? moneyNameTcList 4179 ? moneyNameTcList
4131 : moneyNameEnList; 4180 : moneyNameEnList;
4132 candidates.forEach(element => { 4181 candidates.forEach(element => {
4133 if (element.v == t) { 4182 if (element.v == t) {
4134 value = element.n; 4183 value = element.n;
...@@ -4164,7 +4213,7 @@ export function getPolicyName(lan, code, name) { ...@@ -4164,7 +4213,7 @@ export function getPolicyName(lan, code, name) {
4164 } 4213 }
4165 } 4214 }
4166 } 4215 }
4167 } catch (e) {} 4216 } catch (e) { }
4168 if (!policy) { 4217 if (!policy) {
4169 return name; 4218 return name;
4170 } 4219 }
......