2cf4637a by joe

修复18-19号提到的 部分BUG

1 parent a35c232e
Showing 84 changed files with 81 additions and 33 deletions
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -418,7 +418,8 @@ module.exports = { ...@@ -418,7 +418,8 @@ module.exports = {
418 submitBtn: 'Confirm', 418 submitBtn: 'Confirm',
419 errorTips: { 419 errorTips: {
420 e1: "Please fill in this item", 420 e1: "Please fill in this item",
421 e2: "Please fill in the correct contact information" 421 e2: "Please fill in the correct contact information",
422 e3: "You have submitted the appointment information, please do not repeat the appointment"
422 } 423 }
423 }, 424 },
424 paymentType: { 425 paymentType: {
...@@ -692,9 +693,9 @@ module.exports = { ...@@ -692,9 +693,9 @@ module.exports = {
692 menu2: "Payment Options", 693 menu2: "Payment Options",
693 menu3: "Policy Enquiry", 694 menu3: "Policy Enquiry",
694 menu4: "Change of Policy", 695 menu4: "Change of Policy",
695 menu41: "Policy Change", 696 menu41: "Policy Change Guidelines",
696 menu42: "Change of Contact", 697 menu42: "Change of Contact Information",
697 menu43: "Change of Customer", 698 menu43: "Change of Customer Information",
698 menu5: "Claims Application", 699 menu5: "Claims Application",
699 menu6: "Reservation", 700 menu6: "Reservation",
700 menu7: "Complaints", 701 menu7: "Complaints",
...@@ -791,8 +792,8 @@ module.exports = { ...@@ -791,8 +792,8 @@ module.exports = {
791 goto: "Go to", 792 goto: "Go to",
792 per: "page", 793 per: "page",
793 page: "", 794 page: "",
794 total : "total", 795 total: "total",
795 unit : "news" 796 unit: "news"
796 }, 797 },
797 newsDetail: { 798 newsDetail: {
798 back: "Back", 799 back: "Back",
......
...@@ -418,7 +418,8 @@ module.exports = { ...@@ -418,7 +418,8 @@ module.exports = {
418 submitBtn: '确认', 418 submitBtn: '确认',
419 errorTips: { 419 errorTips: {
420 e1: "請填寫該項內容", 420 e1: "請填寫該項內容",
421 e2: "請填寫正確的聯繫方式" 421 e2: "請填寫正確的聯繫方式",
422 e3: "您已經提交了預約信息,請不要重複預約"
422 } 423 }
423 }, 424 },
424 paymentType: { 425 paymentType: {
......
...@@ -418,7 +418,8 @@ module.exports = { ...@@ -418,7 +418,8 @@ module.exports = {
418 submitBtn: '确认', 418 submitBtn: '确认',
419 errorTips: { 419 errorTips: {
420 e1: "请填写该项内容", 420 e1: "请填写该项内容",
421 e2: "请填写正确的联系方式" 421 e2: "请填写正确的联系方式",
422 e3: "您已经提交了预约信息,请不要重复预约"
422 } 423 }
423 }, 424 },
424 paymentType: { 425 paymentType: {
......
...@@ -395,6 +395,9 @@ export default { ...@@ -395,6 +395,9 @@ export default {
395 this.date = today.getDate(); 395 this.date = today.getDate();
396 } 396 }
397 this.formatDate(); 397 this.formatDate();
398 },
399 judgeLastDateValidate(val){
400
398 } 401 }
399 }, 402 },
400 mounted() {}, 403 mounted() {},
...@@ -406,7 +409,7 @@ export default { ...@@ -406,7 +409,7 @@ export default {
406 this.dateValue = val; 409 this.dateValue = val;
407 this.initData(); 410 this.initData();
408 }, 411 },
409 dateValue(val) { 412 dateValue(val,oldVal) {
410 this.$emit('input', val) 413 this.$emit('input', val)
411 } 414 }
412 } 415 }
......
...@@ -61,6 +61,14 @@ export default { ...@@ -61,6 +61,14 @@ export default {
61 }, 61 },
62 contactTypes() { 62 contactTypes() {
63 return this.i18n.complaintAcceptance.contactTypes; 63 return this.i18n.complaintAcceptance.contactTypes;
64 },
65 submitBtnDisabled() {
66 let b1 = !this.checked;
67 let b2 = this.data.contactDate ? false : true;
68 let b3 = this.data.name ? false : true;
69 let b4 = this.checkContactMethod() ? true : false;
70 let b5 = this.data.complain ? false : true;
71 return b1 || b2 || b3 || b4 || b5;
64 } 72 }
65 }, 73 },
66 methods: { 74 methods: {
...@@ -82,9 +90,12 @@ export default { ...@@ -82,9 +90,12 @@ export default {
82 if (!this.checked || this.isSubmit) { 90 if (!this.checked || this.isSubmit) {
83 return; 91 return;
84 } 92 }
93 let b3 = this.checkContactMethod();
94 if (b3) {
95 this.errorTips.contactMethodErr = b3;
96 }
85 let b1 = this.checkName(); 97 let b1 = this.checkName();
86 let b2 = this.checkContactType(); 98 let b2 = this.checkContactType();
87 let b3 = this.checkContactMethod();
88 let b4 = this.checkComplain(); 99 let b4 = this.checkComplain();
89 let b5 = this.checkPolicyNumber(); 100 let b5 = this.checkPolicyNumber();
90 let b6 = this.checkContactDate(); 101 let b6 = this.checkContactDate();
...@@ -128,24 +139,21 @@ export default { ...@@ -128,24 +139,21 @@ export default {
128 }, 139 },
129 checkContactMethod() { 140 checkContactMethod() {
130 if (!this.data.contactMethod) { 141 if (!this.data.contactMethod) {
131 this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e1; 142 return this.i18n.complaintAcceptance.errorTips.e1;
132 return false;
133 } 143 }
134 if (this.data.contactType == 1) { 144 if (this.data.contactType == 1) {
135 let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod); 145 let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod);
136 let zhMobile = contactMethodCheck('mobile', this.data.contactMethod); 146 let zhMobile = contactMethodCheck('mobile', this.data.contactMethod);
137 if (!hkMobile && !zhMobile) { 147 if (!hkMobile && !zhMobile) {
138 this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e2; 148 return this.i18n.complaintAcceptance.errorTips.e2;
139 return false;
140 } 149 }
141 } else { 150 } else {
142 let emailCheck = contactMethodCheck('email', this.data.contactMethod); 151 let emailCheck = contactMethodCheck('email', this.data.contactMethod);
143 if (!emailCheck) { 152 if (!emailCheck) {
144 this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e2; 153 return this.i18n.complaintAcceptance.errorTips.e2;
145 return false;
146 } 154 }
147 } 155 }
148 return true; 156 return "";
149 }, 157 },
150 checkComplain() { 158 checkComplain() {
151 if (!this.data.complain) { 159 if (!this.data.complain) {
......
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
116 </div> 116 </div>
117 117
118 <!-- 提交按钮 --> 118 <!-- 提交按钮 -->
119 <div class="submit-btn flex-center" @click="submitHandler" :class="{disabled:!checked}"> 119 <div class="submit-btn flex-center" @click="submitHandler" :class="{disabled:submitBtnDisabled}">
120 <van-loading v-if="isSubmit" /> 120 <van-loading v-if="isSubmit" />
121 <span>{{$t('reservation.submitBtn')}}</span> 121 <span>{{$t('reservation.submitBtn')}}</span>
122 </div> 122 </div>
......
...@@ -36,7 +36,8 @@ export default { ...@@ -36,7 +36,8 @@ export default {
36 e4: "", 36 e4: "",
37 e5: "", 37 e5: "",
38 e6: "", 38 e6: "",
39 e7: "" 39 e7: "",
40 e8: ""
40 }, 41 },
41 42
42 modalSimpleVisiable: false, 43 modalSimpleVisiable: false,
...@@ -63,6 +64,13 @@ export default { ...@@ -63,6 +64,13 @@ export default {
63 }, 64 },
64 reservationTypes() { 65 reservationTypes() {
65 return this.i18n.reservation.reservationCandidates; 66 return this.i18n.reservation.reservationCandidates;
67 },
68 submitBtnDisabled() {
69 let b1 = !this.checked;
70 let b2 = this.data.contactDate ? false : true;
71 let b3 = this.data.name ? false : true;
72 let b4 = this.checkContactMethod() ? true : false;
73 return b1 || b2 || b3 || b4;
66 } 74 }
67 }, 75 },
68 methods: { 76 methods: {
...@@ -83,11 +91,15 @@ export default { ...@@ -83,11 +91,15 @@ export default {
83 if (!this.checked || this.isSubmit) { 91 if (!this.checked || this.isSubmit) {
84 return; 92 return;
85 } 93 }
94 let err = this.checkContactMethod();
95 if (err) {
96 this.errorTips.e3 = err;
97 return;
98 }
86 let b1 = this.checkName(); 99 let b1 = this.checkName();
87 let b2 = this.checkContactMethod();
88 let b3 = this.checkInstruction(); 100 let b3 = this.checkInstruction();
89 let b4 = this.checkContactDate(); 101 let b4 = this.checkContactDate();
90 let b = b1 & b2 & b3 & b4; 102 let b = b1 & b3 & b4;
91 103
92 if (b) { 104 if (b) {
93 this.isSubmit = true; 105 this.isSubmit = true;
...@@ -98,7 +110,13 @@ export default { ...@@ -98,7 +110,13 @@ export default {
98 }).then(() => { 110 }).then(() => {
99 this.showSubmitSuccess(); 111 this.showSubmitSuccess();
100 this.isSubmit = false; 112 this.isSubmit = false;
101 }).catch(() => { 113 }).catch(e => {
114 switch (e.code) {
115 case 3001:
116 console.log(1111);
117 this.errorTips.e8 = this.i18n.reservation.errorTips.e3;
118 break;
119 }
102 this.isSubmit = false; 120 this.isSubmit = false;
103 }) 121 })
104 } 122 }
...@@ -122,10 +140,9 @@ export default { ...@@ -122,10 +140,9 @@ export default {
122 let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod); 140 let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod);
123 let zhMobile = contactMethodCheck('mobile', this.data.contactMethod); 141 let zhMobile = contactMethodCheck('mobile', this.data.contactMethod);
124 if (!hkMobile && !zhMobile) { 142 if (!hkMobile && !zhMobile) {
125 this.errorTips.e3 = this.i18n.complaintAcceptance.errorTips.e2; 143 return this.i18n.login.tips.oe0;
126 return false;
127 } 144 }
128 return true; 145 return "";
129 }, 146 },
130 checkInstruction() { 147 checkInstruction() {
131 // if (!this.data.instruction) { 148 // if (!this.data.instruction) {
...@@ -166,6 +183,9 @@ export default { ...@@ -166,6 +183,9 @@ export default {
166 'data.instruction': function () { 183 'data.instruction': function () {
167 this.errorTips.e5 = ""; 184 this.errorTips.e5 = "";
168 }, 185 },
186 'data.reservationType': function () {
187 this.errorTips.e8 = "";
188 },
169 'data.contactDate': function () { 189 'data.contactDate': function () {
170 this.errorTips.e7 = ""; 190 this.errorTips.e7 = "";
171 } 191 }
......
...@@ -115,10 +115,15 @@ ...@@ -115,10 +115,15 @@
115 </p> 115 </p>
116 </div> 116 </div>
117 117
118 <div class="submit-btn flex-center" :class="{disabled : !checked}" @click="submitHandler"> 118 <div class="submit-btn flex-center" :class="{disabled : submitBtnDisabled}" @click="submitHandler">
119 <van-loading v-if="isSubmit" /> 119 <van-loading v-if="isSubmit" />
120 <span>{{$t('reservation.submitBtn')}}</span> 120 <span>{{$t('reservation.submitBtn')}}</span>
121 </div> 121 </div>
122 <div class="flex-center validator" v-if="errorTips.e8.length > 0">
123 <img src="@/assets/images/common/icon-notice.png" alt=""> &nbsp; {{errorTips.e8}}
124 </div>
125
126
122 </div> 127 </div>
123 </div> 128 </div>
124 </template> 129 </template>
......
...@@ -152,7 +152,7 @@ export default { ...@@ -152,7 +152,7 @@ export default {
152 this.fetchIndexVideo().then(res => { 152 this.fetchIndexVideo().then(res => {
153 this.refreshVideoPlayer(); 153 this.refreshVideoPlayer();
154 }); 154 });
155 if(!isMobile){ 155 if(!this.isMobile){
156 window.addEventListener('resize', () => this.refreshVideoPlayer(), false); 156 window.addEventListener('resize', () => this.refreshVideoPlayer(), false);
157 } 157 }
158 }, 158 },
......
...@@ -163,6 +163,9 @@ export default { ...@@ -163,6 +163,9 @@ export default {
163 data: this.information, 163 data: this.information,
164 sid: true 164 sid: true
165 }).then(response => { 165 }).then(response => {
166 this.userInfo.hadFullInfo = 1;
167 this.userInfo.name = this.information.lastName + this.information.firstName;
168 this.$store.commit("SET_USER_INFO", this.userInfo);
166 this.loading = false; 169 this.loading = false;
167 let path = this.$route.query.c || "/"; 170 let path = this.$route.query.c || "/";
168 this.targetPath = path; 171 this.targetPath = path;
...@@ -200,6 +203,7 @@ export default { ...@@ -200,6 +203,7 @@ export default {
200 let path = this.$route.query.c || "/"; 203 let path = this.$route.query.c || "/";
201 this.targetPath = path; 204 this.targetPath = path;
202 this.userInfo.hadFullInfo = 1; 205 this.userInfo.hadFullInfo = 1;
206 this.userInfo.name = this.information.lastName + this.information.firstName;
203 this.$store.commit("SET_USER_INFO", this.userInfo); 207 this.$store.commit("SET_USER_INFO", this.userInfo);
204 // this.showModal(message, "succ"); 208 // this.showModal(message, "succ");
205 this.modalCallback(); 209 this.modalCallback();
......
...@@ -110,11 +110,12 @@ export default { ...@@ -110,11 +110,12 @@ export default {
110 } else { 110 } else {
111 this.values.cid = response.data.cid; 111 this.values.cid = response.data.cid;
112 this.step2.idNo = response.data.idNo; 112 this.step2.idNo = response.data.idNo;
113 if (typeof this.step2.idNo == "undefined") { 113 // if (typeof this.step2.idNo == "undefined") {
114 this.sureIdNo(); 114 // this.sureIdNo();
115 } else { 115 // } else {
116 this.type = 2; 116 // this.type = 2;
117 } 117 // }
118 this.type = 3;
118 } 119 }
119 }).catch(err=>{ 120 }).catch(err=>{
120 this.loading = false; 121 this.loading = false;
......
...@@ -363,6 +363,7 @@ export default { ...@@ -363,6 +363,7 @@ export default {
363 this._showRegisterFailure(response); 363 this._showRegisterFailure(response);
364 this.type = 1; 364 this.type = 1;
365 } else { 365 } else {
366 this.$store.commit("SET_USER_INFO", response.data);
366 this._showSuccessMessage(); 367 this._showSuccessMessage();
367 } 368 }
368 }).catch(e => { 369 }).catch(e => {
...@@ -455,8 +456,11 @@ export default { ...@@ -455,8 +456,11 @@ export default {
455 }, 456 },
456 _showSuccessMessage() { 457 _showSuccessMessage() {
457 let message = this.i18n.register.tips.e12; 458 let message = this.i18n.register.tips.e12;
458 this.showModal(message, "succ");
459 this.targetPath = "/infomation/improve"; 459 this.targetPath = "/infomation/improve";
460 this.showModal(message, "succ");
461 // this.$router.push({
462 // "path": this.targetPath
463 // });
460 // alert("注册成功") 464 // alert("注册成功")
461 }, 465 },
462 onForgetHandler() { 466 onForgetHandler() {
......