bdf81816 by joe

修改

1 parent 0861646c
module.exports = {
logout : "/pingan_hklife_webapi/user/logout",
load: "/pingan_hklife_webapi/user/load",
logout: "/pingan_hklife_webapi/user/logout",
// 是否显示图形验证码接口
stdIsShowImageVcode : "/pingan_hklife_webapi/auth/stdIsShowImageVcode",
stdIsShowImageVcode: "/pingan_hklife_webapi/auth/stdIsShowImageVcode",
// 刷新图形验证码接口
stdRefreshVcode : "/pingan_hklife_webapi/auth/stdRefreshVcode",
stdRefreshVcode: "/pingan_hklife_webapi/auth/stdRefreshVcode",
// OTP发送接口
stdSendOTP : "/pingan_hklife_webapi/auth/stdSendOTP",
stdSendOTP: "/pingan_hklife_webapi/auth/stdSendOTP",
// OTP验证与验重接口
stdValidateOTPandRepeat : "/pingan_hklife_webapi/auth/stdValidateOTPandRepeat",
stdValidateOTPandRepeat: "/pingan_hklife_webapi/auth/stdValidateOTPandRepeat",
// 注册手机号验重接口
gsRegCheck : "/pingan_hklife_webapi/auth/gsRegCheck",
gsRegCheck: "/pingan_hklife_webapi/auth/gsRegCheck",
// 账户整合登录接口
gsLogin : "/pingan_hklife_webapi/auth/gsLogin",
gsLogin: "/pingan_hklife_webapi/auth/gsLogin",
// 注册接口
stdRegister : "/pingan_hklife_webapi/auth/stdRegister",
stdRegister: "/pingan_hklife_webapi/auth/stdRegister",
// 修改密码
changePassword : "/pingan_hklife_webapi/password/change",
changePassword: "/pingan_hklife_webapi/user/password/change",
// 短信验证码登录
otpLogin : "/pingan_hklife_webapi/user/otpLogin",
otpLogin: "/pingan_hklife_webapi/user/otpLogin",
// 短信验证码登录
otpRegisterAndLogin : "/pingan_hklife_webapi/user/otpRegisterAndLogin",
otpRegisterAndLogin: "/pingan_hklife_webapi/user/otpRegisterAndLogin",
// 找回密码:定位用户信息
locateUserInfo : "/pingan_hklife_webapi/reset/locateUserInfo",
locateUserInfo: "/pingan_hklife_webapi/reset/locateUserInfo",
// 找回密码:发送验证码
sendOtp : "/pingan_hklife_webapi/reset/sendOtp",
sendOtp: "/pingan_hklife_webapi/reset/sendOtp",
// 找回密码:校验验证码
checkOtp : "/pingan_hklife_webapi/reset/checkOtp",
checkOtp: "/pingan_hklife_webapi/reset/checkOtp",
// 找回密码:重置密码
resetPwd : "/pingan_hklife_webapi/reset/resetPwd",
resetPwd: "/pingan_hklife_webapi/reset/resetPwd",
// 找回密码:重置密码
updateInformation: "/pingan_hklife_webapi/user/updateInformation",
}
\ No newline at end of file
......
......@@ -135,17 +135,17 @@ module.exports = {
verifyCode: "驗證碼",
verifyCodePlaceholder: "驗證碼",
verifyCodeGet: "獲取驗證碼",
tips : {
e1 : "请输入账号信息",
e2 : "请输入密码",
e3 : "请输入图像验证码",
e4 : "请同意《平安一账通会员服务协议》",
e5 : "账号/密码不正确",
oe0 : "请输入正确的手机号",
oe1 : "请先获取短信验证码",
oe2 : "请输入图片验证码",
oe3 : "请输入短信验证码",
oe4 : "短信验证码不正确",
tips: {
e1: "请输入账号信息",
e2: "请输入密码",
e3: "请输入图像验证码",
e4: "请同意《平安一账通会员服务协议》",
e5: "账号/密码不正确",
oe0: "请输入正确的手机号",
oe1: "请先获取短信验证码",
oe2: "请输入图片验证码",
oe3: "请输入短信验证码",
oe4: "短信验证码不正确",
}
},
session: {
......@@ -251,6 +251,45 @@ module.exports = {
t5Placeholder: "",
submit: "確認",
cancel: "跳過",
candidates: {
sex: [{
name: "男",
value: "M"
}, {
name: "女",
value: "F"
}],
idType: [{
name: "身份證",
value: "1"
}, {
name: "護照",
value: "2"
}, {
name: "軍官證或士兵證",
value: "3"
}, {
name: "港澳通行證/回鄉證或台胞證",
value: "6"
}, {
name: "外國人永久居留身份證",
value: "0"
}, {
name: "港澳台居民居住證",
value: "V"
}, {
name: "台灣居民居住證",
value: "W"
}]
},
errorTips: {
e1: "請填寫姓名信息",
e2: "請選擇性別",
e3: "請選擇生日",
e4: "請選擇證件類型",
e5: "請填寫證件號碼",
e6: "您填寫的證件號碼有誤",
}
},
index: {
news: "新聞資訊",
......
......@@ -249,6 +249,45 @@ module.exports = {
t5Placeholder: "",
submit: "確認",
cancel: "跳過",
candidates: {
sex: [{
name: "男",
value: "M"
}, {
name: "女",
value: "F"
}],
idType: [{
name: "身份證",
value: "1"
}, {
name: "護照",
value: "2"
}, {
name: "軍官證或士兵證",
value: "3"
}, {
name: "港澳通行證/回鄉證或台胞證",
value: "6"
}, {
name: "外國人永久居留身份證",
value: "0"
}, {
name: "港澳台居民居住證",
value: "V"
}, {
name: "台灣居民居住證",
value: "W"
}]
},
errorTips: {
e1: "請填寫姓名信息",
e2: "請選擇性別",
e3: "請選擇生日",
e4: "請選擇證件類型",
e5: "請填寫證件號碼",
e6: "您填寫的證件號碼有誤",
}
},
index: {
news: "新聞資訊",
......
......@@ -135,17 +135,17 @@ module.exports = {
verifyCode: "验证码",
verifyCodePlaceholder: "验证码",
verifyCodeGet: "获取验证码",
tips : {
e1 : "请输入账号信息",
e2 : "请输入密码",
e3 : "请输入图像验证码",
e4 : "请同意《平安一账通会员服务协议》",
e5 : "账号或密码不正确",
oe0 : "请输入正确的手机号",
oe1 : "请先获取短信验证码",
oe2 : "请输入图片验证码",
oe3 : "请输入短信验证码",
oe4 : "短信验证码不正确",
tips: {
e1: "请输入账号信息",
e2: "请输入密码",
e3: "请输入图像验证码",
e4: "请同意《平安一账通会员服务协议》",
e5: "账号或密码不正确",
oe0: "请输入正确的手机号",
oe1: "请先获取短信验证码",
oe2: "请输入图片验证码",
oe3: "请输入短信验证码",
oe4: "短信验证码不正确",
}
},
session: {
......@@ -197,12 +197,12 @@ module.exports = {
error2: "密码中必须包含数字、字符以及特殊号码",
error3: "两次密码不一致,请确认后重新输入",
error4: "密码修改失败,请稍后再试,或拨打客服电话95511解决",
error5 : "旧密码不正确,请重新输入",
error5: "旧密码不正确,请重新输入",
success: "密码修改成功"
},
passwordReset: {
oldPwd : "旧密码",
oldPwdPlaceholde : "请输入旧密码",
oldPwd: "旧密码",
oldPwdPlaceholde: "请输入旧密码",
cidExpire: "长时间未操作,为了您的账户安全,请重新开始",
type1: {
title: "密码找回",
......@@ -249,6 +249,45 @@ module.exports = {
t5Placeholder: "",
submit: "确认",
cancel: "跳过",
candidates: {
sex: [{
name: "男",
value: "M"
}, {
name: "女",
value: "F"
}],
idType: [{
name: "身份证",
value: "1"
}, {
name: "护照",
value: "2"
}, {
name: "军官证或士兵证",
value: "3"
}, {
name: "港澳通行证/回乡证或台胞证",
value: "6"
}, {
name: "外国人永久居留身份证",
value: "0"
}, {
name: "港澳居民居住证",
value: "V"
}, {
name: "台湾居民居住证",
value: "W"
}]
},
errorTips: {
e1: "请填写姓名信息",
e2: "请选择性别",
e3: "请选择生日",
e4: "请选择证件类型",
e5: "请填写证件号码",
e6: "您填写的证件号码有误",
}
},
index: {
news: "新闻资讯",
......
......@@ -4,6 +4,8 @@ import {
httpPost
} from '@/api/fetch-api.js'
import modalComp from '@/components/modal-comp/modal-comp.vue';
export default {
data() {
return {
......@@ -17,20 +19,197 @@ export default {
password: "",
passwordRepeat: ""
},
birthDate: "",
information: {
cnName: "joe",
sex: "M",
birthDate: "1990-01-01",
idNo: "111111111234567890",
idType: "1"
},
errorTips: {
e1: "",
e2: "",
e3: "",
e4: "",
e5: "",
},
modalVisiable: false,
targetPath: "",
modalIcon: "succ",
modalContent: ""
}
},
components: {},
components: {
modalComp
},
computed: {
locale() {
return this.$i18n.locale || 'tc';
},
i18n() {
return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
},
sexCandidates() {
let i18n = this.$i18n.messages[this.$i18n.locale];
return i18n.infomationImprove.candidates.sex;
},
idTypeCandidates() {
let i18n = this.$i18n.messages[this.$i18n.locale];
return i18n.infomationImprove.candidates.idType;
}
},
methods: {
initData() {}
initData() {
},
onUpdateHandler() {
let b1 = this.checkCnName();
let b2 = this.checkIdNo();
let b3 = this.checkBirthday();
let b4 = this.checkSex();
let b5 = this.checkIdType();
let b = b1 & b2 & b3 & b4 & b5;
if (b) {
// console.log(this.birthDate);
// let y = this.birthDate.getFullYear();
// let m = this.birthDate.getMonth() + 1;
// let d = this.birthDate.getDate();
// let day = y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
this.information.birthDate = this.birthDate;
this.loadIdentify().then(() => {
httpPost({
url: api.updateInformation,
data: this.information,
sid: true
}).then(response => {
console.log(response);
});
});
}
},
loadIdentify() {
return new Promise((resolve, reject) => {
httpPost({
url: api.load,
data: {
clientNo: "501381573194155227"
}
}).then(response => {
console.log(response);
this.$store.commit("SET_USER_INFO", response.data);
resolve();
})
});
},
checkCnName() {
if (!this.information.cnName) {
let message = this.i18n.infomationImprove.errorTips.e1;
this.errorTips.e1 = message;
return false;
}
return true;
},
checkSex() {
if (!this.information.sex) {
let message = this.i18n.infomationImprove.errorTips.e2;
this.errorTips.e2 = message;
return false;
}
return true;
},
checkBirthday() {
if (!this.birthDate) {
let message = this.i18n.infomationImprove.errorTips.e3;
this.errorTips.e3 = message;
return false;
}
return true;
},
checkIdType() {
if (!this.information.idType) {
let message = this.i18n.infomationImprove.errorTips.e4;
this.errorTips.e4 = message;
return false;
}
return true;
},
checkIdNo() {
let message = this.i18n.infomationImprove.errorTips.e5;
if (!this.information.idNo) {
this.errorTips.e5 = message;
return false;
}
if (!this.information.idType) {
return true;
}
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 = "";
}
message = "";
break;
case "1": // 身份證
message = idNo.length == 18 ? "" : message;
break;
case "2": // 護照
message = idNo.length > 3 && idNo.length < 50 ? "" : message;
break;
case "3": // 軍官證或士兵證
message = idNo.length > 6 && idNo.length < 50 ? "" : message;
break;
case "6": // 港澳通行證/回鄉證或台胞證
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 = "";
}
break;
case "W": //台灣居民居住證
if ((/830000\\d{11}/.text(idNo) && (/\\d{15}/.test(idNo) || /\\d{17}/.test(idNo)))) {
message = "";
}
break;
default:
message = "";
break;
}
return true;
},
modalCallback() {
this.modalVisiable = false;
if (this.targetPath) {
this.$router.push({
"path": this.targetPath
});
}
}
},
mounted() {
this.initData();
},
watch: {
'information.cnName': function () {
this.errorTips.e1 = "";
},
'information.sex': function () {
this.errorTips.e2 = "";
},
'birthDate': function () {
this.errorTips.e3 = "";
},
'information.idNo': function () {
this.errorTips.e4 = "";
},
'information.idType': function () {
this.errorTips.e5 = "";
}
},
mounted() {},
created() {}
created() { }
}
......
......@@ -100,7 +100,8 @@
&-btn-wrap {
display: flex;
justify-content: space-between;
// justify-content: space-between;
justify-content: center;
margin-top: 2rem;
}
......
<template>
<div class="content">
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<div class="ebg">
<img src="@/assets/images/common/login-bg.png">
</div>
......@@ -16,10 +18,10 @@
<img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1')}}
</div>
<div class="ipt-wrap">
<input class="ipt" type="password" v-model="values.password">
<input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.cnName">
</div>
<div class="validator">
<img src="@/assets/images/common/icon-notice.png" alt=""> 验证提示
<div class="validator" v-if="errorTips.e1.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}}
</div>
</div>
......@@ -29,17 +31,14 @@
</div>
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt">
<template v-if="locale =='zh'">
<option>身份证</option>
</template>
<template v-else>
<option>身份證</option>
<select class="ipt" :class="{err : errorTips.e2.length > 0}" v-model="information.sex">
<template v-if="sexCandidates">
<option v-for="(item,index) in sexCandidates" :key="index" :value="item.value">{{item.name}}</option>
</template>
</select>
</div>
<div class="validator">
<img src="@/assets/images/common/icon-notice.png" alt=""> 验证提示
<div class="validator" v-if="errorTips.e2.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e2}}
</div>
</div>
......@@ -48,10 +47,10 @@
<img src="@/assets/images/improve-infomation/icon-improve-infomation-date.png"> {{$t('infomationImprove.t3')}}
</div>
<div class="ipt-wrap">
<input class="ipt" type="password" v-model="values.password">
<input class="ipt" type="date" :class="{err : errorTips.e3.length > 0}" v-model="birthDate">
</div>
<div class="validator">
<img src="@/assets/images/common/icon-notice.png" alt=""> 验证提示
<div class="validator" v-if="errorTips.e3.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e3}}
</div>
</div>
......@@ -61,17 +60,14 @@
</div>
<div class="ipt-wrap">
<div class="down-arrow"></div>
<select class="ipt">
<template v-if="locale =='zh'">
<option>身份证</option>
</template>
<template v-else>
<option>身份證</option>
<select class="ipt" :class="{err : errorTips.e4.length > 0}" v-model="information.idType">
<template v-if="idTypeCandidates">
<option v-for="(item,index) in idTypeCandidates" :key="index" :value="item.value">{{item.name}}</option>
</template>
</select>
</div>
<div class="validator">
<img src="@/assets/images/common/icon-notice.png" alt=""> 验证提示
<div class="validator" v-if="errorTips.e4.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e4}}
</div>
</div>
......@@ -80,17 +76,17 @@
<img src="@/assets/images/improve-infomation/icon-improve-infomation-card.png"> {{$t('infomationImprove.t5')}}
</div>
<div class="ipt-wrap">
<input class="ipt" type="password" v-model="values.password">
<input class="ipt" type="text" :class="{err : errorTips.e5.length > 0}" v-model="information.idNo">
</div>
<div class="validator">
<img src="@/assets/images/common/icon-notice.png" alt=""> 验证提示
<div class="validator" v-if="errorTips.e5.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e5}}
</div>
</div>
</div>
<div class="login-btn-wrap">
<div @click="onRegisterHandler()" class="login-submit pointer">{{$t('infomationImprove.submit')}}</div>
<div @click="onRegisterHandler()" class="login-submit pointer">{{$t('infomationImprove.cancel')}}</div>
<div @click="onUpdateHandler()" class="login-submit pointer">{{$t('infomationImprove.submit')}}</div>
</div>
</div>
......
......@@ -18,14 +18,14 @@
<div class="pure-u-1 form-item">
<div class="ipt-wrap">
<img class="down-arrow" src="@/assets/images/reservation/re-down-arrow.png" alt="">
<select class="ipt" v-model="mobileNoType">
<select class="ipt" v-model="mobileNoType" >
<option v-for="(item,index) in mobileOptions" :key="index" :value="item.type">{{item.name}}</option>
</select>
</div>
</div>
<div class="pure-u-1 form-item">
<div class="ipt-wrap">
<div class="ipt ipt2">
<div class="ipt ipt2" :class="{err : errorTips.p1.length > 0}" >
<div class="region-tel">{{mobileTip.areaCode}}</div>
<input :placeholder="mobileTip.placeHolder" class="ipt-tel" type="text" v-model="registerForm.mobileNo">
</div>
......@@ -37,7 +37,7 @@
<div class="pure-u-1 form-item" v-if="registerCheck.showImageCode">
<div class="ipt-wrap">
<input :placeholder="$t('login.verifyPlaceholder')" class="ipt ipt-verify" type="text" v-model="registerForm.imageValue">
<input :placeholder="$t('login.verifyPlaceholder')" class="ipt ipt-verify" :class="{err : errorTips.p3.length > 0}" type="text" v-model="registerForm.imageValue">
<div class="ipt verify-btn pointer vcode" @click="handlerRefreshImageVcode">
<img :src="values.imageBase64">
</div>
......@@ -48,7 +48,7 @@
</div>
<div class="pure-u-1 form-item">
<div class="ipt-wrap">
<div class="ipt ipt2">
<div class="ipt ipt2" :class="{err : errorTips.p2.length > 0}" >
<input :placeholder="$t('register.verifyCodePlaceholder')" class="ipt-code" type="text" v-model="registerForm.opt">
<div v-if="times.remain == 0" class="veri-btn pointer" @click="handlerStdSendOTP">{{$t('register.verifyCodeGet')}}</div>
<div v-else class="veri-btn-default">{{times.tip}}</div>
......@@ -76,7 +76,7 @@
<img src="@/assets/images/register/icon-register-lock.png"> {{$t('register.newPassword')}}
</div>
<div class="ipt-wrap">
<input :placeholder="$t('register.newPasswordPlaceholder')" class="ipt" type="password" v-model="values.password">
<input :placeholder="$t('register.newPasswordPlaceholder')" class="ipt" :class="{err : errorTips.p4.length > 0}" type="password" v-model="values.password">
</div>
<div class="validator" v-if="errorTips.p4.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.p4}}
......@@ -87,7 +87,7 @@
<img src="@/assets/images/register/icon-register-lock.png"> {{$t('register.newPasswordSure')}}
</div>
<div class="ipt-wrap">
<input :placeholder="$t('register.newPasswordSurePlaceholder')" class="ipt" type="password" v-model="values.passwordRepeat">
<input :placeholder="$t('register.newPasswordSurePlaceholder')" class="ipt" :class="{err : errorTips.p5.length > 0}" type="password" v-model="values.passwordRepeat">
</div>
<div class="validator" v-if="errorTips.p5.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.p5}}
......