54b51ce0 by joe

修复部分BUG

1 parent fab542fb
...@@ -165,7 +165,7 @@ module.exports = { ...@@ -165,7 +165,7 @@ module.exports = {
165 service: "Service Network", 165 service: "Service Network",
166 qrcode: "Official Accounts", 166 qrcode: "Official Accounts",
167 qrcodeBot: "Official WeChat Account", 167 qrcodeBot: "Official WeChat Account",
168 copyright: "版權所有 © 中國平安保險(集團)股份有限公司未經許可不得復制、轉載或摘編,違者必究!" 168 copyright: "Copyright © China Ping An Life Insurance (Hong Kong) Company Limited  All rights reserved."
169 }, 169 },
170 login: { 170 login: {
171 title: "PingAn One Connect Member Service", 171 title: "PingAn One Connect Member Service",
...@@ -196,7 +196,7 @@ module.exports = { ...@@ -196,7 +196,7 @@ module.exports = {
196 oe1: "Please get SMS verification code first", 196 oe1: "Please get SMS verification code first",
197 oe2: "Please enter the picture verification code", 197 oe2: "Please enter the picture verification code",
198 oe3: "Please enter the picture verification code", 198 oe3: "Please enter the picture verification code",
199 oe4: "Invalidate SMS verification code, please re-enter", 199 oe4: "Your verify code is not correct. Please try again",
200 } 200 }
201 }, 201 },
202 session: { 202 session: {
...@@ -391,7 +391,9 @@ module.exports = { ...@@ -391,7 +391,9 @@ module.exports = {
391 errorTips: { 391 errorTips: {
392 e1: "Please fill in this item", 392 e1: "Please fill in this item",
393 e2: "Please fill in the correct contact information", 393 e2: "Please fill in the correct contact information",
394 e3: "Please fill in the correct policy number" 394 e3: "Please fill in the correct policy number",
395 e4: "請填寫正確的聯繫電話",
396 e5: "請填寫正確的電郵地址",
395 }, 397 },
396 success: "Thank you for your comments" 398 success: "Thank you for your comments"
397 }, 399 },
...@@ -419,8 +421,11 @@ module.exports = { ...@@ -419,8 +421,11 @@ module.exports = {
419 submitBtn: 'Confirm', 421 submitBtn: 'Confirm',
420 errorTips: { 422 errorTips: {
421 e1: "Please fill in this item", 423 e1: "Please fill in this item",
422 e2: "Please fill in the correct contact information", 424 e2: "Please fill in the correct contact mobile no.",
423 e3: "You have submitted the appointment information, please do not repeat the appointment" 425 e3: "You have submitted the appointment information, please do not repeat the appointment",
426 e4: "Please fill in the valid date",
427 e4: "Please fill in the correct mobile no.",
428 e5: "Please fill in the correct email",
424 } 429 }
425 }, 430 },
426 paymentType: { 431 paymentType: {
......
...@@ -167,7 +167,7 @@ module.exports = { ...@@ -167,7 +167,7 @@ module.exports = {
167 service: "服務網絡", 167 service: "服務網絡",
168 qrcode: "社交媒體", 168 qrcode: "社交媒體",
169 qrcodeBot: "官方公眾號", 169 qrcodeBot: "官方公眾號",
170 copyright: "版權所有 © 中國平安保險(集團)股份有限公司未經許可不得復制、轉載或摘編,違者必究!" 170 copyright: "版權 © 中國平安人壽(香港)有限公司 版權所有"
171 }, 171 },
172 login: { 172 login: {
173 title: "平安一賬通", 173 title: "平安一賬通",
...@@ -198,7 +198,7 @@ module.exports = { ...@@ -198,7 +198,7 @@ module.exports = {
198 oe1: "請先獲取短信驗證碼", 198 oe1: "請先獲取短信驗證碼",
199 oe2: "請輸入圖片驗證碼", 199 oe2: "請輸入圖片驗證碼",
200 oe3: "請輸入短信驗證碼", 200 oe3: "請輸入短信驗證碼",
201 oe4: "短信驗證碼不正確", 201 oe4: "驗證碼錯誤,請重試",
202 }, 202 },
203 }, 203 },
204 register: { 204 register: {
...@@ -391,7 +391,9 @@ module.exports = { ...@@ -391,7 +391,9 @@ module.exports = {
391 errorTips: { 391 errorTips: {
392 e1: "請填寫該項內容", 392 e1: "請填寫該項內容",
393 e2: "請填寫正確的聯繫方式", 393 e2: "請填寫正確的聯繫方式",
394 e3 : "請填寫正確的保單號" 394 e3: "請填寫正確的保單號",
395 e4: "請填寫正確的聯繫電話",
396 e5: "請填寫正確的電郵地址",
395 }, 397 },
396 success: "感謝您的寶貴意見" 398 success: "感謝您的寶貴意見"
397 }, 399 },
...@@ -420,7 +422,8 @@ module.exports = { ...@@ -420,7 +422,8 @@ module.exports = {
420 errorTips: { 422 errorTips: {
421 e1: "請填寫該項內容", 423 e1: "請填寫該項內容",
422 e2: "請填寫正確的聯繫方式", 424 e2: "請填寫正確的聯繫方式",
423 e3: "您已經提交了預約信息,請不要重複預約" 425 e3: "您已經提交了預約信息,請不要重複預約",
426 e4: "請填寫有效的日期"
424 } 427 }
425 }, 428 },
426 paymentType: { 429 paymentType: {
...@@ -792,8 +795,8 @@ module.exports = { ...@@ -792,8 +795,8 @@ module.exports = {
792 goto: "跳轉", 795 goto: "跳轉",
793 per: "第", 796 per: "第",
794 page: "頁", 797 page: "頁",
795 total : "共", 798 total: "共",
796 unit : "條" 799 unit: "條"
797 }, 800 },
798 newsDetail: { 801 newsDetail: {
799 back: "回到列表頁", 802 back: "回到列表頁",
......
...@@ -167,7 +167,7 @@ module.exports = { ...@@ -167,7 +167,7 @@ module.exports = {
167 service: "服务网络", 167 service: "服务网络",
168 qrcode: "社交媒体", 168 qrcode: "社交媒体",
169 qrcodeBot: "官方公众号", 169 qrcodeBot: "官方公众号",
170 copyright: "版权所有 © 中国平安保险(集团)股份有限公司未经许可不得复制、转载或摘编,违者必究!" 170 copyright: "版权 © 中国平安人寿(香港)有限公司  版权所有"
171 }, 171 },
172 login: { 172 login: {
173 title: "平安一账通", 173 title: "平安一账通",
...@@ -198,7 +198,7 @@ module.exports = { ...@@ -198,7 +198,7 @@ module.exports = {
198 oe1: "请先获取短信验证码", 198 oe1: "请先获取短信验证码",
199 oe2: "请输入图片验证码", 199 oe2: "请输入图片验证码",
200 oe3: "请输入短信验证码", 200 oe3: "请输入短信验证码",
201 oe4: "短信验证码不正确", 201 oe4: "验证码错误,请重试",
202 } 202 }
203 }, 203 },
204 session: { 204 session: {
...@@ -391,7 +391,9 @@ module.exports = { ...@@ -391,7 +391,9 @@ module.exports = {
391 errorTips: { 391 errorTips: {
392 e1: "请填写该项内容", 392 e1: "请填写该项内容",
393 e2: "请填写正确的联系方式", 393 e2: "请填写正确的联系方式",
394 e3: "请填写正确的保单号" 394 e3: "请填写正确的保单号",
395 e4: "请填写正确的联系电话",
396 e5: "请填写正确的电邮地址",
395 }, 397 },
396 success: "感谢您的宝贵意见" 398 success: "感谢您的宝贵意见"
397 }, 399 },
...@@ -419,8 +421,9 @@ module.exports = { ...@@ -419,8 +421,9 @@ module.exports = {
419 submitBtn: '确认', 421 submitBtn: '确认',
420 errorTips: { 422 errorTips: {
421 e1: "请填写该项内容", 423 e1: "请填写该项内容",
422 e2: "请填写正确的联系方式", 424 e2: "请填写正确的联系电话",
423 e3: "您已经提交了预约信息,请不要重复预约" 425 e3: "您已经提交了预约信息,请不要重复预约",
426 e4: "请填写有效的日期"
424 } 427 }
425 }, 428 },
426 paymentType: { 429 paymentType: {
......
...@@ -375,6 +375,9 @@ export default { ...@@ -375,6 +375,9 @@ export default {
375 disable = true; 375 disable = true;
376 } 376 }
377 }); 377 });
378 if(!disable){
379 disable = !/^((?!0000)[0-9]{4}-((0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-8])|(0[13-9]|1[0-2])-(29|30)|(0[13578]|1[02])-31)|([0-9]{2}(0[48]|[2468][048]|[13579][26])|(0[48]|[2468][048]|[13579][26])00)-02-29)$/.test(dateValue);
380 }
378 let result = { 381 let result = {
379 dateValue: this.dateValue, 382 dateValue: this.dateValue,
380 disable: disable 383 disable: disable
......
...@@ -23,6 +23,7 @@ export default { ...@@ -23,6 +23,7 @@ export default {
23 contactIconShow: "", 23 contactIconShow: "",
24 contactTypeShow: "", 24 contactTypeShow: "",
25 contactPlaceHolderShow: "", 25 contactPlaceHolderShow: "",
26 contactDateError: false,
26 data: { 27 data: {
27 name: "", 28 name: "",
28 contactType: "", 29 contactType: "",
...@@ -68,10 +69,18 @@ export default { ...@@ -68,10 +69,18 @@ export default {
68 let b3 = this.data.name ? false : true; 69 let b3 = this.data.name ? false : true;
69 let b4 = this.checkContactMethod() ? true : false; 70 let b4 = this.checkContactMethod() ? true : false;
70 let b5 = this.data.complain ? false : true; 71 let b5 = this.data.complain ? false : true;
71 return b1 || b2 || b3 || b4 || b5; 72 let b6 = this.contactDateError;
73 let b7 = this.data.policyNumber && !policyNumberCheck(this.data.policyNumber);
74 return b1 || b2 || b3 || b4 || b5 || b6 || b7;
72 } 75 }
73 }, 76 },
74 methods: { 77 methods: {
78 checkDate(data) {
79 this.contactDateError = data.disable;
80 if (this.contactDateError) {
81 this.errorTips.contactDateErr = this.i18n.reservation.errorTips.e4;
82 }
83 },
75 showModal(content, icon) { 84 showModal(content, icon) {
76 icon = !icon || typeof icon === "undefined" ? "succ" : icon; 85 icon = !icon || typeof icon === "undefined" ? "succ" : icon;
77 this.modalIcon = icon; 86 this.modalIcon = icon;
...@@ -94,14 +103,13 @@ export default { ...@@ -94,14 +103,13 @@ export default {
94 if (b3) { 103 if (b3) {
95 this.errorTips.contactMethodErr = b3; 104 this.errorTips.contactMethodErr = b3;
96 } 105 }
97 let b1 = this.checkName(); 106 this.checkName();
98 let b2 = this.checkContactType(); 107 this.checkContactType();
99 let b4 = this.checkComplain(); 108 this.checkComplain();
100 let b5 = this.checkPolicyNumber(); 109 this.checkPolicyNumber();
101 let b6 = this.checkContactDate(); 110 this.checkContactDate();
102 let b = b1 & b2 & !b3 & b4 & b5 & b6;
103 111
104 if (b) { 112 if (!submitBtnDisabled) {
105 this.isSubmit = true; 113 this.isSubmit = true;
106 httpPost({ 114 httpPost({
107 url: api.saveComplain, 115 url: api.saveComplain,
...@@ -145,12 +153,12 @@ export default { ...@@ -145,12 +153,12 @@ export default {
145 let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod); 153 let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod);
146 let zhMobile = contactMethodCheck('mobile', this.data.contactMethod); 154 let zhMobile = contactMethodCheck('mobile', this.data.contactMethod);
147 if (!hkMobile && !zhMobile) { 155 if (!hkMobile && !zhMobile) {
148 return this.i18n.complaintAcceptance.errorTips.e2; 156 return this.i18n.complaintAcceptance.errorTips.e4;
149 } 157 }
150 } else { 158 } else {
151 let emailCheck = contactMethodCheck('email', this.data.contactMethod); 159 let emailCheck = contactMethodCheck('email', this.data.contactMethod);
152 if (!emailCheck) { 160 if (!emailCheck) {
153 return this.i18n.complaintAcceptance.errorTips.e2; 161 return this.i18n.complaintAcceptance.errorTips.e5;
154 } 162 }
155 } 163 }
156 return ""; 164 return "";
...@@ -175,6 +183,9 @@ export default { ...@@ -175,6 +183,9 @@ export default {
175 this.errorTips.contactDateErr = this.i18n.complaintAcceptance.errorTips.e1; 183 this.errorTips.contactDateErr = this.i18n.complaintAcceptance.errorTips.e1;
176 return false; 184 return false;
177 } 185 }
186 if (this.contactDateError) {
187 return false;
188 }
178 return true; 189 return true;
179 }, 190 },
180 userLogin(uinfo) { 191 userLogin(uinfo) {
...@@ -201,7 +212,12 @@ export default { ...@@ -201,7 +212,12 @@ export default {
201 this.contactPlaceHolderShow = this.contactTypes[val - 1].placeholder; 212 this.contactPlaceHolderShow = this.contactTypes[val - 1].placeholder;
202 }, 213 },
203 'data.contactMethod': function () { 214 'data.contactMethod': function () {
204 this.errorTips.contactMethodErr = ""; 215 let b3 = this.checkContactMethod();
216 if (b3) {
217 this.errorTips.contactMethodErr = b3;
218 } else {
219 this.errorTips.contactMethodErr = "";
220 }
205 }, 221 },
206 'data.complain': function () { 222 'data.complain': function () {
207 this.errorTips.complainErr = ""; 223 this.errorTips.complainErr = "";
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
84 </div> 84 </div>
85 <div class="ipt-wrap ipt-wrap2"> 85 <div class="ipt-wrap ipt-wrap2">
86 <!-- <input class="ipt" type="date" :class="{err:errorTips.contactDateErr.length>0}" v-model="data.contactDate"> --> 86 <!-- <input class="ipt" type="date" :class="{err:errorTips.contactDateErr.length>0}" v-model="data.contactDate"> -->
87 <date-picker v-model="data.contactDate"></date-picker> 87 <date-picker v-model="data.contactDate" :check="checkDate"></date-picker>
88 </div> 88 </div>
89 <div class="validator" v-if="errorTips.contactDateErr.length > 0"> 89 <div class="validator" v-if="errorTips.contactDateErr.length > 0">
90 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactDateErr}} 90 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactDateErr}}
......
...@@ -20,6 +20,7 @@ export default { ...@@ -20,6 +20,7 @@ export default {
20 key: 'value', 20 key: 'value',
21 isHkCus: true, 21 isHkCus: true,
22 checked: false, 22 checked: false,
23 contactDateError: false,
23 data: { 24 data: {
24 name: "", 25 name: "",
25 contactType: "", 26 contactType: "",
...@@ -39,7 +40,6 @@ export default { ...@@ -39,7 +40,6 @@ export default {
39 e7: "", 40 e7: "",
40 e8: "" 41 e8: ""
41 }, 42 },
42
43 modalSimpleVisiable: false, 43 modalSimpleVisiable: false,
44 modalVisiable: false, 44 modalVisiable: false,
45 targetPath: "", 45 targetPath: "",
...@@ -70,13 +70,17 @@ export default { ...@@ -70,13 +70,17 @@ export default {
70 let b2 = this.data.contactDate ? false : true; 70 let b2 = this.data.contactDate ? false : true;
71 let b3 = this.data.name ? false : true; 71 let b3 = this.data.name ? false : true;
72 let b4 = this.checkContactMethod() ? true : false; 72 let b4 = this.checkContactMethod() ? true : false;
73 return b1 || b2 || b3 || b4; 73 let b5 = this.contactDateError;
74 return b1 || b2 || b3 || b4 || b5;
74 } 75 }
75 }, 76 },
76 methods: { 77 methods: {
77 // 校验日期,日期变更后触发,包含点击和文本输入 78 // 校验日期,日期变更后触发,包含点击和文本输入
78 checkDate(data){ 79 checkDate(data) {
79 console.log("checkDate data:", data); 80 this.contactDateError = data.disable;
81 if (this.contactDateError) {
82 this.errorTips.e7 = this.i18n.reservation.errorTips.e4;
83 }
80 }, 84 },
81 showModal(content, icon) { 85 showModal(content, icon) {
82 icon = !icon || typeof icon === "undefined" ? "succ" : icon; 86 icon = !icon || typeof icon === "undefined" ? "succ" : icon;
...@@ -100,30 +104,29 @@ export default { ...@@ -100,30 +104,29 @@ export default {
100 this.errorTips.e3 = err; 104 this.errorTips.e3 = err;
101 return; 105 return;
102 } 106 }
103 let b1 = this.checkName(); 107 this.checkName();
104 let b3 = this.checkInstruction(); 108 this.checkInstruction();
105 let b4 = this.checkContactDate(); 109 this.checkContactDate();
106 let b = b1 & b3 & b4; 110 if (this.submitBtnDisabled) {
107 111 return;
108 if (b) {
109 this.isSubmit = true;
110 this.data.hkCustomer = this.isHkCus ? 1 : 0;
111 httpPost({
112 url: api.saveReservation,
113 data: this.data
114 }).then(() => {
115 this.showSubmitSuccess();
116 this.isSubmit = false;
117 }).catch(e => {
118 switch (e.code) {
119 case 3001:
120 console.log(1111);
121 this.errorTips.e8 = this.i18n.reservation.errorTips.e3;
122 break;
123 }
124 this.isSubmit = false;
125 })
126 } 112 }
113
114 this.isSubmit = true;
115 this.data.hkCustomer = this.isHkCus ? 1 : 0;
116 httpPost({
117 url: api.saveReservation,
118 data: this.data
119 }).then(() => {
120 this.showSubmitSuccess();
121 this.isSubmit = false;
122 }).catch(e => {
123 switch (e.code) {
124 case 3001:
125 this.errorTips.e8 = this.i18n.reservation.errorTips.e3;
126 break;
127 }
128 this.isSubmit = false;
129 });
127 }, 130 },
128 showSubmitSuccess() { 131 showSubmitSuccess() {
129 this.showModal(this.i18n.reservation.success); 132 this.showModal(this.i18n.reservation.success);
...@@ -162,6 +165,9 @@ export default { ...@@ -162,6 +165,9 @@ export default {
162 this.errorTips.e7 = message; 165 this.errorTips.e7 = message;
163 return false; 166 return false;
164 } 167 }
168 if (this.contactDateError) {
169 return false;
170 }
165 return true; 171 return true;
166 }, 172 },
167 userLogin(uinfo) { 173 userLogin(uinfo) {
...@@ -179,18 +185,28 @@ export default { ...@@ -179,18 +185,28 @@ export default {
179 }, 185 },
180 watch: { 186 watch: {
181 'data.name': function () { 187 'data.name': function () {
188 this.errorTips.e8 = "";
182 this.errorTips.e1 = ""; 189 this.errorTips.e1 = "";
183 }, 190 },
184 'data.contactMethod': function () { 191 'data.contactMethod': function () {
185 this.errorTips.e3 = ""; 192 this.errorTips.e8 = "";
193 let b = this.checkContactMethod();
194 if (b) {
195 this.errorTips.e3 = b;
196 } else {
197 this.errorTips.e3 = "";
198 }
199
186 }, 200 },
187 'data.instruction': function () { 201 'data.instruction': function () {
202 this.errorTips.e8 = "";
188 this.errorTips.e5 = ""; 203 this.errorTips.e5 = "";
189 }, 204 },
190 'data.reservationType': function () { 205 'data.reservationType': function () {
191 this.errorTips.e8 = ""; 206 this.errorTips.e8 = "";
192 }, 207 },
193 'data.contactDate': function () { 208 'data.contactDate': function () {
209 this.errorTips.e8 = "";
194 this.errorTips.e7 = ""; 210 this.errorTips.e7 = "";
195 } 211 }
196 }, 212 },
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
82 <div class="label"> 82 <div class="label">
83 <div class="icon"><img src="@/assets/images/reservation/icon-re-calendar.png"></div>{{$t('reservation.contactTime')}} 83 <div class="icon"><img src="@/assets/images/reservation/icon-re-calendar.png"></div>{{$t('reservation.contactTime')}}
84 </div> 84 </div>
85 <div class="ipt-wrap"> 85 <div class="ipt-wrap" :class="{err:errorTips.e7.length>0}">
86 <!-- <input class="ipt" type="date" v-model="data.contactDate" :class="{err : errorTips.e7.length > 0}"> --> 86 <!-- <input class="ipt" type="date" v-model="data.contactDate" :class="{err : errorTips.e7.length > 0}"> -->
87 <date-picker v-model="data.contactDate" :check="checkDate"></date-picker> 87 <date-picker v-model="data.contactDate" :check="checkDate"></date-picker>
88 </div> 88 </div>
......
...@@ -182,6 +182,14 @@ export default { ...@@ -182,6 +182,14 @@ export default {
182 this.errorModel = 2; 182 this.errorModel = 2;
183 }); 183 });
184 }, 184 },
185
186 testUpdateUserInfo() {
187 let userInfo = JSON.parse(JSON.stringify(this.userInfo));
188 userInfo.hadFullInfo = 1;
189 userInfo.name = this.information.lastName + this.information.firstName;
190 this.$store.commit("SET_USER_INFO", userInfo);
191 },
192
185 updateInformation() { 193 updateInformation() {
186 // 仅更新5项基本信息 194 // 仅更新5项基本信息
187 if (this.loading) { 195 if (this.loading) {
......
...@@ -11,7 +11,7 @@ import { ...@@ -11,7 +11,7 @@ import {
11 } from '@/api/fetch-api.js' 11 } from '@/api/fetch-api.js'
12 12
13 13
14 import { contactMethodCheck } from '@utils/utils.js'; 14 import { contactMethodCheck ,checkVerifyCode} from '@utils/utils.js';
15 15
16 import modalComp from '@/components/modal-comp/modal-comp.vue'; 16 import modalComp from '@/components/modal-comp/modal-comp.vue';
17 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue'; 17 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
116 otpLoginDisabled() { 116 otpLoginDisabled() {
117 let b1 = !this.loginCheck.agreeProtocol; 117 let b1 = !this.loginCheck.agreeProtocol;
118 let b2 = !this.loginForm.mobileNo; 118 let b2 = !this.loginForm.mobileNo;
119 let b3 = !this.loginForm.otp; 119 let b3 = !checkVerifyCode(this.loginForm.otp);
120 let b4 = !this.values.token; 120 let b4 = !this.values.token;
121 let b5 = this.values.vcodeuuid && !this.loginForm.imageValue; 121 let b5 = this.values.vcodeuuid && !this.loginForm.imageValue;
122 return b1 || b2 || b3 || b4 || b5; 122 return b1 || b2 || b3 || b4 || b5;
...@@ -340,7 +340,7 @@ export default { ...@@ -340,7 +340,7 @@ export default {
340 _checkOptParams() { 340 _checkOptParams() {
341 return new Promise((resolve, reject) => { 341 return new Promise((resolve, reject) => {
342 this._checkMobileLegal().then(() => { 342 this._checkMobileLegal().then(() => {
343 if (!this.loginForm.otp) { 343 if (!checkVerifyCode(this.loginForm.otp)) {
344 this._showOtpEmptyTips(); 344 this._showOtpEmptyTips();
345 return; 345 return;
346 } 346 }
......
...@@ -4,6 +4,8 @@ import { ...@@ -4,6 +4,8 @@ import {
4 httpPost 4 httpPost
5 } from '@/api/fetch-api.js' 5 } from '@/api/fetch-api.js'
6 6
7 import { checkVerifyCode } from '@utils/utils.js';
8
7 import modalComp from '@/components/modal-comp/modal-comp.vue'; 9 import modalComp from '@/components/modal-comp/modal-comp.vue';
8 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue'; 10 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
9 import { passwordEncrypt } from '@/utils/encrypt.js'; 11 import { passwordEncrypt } from '@/utils/encrypt.js';
...@@ -57,7 +59,7 @@ export default { ...@@ -57,7 +59,7 @@ export default {
57 return b1; 59 return b1;
58 }, 60 },
59 s3BtnDisabled() { 61 s3BtnDisabled() {
60 let b1 = !this.step3.otp ? true : false; 62 let b1 = !checkVerifyCode(this.step3.otp) ? true : false;
61 return b1; 63 return b1;
62 }, 64 },
63 s4BtnDisabled() { 65 s4BtnDisabled() {
...@@ -117,7 +119,7 @@ export default { ...@@ -117,7 +119,7 @@ export default {
117 // } 119 // }
118 this.type = 3; 120 this.type = 3;
119 } 121 }
120 }).catch(err=>{ 122 }).catch(err => {
121 this.loading = false; 123 this.loading = false;
122 }); 124 });
123 }, 125 },
...@@ -161,7 +163,7 @@ export default { ...@@ -161,7 +163,7 @@ export default {
161 return; 163 return;
162 } 164 }
163 // 发送验证码 165 // 发送验证码
164 if (!this.step3.otp) { 166 if (!checkVerifyCode(this.step3.otp)) {
165 this.step3.error = this.i18n().passwordReset.type2.error1; 167 this.step3.error = this.i18n().passwordReset.type2.error1;
166 return; 168 return;
167 } 169 }
...@@ -186,7 +188,7 @@ export default { ...@@ -186,7 +188,7 @@ export default {
186 return; 188 return;
187 } 189 }
188 } 190 }
189 }).catch(err=>{ 191 }).catch(err => {
190 this.loading = false; 192 this.loading = false;
191 }) 193 })
192 }, 194 },
...@@ -225,7 +227,8 @@ export default { ...@@ -225,7 +227,8 @@ export default {
225 break 227 break
226 default: 228 default:
227 message = this.i18n().passwordCheck.error4; 229 message = this.i18n().passwordCheck.error4;
228 this.showModal(message, "info"); 230 this.step4.error2 = message;
231 // this.showModal(message, "info");
229 break; 232 break;
230 } 233 }
231 } 234 }
......
...@@ -113,7 +113,8 @@ export default { ...@@ -113,7 +113,8 @@ export default {
113 case "COMMON_ERROR_E0": 113 case "COMMON_ERROR_E0":
114 message = this.i18n().session.sidExpire; 114 message = this.i18n().session.sidExpire;
115 this.targetPath = "/login?callback=/password/reset"; 115 this.targetPath = "/login?callback=/password/reset";
116 this.showModal(message, "info"); 116 this.step.error2 = message;
117 // this.showModal(message, "info");
117 break; 118 break;
118 default: 119 default:
119 this.step.error0 = this.i18n().passwordCheck.error5; 120 this.step.error0 = this.i18n().passwordCheck.error5;
...@@ -124,7 +125,8 @@ export default { ...@@ -124,7 +125,8 @@ export default {
124 this.loading = false; 125 this.loading = false;
125 let message = this.i18n().session.sidExpire; 126 let message = this.i18n().session.sidExpire;
126 this.targetPath = "/login?callback=/password/reset"; 127 this.targetPath = "/login?callback=/password/reset";
127 this.showModal(message, "info"); 128 this.step.error2 = message;
129 // this.showModal(message, "info");
128 }); 130 });
129 }, 131 },
130 checkPassword(password) { 132 checkPassword(password) {
......
...@@ -6,7 +6,7 @@ import { ...@@ -6,7 +6,7 @@ import {
6 httpPost 6 httpPost
7 } from '@/api/fetch-api.js' 7 } from '@/api/fetch-api.js'
8 8
9 import { contactMethodCheck } from '@utils/utils.js'; 9 import { contactMethodCheck,checkVerifyCode } from '@utils/utils.js';
10 10
11 import modalComp from '@/components/modal-comp/modal-comp.vue'; 11 import modalComp from '@/components/modal-comp/modal-comp.vue';
12 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue'; 12 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
84 let b1 = !this.registerCheck.agreeProtocol; 84 let b1 = !this.registerCheck.agreeProtocol;
85 let b2 = !this.values.token; 85 let b2 = !this.values.token;
86 let b3 = this.values.vcodeuuid && !this.registerForm.imageValue; 86 let b3 = this.values.vcodeuuid && !this.registerForm.imageValue;
87 let b4 = !this.registerForm.opt; 87 let b4 = !checkVerifyCode(this.registerForm.opt);
88 return b1 || b2 || b3 || b4; 88 return b1 || b2 || b3 || b4;
89 }, 89 },
90 submitDisabled() { 90 submitDisabled() {
...@@ -311,7 +311,7 @@ export default { ...@@ -311,7 +311,7 @@ export default {
311 this._showImageValueTip(); 311 this._showImageValueTip();
312 return; 312 return;
313 } 313 }
314 if (!this.registerForm.opt) { 314 if (!checkVerifyCode(this.registerForm.opt)) {
315 this._showOTPTip(); 315 this._showOTPTip();
316 return; 316 return;
317 } 317 }
......
...@@ -272,5 +272,9 @@ export function contactMethodCheck(type, value) { ...@@ -272,5 +272,9 @@ export function contactMethodCheck(type, value) {
272 } 272 }
273 273
274 export function policyNumberCheck(policyNumber) { 274 export function policyNumberCheck(policyNumber) {
275 return /^P(0001|0002)\d{11}$/.test(policyNumber); 275 return /^(P|p)(0001|0002)\d{11}$/.test(policyNumber);
276 }
277
278 export function checkVerifyCode(verifyCode) {
279 return /^\d{6}$/.test(verifyCode)
276 } 280 }
...\ No newline at end of file ...\ No newline at end of file
......