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 = {
submitBtn: 'Confirm',
errorTips: {
e1: "Please fill in this item",
e2: "Please fill in the correct contact information"
e2: "Please fill in the correct contact information",
e3: "You have submitted the appointment information, please do not repeat the appointment"
}
},
paymentType: {
......@@ -692,9 +693,9 @@ module.exports = {
menu2: "Payment Options",
menu3: "Policy Enquiry",
menu4: "Change of Policy",
menu41: "Policy Change",
menu42: "Change of Contact",
menu43: "Change of Customer",
menu41: "Policy Change Guidelines",
menu42: "Change of Contact Information",
menu43: "Change of Customer Information",
menu5: "Claims Application",
menu6: "Reservation",
menu7: "Complaints",
......@@ -791,8 +792,8 @@ module.exports = {
goto: "Go to",
per: "page",
page: "",
total : "total",
unit : "news"
total: "total",
unit: "news"
},
newsDetail: {
back: "Back",
......
......@@ -418,7 +418,8 @@ module.exports = {
submitBtn: '确认',
errorTips: {
e1: "請填寫該項內容",
e2: "請填寫正確的聯繫方式"
e2: "請填寫正確的聯繫方式",
e3: "您已經提交了預約信息,請不要重複預約"
}
},
paymentType: {
......
......@@ -418,7 +418,8 @@ module.exports = {
submitBtn: '确认',
errorTips: {
e1: "请填写该项内容",
e2: "请填写正确的联系方式"
e2: "请填写正确的联系方式",
e3: "您已经提交了预约信息,请不要重复预约"
}
},
paymentType: {
......
......@@ -395,6 +395,9 @@ export default {
this.date = today.getDate();
}
this.formatDate();
},
judgeLastDateValidate(val){
}
},
mounted() {},
......@@ -406,7 +409,7 @@ export default {
this.dateValue = val;
this.initData();
},
dateValue(val) {
dateValue(val,oldVal) {
this.$emit('input', val)
}
}
......
......@@ -61,6 +61,14 @@ export default {
},
contactTypes() {
return this.i18n.complaintAcceptance.contactTypes;
},
submitBtnDisabled() {
let b1 = !this.checked;
let b2 = this.data.contactDate ? false : true;
let b3 = this.data.name ? false : true;
let b4 = this.checkContactMethod() ? true : false;
let b5 = this.data.complain ? false : true;
return b1 || b2 || b3 || b4 || b5;
}
},
methods: {
......@@ -82,9 +90,12 @@ export default {
if (!this.checked || this.isSubmit) {
return;
}
let b3 = this.checkContactMethod();
if (b3) {
this.errorTips.contactMethodErr = b3;
}
let b1 = this.checkName();
let b2 = this.checkContactType();
let b3 = this.checkContactMethod();
let b4 = this.checkComplain();
let b5 = this.checkPolicyNumber();
let b6 = this.checkContactDate();
......@@ -128,24 +139,21 @@ export default {
},
checkContactMethod() {
if (!this.data.contactMethod) {
this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e1;
return false;
return this.i18n.complaintAcceptance.errorTips.e1;
}
if (this.data.contactType == 1) {
let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod);
let zhMobile = contactMethodCheck('mobile', this.data.contactMethod);
if (!hkMobile && !zhMobile) {
this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e2;
return false;
return this.i18n.complaintAcceptance.errorTips.e2;
}
} else {
let emailCheck = contactMethodCheck('email', this.data.contactMethod);
if (!emailCheck) {
this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e2;
return false;
return this.i18n.complaintAcceptance.errorTips.e2;
}
}
return true;
return "";
},
checkComplain() {
if (!this.data.complain) {
......
......@@ -116,7 +116,7 @@
</div>
<!-- 提交按钮 -->
<div class="submit-btn flex-center" @click="submitHandler" :class="{disabled:!checked}">
<div class="submit-btn flex-center" @click="submitHandler" :class="{disabled:submitBtnDisabled}">
<van-loading v-if="isSubmit" />
<span>{{$t('reservation.submitBtn')}}</span>
</div>
......
......@@ -36,7 +36,8 @@ export default {
e4: "",
e5: "",
e6: "",
e7: ""
e7: "",
e8: ""
},
modalSimpleVisiable: false,
......@@ -63,6 +64,13 @@ export default {
},
reservationTypes() {
return this.i18n.reservation.reservationCandidates;
},
submitBtnDisabled() {
let b1 = !this.checked;
let b2 = this.data.contactDate ? false : true;
let b3 = this.data.name ? false : true;
let b4 = this.checkContactMethod() ? true : false;
return b1 || b2 || b3 || b4;
}
},
methods: {
......@@ -83,11 +91,15 @@ export default {
if (!this.checked || this.isSubmit) {
return;
}
let err = this.checkContactMethod();
if (err) {
this.errorTips.e3 = err;
return;
}
let b1 = this.checkName();
let b2 = this.checkContactMethod();
let b3 = this.checkInstruction();
let b4 = this.checkContactDate();
let b = b1 & b2 & b3 & b4;
let b = b1 & b3 & b4;
if (b) {
this.isSubmit = true;
......@@ -98,7 +110,13 @@ export default {
}).then(() => {
this.showSubmitSuccess();
this.isSubmit = false;
}).catch(() => {
}).catch(e => {
switch (e.code) {
case 3001:
console.log(1111);
this.errorTips.e8 = this.i18n.reservation.errorTips.e3;
break;
}
this.isSubmit = false;
})
}
......@@ -122,10 +140,9 @@ export default {
let hkMobile = contactMethodCheck('hkmobile', this.data.contactMethod);
let zhMobile = contactMethodCheck('mobile', this.data.contactMethod);
if (!hkMobile && !zhMobile) {
this.errorTips.e3 = this.i18n.complaintAcceptance.errorTips.e2;
return false;
return this.i18n.login.tips.oe0;
}
return true;
return "";
},
checkInstruction() {
// if (!this.data.instruction) {
......@@ -166,6 +183,9 @@ export default {
'data.instruction': function () {
this.errorTips.e5 = "";
},
'data.reservationType': function () {
this.errorTips.e8 = "";
},
'data.contactDate': function () {
this.errorTips.e7 = "";
}
......
......@@ -115,10 +115,15 @@
</p>
</div>
<div class="submit-btn flex-center" :class="{disabled : !checked}" @click="submitHandler">
<div class="submit-btn flex-center" :class="{disabled : submitBtnDisabled}" @click="submitHandler">
<van-loading v-if="isSubmit" />
<span>{{$t('reservation.submitBtn')}}</span>
</div>
<div class="flex-center validator" v-if="errorTips.e8.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt=""> &nbsp; {{errorTips.e8}}
</div>
</div>
</div>
</template>
......
......@@ -152,7 +152,7 @@ export default {
this.fetchIndexVideo().then(res => {
this.refreshVideoPlayer();
});
if(!isMobile){
if(!this.isMobile){
window.addEventListener('resize', () => this.refreshVideoPlayer(), false);
}
},
......
......@@ -163,6 +163,9 @@ export default {
data: this.information,
sid: true
}).then(response => {
this.userInfo.hadFullInfo = 1;
this.userInfo.name = this.information.lastName + this.information.firstName;
this.$store.commit("SET_USER_INFO", this.userInfo);
this.loading = false;
let path = this.$route.query.c || "/";
this.targetPath = path;
......@@ -200,6 +203,7 @@ export default {
let path = this.$route.query.c || "/";
this.targetPath = path;
this.userInfo.hadFullInfo = 1;
this.userInfo.name = this.information.lastName + this.information.firstName;
this.$store.commit("SET_USER_INFO", this.userInfo);
// this.showModal(message, "succ");
this.modalCallback();
......
......@@ -110,11 +110,12 @@ export default {
} else {
this.values.cid = response.data.cid;
this.step2.idNo = response.data.idNo;
if (typeof this.step2.idNo == "undefined") {
this.sureIdNo();
} else {
this.type = 2;
}
// if (typeof this.step2.idNo == "undefined") {
// this.sureIdNo();
// } else {
// this.type = 2;
// }
this.type = 3;
}
}).catch(err=>{
this.loading = false;
......
......@@ -363,6 +363,7 @@ export default {
this._showRegisterFailure(response);
this.type = 1;
} else {
this.$store.commit("SET_USER_INFO", response.data);
this._showSuccessMessage();
}
}).catch(e => {
......@@ -455,8 +456,11 @@ export default {
},
_showSuccessMessage() {
let message = this.i18n.register.tips.e12;
this.showModal(message, "succ");
this.targetPath = "/infomation/improve";
this.showModal(message, "succ");
// this.$router.push({
// "path": this.targetPath
// });
// alert("注册成功")
},
onForgetHandler() {
......