422f97cc by joe

中英切换

1 parent 857e1fb6
......@@ -376,27 +376,33 @@ module.exports = {
name: "Name",
namePlaceholder: "Name",
contactType: "Preferred Way of Contact",
email: "電郵地址",
email: "E-mail",
question: "Question/ Opinion",
questionPlaceHolder: "(字數不超過500字)",
questionPlaceHolder: "No more than 500 words",
orderNo: "Policy No",
orderNoPlaceHolder: "如您為平安客戶,請提供保單編號",
orderNoPlaceHolder: "If you are Ping An customer, please provide the policy number",
contactTime: "Preferred Contact Date",
notice1: "The personal data collected in this form is processed in accordance with Ping An Life Insurance Company of China (HK), Ltd Personal Information Collection Statement and will only be used to contact you. However, the personal data collected will not be transferred to third-party organizations other than those specified in the \"Ping An Life Insurance Company of China (HK), Ltd Personal Data Collection Statement\" without your explicit authorization. You can choose not to provide us with the required personal information, but this may prevent us from contacting you. You can also access and correct your personal data in accordance with Ping An Life Insurance Company of China (HK), Ltd Personal Data Collection Statement。",
notice2: "I hereby confirm that I understand and agree that my personal data will be used for the above purposes in accordance with the Ping An Life Insurance Company of China (HK) Personal Data Collection Statement.",
contactTypes: ['Mobile', 'Email'],
contactTypes: [{ name: 'Mobile', value: 1 }, { name: 'Email', value: 2 }],
errorTips: {
e1: "請填寫該項內容",
e2: "請填寫正確的聯繫方式"
e1: "Please fill in this item",
e2: "Please fill in the correct contact information"
},
success: "Thank you for your comments"
},
reservation: {
name: "Name",
namePlaceholder: "Name",
contactType: "Preferred way of contact",
contactTypeCadidates: [{ name: "phone no", value: 1 }],
contact: "Contact Number",
contactPlaceholder: "(HK No./ Mainland No.)",
reservationType: "Type of Reservation",
reservationCandidates: [
{ name: "Insurance consultation", value: "投保諮詢" },
{ name: "Agent change", value: "代办保单变更" }
],
reservationRemark: "Reservation Description",
reservationRemarkPlaceholder: "Optional, no more than 500 words, prompt text \"Please briefly explain the insurance type or business you want to consult",
hkClient: "Current Pingan HK Customer",
......@@ -405,6 +411,12 @@ module.exports = {
contactTime: "Preferred Contact Date",
notice1: "The personal data collected in this form is processed in accordance with Ping An Life Insurance Company of China (HK), Ltd Personal Information Collection Statement and will only be used to contact you. However, the personal data collected will not be transferred to third-party organizations other than those specified in the \"Ping An Life Insurance Company of China (HK), Ltd Personal Data Collection Statement\" without your explicit authorization. You can choose not to provide us with the required personal information, but this may prevent us from contacting you. You can also access and correct your personal data in accordance with Ping An Life Insurance Company of China (HK), Ltd Personal Data Collection Statement。",
notice2: "I hereby confirm that I understand and agree that my personal data will be used for the above purposes in accordance with the Ping An Life Insurance Company of China (HK) Personal Data Collection Statement.",
success: "Success",
submitBtn: 'Confirm',
errorTips: {
e1: "Please fill in this item",
e2: "Please fill in the correct contact information"
}
},
paymentType: {
menu1: "Payment in Person at Cashier",
......@@ -621,7 +633,7 @@ module.exports = {
e2: "請填寫聯繫地址",
e3: "Please enter the collect E-mail"
},
success : "Success",
success: "Success",
},
policyChangeInformation: {
title: "Change of Customer Information",
......@@ -641,7 +653,7 @@ module.exports = {
upload: "Upload Attachment",
modifyTips1: "If you need to modify please",
modifyTips2: " contact customer service",
success : "Success",
success: "Success",
},
contactUs: {
service: {
......@@ -739,15 +751,6 @@ module.exports = {
noPolicy: "You haven't bought any policy, if you have any questions please",
customService: " contact customer service",
},
reservation: {
submitBtn: '確認',
contactTypes: ['電話'],
reservationTypes: ['投保咨詢', '代辦保單變更'],
errorTips: {
e1: "請填寫該項內容",
e2: "請填寫正確的聯繫方式"
}
},
unauth: {
tips: "If you have a ping an all in one account account, it can help us provide better services for you",
or: "or",
......
......@@ -384,19 +384,25 @@ module.exports = {
contactTime: "期望聯絡時間",
notice1: "本表格所收集的個人資料根據「平安人壽香港個人資料收集聲明」處理及只會被用作於聯絡 閣下之用。然而所收集的個人資料未經您明確授權將不會轉移至「平安人壽香港個人資料收集聲明」列明以外之第三者機構。您可選擇不向我們提供所需的個人資料,惟這樣可能導致我們不能聯絡您。您亦可根據「平安人壽香港個人資料收集聲明」之權利查閱及更正個人資料。",
notice2: "本人現確認明白並同意本人的個人資料根據中銀人壽個人資料收集聲明作以上述用途。",
contactTypes: ['電話', '電郵'],
contactTypes: [{ name: '電話', value: 1 }, { name: '電郵', value: 2 }],
errorTips: {
e1: "請填寫該項內容",
e2: "請填寫正確的聯繫方式"
},
success : "感謝您的寶貴意見"
},
reservation: {
name: "姓名",
namePlaceholder: "姓名",
contactType: "聯絡方式",
contactTypeCadidates: [{ name: "電話", value: 1 }],
contact: "聯絡電話",
contactPlaceholder: "香港號碼/內地號碼",
reservationType: "預約類型",
reservationCandidates: [
{ name: "投保諮詢", value: "投保諮詢" },
{ name: "代辦保單變更", value: "代办保单变更" }
],
reservationRemark: "預約說明",
reservationRemarkPlaceholder: "請簡單說明您想要咨詢的產品或業務",
hkClient: "是否平安香港客戶",
......@@ -405,6 +411,12 @@ module.exports = {
contactTime: "期望聯絡時間",
notice1: "本表格所收集的個人資料根據「平安人壽香港個人資料收集聲明」處理及只會被用作於聯絡 閣下之用。然而所收集的個人資料未經您明確授權將不會轉移至「平安人壽香港個人資料收集聲明」列明以外之第三者機構。您可選擇不向我們提供所需的個人資料,惟這樣可能導致我們不能聯絡您。您亦可根據「平安人壽香港個人資料收集聲明」之權利查閱及更正個人資料。",
notice2: "本人現確認明白並同意本人的個人資料根據中銀人壽個人資料收集聲明作以上述用途。",
success : "提交成功",
submitBtn: '确认',
errorTips: {
e1: "請填寫該項內容",
e2: "請填寫正確的聯繫方式"
}
},
paymentType: {
menu1: "親臨客服中心付款",
......@@ -738,15 +750,6 @@ module.exports = {
noPolicy: "您還未購買保單,如有疑問請",
customService : "聯繫客服",
},
reservation: {
submitBtn: '確認',
contactTypes: ['電話'],
reservationTypes: ['投保咨詢', '代辦保單變更'],
errorTips: {
e1: "請填寫該項內容",
e2: "請填寫正確的聯繫方式"
}
},
unauth: {
tips: "如您有平安一賬通賬戶,可幫助我們更好地為您提供服務",
or: "或",
......
......@@ -384,19 +384,25 @@ module.exports = {
contactTime: "期望联络时间",
notice1: "本表格所收集的个人资料根据「平安人寿香港个人资料收集声明」处理及只会被用作于联络 阁下之用。然而所收集的个人资料未经您明确授权将不会转移至「平安人寿香港个人资料收集声明」列明以外之第三者机构。您可选择不向我们提供所需的个人资料,惟这样可能导致我们不能联络您。您亦可根据「平安人寿香港个人资料收集声明」之权利查阅及更正个人资料。",
notice2: "本人现确认明白并同意本人的个人资料根据中银人寿个人资料收集声明作以上述用途。",
contactTypes: ['电话', '电邮'],
contactTypes: [{ name: '电话', value: 1 }, { name: '电邮', value: 2 }],
errorTips: {
e1: "请填写该项内容",
e2: "请填写正确的联系方式"
},
success: "感谢您的宝贵意见"
},
reservation: {
name: "姓名",
namePlaceholder: "姓名",
contactType: "联络方式",
contactTypeCadidates: [{ name: "电话", value: 1 }],
contact: "联络电话",
contactPlaceholder: "香港号码/内地号码",
reservationType: "预约类型",
reservationCandidates: [
{ name: "投保咨询", value: "投保咨询" },
{ name: "代办保单变更", value: "代办保单变更" }
],
reservationRemark: "预约说明",
reservationRemarkPlaceholder: "请简单说明您想要咨询的产品或业务",
hkClient: "是否平安香港客户",
......@@ -405,6 +411,12 @@ module.exports = {
contactTime: "期望联络时间",
notice1: "本表格所收集的个人资料根据「平安人寿香港个人资料收集声明」处理及只会被用作于联络 阁下之用。然而所收集的个人资料未经您明确授权将不会转移至「平安人寿香港个人资料收集声明」列明以外之第三者机构。您可选择不向我们提供所需的个人资料,惟这样可能导致我们不能联络您。您亦可根据「平安人寿香港个人资料收集声明」之权利查阅及更正个人资料。",
notice2: "本人现确认明白并同意本人的个人资料根据中银人寿个人资料收集声明作以上述用途。",
success: "提交成功",
submitBtn: '确认',
errorTips: {
e1: "请填写该项内容",
e2: "请填写正确的联系方式"
}
},
paymentType: {
menu1: "亲临客服中心付款",
......@@ -622,7 +634,7 @@ module.exports = {
e2: "請填寫聯繫地址",
e3: "請填寫正確的E-Mail地址"
},
success : "更新成功",
success: "更新成功",
},
policyChangeInformation: {
title: "客户资料变更",
......@@ -642,7 +654,7 @@ module.exports = {
upload: "附件上传",
modifyTips1: "如需修改请",
modifyTips2: "联系客服",
success : "更新成功",
success: "更新成功",
},
contactUs: {
service: {
......@@ -733,26 +745,17 @@ module.exports = {
t6ClosingDate: "实收日期",
t6PaymentAmount: "缴费金额",
showMore : "显示所有保单",
showMore: "显示所有保单",
noPolicy: "您还未购买保单,如有疑问请",
customService : "联系客服",
},
reservation: {
submitBtn: '确认',
contactTypes: ['電話'],
reservationTypes: ['投保咨询', '代办保单变更'],
errorTips: {
e1: "請填寫該項內容",
e2: "請填寫正確的聯繫方式"
}
customService: "联系客服",
},
unauth: {
tips: "如您有平安一账通账户,可帮助我们更好地为您提供服务",
or: "或",
login: "登录",
register: "注册",
baseInfoTip : "您的完整信息可帮助我们为您提供完整服务",
infoBtn : "前往完善"
baseInfoTip: "您的完整信息可帮助我们为您提供完整服务",
infoBtn: "前往完善"
}
}
}
......
......@@ -4,13 +4,22 @@ import {
export default {
props: {
checkProfile: false,
// 模型;auth、suggest
model: {
type: String,
default: "auth"
},
checkProfile: {
type: Boolean,
default: false
},
},
data() {
return {
key: 'value',
showProfileInfo: false,
showUnAuth: false
showUnAuth: false,
showSuggest: true
}
},
components: {},
......@@ -25,7 +34,9 @@ export default {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
showPanel() {
return this.showProfileInfo || this.showUnAuth;
let b1 = this.model == "auth" && (this.showProfileInfo || this.showUnAuth);
let b2 = this.model == "suggest" && this.showSuggest;
return b1 || b2;
}
},
methods: {
......
......@@ -9,7 +9,7 @@
<span class="pointer btn" @click="gotoRegisterPage">{{$t('customService.unauth.register')}}</span>
</div>
<!-- <img class="pointer close" src="@/assets/images/common/icon-alert-close.png" alt=""> -->
<img v-if="model=='suggest'" class="pointer close" src="@/assets/images/common/icon-alert-close.png" alt="" @click="showSuggest = false">
</div>
</div>
......@@ -24,7 +24,7 @@
<!-- <img class="pointer close" src="@/assets/images/common/icon-alert-close.png" alt=""> -->
</div>
</div>
<div class="empty-line"></div>
<div class="empty-line" v-if="model!='suggest'"></div>
</div>
</template>
......
......@@ -21,6 +21,13 @@ export default {
name: name
})
},
toPath(path){
document.documentElement.scrollTop = 0;
document.body.scrollTop = 0;
this.$router.push({
path: path
})
},
initData() {}
},
mounted() {},
......
......@@ -24,7 +24,7 @@
<div @click="toPage('profile')" class="n-item">{{$t('footer.aboutUs')}}</div>
<div @click="toPage('profile')" class="n-item">{{$t('footer.companyIntroduction')}}</div>
<div @click="toPage('newsList')" class="n-item">{{$t('footer.news')}}</div>
<div class="n-item">{{$t('footer.joinUs')}}</div>
<div @click="toPage('empty')" class="n-item">{{$t('footer.joinUs')}}</div>
</div>
<div class="nav-v">
<div class="n-item">{{$t('footer.helpCenter')}}</div>
......@@ -33,10 +33,10 @@
<div @click="toPage('personalDataCollection')" class="n-item">{{$t('footer.protocol')}}</div>
</div>
<div class="nav-v">
<div class="n-item">{{$t('footer.contactUs')}}</div>
<div class="n-item">{{$t('footer.contactInformation')}}</div>
<div class="n-item">{{$t('footer.service')}}</div>
<div class="n-item">{{$t('footer.map')}}</div>
<div @click="toPath('/custom/service?q=m1')" class="n-item">{{$t('footer.contactUs')}}</div>
<div @click="toPage('empty')" class="n-item">{{$t('footer.contactInformation')}}</div>
<div @click="toPage('empty')" class="n-item">{{$t('footer.service')}}</div>
<div @click="toPage('empty')" class="n-item">{{$t('footer.map')}}</div>
</div>
</div>
......
......@@ -3,7 +3,7 @@
.content {
position: relative;
padding-bottom: 2.5rem;
font-family: MicrosoftYaHei;
// font-family: MicrosoftYaHei;
}
.top-space {
......
......@@ -4,6 +4,10 @@ import {
httpPost
} from '@/api/fetch-api.js'
import { contactMethodCheck } from '@utils/utils.js';
import Auth from '@components/auth/auth.vue';
import modalComp from '@/components/modal-comp/modal-comp.vue';
import DatePicker from '@/components/date-picker/date-picker.vue'
export default {
......@@ -12,6 +16,7 @@ export default {
key: 'value',
isHkCus: true,
checked: false,
contactTypeShow: "",
data: {
name: "",
contactType: "",
......@@ -27,11 +32,19 @@ export default {
complainErr: "",
policyNumberErr: "",
contactDateErr: ""
}
},
modalSimpleVisiable: false,
modalVisiable: false,
targetPath: "",
modalIcon: "succ",
modalContent: "",
}
},
components: {
DatePicker
DatePicker,
Auth,
modalComp
},
computed: {
locale() {
......@@ -45,8 +58,18 @@ export default {
}
},
methods: {
showModal(content, icon) {
icon = !icon || typeof icon === "undefined" ? "succ" : icon;
this.modalIcon = icon;
this.modalContent = content;
this.modalVisiable = true;
},
modalCallback() {
this.modalVisiable = false;
},
initData() {
this.data.contactType = this.contactTypes[0];
this.data.contactType = this.contactTypes[0].value;
this.contactTypeShow = this.contactTypes[0].name;
},
submitHandler() {
if (!this.checked || this.isSubmit) {
......@@ -74,12 +97,13 @@ export default {
}
},
showSubmitSuccess() {
alert("提交成功");
this.showModal(this.i18n.complaintAcceptance.success);
this.data.name = "";
this.data.contactMethod = "";
this.data.complain = "";
this.data.policyNumber = "";
this.data.contactDate = "";
this.checked = false;
},
checkName() {
if (!this.data.name) {
......@@ -100,6 +124,20 @@ export default {
this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e1;
return false;
}
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;
}
} else {
let emailCheck = contactMethodCheck('email', this.data.contactMethod);
if (!emailCheck) {
this.errorTips.contactMethodErr = this.i18n.complaintAcceptance.errorTips.e2;
return false;
}
}
return true;
},
checkComplain() {
......@@ -110,11 +148,12 @@ export default {
return true;
},
checkPolicyNumber() {
if (!this.data.policyNumber) {
this.errorTips.policyNumberErr = this.i18n.complaintAcceptance.errorTips.e1;
return false;
}
return true;
// if (!this.data.policyNumber) {
// this.errorTips.policyNumberErr = this.i18n.complaintAcceptance.errorTips.e1;
// return false;
// }
// return true;
},
checkContactDate() {
if (!this.data.contactDate) {
......@@ -128,8 +167,9 @@ export default {
'data.name': function () {
this.errorTips.nameErr = "";
},
'data.contactType': function () {
'data.contactType': function (val) {
this.errorTips.contactTypeErr = "";
this.contactTypeShow = this.contactTypes[val - 1].name;
},
'data.contactMethod': function () {
this.errorTips.contactMethodErr = "";
......
<template>
<div class="reservation-container">
<!-- 顶头iterm -->
<div class="form form2">
<div class="form-item">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-name.png"></div> {{$t('complaintAcceptance.name')}}
</div>
<div class="ipt-wrap">
<input :placeholder="$t('complaintAcceptance.namePlaceholder')" class="ipt name-ipt" type="text" :class="{err : errorTips.nameErr.length > 0}" v-model="data.name">
</div>
<div class="validator" v-if="errorTips.nameErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.nameErr}}
<div>
<auth :model="'suggest'" ref="auth"></auth>
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<div class="reservation-container">
<!-- 顶头iterm -->
<div class="form form2">
<div class="form-item">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-name.png"></div> {{$t('complaintAcceptance.name')}}
</div>
<div class="ipt-wrap">
<input :placeholder="$t('complaintAcceptance.namePlaceholder')" class="ipt name-ipt" type="text" :class="{err : errorTips.nameErr.length > 0}" v-model="data.name">
</div>
<div class="validator" v-if="errorTips.nameErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.nameErr}}
</div>
</div>
</div>
<div class="form-item">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-contact.png"></div>{{$t('complaintAcceptance.contactType')}}
</div>
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt phone-ipt" v-model="data.contactType">
<option v-for="(item,index) in contactTypes" :key="index" :value="item">{{item}}</option>
</select>
</div>
<div class="validator" v-if="errorTips.contactTypeErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactTypeErr}}
<div class="form-item">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-contact.png"></div>{{$t('complaintAcceptance.contactType')}}
</div>
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt phone-ipt" v-model="data.contactType">
<option v-for="(item,index) in contactTypes" :key="index" :value="item.value">{{item.name}}</option>
</select>
</div>
<div class="validator" v-if="errorTips.contactTypeErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactTypeErr}}
</div>
</div>
</div>
<div class="form-item flex1">
<div class="label">
<div class="icon"><img src="@/assets/images/complaint-acceptance/icon-ca-mail.png"></div>{{data.contactType}}
</div>
<div class="ipt-wrap">
<input class="ipt mail-ipt" type="text" :class="{err : errorTips.contactMethodErr.length > 0}" v-model="data.contactMethod">
</div>
<div class="validator" v-if="errorTips.contactMethodErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactMethodErr}}
<div class="form-item flex1">
<div class="label">
<div class="icon"><img src="@/assets/images/complaint-acceptance/icon-ca-mail.png"></div>{{contactTypeShow}}
</div>
<div class="ipt-wrap">
<input class="ipt mail-ipt" type="text" :class="{err : errorTips.contactMethodErr.length > 0}" v-model="data.contactMethod">
</div>
<div class="validator" v-if="errorTips.contactMethodErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactMethodErr}}
</div>
</div>
</div>
</div>
<!-- 长文本 -->
<div class="form">
<div class="pure-u-1 form-item">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-arrow-reservation.png"></div>{{$t('complaintAcceptance.question')}}
</div>
<div class="ipt-wrap">
<textarea :placeholder="$t('complaintAcceptance.questionPlaceHolder')" class="ipt textarea" :class="{err:errorTips.complainErr.length >0}" v-model="data.complain"></textarea>
</div>
<div class="validator" v-if="errorTips.contactMethodErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactMethodErr}}
</div>
</div>
<!-- 保单编号 非必填 -->
<div class="pure-u-1 form-item form-item3">
<div class="label">
<div class="icon"><img src="@/assets/images/complaint-acceptance/icon-ca-no.png"></div>{{$t('complaintAcceptance.orderNo')}}
</div>
<div class="ipt-wrap ipt-wrap2">
<input :placeholder="$t('complaintAcceptance.orderNoPlaceHolder')" class="ipt" type="text" :class="{err:errorTips.policyNumberErr.length>0}" v-model="data.policyNumber">
</div>
<div class="validator" v-if="errorTips.policyNumberErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.policyNumberErr}}
<!-- 长文本 -->
<div class="form">
<div class="pure-u-1 form-item">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-arrow-reservation.png"></div>{{$t('complaintAcceptance.question')}}
</div>
<div class="ipt-wrap">
<textarea :placeholder="$t('complaintAcceptance.questionPlaceHolder')" class="ipt textarea" :class="{err:errorTips.complainErr.length >0}" v-model="data.complain"></textarea>
</div>
<div class="validator" v-if="errorTips.complainErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.complainErr}}
</div>
</div>
</div>
<!-- 联络时间 -->
<div class="pure-u-1 form-item form-item3">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-calendar.png"></div>{{$t('complaintAcceptance.contactTime')}}
</div>
<div class="ipt-wrap ipt-wrap2">
<!-- <input class="ipt" type="date" :class="{err:errorTips.contactDateErr.length>0}" v-model="data.contactDate"> -->
<date-picker v-model="data.contactDate"></date-picker>
</div>
<div class="validator" v-if="errorTips.contactDateErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactDateErr}}
<!-- 保单编号 非必填 -->
<div class="pure-u-1 form-item form-item3">
<div class="label">
<div class="icon"><img src="@/assets/images/complaint-acceptance/icon-ca-no.png"></div>{{$t('complaintAcceptance.orderNo')}}
</div>
<div class="ipt-wrap ipt-wrap2">
<input :placeholder="$t('complaintAcceptance.orderNoPlaceHolder')" class="ipt" type="text" :class="{err:errorTips.policyNumberErr.length>0}" v-model="data.policyNumber">
</div>
<div class="validator" v-if="errorTips.policyNumberErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.policyNumberErr}}
</div>
</div>
<div class="mt8">
<!-- 联络时间 -->
<div class="pure-u-1 form-item form-item3">
<div class="label">
<div class="icon"><img src="@/assets/images/reservation/icon-re-calendar.png"></div>{{$t('complaintAcceptance.contactTime')}}
</div>
<div class="ipt-wrap ipt-wrap2">
<!-- <input class="ipt" type="date" :class="{err:errorTips.contactDateErr.length>0}" v-model="data.contactDate"> -->
<date-picker v-model="data.contactDate"></date-picker>
</div>
<div class="validator" v-if="errorTips.contactDateErr.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.contactDateErr}}
</div>
<div class="mt8">
<div class="label">
</div>
<!-- <div class="calendar">
<img src="@/assets/images/reservation/re-calendar.png">
</div> -->
</div>
<!-- <div class="calendar">
<img src="@/assets/images/reservation/re-calendar.png">
</div> -->
</div>
</div>
</div>
<!-- 通知 -->
<div class="notice">
<p class="notice-item">
<img class="notice-item-icon" src="@/assets/images/reservation/icon-re-notice.png"> &nbsp;&nbsp;&nbsp;&nbsp;{{$t('complaintAcceptance.notice1')}}
</p>
<p class="notice-item pointer" @click="checked = !checked">
<img v-if="!checked" class="notice-item-icon" src="@/assets/images/reservation/un-check.png">
<img v-else class="notice-item-icon" src="@/assets/images/reservation/check.png"> &nbsp;&nbsp;&nbsp;&nbsp;{{$t('complaintAcceptance.notice2')}}
</p>
</div>
<!-- 通知 -->
<div class="notice">
<p class="notice-item">
<img class="notice-item-icon" src="@/assets/images/reservation/icon-re-notice.png"> &nbsp;&nbsp;&nbsp;&nbsp;{{$t('complaintAcceptance.notice1')}}
</p>
<p class="notice-item pointer" @click="checked = !checked">
<img v-if="!checked" class="notice-item-icon" src="@/assets/images/reservation/un-check.png">
<img v-else class="notice-item-icon" src="@/assets/images/reservation/check.png"> &nbsp;&nbsp;&nbsp;&nbsp;{{$t('complaintAcceptance.notice2')}}
</p>
</div>
<!-- 提交按钮 -->
<div class="submit-btn" @click="submitHandler" :class="{disabled:!checked}">
{{$t('customService.reservation.submitBtn')}}
<!-- 提交按钮 -->
<div class="submit-btn" @click="submitHandler" :class="{disabled:!checked}">
{{$t('customService.reservation.submitBtn')}}
</div>
</div>
</div>
</template>
......
......@@ -87,7 +87,7 @@
</div>
</template>
<template v-if="locale =='tc'">
<template v-else-if="locale =='tc'">
<!-- 繁体-->
<div v-if="curIndex == 0" class="payment-cont-item">
<ul>
......
......@@ -4,6 +4,8 @@ import {
httpPost
} from '@/api/fetch-api.js'
import { contactMethodCheck } from '@utils/utils.js';
import Auth from '@components/auth/auth.vue';
import modalComp from '@/components/modal-comp/modal-comp.vue';
import PolicyHeadList from "./policy-head-list.vue";
......@@ -113,8 +115,8 @@ export default {
},
checkMobile() {
if (this.data.mobile) {
let hkMobile = /^[5689]{1}\d{7}$/.test(this.data.mobile);
let zhMobile = /^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$/.test(this.data.mobile);
let hkMobile = contactMethodCheck('hkmobile', this.data.mobile);
let zhMobile = contactMethodCheck('mobile', this.data.mobile);
if (!hkMobile && !zhMobile) {
this.errorTips.e1 = this.i18n.policyChangeContact.errorTips.e1;
return false;
......@@ -126,7 +128,7 @@ export default {
return true;
},
checkEmail() {
if (this.data.email && !/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(this.data.email)) {
if (this.data.email && !contactMethodCheck('email', this.data.email)) {
this.errorTips.e3 = this.i18n.policyChangeContact.errorTips.e3;
return false;
}
......
......@@ -4,7 +4,11 @@ import {
httpPost
} from '@/api/fetch-api.js'
import DatePicker from '@/components/date-picker/date-picker.vue'
import { contactMethodCheck } from '@utils/utils.js';
import DatePicker from '@/components/date-picker/date-picker.vue';
import Auth from '@components/auth/auth.vue';
import modalComp from '@/components/modal-comp/modal-comp.vue';
export default {
data() {
......@@ -30,11 +34,19 @@ export default {
e5: "",
e6: "",
e7: ""
}
},
modalSimpleVisiable: false,
modalVisiable: false,
targetPath: "",
modalIcon: "succ",
modalContent: "",
}
},
components: {
DatePicker
DatePicker,
Auth,
modalComp
},
computed: {
locale() {
......@@ -44,16 +56,25 @@ export default {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
contactTypes() {
return this.i18n.customService.reservation.contactTypes;
return this.i18n.reservation.contactTypeCadidates;
},
reservationTypes() {
return this.i18n.customService.reservation.reservationTypes;
return this.i18n.reservation.reservationCandidates;
}
},
methods: {
showModal(content, icon) {
icon = !icon || typeof icon === "undefined" ? "succ" : icon;
this.modalIcon = icon;
this.modalContent = content;
this.modalVisiable = true;
},
modalCallback() {
this.modalVisiable = false;
},
initData() {
this.data.contactType = this.contactTypes[0];
this.data.reservationType = this.reservationTypes[0];
this.data.contactType = this.contactTypes[0].value;
this.data.reservationType = this.reservationTypes[0].value;
},
submitHandler() {
if (!this.checked || this.isSubmit) {
......@@ -80,14 +101,15 @@ export default {
}
},
showSubmitSuccess() {
alert("提交成功");
this.showModal(this.i18n.reservation.success);
this.data.name = "";
this.data.contactMethod = "";
this.data.instruction = "";
this.checked = false;
},
checkName() {
if (!this.data.name) {
let message = this.i18n.customService.reservation.errorTips.e1;
let message = this.i18n.reservation.errorTips.e1;
this.errorTips.e1 = message;
return false;
}
......@@ -95,23 +117,23 @@ export default {
},
checkContactMethod() {
if (!this.data.contactMethod) {
let message = this.i18n.customService.reservation.errorTips.e1;
let message = this.i18n.reservation.errorTips.e1;
this.errorTips.e3 = message;
return false;
}
return true;
},
checkInstruction() {
if (!this.data.instruction) {
let message = this.i18n.customService.reservation.errorTips.e1;
this.errorTips.e5 = message;
return false;
}
// if (!this.data.instruction) {
// let message = this.i18n.reservation.errorTips.e1;
// this.errorTips.e5 = message;
// return false;
// }
return true;
},
checkContactDate() {
if (!this.data.contactDate) {
let message = this.i18n.customService.reservation.errorTips.e1;
let message = this.i18n.reservation.errorTips.e1;
this.errorTips.e7 = message;
return false;
}
......
<template>
<div>
<auth :model="'suggest'" ref="auth"></auth>
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<div class="reservation-container">
<div class="gird-g form">
......@@ -23,7 +25,7 @@
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt" v-model="data.contactType">
<option v-for="(item,index) in contactTypes" :key="index" :value="item">{{item}}</option>
<option v-for="(item,index) in contactTypes" :key="index" :value="item.value">{{item.name}}</option>
</select>
</div>
</div>
......@@ -47,7 +49,7 @@
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt" v-model="data.reservationType">
<option v-for="(item,index) in reservationTypes" :key="index" :value="item">{{item}}</option>
<option v-for="(item,index) in reservationTypes" :key="index" :value="item.value">{{item.name}}</option>
</select>
</div>
</div>
......@@ -110,7 +112,7 @@
</div>
<div class="submit-btn" :class="{disabled : !checked}" @click="submitHandler">
{{$t('customService.reservation.submitBtn')}}
{{$t('reservation.submitBtn')}}
</div>
</div>
</div>
......
......@@ -137,6 +137,7 @@
position: relative;
@extend .fcc;
@extend .bb;
@include ellipsis(14);
padding-left: 2.166667rem;
flex: 1;
line-height: 2.3;
......
......@@ -58,9 +58,12 @@
<div v-if="$i18n.locale == 'zh'" class="txt">
中国平安人寿保险股份有限公司成立于2002年,是中国平安保险(集团)股份有限公司旗下的重要成员。截至2017年12月31日,平安人寿注册资本为338亿元,在全国拥有42家分公司(含7家电话销售中心)及超过3,300个营业网点,寿险代理人达138.6万名。公司个险、银保、电销、互联网多渠道齐头并进,实现协同发展,运营管理水平及客户体验领先市场,并依托集团“金融+科技”双驱动战略,在合规经营、防范风险的前提下,开启平台经营新时代,持续提升产品、科技两大核心竞争力,推动内含价值及规模持续、健康、稳定增长。
</div>
<div v-else class="txt">
<div v-else-if="$i18n.locale == 'tc'" class="txt">
中國平安人壽保險股份有限公司成立於2002年,是中國平安保險(集團)股份有限公司旗下的重要成員。截至2017年12月31日,平安人壽註冊資本為338億元,在全國擁有42家分公司(含7家電話銷售中心)及超過3,300個營業網點,壽險代理人達138.6萬名。公司個險、銀保、電銷、互聯網多渠道齊頭並進,實現協同發展,運營管理水平及客戶體驗領先市場,並依托集團“金融+科技”雙驅動戰略,在合規經營、防範風險的前提下,開啟平臺經營新時代,持續提升產品、科技兩大核心競爭力,推動內含價值及規模持續、健康、穩定增長。
</div>
<div v-else class="txt">
Ping An Life Insurance Co., Ltd. of China was founded in 2002. It is an important member of Ping An insurance (Group) Co., Ltd. As of December 31, 2017, Ping An life had a registered capital of 33.8 billion yuan. It has 42 branches (including 7 telemarketing centers) and more than 3300 business outlets nationwide, with 1.386 million life insurance agents. The company's personal insurance, bancassurance, telemarketing and Internet multi-channel go hand in hand to achieve coordinated development, leading the market in operation and management level and customer experience, and relying on the group's "Finance + technology" dual drive strategy, under the premise of compliant operation and risk prevention, to open a new era of platform operation, continuously improve the two core competitiveness of products and technology, and promote the sustainability of embedded value and scale Healthy and stable growth.
</div>
</div>
</div>
</div>
......
......@@ -10,6 +10,7 @@ import {
httpPost
} from '@/api/fetch-api.js'
import { contactMethodCheck } from '@utils/utils.js';
import modalComp from '@/components/modal-comp/modal-comp.vue';
import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
......@@ -216,7 +217,7 @@ export default {
}).then(response => {
this.loading = false;
this._handlerLoginResponse(response);
}).catch(err=>{
}).catch(err => {
this.loading = false;
});
});
......@@ -293,7 +294,7 @@ export default {
}).then(response => {
this.loading = false;
this._handlerLoginResponse(response);
}).catch(err=>{
}).catch(err => {
this.loading = false;
});
});
......@@ -375,8 +376,8 @@ export default {
// 检测手机号是否正确
return new Promise((resolve, reject) => {
let mobile = this.loginForm.mobileNo;
let hkMobile = mobile.length == 8 && /^[5689]{1}\d{7}$/.test(mobile);
let zhMobile = mobile.length == 11 && /^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$/.test(mobile);
let hkMobile = mobile.length == 8 && contactMethodCheck('hkmobile', mobile);
let zhMobile = mobile.length == 11 && contactMethodCheck('mobile', mobile);
if (!hkMobile && !zhMobile) {
this._showMobileNoIllegalTip()
return;
......
......@@ -6,7 +6,8 @@
.box {
position: relative;
max-width: 64rem;
max-width: $articleWidth;
// max-width: 64rem;
}
.top-space {
......
......@@ -32,7 +32,7 @@
</div>
</div>
<div v-if="$i18n.locale == 'tc'">
<div v-else-if="$i18n.locale == 'tc'">
<div class="top-space"></div>
<h2 class="tit">中國平安,與時代同行!</h2>
<div @click="toNewsList" class="box back">返回列表頁 ></div>
......
......@@ -13,7 +13,7 @@
</div>
</div>
<div v-if="$i18n.locale == 'tc'">
<div v-else-if="$i18n.locale == 'tc'">
<div class="top-space"></div>
<h2 class="tit">公司簡介</h2>
<div class="box desc">
......
......@@ -4,6 +4,8 @@ import {
httpPost
} from '@/api/fetch-api.js'
import { contactMethodCheck } from '@utils/utils.js';
import modalComp from '@/components/modal-comp/modal-comp.vue';
import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
import { passwordEncrypt } from '@/utils/encrypt.js';
......@@ -120,13 +122,12 @@ export default {
return new Promise((resolve, reject) => {
let mobile = this.registerForm.mobileNo;
if (this.mobileNoType == "hk") {
if (mobile.length != 8 && !/^[5689]{1}\d{7}$/.test(mobile)) {
if (mobile.length != 8 && !contactMethodCheck('hkmobile', mobile)) {
this._showMobileNoIllegalTip()
return;
}
} else {
if (mobile.length != 11 &&
!/^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$/.test(mobile)) {
if (mobile.length != 11 && !contactMethodCheck('mobile', mobile)) {
this._showMobileNoIllegalTip()
return;
}
......
......@@ -248,3 +248,23 @@ export function throttle(func, wait, type) {
}
}
}
/**
* 几种常用的校验方式
* @param {string} type
* @param {string} value
*/
export function contactMethodCheck(type, value) {
if (type == 'hkmobile') {
return /^[5689]{1}\d{7}$/.test(value);
}
if (type == 'mobile') {
return /^((13[0-9])|(14[5,7,9])|(15([0-3]|[5-9]))|(166)|(17[0-9])|(18[0-9])|(19[0-9]))\d{8}$/.test(value);
}
if (type == 'email') {
return /^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(value);
}
return true;
}
\ No newline at end of file
......