b7efbc15 by joe

預約服務信息保存到CMS

1 parent e78e6c60
Showing 36 changed files with 439 additions and 88 deletions
......@@ -9,7 +9,7 @@
<link rel="stylesheet" href="./css/pure-min.css">
<link rel="stylesheet" href="./css/grids-responsive-min.css">
<title>平安人寿保险官网</title>
<link href="static/js/0.1573611020412.js" rel="prefetch"><link href="static/js/1.1573611020412.js" rel="prefetch"><link href="static/js/10.1573611020412.js" rel="prefetch"><link href="static/js/11.1573611020412.js" rel="prefetch"><link href="static/js/12.1573611020412.js" rel="prefetch"><link href="static/js/13.1573611020412.js" rel="prefetch"><link href="static/js/14.1573611020412.js" rel="prefetch"><link href="static/js/15.1573611020412.js" rel="prefetch"><link href="static/js/16.1573611020412.js" rel="prefetch"><link href="static/js/2.1573611020412.js" rel="prefetch"><link href="static/js/3.1573611020412.js" rel="prefetch"><link href="static/js/4.1573611020412.js" rel="prefetch"><link href="static/js/5.1573611020412.js" rel="prefetch"><link href="static/js/6.1573611020412.js" rel="prefetch"><link href="static/js/7.1573611020412.js" rel="prefetch"><link href="static/js/8.1573611020412.js" rel="prefetch"><link href="static/js/9.1573611020412.js" rel="prefetch"><link href="static/js/app.1573611020412.js" rel="preload" as="script"></head>
<link href="static/js/0.1573652689022.js" rel="prefetch"><link href="static/js/1.1573652689022.js" rel="prefetch"><link href="static/js/10.1573652689022.js" rel="prefetch"><link href="static/js/11.1573652689022.js" rel="prefetch"><link href="static/js/12.1573652689022.js" rel="prefetch"><link href="static/js/13.1573652689022.js" rel="prefetch"><link href="static/js/14.1573652689022.js" rel="prefetch"><link href="static/js/15.1573652689022.js" rel="prefetch"><link href="static/js/16.1573652689022.js" rel="prefetch"><link href="static/js/2.1573652689022.js" rel="prefetch"><link href="static/js/3.1573652689022.js" rel="prefetch"><link href="static/js/4.1573652689022.js" rel="prefetch"><link href="static/js/5.1573652689022.js" rel="prefetch"><link href="static/js/6.1573652689022.js" rel="prefetch"><link href="static/js/7.1573652689022.js" rel="prefetch"><link href="static/js/8.1573652689022.js" rel="prefetch"><link href="static/js/9.1573652689022.js" rel="prefetch"><link href="static/js/app.1573652689022.js" rel="preload" as="script"></head>
<body>
<noscript>
......@@ -19,6 +19,6 @@
<div id="app"></div>
<!-- built files will be auto injected -->
<script src="./js/unionrsa.js"></script>
<script type="text/javascript" src="static/js/app.1573611020412.js"></script></body>
<script type="text/javascript" src="static/js/app.1573652689022.js"></script></body>
</html>
......
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.
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.
......@@ -31,4 +31,13 @@ module.exports = {
resetPwd: "/pingan_hklife_webapi/reset/resetPwd",
// 找回密码:重置密码
updateInformation: "/pingan_hklife_webapi/user/updateInformation",
// 读取联系方式
getContacts: "/pingan_hklife_webapi/customService/contacts/get",
// 更新联系方式
updateContacts: "/pingan_hklife_webapi/customService/contacts/update",
// 保存預約服務
saveReservation: "/pingan_hklife_webapi/customService/reservation/save",
// 保存投訴建議
saveComplain: "/pingan_hklife_webapi/customService/complain/save"
}
\ No newline at end of file
......
......@@ -41,11 +41,11 @@ axios.interceptors.response.use(
if (response.data.code === 200) {
return Promise.resolve(response);
} else {
Toast(response.data.bizMsg);
return Promise.reject(response);
// Toast(response.data.bizMsg);
return Promise.reject(response.data);
}
} else {
return Promise.reject(response);
return Promise.reject(response.data);
}
},
// 服务器状态码不是200的情况
......@@ -126,9 +126,10 @@ export const httpGet = params => {
} = params;
let headers = {};
if (sid) {
let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : "";
headers = {
headers : {
sid : state.userInfo.sid
headers: {
sid: sessionId
}
}
}
......@@ -149,16 +150,16 @@ export const httpPost = params => {
} = params;
let headers = {};
if (sid) {
let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : "";
headers = {
headers : {
sid : state.userInfo.sid
headers: {
sid: sessionId
}
}
}
return axios.post(`${base}${url}`, data, headers).then(res => res.data.content);
}
/**
* 封装post方法
* @param {*} params
......
......@@ -8,6 +8,9 @@ module.exports = {
zh: 'Chinese',
en: 'English'
},
glbalTips : {
sessionLost : "为了更好的体验,需要您登录后再进行此操作"
},
nav: {
loginData: {
name: "login",
......@@ -59,7 +62,7 @@ module.exports = {
},
{
name: "Change policy",
path: "/custom/service?q=m4"
path: "/custom/service?q=m41"
},
{
name: "Claim report",
......@@ -282,6 +285,7 @@ module.exports = {
value: "W"
}]
},
successMsg : "更新成功",
errorTips: {
e1: "請填寫姓名信息",
e2: "請選擇性別",
......@@ -289,6 +293,7 @@ module.exports = {
e4: "請選擇證件類型",
e5: "請填寫證件號碼",
e6: "您填寫的證件號碼有誤",
e7: "您填寫的信息有誤,請核實後重新提交",
}
},
index: {
......@@ -550,6 +555,11 @@ module.exports = {
email: "E-Mail",
checkTips: "本人不同意接收宣傳信息",
submit: "確認修改",
errorTips : {
e1 : "請填寫正確的聯繫電話",
e2 : "請填寫聯繫地址",
e3 : "請填寫正確的E-Mail地址"
}
},
policyChangeInformation: {
hkClient: "是否平安香港客戶",
......@@ -656,7 +666,13 @@ module.exports = {
t6PaymentAmount: "Payment amount",
},
reservation: {
submitBtn: '確認'
submitBtn: '確認',
contactMethods : ['電話'],
reservationTypes: ['投保咨詢','代辦保單變更'],
errorTips : {
e1 : "請填寫該項內容",
e2 : "請填寫正確的聯繫方式"
}
}
}
}
......
......@@ -8,6 +8,9 @@ module.exports = {
zh: 'Chinese',
en: 'English'
},
glbalTips : {
sessionLost : "為了更好的體驗,需要您登錄後再進行此操作"
},
nav: {
loginData: {
name: "登入",
......@@ -59,7 +62,7 @@ module.exports = {
},
{
name: "保單變更",
path: "/custom/service?q=m4"
path: "/custom/service?q=m41"
},
{
name: "理賠申請",
......@@ -280,6 +283,7 @@ module.exports = {
value: "W"
}]
},
successMsg : "更新成功",
errorTips: {
e1: "請填寫姓名信息",
e2: "請選擇性別",
......@@ -287,6 +291,7 @@ module.exports = {
e4: "請選擇證件類型",
e5: "請填寫證件號碼",
e6: "您填寫的證件號碼有誤",
e7: "您填寫的信息有誤,請核實後重新提交",
}
},
index: {
......@@ -548,6 +553,11 @@ module.exports = {
email: "E-Mail",
checkTips: "本人不同意接收宣傳信息",
submit: "確認修改",
errorTips : {
e1 : "請填寫正確的聯繫電話",
e2 : "請填寫聯繫地址",
e3 : "請填寫正確的E-Mail地址"
}
},
policyChangeInformation: {
hkClient: "是否平安香港客戶",
......@@ -654,7 +664,13 @@ module.exports = {
t6PaymentAmount: "繳費金額",
},
reservation: {
submitBtn: '確認'
submitBtn: '確認',
contactMethods : ['電話'],
reservationTypes: ['投保咨詢','代辦保單變更'],
errorTips : {
e1 : "請填寫該項內容",
e2 : "請填寫正確的聯繫方式"
}
}
}
}
......
......@@ -8,6 +8,9 @@ module.exports = {
zh: '中文',
en: '英文'
},
glbalTips : {
sessionLost : "为了更好的体验,需要您登录后再进行此操作"
},
nav: {
loginData: {
name: "登陆",
......@@ -59,7 +62,7 @@ module.exports = {
},
{
name: "保单变更",
path: "/custom/service?q=m4"
path: "/custom/service?q=m41"
},
{
name: "理赔申请",
......@@ -280,6 +283,7 @@ module.exports = {
value: "W"
}]
},
successMsg : "更新成功",
errorTips: {
e1: "请填写姓名信息",
e2: "请选择性别",
......@@ -287,6 +291,7 @@ module.exports = {
e4: "请选择证件类型",
e5: "请填写证件号码",
e6: "您填写的证件号码有误",
e7: "您填写的信息有误,请核实后重新提交",
}
},
index: {
......@@ -549,18 +554,12 @@ module.exports = {
email: "E-Mail",
checkTips: "本人不同意接收宣传信息",
submit: "确认修改",
errorTips : {
e1 : "請填寫正確的聯繫電話",
e2 : "請填寫聯繫地址",
e3 : "請填寫正確的E-Mail地址"
}
},
policyChangeInformation: {
hkClient: "是否平安香港客戶",
yes: "是",
......@@ -666,7 +665,13 @@ module.exports = {
t6PaymentAmount: "缴费金额",
},
reservation: {
submitBtn: '确认'
submitBtn: '确认',
contactMethods : ['電話'],
reservationTypes: ['投保咨询','代办保单变更'],
errorTips : {
e1 : "請填寫該項內容",
e2 : "請填寫正確的聯繫方式"
}
}
}
}
......
......@@ -11,9 +11,24 @@ export default {
checked1: false,
checked2: false,
checked3: false,
data: {
mobileAreaCode: "",
mobile: "",
mobileAcceptMessage: 0,
email: "",
emailAcceptMessage: 0,
address: "",
addressAcceptMessage: 0
},
errorTips: {
e1: "",
e2: "",
e3: ""
}
}
},
components: {},
components: {
},
computed: {
locale() {
return this.$i18n.locale || 'tc';
......@@ -23,8 +38,112 @@ export default {
}
},
methods: {
initData() {}
modalCallback() {
this.modalVisiable = false;
},
sessionLost() {
// let message = this.i18n.glbalTips.sessionLost;
// alert(message);
// let targetPath = "/login?callback=" + this.buildCallbackPath();
// this.$router.push({
// path: targetPath
// });
},
showSuccess() {
alert("更新成功")
},
updateContactsHandler() {
let b1 = this.checkMobile();
let b2 = this.checkEmail();
let b3 = this.checkAddress();
let b = b1 & b2 & b3;
if (b) {
this.data.mobileAcceptMessage = this.checked1 ? 1 : 0;
this.data.addressAcceptMessage = this.checked2 ? 1 : 0;
this.data.emailAcceptMessage = this.checked3 ? 1 : 0;
httpPost({
url: api.updateContacts,
data: this.data,
sid: true
}).then(() => {
this.showSuccess();
}).catch(() => {
this.sessionLost();
})
}
},
checkMobile() {
if (!this.data.mobile) {
this.errorTips.e1 = this.i18n.policyChangeContact.errorTips.e1;
return false;
} else {
if (this.data.mobile.length != 8 && this.data.mobile.length != 11) {
this.errorTips.e1 = this.i18n.policyChangeContact.errorTips.e1;
return false;
}
}
return true;
},
checkAddress() {
if (!this.data.address) {
this.errorTips.e2 = this.i18n.policyChangeContact.errorTips.e2;
return false;
}
return true;
},
checkEmail() {
if (!/^(\w-*\.*)+@(\w-?)+(\.\w{2,})+$/.test(this.data.email)) {
this.errorTips.e3 = this.i18n.policyChangeContact.errorTips.e3;
return false;
}
return true;
},
initData() {
httpPost({
url: api.getContacts,
sid: true
}).then(response => {
if (response) {
this.data.mobile = response.mobile;
this.data.mobileAcceptMessage = response.mobileAcceptMessage;
this.data.email = response.email;
this.data.emailAcceptMessage = response.emailAcceptMessage;
this.data.address = response.address;
this.data.addressAcceptMessage = response.addressAcceptMessage;
}
this.checked1 = this.data.mobileAcceptMessage == 1 ? true : false;
this.checked2 = this.data.addressAcceptMessage == 1 ? true : false;
this.checked3 = this.data.emailAcceptMessage == 1 ? true : false;
}).catch(res => {
if (res.code == "404") {
this.sessionLost();
}
});
},
buildCallbackPath() {
let path = this.$route.path;
let sep = "?"
for (let key in this.$route.query) {
path += sep + key + "=" + this.$route.query[key];
sep = "&";
}
return path;
}
},
watch: {
'data.mobile': function () {
this.errorTips.e1 = "";
},
'data.address': function () {
this.errorTips.e2 = "";
},
'data.email': function () {
this.errorTips.e3 = "";
}
},
mounted() {
this.initData();
},
mounted() {},
created() {}
created() { }
}
......
......@@ -42,6 +42,8 @@
}
.ipt-wrap {
display: flex;
align-items: center;
position: relative;
// input和下拉
......@@ -91,6 +93,21 @@
margin-right: .666667rem;
}
}
.validator {
color: $cOrange;
margin-top: 0.5rem;
position: absolute;
right: 16rem;
display: flex;
align-items: center;
// bottom: 0;
img {
display: inline-block;
margin-right: 0.4rem;
}
}
}
}
......
......@@ -6,11 +6,20 @@
<div class="label">
<div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-phone.png"></div>{{$t('policyChangeContact.phone')}}
</div>
<div class="ipt-wrap">
<input placeholder="香港(852)2888 8888" class="ipt mail-ipt" type="text">
<img @click="checked1 = !checked1" v-if="!checked1" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
<img @click="checked1 = !checked1" v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
<span>{{$t("policyChangeContact.checkTips")}}</span>
<div class="ipt-wrap" >
<!-- <div> -->
<input class="ipt mail-ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="data.mobile">
<!-- </div> -->
<div class="pointer" @click="checked1 = !checked1">
<img v-if="!checked1" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
<img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
<span>{{$t("policyChangeContact.checkTips")}}</span>
</div>
</div>
<div class="validator" v-if="errorTips.e1.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e1}}
</div>
</div>
<div class="form-item">
......@@ -18,10 +27,15 @@
<div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-location.png"></div>{{$t('policyChangeContact.address')}}
</div>
<div class="ipt-wrap">
<input placeholder="深圳市益田路5033號" class="ipt mail-ipt" type="text">
<img @click="checked2 = !checked2" v-if="!checked2" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
<img @click="checked2 = !checked2" v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
<span>{{$t("policyChangeContact.checkTips")}}</span>
<input class="ipt mail-ipt" type="text" :class="{err : errorTips.e2.length > 0}" v-model="data.address">
<div class="pointer" @click="checked2 = !checked2">
<img v-if="!checked2" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
<img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
<span>{{$t("policyChangeContact.checkTips")}}</span>
</div>
</div>
<div class="validator" v-if="errorTips.e2.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e2}}
</div>
</div>
<div class="form-item">
......@@ -29,14 +43,20 @@
<div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-mail.png"></div>{{$t('policyChangeContact.email')}}
</div>
<div class="ipt-wrap">
<input placeholder="123@ping.com.cn" class="ipt mail-ipt" type="text">
<img @click="checked3 = !checked3" v-if="!checked3" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
<img @click="checked3 = !checked3" v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
<span>{{$t("policyChangeContact.checkTips")}}</span>
<input class="ipt mail-ipt" type="text" :class="{err : errorTips.e3.length > 0}" v-model="data.email">
<div class="pointer" @click="checked3 = !checked3">
<img v-if="!checked3" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
<img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
<span>{{$t("policyChangeContact.checkTips")}}</span>
</div>
</div>
<div class="validator" v-if="errorTips.e3.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}}
</div>
</div>
</div>
<div class="submit-btn">
<div class="submit-btn" @click="updateContactsHandler">
{{$t("policyChangeContact.submit")}}
</div>
</div>
......
......@@ -7,9 +7,28 @@ import {
export default {
data() {
return {
isSubmit: false,
key: 'value',
isHkCus : true,
checked : false
isHkCus: true,
checked: false,
data: {
name: "",
contactType: "",
contactMethod: "",
reservationType: "",
instruction: "",
hkCustomer: "",
contactDate: ""
},
errorTips: {
e1: "",
e2: "",
e3: "",
e4: "",
e5: "",
e6: "",
e7: ""
}
}
},
components: {},
......@@ -19,11 +38,98 @@ export default {
},
i18n() {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
contactMethods() {
return this.i18n.customService.reservation.contactMethods;
},
reservationTypes() {
return this.i18n.customService.reservation.reservationTypes;
}
},
methods: {
initData() {}
initData() {
this.data.contactType = this.contactMethods[0];
this.data.reservationType = this.reservationTypes[0];
},
submitHandler() {
if (this.isSubmit) {
return;
}
let b1 = this.checkName();
let b2 = this.checkContactMethod();
let b3 = this.checkInstruction();
let b4 = this.checkContactDate();
let b = b1 & b2 & b3 & b4;
if (b) {
this.isSubmit = true;
this.data.hkCustomer = this.isHkCus ? 1 : 0;
httpPost({
url: api.saveReservation,
data: this.data
}).then(() => {
this.showSubmitSuccess();
this.isSubmit = false;
}).catch(() => {
this.isSubmit = false;
})
}
},
showSubmitSuccess(){
alert("提交成功");
this.data.name = "";
this.data.contactMethod = "";
this.data.instruction = "";
},
checkName() {
if (!this.data.name) {
let message = this.i18n.customService.reservation.errorTips.e1;
this.errorTips.e1 = message;
return false;
}
return true;
},
checkContactMethod() {
if (!this.data.contactMethod) {
let message = this.i18n.customService.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;
}
return true;
},
checkContactDate() {
if (!this.data.contactDate) {
let message = this.i18n.customService.reservation.errorTips.e1;
this.errorTips.e7 = message;
return false;
}
return true;
}
},
watch: {
'data.name': function () {
this.errorTips.e1 = "";
},
'data.contactMethod': function () {
this.errorTips.e3 = "";
},
'data.instruction': function () {
this.errorTips.e5 = "";
},
'data.contactDate': function () {
this.errorTips.e7 = "";
}
},
mounted() {
this.initData();
},
mounted() {},
created() {}
created() { }
}
......
......@@ -80,6 +80,21 @@ input {
}
}
.validator {
color: $cOrange;
margin-top: 0.5rem;
position: absolute;
right: 1rem;
display: flex;
align-items: center;
// bottom: 0;
img {
display: inline-block;
margin-right: 0.4rem;
}
}
}
// 不换行
......@@ -200,3 +215,8 @@ input {
background-blend-mode: soft-light, ;
background-image: linear-gradient(to top, #000000, #ffffff), linear-gradient(to bottom, #ec6429, #ec6429);
}
.disabled {
background-color: gray !important;
background-image:none !important;
}
\ No newline at end of file
......
......@@ -8,7 +8,10 @@
<div class="icon"><img src="@/assets/images/reservation/icon-re-name.png"></div> {{$t('reservation.name')}}
</div>
<div class="ipt-wrap">
<input :placeholder="$t('reservation.namePlaceholder')" class="ipt" type="text">
<input :placeholder="$t('reservation.namePlaceholder')" class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="data.name">
</div>
<div class="validator" v-if="errorTips.e1.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e1}}
</div>
</div>
......@@ -18,9 +21,8 @@
</div>
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt">
<option v-if="locale !='zh'">電話</option>
<option v-else>电话</option>
<select class="ipt" v-model="data.contactType">
<option v-for="(item,index) in contactMethods" :key="index" :value="item">{{item}}</option>
</select>
</div>
</div>
......@@ -30,7 +32,10 @@
<div class="icon"><img src="@/assets/images/reservation/icon-re-phone.png"></div>{{$t('reservation.contact')}}
</div>
<div class="ipt-wrap">
<input :placeholder="$t('reservation.contactPlaceholder')" class="ipt" type="text">
<input :placeholder="$t('reservation.contactPlaceholder')" class="ipt" :class="{err : errorTips.e3.length > 0}" type="text" v-model="data.contactMethod">
</div>
<div class="validator" v-if="errorTips.e3.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}}
</div>
</div>
......@@ -40,15 +45,8 @@
</div>
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt">
<template v-if="locale =='zh'">
<option>投保咨询</option>
<option>代办保单变更</option>
</template>
<template v-else>
<option>投保咨詢</option>
<option>代辦保單變更</option>
</template>
<select class="ipt" v-model="data.reservationType">
<option v-for="(item,index) in reservationTypes" :key="index" :value="item">{{item}}</option>
</select>
</div>
</div>
......@@ -58,7 +56,10 @@
<div class="icon"><img src="@/assets/images/reservation/icon-re-arrow-reservation.png"></div>{{$t('reservation.reservationRemark')}}
</div>
<div class="ipt-wrap">
<textarea :placeholder="$t('reservation.reservationRemarkPlaceholder')" class="ipt textarea"></textarea>
<textarea :placeholder="$t('reservation.reservationRemarkPlaceholder')" class="ipt textarea" :class="{err : errorTips.e5.length > 0}" v-model="data.instruction"></textarea>
</div>
<div class="validator" v-if="errorTips.e5.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e5}}
</div>
</div>
......@@ -79,14 +80,17 @@
<div class="icon"><img src="@/assets/images/reservation/icon-re-calendar.png"></div>{{$t('reservation.contactTime')}}
</div>
<div class="ipt-wrap">
<input value="2019/10/16" class="ipt" type="text">
<input class="ipt" type="date" v-model="data.contactDate" :class="{err : errorTips.e7.length > 0}">
</div>
<div class="validator" v-if="errorTips.e7.length > 0">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e7}}
</div>
<div class="mt8">
<div class="label">
</div>
<div class="calendar">
<!-- <div class="calendar">
<img src="@/assets/images/reservation/re-calendar.png">
</div>
</div> -->
</div>
</div>
</div>
......@@ -103,7 +107,7 @@
</p>
</div>
<div class="submit-btn">
<div class="submit-btn" :class="{disabled : !checked}" @click="submitHandler">
{{$t('customService.reservation.submitBtn')}}
</div>
</div>
......
......@@ -21,11 +21,11 @@ export default {
},
birthDate: "",
information: {
cnName: "joe",
sex: "M",
birthDate: "1990-01-01",
idNo: "111111111234567890",
idType: "1"
cnName: "",
sex: "",
birthDate: "",
idNo: "",
idType: ""
},
errorTips: {
e1: "",
......@@ -60,6 +60,12 @@ export default {
}
},
methods: {
showModal(content, icon) {
icon = !icon || typeof icon === "undefined" ? "succ" : "succ";
this.modalIcon = icon;
this.modalContent = content;
this.modalVisiable = true;
},
initData() {
},
onUpdateHandler() {
......@@ -83,7 +89,23 @@ export default {
data: this.information,
sid: true
}).then(response => {
console.log(response);
let message = "";
switch (response.returnCode) {
case "GS_MODIFYFIVEKEYS_ERROR_IDNOERROR":
message = this.i18n.infomationImprove.errorTips.e6;
this.errorTips.e5 = message;
break;
case "COMMON_ERROR_036":
this.showModal(this.i18n.infomationImprove.errorTips.e7, "info");
this.errorTips.e5 = message;
break;
case "0":
message = this.i18n.infomationImprove.successMsg;
this.showModal(message, "succ");
let path = this.$route.query.callback || "/index";
this.targetPath = path;
break;
}
});
});
}
......@@ -96,7 +118,6 @@ export default {
clientNo: "501381573194155227"
}
}).then(response => {
console.log(response);
this.$store.commit("SET_USER_INFO", response.data);
resolve();
})
......@@ -145,13 +166,11 @@ export default {
}
message = this.i18n.infomationImprove.errorTips.e6;
let idNo = this.information.idNo + "";
console.log(idNo);
console.log(idNo.length);
switch (this.information.idType) {
case "0": // 外國人永久居留身份證
if (/[a-z][A-Z]{3}[0-9]{12}/.test(idNo)) {
message = "";
}
// if (/[a-z][A-Z]{3}[0-9]{12}/.test(idNo)) {
// message = "";
// }
message = "";
break;
case "1": // 身份證
......@@ -167,14 +186,14 @@ export default {
message = idNo.length > 5 && idNo.length < 50 ? "" : message;
break;
case "V": // 港澳台居民居住證
if ((/8[1|2]0000\\d{11}/.text(idNo) && (/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo)))) {
message = "";
}
// if ((/8[1|2]0000\\d{11}/.text(idNo) && (/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo)))) {
message = "";
// }
break;
case "W": //台灣居民居住證
if ((/830000\\d{11}/.text(idNo) && (/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo)))) {
message = "";
}
// if ((/830000\\d{11}/.text(idNo) && (/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo)))) {
message = "";
// }
break;
default:
message = "";
......
......@@ -166,7 +166,6 @@
}
.ipt-wrap {
position: relative;
display: flex;
justify-content: space-between;
......