6075dcf6 by joe

1

1 parent fe2f08ad
......@@ -4,4 +4,6 @@ VUE_APP_BASE_URL= 'https://ow.go.qudone.com'
VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB'
VUE_APP_CONTENT_ENCRYPT_SWITCH = true
\ No newline at end of file
VUE_APP_CONTENT_ENCRYPT_SWITCH = true
VUE_APP_ONE_ACCOUNT_CENTER_OFF = true
\ No newline at end of file
......
......@@ -5,3 +5,5 @@ VUE_APP_BASE_URL= 'https://ow.go.qudone.com'
VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB'
VUE_APP_CONTENT_ENCRYPT_SWITCH = true
VUE_APP_ONE_ACCOUNT_CENTER_OFF = true
\ No newline at end of file
......
......@@ -4,3 +4,5 @@ VUE_APP_BASE_URL= ''
VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB'
VUE_APP_CONTENT_ENCRYPT_SWITCH = true
VUE_APP_ONE_ACCOUNT_CENTER_OFF = true
\ No newline at end of file
......
......@@ -21,6 +21,7 @@ module.exports = {
stdRegister: "/pingan_hklife_webapi/auth/stdRegister",
// 修改密码
changePassword: "/pingan_hklife_webapi/user/password/change",
changePasswordV2: "/pingan_hklife_webapi/user/password/changeV2",
// 短信验证码登录
otpLogin: "/pingan_hklife_webapi/user/otpLogin",
// 短信验证码登录
......@@ -54,8 +55,10 @@ module.exports = {
updatePolicyContanct : "/pingan_hklife_webapi/policy/updateContacts",
// 保单客戶資料變更
updatePolicyInfo : "/pingan_hklife_webapi/policy/updateInfo",
updatePolicyInfoV2 : "/pingan_hklife_webapi/policy/updatePolicyInfo",
// 证件上传
idPicUpload : "/pingan_hklife_webapi/policy/idPicUpload",
updateIdFileV2 : "/pingan_hklife_webapi/policy/updateIdFileV2",
// 回销回执
policyReceipt : "/pingan_hklife_webapi/policy/policyReceipt",
// 获取电子保单下载code
......@@ -82,5 +85,9 @@ module.exports = {
companyOutline : "/pingan_hklife_webapi/cms/company/outline",
productInfo : "/pingan_hklife_webapi/cms/product",
config : "/pingan_hklife_webapi/config"
config : "/pingan_hklife_webapi/config",
// 为了香港上线而增加的身份自行管理接口
doLoginV2 : "/pingan_hklife_webapi/user/loginv2",
doRegisterV2 : "/pingan_hklife_webapi/user/registerv2"
}
\ No newline at end of file
......
import axiosIns from 'axios';
import state from '@/store/state.js';
import { SET_USER_INFO } from '@/store/mutations.js';
import CryptoJS from "crypto-js";
import JsEncrypt from "jsencrypt";
......@@ -51,7 +52,7 @@ function Toast(msg) {
// let base = COM.baseUrl;
// console.log(process.env);
let baseURL = process.env.VUE_APP_BASE_URL;
// let baseURL = "http://localhost:9101";
// baseURL = "http://localhost:9101";
if (window.location.href.indexOf("192.168") != -1) {
baseURL = "https://ow.go.qudone.com";
}
......@@ -71,6 +72,7 @@ let encryptPattern = [
let encryptWhileList = [
"/pingan_hklife_webapi/policy/idPicUpload",
"/pingan_hklife_webapi/policy/updateIdFileV2",
"/pingan_hklife_webapi/policy/clarmsUpload"
]
......@@ -107,6 +109,9 @@ axios.interceptors.response.use(
if (response.data.code === 200) {
return Promise.resolve(response);
} else {
if (response.data.code === 404) {
SET_USER_INFO(state, null);
}
// Toast(response.data.bizMsg);
return Promise.reject(response.data);
}
......@@ -129,10 +134,10 @@ axios.interceptors.response.use(
}
});
break;
// 403 token过期
// 登录过期对用户进行提示
// 清除本地token和清空vuex中token对象
// 跳转登录页面
// 403 token过期
// 登录过期对用户进行提示
// 清除本地token和清空vuex中token对象
// 跳转登录页面
case 403:
Toast({
message: '登录过期,请重新登录',
......@@ -152,7 +157,7 @@ axios.interceptors.response.use(
});
}, 1000);
break;
// 404请求不存在
// 404请求不存在
case 404:
Toast({
message: '网络请求不存在',
......@@ -160,7 +165,7 @@ axios.interceptors.response.use(
forbidClick: true
});
break;
// 其他错误,直接抛出错误提示
// 其他错误,直接抛出错误提示
default:
Toast({
message: error.response.data.message,
......@@ -248,6 +253,7 @@ export const formdata = params => {
let {
url,
data,
myFormData,
sid,
} = params;
let headers = {
......@@ -255,15 +261,20 @@ export const formdata = params => {
"Content-Type": "multipart/form-data"
}
}
let formData = new FormData(); //使用formData对象
for (let key in data) {
formData.append(key, data[key]);
let lastFormData = null
if (data) {
lastFormData = new FormData(); //使用formData对象
for (let key in data) {
lastFormData.append(key, data[key]);
}
} else {
lastFormData = myFormData;
}
if (sid) {
let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : "";
headers.headers.sid = sessionId;
}
return axios.post(`${url}`, formData, headers).then(res => res.data);
return axios.post(`${url}`, lastFormData, headers).then(res => res.data);
}
export const requestDomain = () => {
......
......@@ -198,6 +198,8 @@ module.exports = {
e3: "Please enter the picture verification code",
e4: "Agree with PingAn Member Service Agreement",
e5: "Invalidate account or password, please re-enter",
e6: "Your password has been mistyped 4 times. Your account will be locked soon. Please retrieve your password!",
e7: "Your password has been mistyped 5 times. You can't log in again in 24 hours!",
oe0: "Invalidate mobile no. , please re-enter",
oe1: "Please get SMS verification code first",
oe2: "Please enter the picture verification code",
......
......@@ -198,6 +198,8 @@ module.exports = {
e3: "請輸入圖像驗證碼",
e4: "請同意《平安賬戶會員服務協議》",
e5: "賬號或密碼不正確",
e6: "您的密碼已輸錯4次,帳戶即將被鎖定,請找回密碼!",
e7: "您的密碼已輸錯5次,24小時內無法再登入!",
oe0: "請輸入正確的手機號",
oe1: "請先獲取短信驗證碼",
oe2: "請輸入圖片驗證碼",
......
......@@ -198,6 +198,8 @@ module.exports = {
e3: "请输入图像验证码",
e4: "请同意《平安账户会员服务协议》",
e5: "账号或密码不正确",
e6: "您的密码已输错4次,账户即将被锁定,请找回密码!",
e7: "您的密码已输错5次, 24小时内无法再登录!",
oe0: "请输入正确的手机号",
oe1: "请先获取短信验证码",
oe2: "请输入图片验证码",
......
......@@ -25,10 +25,10 @@ export default {
loading: false,
showTips: false,
data: {
// firstName: "玛丽",
// lastName: "",
// birthDate: "15-07-1999",
// idNo: "H4099030",
// firstName: "珊珊",
// lastName: "",
// birthDate: "01-01-2000",
// idNo: "84555455",
// idType: "40"
firstName: "",
......
......@@ -73,23 +73,43 @@ export default {
overlay: {
type: Function,
default: null
},
showType: {
type: String,
default: "owner"
}
},
data() {
return {
key: 'value',
frontPicSrc: null,
backPicSrc: null,
frontPicFile: null,
backPicFile: null
ownerFrontPicSrc: null,
ownerBackPicSrc: null,
ownerFrontPicFile: null,
ownerBackPicFile: null,
insuredFrontPicSrc: null,
insuredBackPicSrc: null,
insuredFrontPicFile: null,
insuredBackPicFile: null
}
},
components: {},
computed: {
submitBtnDisabled() {
let b1 = this.frontPicFile ? false : true;
let b2 = this.backPicFile ? false : true;
return b1 || b2;
let b = false;
if (this.showType == "owner" || this.showType == "both") {
let b1 = this.ownerFrontPicSrc ? false : true;
let b2 = this.ownerBackPicSrc ? false : true;
b = b1 || b2;
}
if (this.showType == "insured" || this.showType == "both") {
let b3 = this.insuredFrontPicSrc ? false : true;
let b4 = this.insuredBackPicSrc ? false : true;
b = b || b3 || b4;
}
return b;
}
},
methods: {
......@@ -98,7 +118,13 @@ export default {
if (this.submitBtnDisabled) {
return;
}
this.$emit("onSubmit", { front: this.frontPicFile, back: this.backPicFile });
this.$emit("onSubmit", {
ownerFrontPicFile: this.ownerFrontPicFile,
ownerBackPicFile: this.ownerBackPicFile,
insuredFrontPicFile: this.insuredFrontPicFile,
insuredBackPicFile: this.insuredBackPicFile
});
},
handlePicSelect(type) {
let _this = this;
......@@ -108,17 +134,35 @@ export default {
input.onchange = function (val) {
var reader = new FileReader();
reader.onload = function (e) {
if (type == 'front') {
_this.$set(_this, 'frontPicSrc', reader.result);
} else {
_this.$set(_this, 'backPicSrc', reader.result);
switch (type) {
case "ownerFront":
_this.$set(_this, 'ownerFrontPicSrc', reader.result);
break;
case "ownerBack":
_this.$set(_this, 'ownerBackPicSrc', reader.result);
break;
case "insuredFront":
_this.$set(_this, 'insuredFrontPicSrc', reader.result);
break;
case "insuredBack":
_this.$set(_this, 'insuredBackPicSrc', reader.result);
break;
}
}
let file = input.files[0];
if (type == 'front') {
_this.$set(_this, 'frontPicFile', file);
} else {
_this.$set(_this, 'backPicFile', file);
switch (type) {
case "ownerFront":
_this.$set(_this, 'ownerFrontPicFile', file);
break;
case "ownerBack":
_this.$set(_this, 'ownerBackPicFile', file);
break;
case "insuredFront":
_this.$set(_this, 'insuredFrontPicFile', file);
break;
case "insuredBack":
_this.$set(_this, 'insuredBackPicFile', file);
break;
}
reader.readAsDataURL(file);
};
......@@ -144,5 +188,6 @@ export default {
}
},
mounted() { },
created() { }
created() {
}
}
......
......@@ -76,6 +76,8 @@
img {
width: 100%;
max-width: 14.75rem;
max-height: 10rem;
}
}
}
......
......@@ -7,15 +7,28 @@
{{$t('form.modalUploadCard.tit')}}
<img @click="onCloseHandler()" class="close-btn pointer" :src="require('@assets/images/common/icon-modal-simple-close.png')">
</div>
<div class="modal-content">
<div class="modal-content" v-if="showType == 'owner' || showType == 'both'">
<div class="gird-g upload">
<div class="pure-u-1 pure-u-md-1-2 upload-item">
<div class="tit"> {{$t('policyChangeInformation.owner')}} {{$t('form.modalUploadCard.front')}}</div>
<img class="poster pointer" :src="ownerFrontPicSrc || require('@assets/images/common/card-front.png')" alt="" @click="handlePicSelect('ownerFront')">
</div>
<div class="pure-u-1 pure-u-md-1-2 upload-item">
<div class="tit"> {{$t('policyChangeInformation.owner')}} {{$t('form.modalUploadCard.back')}}</div>
<img class="poster pointer" :src="ownerBackPicSrc || require('@assets/images/common/card-back.png')" alt="" @click="handlePicSelect('ownerBack')">
</div>
</div>
</div>
<div class="modal-content" v-if="showType == 'insured' || showType == 'both'">
<div class="gird-g upload">
<div class="pure-u-1 pure-u-md-1-2 upload-item">
<div class="tit"> {{$t('form.modalUploadCard.front')}}</div>
<img class="poster pointer" :src="frontPicSrc || require('@assets/images/common/card-front.png')" alt="" @click="handlePicSelect('front')">
<div class="tit"> {{$t('policyChangeInformation.insured')}} {{$t('form.modalUploadCard.front')}}</div>
<img class="poster pointer" :src="insuredFrontPicSrc || require('@assets/images/common/card-front.png')" alt="" @click="handlePicSelect('insuredFront')">
</div>
<div class="pure-u-1 pure-u-md-1-2 upload-item">
<div class="tit"> {{$t('form.modalUploadCard.back')}}</div>
<img class="poster pointer" :src="backPicSrc || require('@assets/images/common/card-back.png')" alt="" @click="handlePicSelect('back')">
<div class="tit"> {{$t('policyChangeInformation.insured')}} {{$t('form.modalUploadCard.back')}}</div>
<img class="poster pointer" :src="insuredBackPicSrc || require('@assets/images/common/card-back.png')" alt="" @click="handlePicSelect('insuredBack')">
</div>
</div>
</div>
......
<template>
<div class="comp" v-if="policyDetail && showPolicy">
<modal2-comp :visible="showSuccessTip" :close="()=>{showSuccessTip = false}" :content="$t('vhis.tip6')" :target="$t('vhis.tip7')" @targetCallbak="toTarget"></modal2-comp>
<modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')" ></modal2-comp>
<div @click="handleIgnorePolicy" class="overlay"></div>
<div class="border">
<div class="close" @click="onOverLayHandler()"><img src="@/assets/images/vhis/close.png"></div>
<div class="modal">
<div class="content">
<div class="title">{{$t('vhis.title')}}{{$t('vhis.titleAft')}}</div>
<div class="statement">
<div class="desc orange" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc1')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc2')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc3')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc4')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc5')}}</div>
</div>
<hr class="line1">
<div class="form ">
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label1')}}</div>
<div class="value orange">
<span>{{policyDetail.policyCode}}</span>
</div>
<div>
<div class="comp" v-if="policyDetail && showPolicy">
<div @click="handleIgnorePolicy" class="overlay"></div>
<div class="border">
<div class="close" @click="onOverLayHandler()"><img src="@/assets/images/vhis/close.png"></div>
<div class="modal">
<div class="content">
<div class="title">{{$t('vhis.title')}}{{$t('vhis.titleAft')}}</div>
<div class="statement">
<div class="desc orange" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc1')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc2')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc3')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc4')}}</div>
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc5')}}</div>
</div>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label2')}}</div>
<div class="value orange">
<span>{{formatPolicyName(policyDetail.productCode,policyDetail.productName)}}</span>
<hr class="line1">
<div class="form ">
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label1')}}</div>
<div class="value orange">
<span>{{policyDetail.policyCode}}</span>
</div>
</div>
</div>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label3')}}</div>
<div class="value">
<span class="orange">{{policyDetail.ymd1}}</span>
<span>{{$t('vhis.ymd1')}}</span>
<span class="orange">{{policyDetail.ymd2}}</span>
<span>{{$t('vhis.ymd2')}}</span>
<span class="orange">{{policyDetail.ymd3}}</span>
<span>{{$t('vhis.ymd3')}}</span>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label2')}}</div>
<div class="value orange">
<span>{{formatPolicyName(policyDetail.productCode,policyDetail.productName)}}</span>
</div>
</div>
</div>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label4')}}</div>
<div class="value orange">
<template v-if="locale == 'en'">
<span>{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}</span>
</template>
<template v-else>
<span>{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}</span>
</template>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label3')}}</div>
<div class="value">
<span class="orange">{{policyDetail.ymd1}}</span>
<span>{{$t('vhis.ymd1')}}</span>
<span class="orange">{{policyDetail.ymd2}}</span>
<span>{{$t('vhis.ymd2')}}</span>
<span class="orange">{{policyDetail.ymd3}}</span>
<span>{{$t('vhis.ymd3')}}</span>
</div>
</div>
</div>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label5')}}:</div>
<div class="value orange">
<template v-if="locale == 'en'">
<span>{{policyDetail.insuredNameEn ? policyDetail.insuredNameEn : policyDetail.insuredNameCn}}</span>
</template>
<template v-else>
<span>{{policyDetail.insuredNameCn ? policyDetail.insuredNameCn : policyDetail.insuredNameEn}}</span>
</template>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label4')}}</div>
<div class="value orange">
<template v-if="locale == 'en'">
<span>{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}</span>
</template>
<template v-else>
<span>{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}</span>
</template>
</div>
</div>
</div>
</div>
<div class="download">
<div class="border2 download-item" @click="downloadPolicy">
<div class="cont">
<img class="icon" src="@/assets/images/vhis/vhis-download.png">
<span class="t1">{{$t('vhis.btn1')}}</span>
<div class="form-item">
<div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label5')}}:</div>
<div class="value orange">
<template v-if="locale == 'en'">
<span>{{policyDetail.insuredNameEn ? policyDetail.insuredNameEn : policyDetail.insuredNameCn}}</span>
</template>
<template v-else>
<span>{{policyDetail.insuredNameCn ? policyDetail.insuredNameCn : policyDetail.insuredNameEn}}</span>
</template>
</div>
</div>
</div>
</div>
<hr class="line1">
<div class="bottom-wrap ">
<div class="notice" :class="{'ltz':locale == 'en'}">
<span>{{$t('vhis.tip1')}}</span>
<span class="orange">
<template v-if="locale == 'en'">
{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}
</template>
<template v-else>
{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}
</template>
</span>
<span>{{$t('vhis.tip2')}}</span>
<span class="orange">{{policyDetail.nowYmd1}}</span>
<span>{{$t('vhis.ymd1')}}</span>
<span class="orange">{{policyDetail.nowYmd2}}</span>
<span>{{$t('vhis.ymd2')}}</span>
<span class="orange">{{policyDetail.nowYmd3}}</span>
<span>{{$t('vhis.ymd3')}}{{$t('vhis.tip3')}}</span>
</div>
<div class="btn-wrap">
<div class="submit-btn flex-center " @click="handleConfirmPolicy">
<van-loading v-if="loading" />
{{$t('vhis.btn2')}}
<div class="download">
<div class="border2 download-item" @click="downloadPolicy">
<div class="cont">
<img class="icon" src="@/assets/images/vhis/vhis-download.png">
<span class="t1">{{$t('vhis.btn1')}}</span>
</div>
</div>
<div class="submit-btn " @click="handleIgnorePolicy">{{$t('vhis.btn3')}}</div>
</div>
<div class="flex-center contact">
{{$t('vhis.tip4')}}
<span class="pointer" @click="toContact()">{{$t('vhis.tip5')}}</span>
<hr class="line1">
<div class="bottom-wrap ">
<div class="notice" :class="{'ltz':locale == 'en'}">
<span>{{$t('vhis.tip1')}}</span>
<span class="orange">
<template v-if="locale == 'en'">
{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}
</template>
<template v-else>
{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}
</template>
</span>
<span>{{$t('vhis.tip2')}}</span>
<span class="orange">{{policyDetail.nowYmd1}}</span>
<span>{{$t('vhis.ymd1')}}</span>
<span class="orange">{{policyDetail.nowYmd2}}</span>
<span>{{$t('vhis.ymd2')}}</span>
<span class="orange">{{policyDetail.nowYmd3}}</span>
<span>{{$t('vhis.ymd3')}}{{$t('vhis.tip3')}}</span>
</div>
<div class="btn-wrap">
<div class="submit-btn flex-center " @click="handleConfirmPolicy">
<van-loading v-if="loading" />
{{$t('vhis.btn2')}}
</div>
<div class="submit-btn " @click="handleIgnorePolicy">{{$t('vhis.btn3')}}</div>
</div>
<div class="flex-center contact">
{{$t('vhis.tip4')}}
<span class="pointer" @click="toContact()">{{$t('vhis.tip5')}}</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<modal2-comp :visible="showSuccessTip" :close="()=>{showSuccessTip = false}" :content="$t('vhis.tip6')" :target="$t('vhis.tip7')" @targetCallbak="toTarget"></modal2-comp>
<modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')" ></modal2-comp>
</div>
</template>
......
......@@ -99,7 +99,8 @@ function initQueryConfig() {
PK: rsaKey1,
E: rsaKeyIndex1,
vhis: vhis1,
policies: policies
policies: policies,
oneAccountCenterOff: process.env.VUE_APP_ONE_ACCOUNT_CENTER_OFF == "true" ? true : false
};
httpGet({
......
......@@ -2,7 +2,7 @@
<template>
<div>
<auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true" ref="auth" :tipModel="'m2'"></auth>
<modal-upload-card-comp :visible="modalUploadCardVisiable" :show-confirm="true" @close="modalUploadCardVisiable=false" @onSubmit="handleUpdatePolicyWithFile"></modal-upload-card-comp>
<modal-upload-card-comp v-if="modalUploadCardVisiable" :visible="modalUploadCardVisiable" :showType="showType" :show-confirm="true" @close="modalUploadCardVisiable=false" @onSubmit="handleUpdatePolicyWithFile"></modal-upload-card-comp>
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<template v-if="showForm">
......@@ -29,7 +29,8 @@
<div class="icon"><img src="@/assets/images/policy-change-information/icon-pci-info.png"></div> {{$t('policyChangeInformation.name')}}
</div>
<div class="ipt-wrap">
<input class="ipt" type="text" v-model="data.name">
<input v-if="locale == 'en'" class="ipt" type="text" v-model="data.nameEn">
<input v-else class="ipt" type="text" v-model="data.nameCn">
</div>
</div>
......
......@@ -226,7 +226,7 @@ export default {
this.initData();
setTimeout(() => {
console.log("queryConfigData:", this.$root.queryConfigData);
// console.log("queryConfigData:", this.$root.queryConfigData);
// console.log("queryConfigData:", window.vueInstance.queryConfigData); // 挂载到windows的访问方法
// 放localStorage直接是localStorage.getItem("queryConfig");
}, 3000)
......
......@@ -128,6 +128,9 @@ export default {
let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false;
let b2 = this.values.passwordRepeat != this.values.password ? true : false;
return b1 || b2;
},
oneAccountCenterOff() {
return window.global.oneAccountCenterOff;
}
},
methods: {
......@@ -181,7 +184,6 @@ export default {
let mobileOptions = JSON.parse(JSON.stringify(this.i18n.register.mobileOptions));
this.mobileOptions = mobileOptions;
this.mobileTip = this.mobileOptions[0];
console.log(this.mobileOptions)
},
handlerIsShowImageVcode() {
return new Promise((resolve, reject) => {
......@@ -217,19 +219,55 @@ export default {
// 刷新图形二维码
},
handlerLogin() {
if ((this.type == 1 && this.pwdLoginDisabled) || (this.type == 2 && this.otpLoginDisabled)) {
return;
if (this.oneAccountCenterOff) {
this.selfLogin();
} else {
if ((this.type == 1 && this.pwdLoginDisabled) || (this.type == 2 && this.otpLoginDisabled)) {
return;
}
this.refreshDeviceId();
if (!this.loginCheck.agreeProtocol) {
this._showAgreeProtocalTips();
return;
}
if (this.type == 1) {
this._passwordLogin();
} else {
this._otpLogin();
}
}
this.refreshDeviceId();
if (!this.loginCheck.agreeProtocol) {
this._showAgreeProtocalTips();
},
selfLogin() {
if (this.loading) {
return;
}
if (this.type == 1) {
this._passwordLogin();
} else {
this._otpLogin();
}
this.loading = true;
let data = {
account: this.loginForm.userId,
password: this.loginForm.password
};
httpPost({
url: api.doLoginV2,
data: data
}).then(res => {
this.loading = false;
this.$store.commit("SET_USER_INFO", res);
this._redirectTo();
}).catch(e => {
this.loading = false;
switch (e.code) {
case 404:
this.errorTips.e2 = this.i18n.login.tips.e5;
break;
case 1102:
this.errorTips.e2 = this.i18n.login.tips.e6;
break;
case 1101:
this.errorTips.e2 = this.i18n.login.tips.e7;
break;
}
})
},
_passwordLogin() {
// 刷新图形二维码
......
......@@ -13,16 +13,18 @@
<div class="box">
<!-- 帐密登陆 -->
<div v-if="type == 1" class="login">
<!-- <div class="login-tit">
<img v-if="locale == 'zh'" src="@/assets/images/login/login-tit-zh.png">
<img v-if="locale == 'tc'" src="@/assets/images/login/login-tit-tc.png">
<img v-if="locale == 'en'" class="img-en" src="@/assets/images/login/login-tit-en.png">
</div>
<div class="login-nav">
<div @click="onLoginTypeHandler(1)" class="login-nav-tit text-r pointer active">{{$t('login.loginType1')}}</div>
<div class="login-nav-v-line"></div>
<div @click="onLoginTypeHandler(2)" class="login-nav-tit pointer">{{$t('login.loginType2')}}</div>
</div> -->
<template v-if="!oneAccountCenterOff">
<div class="login-tit">
<img v-if="locale == 'zh'" src="@/assets/images/login/login-tit-zh.png">
<img v-if="locale == 'tc'" src="@/assets/images/login/login-tit-tc.png">
<img v-if="locale == 'en'" class="img-en" src="@/assets/images/login/login-tit-en.png">
</div>
<div class="login-nav">
<div @click="onLoginTypeHandler(1)" class="login-nav-tit text-r pointer active">{{$t('login.loginType1')}}</div>
<div class="login-nav-v-line"></div>
<div @click="onLoginTypeHandler(2)" class="login-nav-tit pointer">{{$t('login.loginType2')}}</div>
</div>
</template>
<div class="gird-g form">
<div class="pure-u-1 form-item">
<div class="label">
......@@ -69,7 +71,7 @@
</div>
<div class="login-func">
<div @click="toRegisterPage()" class="login-func-btn pointer">{{$t('login.register')}}</div>
<!-- <div @click="onForgetHandler()" class="login-func-btn pointer">{{$t('login.forget')}}</div> -->
<div v-if="!oneAccountCenterOff" @click="onForgetHandler()" class="login-func-btn pointer">{{$t('login.forget')}}</div>
</div>
</div>
......
......@@ -10,6 +10,7 @@ import {
import Auth from '@components/auth/auth.vue';
import modalComp from '@/components/modal-comp/modal-comp.vue';
import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
import Modal2Comp from '@/components/modal2-comp/modal2-comp.vue';
import { passwordEncrypt } from '@/utils/encrypt.js';
import Vue from 'vue';
import { Loading } from 'vant';
......@@ -20,6 +21,7 @@ export default {
return {
loading: false,
showForm: false,
showError: false,
key: 'value',
type: 1, // 1:输入用户信息 2:找回密码 3:核对信息 4.重置密码
values: {
......@@ -65,6 +67,9 @@ export default {
this.modalVisiable = false;
this.modalSimpleVisiable = false;
},
oneAccountCenterOff() {
return window.global.oneAccountCenterOff;
},
resetPwd() {
if (this.submitBtnDisabled) {
return;
......@@ -94,8 +99,15 @@ export default {
}
this.loading = true;
let url = api.changePassword;
if (this.oneAccountCenterOff) {
url = api.changePasswordV2;
newPwd = this.values.pwd;
oldPwd = this.values.oldPwd;
}
httpPost({
url: api.changePassword,
url: url,
data: {
oldPwd: oldPwd,
newPwd: newPwd
......@@ -111,8 +123,8 @@ export default {
this.showModal(message, "succ");
break
case "COMMON_ERROR_E0":
message = this.i18n().session.sidExpire;
this.targetPath = "/login?callback=/password/reset";
message = this.i18n().session.sidExpire;
this.step.error2 = message;
// this.showModal(message, "info");
break;
......@@ -123,10 +135,15 @@ export default {
}).catch(err => {
this.loading = false;
let message = this.i18n().session.sidExpire;
this.targetPath = "/login?callback=/password/reset";
this.step.error2 = message;
// this.showModal(message, "info");
if (err.code == 404) {
this.showError = true;
}
});
},
sessionLostModalClose() {
this.targetPath = "/login?callback=/password/reset";
this.$router.push({
path: this.targetPath
});
},
checkPassword(password) {
......@@ -162,9 +179,9 @@ export default {
}
},
userLogout() {
this.$router.push({
path: "/"
});
// this.$router.push({
// path: "/"
// });
this.showForm = false;
},
userLogin(data) {
......@@ -222,6 +239,7 @@ export default {
components: {
modalComp,
modalSimpleComp,
Auth
Auth,
Modal2Comp
}
}
......
......@@ -3,6 +3,7 @@
<div>
<modal-simple-comp :visible="modalSimpleVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="closeModal" :overlay="closeModal" :close="closeModal"></modal-simple-comp>
<modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
<modal2-comp :visible="showError" :close="sessionLostModalClose" :content="$t('glbalTips.sessionLost')" ></modal2-comp>
<div class="ebg"></div>
<div class="content">
<div class="top-space"></div>
......
......@@ -87,10 +87,21 @@ export default {
let b4 = !checkVerifyCode(this.registerForm.opt);
return b1 || b2 || b3 || b4;
},
registerDisabledV2() {
let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false;
let b2 = this.values.passwordRepeat != this.values.password ? true : false;
let b3 = !this.registerCheck.agreeProtocol;
let b4 = !this.registerForm.mobileNo ? true : false;
return b1 || b2 || b3 || b4;
},
submitDisabled() {
let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false;
let b2 = this.values.passwordRepeat != this.values.password ? true : false;
return b1 || b2;
},
oneAccountCenterOff() {
return window.global.oneAccountCenterOff;
}
},
methods: {
......@@ -255,6 +266,37 @@ export default {
});
});
},
registerV2Handler() {
if (this.registerDisabledV2) {
return;
}
if (this.loading) {
return;
}
this._checkMobileLegal().then(() => {
let data = {
account: this.registerForm.mobileNo,
password: this.values.password
}
this.loading = true;
httpPost({
url: api.doRegisterV2,
data: data
}).then(res => {
this.loading = false;
this.$store.commit("SET_USER_INFO", res);
this._showSuccessMessage();
}).catch(e => {
this.loading = false;
switch (e.code) {
case 1103:
let message = this.i18n.register.tips.e5;
this.errorTips.p1 = message;
break;
}
})
});
},
_validateOTPandRepeat() {
return new Promise((resolve, reject) => {
let data = {
......
......@@ -6,7 +6,7 @@
<!-- 会员协议 -->
<modal-protocol-comp :visible="modalProtocolVisiable" :overlay="closeModal" :close="closeModal"></modal-protocol-comp>
<div class="ebg"></div>
<div class="content">
<div class="content" v-if="!oneAccountCenterOff">
<div class="top-space"></div>
<div class="step">
<img v-if="type == 1" src="@/assets/images/register/register-step-1.png">
......@@ -16,11 +16,11 @@
<!-- 手机验证 -->
<div v-if="type == 1" class="login">
<!-- <div class="login-tit">
<div class="login-tit">
<img v-if="locale == 'zh'" src="@/assets/images/login/login-tit-zh.png">
<img v-if="locale == 'tc'" src="@/assets/images/login/login-tit-tc.png">
<img v-if="locale == 'en'" class="img-en" src="@/assets/images/login/login-tit-en.png">
</div> -->
</div>
<div class="login-tit2">{{$t('register.title')}}</div>
<div class="gird-g form">
<!-- <div class="pure-u-1 form-item">
......@@ -124,6 +124,74 @@
</div>
</div>
</div>
<div class="content" v-else>
<div class="top-space"></div>
<div class="box">
<!-- 手机验证 -->
<div class="login">
<div class="gird-g form">
<div class="pure-u-1 form-item">
<div class="label">
<img src="@/assets/images/register/icon-register-phone.png"> {{mobileTip.name}}
</div>
<div class="ipt-wrap">
<div class="region-tel ipt-wrap">
<img class="down-arrow" src="@/assets/images/reservation/re-down-arrow.png" alt="">
<el-select class="ipt" v-model="mobileNoType">
<el-option v-for="(item,index) in mobileOptions" :key="index" :value="item.type" :label="item.areaCode">{{item.areaCode}}</el-option>
</el-select>
</div>
<div class="ipt ipt2" :class="{err : errorTips.p1.length > 0}">
<input :placeholder="mobileTip.placeHolder" class="ipt-tel" type="text" v-model="registerForm.mobileNo">
</div>
</div>
<div class="validator" v-if="errorTips.p1.length > 0 ">
<img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.p1}}
</div>
</div>
<div class="pure-u-1 form-item">
<div class="label">
<img src="@/assets/images/register/icon-register-lock.png"> {{$t('register.newPassword')}}
</div>
<div class="ipt-wrap">
<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}}
</div>
</div>
<div class="pure-u-1 form-item">
<div class="label">
<img src="@/assets/images/register/icon-register-lock.png"> {{$t('register.newPasswordSure')}}
</div>
<div class="ipt-wrap">
<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}}
</div>
</div>
</div>
<div class="login-protocol pointer" @click="registerCheck.agreeProtocol = !registerCheck.agreeProtocol">
<img v-if="!registerCheck.agreeProtocol" class="check" src="@/assets/images/login/uncheck.png">
<img v-if="registerCheck.agreeProtocol" class="check" src="@/assets/images/login/check.png"> {{$t('login.agree')}} &nbsp;
<span @click="onProtocolHandler()" class="protocol pointer">{{$t('login.protocol')}}</span>
</div>
<div @click="registerV2Handler()" class="login-submit pointer flex-center" :class="{disabled: registerDisabledV2}">
<van-loading v-if="loading" />
<span>{{$t('register.register')}}</span>
</div>
</div>
</div>
</div>
</div>
</template>
......