6075dcf6 by joe

1

1 parent fe2f08ad
...@@ -4,4 +4,6 @@ VUE_APP_BASE_URL= 'https://ow.go.qudone.com' ...@@ -4,4 +4,6 @@ VUE_APP_BASE_URL= 'https://ow.go.qudone.com'
4 4
5 5
6 VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB' 6 VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB'
7 VUE_APP_CONTENT_ENCRYPT_SWITCH = true
...\ No newline at end of file ...\ No newline at end of file
7 VUE_APP_CONTENT_ENCRYPT_SWITCH = true
8
9 VUE_APP_ONE_ACCOUNT_CENTER_OFF = true
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -5,3 +5,5 @@ VUE_APP_BASE_URL= 'https://ow.go.qudone.com' ...@@ -5,3 +5,5 @@ VUE_APP_BASE_URL= 'https://ow.go.qudone.com'
5 5
6 VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB' 6 VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB'
7 VUE_APP_CONTENT_ENCRYPT_SWITCH = true 7 VUE_APP_CONTENT_ENCRYPT_SWITCH = true
8
9 VUE_APP_ONE_ACCOUNT_CENTER_OFF = true
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -4,3 +4,5 @@ VUE_APP_BASE_URL= '' ...@@ -4,3 +4,5 @@ VUE_APP_BASE_URL= ''
4 4
5 VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB' 5 VUE_APP_CONTENT_ENCRYPT_KEY = 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDA1SNj4qiOEmvTkZfp+Gt0UOLTCdxuEqRE+k0fROhgZdN2GmtDg6jcZV/CXKdwQGGdwOYdxEngRQb2K/SXd5Rnu4MkuAoHopDNrBRVqoJNQi6VOv6fvAEzeYivtS9aMM7IvdZuN1QlASCz2vxfUKJ3BaijMQqQE9m0pVm+0BDEfwIDAQAB'
6 VUE_APP_CONTENT_ENCRYPT_SWITCH = true 6 VUE_APP_CONTENT_ENCRYPT_SWITCH = true
7
8 VUE_APP_ONE_ACCOUNT_CENTER_OFF = true
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -21,6 +21,7 @@ module.exports = { ...@@ -21,6 +21,7 @@ module.exports = {
21 stdRegister: "/pingan_hklife_webapi/auth/stdRegister", 21 stdRegister: "/pingan_hklife_webapi/auth/stdRegister",
22 // 修改密码 22 // 修改密码
23 changePassword: "/pingan_hklife_webapi/user/password/change", 23 changePassword: "/pingan_hklife_webapi/user/password/change",
24 changePasswordV2: "/pingan_hklife_webapi/user/password/changeV2",
24 // 短信验证码登录 25 // 短信验证码登录
25 otpLogin: "/pingan_hklife_webapi/user/otpLogin", 26 otpLogin: "/pingan_hklife_webapi/user/otpLogin",
26 // 短信验证码登录 27 // 短信验证码登录
...@@ -54,8 +55,10 @@ module.exports = { ...@@ -54,8 +55,10 @@ module.exports = {
54 updatePolicyContanct : "/pingan_hklife_webapi/policy/updateContacts", 55 updatePolicyContanct : "/pingan_hklife_webapi/policy/updateContacts",
55 // 保单客戶資料變更 56 // 保单客戶資料變更
56 updatePolicyInfo : "/pingan_hklife_webapi/policy/updateInfo", 57 updatePolicyInfo : "/pingan_hklife_webapi/policy/updateInfo",
58 updatePolicyInfoV2 : "/pingan_hklife_webapi/policy/updatePolicyInfo",
57 // 证件上传 59 // 证件上传
58 idPicUpload : "/pingan_hklife_webapi/policy/idPicUpload", 60 idPicUpload : "/pingan_hklife_webapi/policy/idPicUpload",
61 updateIdFileV2 : "/pingan_hklife_webapi/policy/updateIdFileV2",
59 // 回销回执 62 // 回销回执
60 policyReceipt : "/pingan_hklife_webapi/policy/policyReceipt", 63 policyReceipt : "/pingan_hklife_webapi/policy/policyReceipt",
61 // 获取电子保单下载code 64 // 获取电子保单下载code
...@@ -82,5 +85,9 @@ module.exports = { ...@@ -82,5 +85,9 @@ module.exports = {
82 companyOutline : "/pingan_hklife_webapi/cms/company/outline", 85 companyOutline : "/pingan_hklife_webapi/cms/company/outline",
83 productInfo : "/pingan_hklife_webapi/cms/product", 86 productInfo : "/pingan_hklife_webapi/cms/product",
84 87
85 config : "/pingan_hklife_webapi/config" 88 config : "/pingan_hklife_webapi/config",
89
90 // 为了香港上线而增加的身份自行管理接口
91 doLoginV2 : "/pingan_hklife_webapi/user/loginv2",
92 doRegisterV2 : "/pingan_hklife_webapi/user/registerv2"
86 } 93 }
...\ No newline at end of file ...\ No newline at end of file
......
1 import axiosIns from 'axios'; 1 import axiosIns from 'axios';
2 import state from '@/store/state.js'; 2 import state from '@/store/state.js';
3 import { SET_USER_INFO } from '@/store/mutations.js';
3 import CryptoJS from "crypto-js"; 4 import CryptoJS from "crypto-js";
4 import JsEncrypt from "jsencrypt"; 5 import JsEncrypt from "jsencrypt";
5 6
...@@ -51,7 +52,7 @@ function Toast(msg) { ...@@ -51,7 +52,7 @@ function Toast(msg) {
51 // let base = COM.baseUrl; 52 // let base = COM.baseUrl;
52 // console.log(process.env); 53 // console.log(process.env);
53 let baseURL = process.env.VUE_APP_BASE_URL; 54 let baseURL = process.env.VUE_APP_BASE_URL;
54 // let baseURL = "http://localhost:9101"; 55 // baseURL = "http://localhost:9101";
55 if (window.location.href.indexOf("192.168") != -1) { 56 if (window.location.href.indexOf("192.168") != -1) {
56 baseURL = "https://ow.go.qudone.com"; 57 baseURL = "https://ow.go.qudone.com";
57 } 58 }
...@@ -71,6 +72,7 @@ let encryptPattern = [ ...@@ -71,6 +72,7 @@ let encryptPattern = [
71 72
72 let encryptWhileList = [ 73 let encryptWhileList = [
73 "/pingan_hklife_webapi/policy/idPicUpload", 74 "/pingan_hklife_webapi/policy/idPicUpload",
75 "/pingan_hklife_webapi/policy/updateIdFileV2",
74 "/pingan_hklife_webapi/policy/clarmsUpload" 76 "/pingan_hklife_webapi/policy/clarmsUpload"
75 ] 77 ]
76 78
...@@ -107,6 +109,9 @@ axios.interceptors.response.use( ...@@ -107,6 +109,9 @@ axios.interceptors.response.use(
107 if (response.data.code === 200) { 109 if (response.data.code === 200) {
108 return Promise.resolve(response); 110 return Promise.resolve(response);
109 } else { 111 } else {
112 if (response.data.code === 404) {
113 SET_USER_INFO(state, null);
114 }
110 // Toast(response.data.bizMsg); 115 // Toast(response.data.bizMsg);
111 return Promise.reject(response.data); 116 return Promise.reject(response.data);
112 } 117 }
...@@ -129,10 +134,10 @@ axios.interceptors.response.use( ...@@ -129,10 +134,10 @@ axios.interceptors.response.use(
129 } 134 }
130 }); 135 });
131 break; 136 break;
132 // 403 token过期 137 // 403 token过期
133 // 登录过期对用户进行提示 138 // 登录过期对用户进行提示
134 // 清除本地token和清空vuex中token对象 139 // 清除本地token和清空vuex中token对象
135 // 跳转登录页面 140 // 跳转登录页面
136 case 403: 141 case 403:
137 Toast({ 142 Toast({
138 message: '登录过期,请重新登录', 143 message: '登录过期,请重新登录',
...@@ -152,7 +157,7 @@ axios.interceptors.response.use( ...@@ -152,7 +157,7 @@ axios.interceptors.response.use(
152 }); 157 });
153 }, 1000); 158 }, 1000);
154 break; 159 break;
155 // 404请求不存在 160 // 404请求不存在
156 case 404: 161 case 404:
157 Toast({ 162 Toast({
158 message: '网络请求不存在', 163 message: '网络请求不存在',
...@@ -160,7 +165,7 @@ axios.interceptors.response.use( ...@@ -160,7 +165,7 @@ axios.interceptors.response.use(
160 forbidClick: true 165 forbidClick: true
161 }); 166 });
162 break; 167 break;
163 // 其他错误,直接抛出错误提示 168 // 其他错误,直接抛出错误提示
164 default: 169 default:
165 Toast({ 170 Toast({
166 message: error.response.data.message, 171 message: error.response.data.message,
...@@ -248,6 +253,7 @@ export const formdata = params => { ...@@ -248,6 +253,7 @@ export const formdata = params => {
248 let { 253 let {
249 url, 254 url,
250 data, 255 data,
256 myFormData,
251 sid, 257 sid,
252 } = params; 258 } = params;
253 let headers = { 259 let headers = {
...@@ -255,15 +261,20 @@ export const formdata = params => { ...@@ -255,15 +261,20 @@ export const formdata = params => {
255 "Content-Type": "multipart/form-data" 261 "Content-Type": "multipart/form-data"
256 } 262 }
257 } 263 }
258 let formData = new FormData(); //使用formData对象 264 let lastFormData = null
259 for (let key in data) { 265 if (data) {
260 formData.append(key, data[key]); 266 lastFormData = new FormData(); //使用formData对象
267 for (let key in data) {
268 lastFormData.append(key, data[key]);
269 }
270 } else {
271 lastFormData = myFormData;
261 } 272 }
262 if (sid) { 273 if (sid) {
263 let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : ""; 274 let sessionId = state.userInfo && state.userInfo.sid ? state.userInfo.sid : "";
264 headers.headers.sid = sessionId; 275 headers.headers.sid = sessionId;
265 } 276 }
266 return axios.post(`${url}`, formData, headers).then(res => res.data); 277 return axios.post(`${url}`, lastFormData, headers).then(res => res.data);
267 } 278 }
268 279
269 export const requestDomain = () => { 280 export const requestDomain = () => {
......
...@@ -198,6 +198,8 @@ module.exports = { ...@@ -198,6 +198,8 @@ module.exports = {
198 e3: "Please enter the picture verification code", 198 e3: "Please enter the picture verification code",
199 e4: "Agree with PingAn Member Service Agreement", 199 e4: "Agree with PingAn Member Service Agreement",
200 e5: "Invalidate account or password, please re-enter", 200 e5: "Invalidate account or password, please re-enter",
201 e6: "Your password has been mistyped 4 times. Your account will be locked soon. Please retrieve your password!",
202 e7: "Your password has been mistyped 5 times. You can't log in again in 24 hours!",
201 oe0: "Invalidate mobile no. , please re-enter", 203 oe0: "Invalidate mobile no. , please re-enter",
202 oe1: "Please get SMS verification code first", 204 oe1: "Please get SMS verification code first",
203 oe2: "Please enter the picture verification code", 205 oe2: "Please enter the picture verification code",
......
...@@ -198,6 +198,8 @@ module.exports = { ...@@ -198,6 +198,8 @@ module.exports = {
198 e3: "請輸入圖像驗證碼", 198 e3: "請輸入圖像驗證碼",
199 e4: "請同意《平安賬戶會員服務協議》", 199 e4: "請同意《平安賬戶會員服務協議》",
200 e5: "賬號或密碼不正確", 200 e5: "賬號或密碼不正確",
201 e6: "您的密碼已輸錯4次,帳戶即將被鎖定,請找回密碼!",
202 e7: "您的密碼已輸錯5次,24小時內無法再登入!",
201 oe0: "請輸入正確的手機號", 203 oe0: "請輸入正確的手機號",
202 oe1: "請先獲取短信驗證碼", 204 oe1: "請先獲取短信驗證碼",
203 oe2: "請輸入圖片驗證碼", 205 oe2: "請輸入圖片驗證碼",
......
...@@ -198,6 +198,8 @@ module.exports = { ...@@ -198,6 +198,8 @@ module.exports = {
198 e3: "请输入图像验证码", 198 e3: "请输入图像验证码",
199 e4: "请同意《平安账户会员服务协议》", 199 e4: "请同意《平安账户会员服务协议》",
200 e5: "账号或密码不正确", 200 e5: "账号或密码不正确",
201 e6: "您的密码已输错4次,账户即将被锁定,请找回密码!",
202 e7: "您的密码已输错5次, 24小时内无法再登录!",
201 oe0: "请输入正确的手机号", 203 oe0: "请输入正确的手机号",
202 oe1: "请先获取短信验证码", 204 oe1: "请先获取短信验证码",
203 oe2: "请输入图片验证码", 205 oe2: "请输入图片验证码",
......
...@@ -25,10 +25,10 @@ export default { ...@@ -25,10 +25,10 @@ export default {
25 loading: false, 25 loading: false,
26 showTips: false, 26 showTips: false,
27 data: { 27 data: {
28 // firstName: "玛丽", 28 // firstName: "珊珊",
29 // lastName: "", 29 // lastName: "",
30 // birthDate: "15-07-1999", 30 // birthDate: "01-01-2000",
31 // idNo: "H4099030", 31 // idNo: "84555455",
32 // idType: "40" 32 // idType: "40"
33 33
34 firstName: "", 34 firstName: "",
......
...@@ -73,23 +73,43 @@ export default { ...@@ -73,23 +73,43 @@ export default {
73 overlay: { 73 overlay: {
74 type: Function, 74 type: Function,
75 default: null 75 default: null
76 },
77 showType: {
78 type: String,
79 default: "owner"
76 } 80 }
77 }, 81 },
78 data() { 82 data() {
79 return { 83 return {
80 key: 'value', 84 key: 'value',
81 frontPicSrc: null, 85 ownerFrontPicSrc: null,
82 backPicSrc: null, 86 ownerBackPicSrc: null,
83 frontPicFile: null, 87 ownerFrontPicFile: null,
84 backPicFile: null 88 ownerBackPicFile: null,
89
90 insuredFrontPicSrc: null,
91 insuredBackPicSrc: null,
92 insuredFrontPicFile: null,
93 insuredBackPicFile: null
85 } 94 }
86 }, 95 },
87 components: {}, 96 components: {},
88 computed: { 97 computed: {
89 submitBtnDisabled() { 98 submitBtnDisabled() {
90 let b1 = this.frontPicFile ? false : true; 99 let b = false;
91 let b2 = this.backPicFile ? false : true; 100 if (this.showType == "owner" || this.showType == "both") {
92 return b1 || b2; 101 let b1 = this.ownerFrontPicSrc ? false : true;
102 let b2 = this.ownerBackPicSrc ? false : true;
103 b = b1 || b2;
104 }
105
106 if (this.showType == "insured" || this.showType == "both") {
107 let b3 = this.insuredFrontPicSrc ? false : true;
108 let b4 = this.insuredBackPicSrc ? false : true;
109
110 b = b || b3 || b4;
111 }
112 return b;
93 } 113 }
94 }, 114 },
95 methods: { 115 methods: {
...@@ -98,7 +118,13 @@ export default { ...@@ -98,7 +118,13 @@ export default {
98 if (this.submitBtnDisabled) { 118 if (this.submitBtnDisabled) {
99 return; 119 return;
100 } 120 }
101 this.$emit("onSubmit", { front: this.frontPicFile, back: this.backPicFile }); 121
122 this.$emit("onSubmit", {
123 ownerFrontPicFile: this.ownerFrontPicFile,
124 ownerBackPicFile: this.ownerBackPicFile,
125 insuredFrontPicFile: this.insuredFrontPicFile,
126 insuredBackPicFile: this.insuredBackPicFile
127 });
102 }, 128 },
103 handlePicSelect(type) { 129 handlePicSelect(type) {
104 let _this = this; 130 let _this = this;
...@@ -108,17 +134,35 @@ export default { ...@@ -108,17 +134,35 @@ export default {
108 input.onchange = function (val) { 134 input.onchange = function (val) {
109 var reader = new FileReader(); 135 var reader = new FileReader();
110 reader.onload = function (e) { 136 reader.onload = function (e) {
111 if (type == 'front') { 137 switch (type) {
112 _this.$set(_this, 'frontPicSrc', reader.result); 138 case "ownerFront":
113 } else { 139 _this.$set(_this, 'ownerFrontPicSrc', reader.result);
114 _this.$set(_this, 'backPicSrc', reader.result); 140 break;
141 case "ownerBack":
142 _this.$set(_this, 'ownerBackPicSrc', reader.result);
143 break;
144 case "insuredFront":
145 _this.$set(_this, 'insuredFrontPicSrc', reader.result);
146 break;
147 case "insuredBack":
148 _this.$set(_this, 'insuredBackPicSrc', reader.result);
149 break;
115 } 150 }
116 } 151 }
117 let file = input.files[0]; 152 let file = input.files[0];
118 if (type == 'front') { 153 switch (type) {
119 _this.$set(_this, 'frontPicFile', file); 154 case "ownerFront":
120 } else { 155 _this.$set(_this, 'ownerFrontPicFile', file);
121 _this.$set(_this, 'backPicFile', file); 156 break;
157 case "ownerBack":
158 _this.$set(_this, 'ownerBackPicFile', file);
159 break;
160 case "insuredFront":
161 _this.$set(_this, 'insuredFrontPicFile', file);
162 break;
163 case "insuredBack":
164 _this.$set(_this, 'insuredBackPicFile', file);
165 break;
122 } 166 }
123 reader.readAsDataURL(file); 167 reader.readAsDataURL(file);
124 }; 168 };
...@@ -144,5 +188,6 @@ export default { ...@@ -144,5 +188,6 @@ export default {
144 } 188 }
145 }, 189 },
146 mounted() { }, 190 mounted() { },
147 created() { } 191 created() {
192 }
148 } 193 }
......
...@@ -76,6 +76,8 @@ ...@@ -76,6 +76,8 @@
76 76
77 img { 77 img {
78 width: 100%; 78 width: 100%;
79 max-width: 14.75rem;
80 max-height: 10rem;
79 } 81 }
80 } 82 }
81 } 83 }
......
...@@ -7,15 +7,28 @@ ...@@ -7,15 +7,28 @@
7 {{$t('form.modalUploadCard.tit')}} 7 {{$t('form.modalUploadCard.tit')}}
8 <img @click="onCloseHandler()" class="close-btn pointer" :src="require('@assets/images/common/icon-modal-simple-close.png')"> 8 <img @click="onCloseHandler()" class="close-btn pointer" :src="require('@assets/images/common/icon-modal-simple-close.png')">
9 </div> 9 </div>
10 <div class="modal-content"> 10
11 <div class="modal-content" v-if="showType == 'owner' || showType == 'both'">
12 <div class="gird-g upload">
13 <div class="pure-u-1 pure-u-md-1-2 upload-item">
14 <div class="tit"> {{$t('policyChangeInformation.owner')}} {{$t('form.modalUploadCard.front')}}</div>
15 <img class="poster pointer" :src="ownerFrontPicSrc || require('@assets/images/common/card-front.png')" alt="" @click="handlePicSelect('ownerFront')">
16 </div>
17 <div class="pure-u-1 pure-u-md-1-2 upload-item">
18 <div class="tit"> {{$t('policyChangeInformation.owner')}} {{$t('form.modalUploadCard.back')}}</div>
19 <img class="poster pointer" :src="ownerBackPicSrc || require('@assets/images/common/card-back.png')" alt="" @click="handlePicSelect('ownerBack')">
20 </div>
21 </div>
22 </div>
23 <div class="modal-content" v-if="showType == 'insured' || showType == 'both'">
11 <div class="gird-g upload"> 24 <div class="gird-g upload">
12 <div class="pure-u-1 pure-u-md-1-2 upload-item"> 25 <div class="pure-u-1 pure-u-md-1-2 upload-item">
13 <div class="tit"> {{$t('form.modalUploadCard.front')}}</div> 26 <div class="tit"> {{$t('policyChangeInformation.insured')}} {{$t('form.modalUploadCard.front')}}</div>
14 <img class="poster pointer" :src="frontPicSrc || require('@assets/images/common/card-front.png')" alt="" @click="handlePicSelect('front')"> 27 <img class="poster pointer" :src="insuredFrontPicSrc || require('@assets/images/common/card-front.png')" alt="" @click="handlePicSelect('insuredFront')">
15 </div> 28 </div>
16 <div class="pure-u-1 pure-u-md-1-2 upload-item"> 29 <div class="pure-u-1 pure-u-md-1-2 upload-item">
17 <div class="tit"> {{$t('form.modalUploadCard.back')}}</div> 30 <div class="tit"> {{$t('policyChangeInformation.insured')}} {{$t('form.modalUploadCard.back')}}</div>
18 <img class="poster pointer" :src="backPicSrc || require('@assets/images/common/card-back.png')" alt="" @click="handlePicSelect('back')"> 31 <img class="poster pointer" :src="insuredBackPicSrc || require('@assets/images/common/card-back.png')" alt="" @click="handlePicSelect('insuredBack')">
19 </div> 32 </div>
20 </div> 33 </div>
21 </div> 34 </div>
......
1 1
2 <template> 2 <template>
3 <div class="comp" v-if="policyDetail && showPolicy"> 3 <div>
4 <modal2-comp :visible="showSuccessTip" :close="()=>{showSuccessTip = false}" :content="$t('vhis.tip6')" :target="$t('vhis.tip7')" @targetCallbak="toTarget"></modal2-comp> 4 <div class="comp" v-if="policyDetail && showPolicy">
5 <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')" ></modal2-comp> 5 <div @click="handleIgnorePolicy" class="overlay"></div>
6 <div @click="handleIgnorePolicy" class="overlay"></div> 6 <div class="border">
7 <div class="border"> 7 <div class="close" @click="onOverLayHandler()"><img src="@/assets/images/vhis/close.png"></div>
8 <div class="close" @click="onOverLayHandler()"><img src="@/assets/images/vhis/close.png"></div> 8 <div class="modal">
9 <div class="modal"> 9 <div class="content">
10 <div class="content"> 10 <div class="title">{{$t('vhis.title')}}{{$t('vhis.titleAft')}}</div>
11 <div class="title">{{$t('vhis.title')}}{{$t('vhis.titleAft')}}</div> 11 <div class="statement">
12 <div class="statement"> 12 <div class="desc orange" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc1')}}</div>
13 <div class="desc orange" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc1')}}</div> 13 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc2')}}</div>
14 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc2')}}</div> 14 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc3')}}</div>
15 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc3')}}</div> 15 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc4')}}</div>
16 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc4')}}</div> 16 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc5')}}</div>
17 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.desc5')}}</div>
18 </div>
19 <hr class="line1">
20 <div class="form ">
21 <div class="form-item">
22 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label1')}}</div>
23 <div class="value orange">
24 <span>{{policyDetail.policyCode}}</span>
25 </div>
26 </div> 17 </div>
27 <div class="form-item"> 18 <hr class="line1">
28 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label2')}}</div> 19 <div class="form ">
29 <div class="value orange"> 20 <div class="form-item">
30 <span>{{formatPolicyName(policyDetail.productCode,policyDetail.productName)}}</span> 21 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label1')}}</div>
22 <div class="value orange">
23 <span>{{policyDetail.policyCode}}</span>
24 </div>
31 </div> 25 </div>
32 </div> 26 <div class="form-item">
33 <div class="form-item"> 27 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label2')}}</div>
34 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label3')}}</div> 28 <div class="value orange">
35 <div class="value"> 29 <span>{{formatPolicyName(policyDetail.productCode,policyDetail.productName)}}</span>
36 <span class="orange">{{policyDetail.ymd1}}</span> 30 </div>
37 <span>{{$t('vhis.ymd1')}}</span>
38 <span class="orange">{{policyDetail.ymd2}}</span>
39 <span>{{$t('vhis.ymd2')}}</span>
40 <span class="orange">{{policyDetail.ymd3}}</span>
41 <span>{{$t('vhis.ymd3')}}</span>
42 </div> 31 </div>
43 </div> 32 <div class="form-item">
44 <div class="form-item"> 33 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label3')}}</div>
45 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label4')}}</div> 34 <div class="value">
46 <div class="value orange"> 35 <span class="orange">{{policyDetail.ymd1}}</span>
47 <template v-if="locale == 'en'"> 36 <span>{{$t('vhis.ymd1')}}</span>
48 <span>{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}</span> 37 <span class="orange">{{policyDetail.ymd2}}</span>
49 </template> 38 <span>{{$t('vhis.ymd2')}}</span>
50 <template v-else> 39 <span class="orange">{{policyDetail.ymd3}}</span>
51 <span>{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}</span> 40 <span>{{$t('vhis.ymd3')}}</span>
52 </template> 41 </div>
53 </div> 42 </div>
54 </div> 43 <div class="form-item">
55 <div class="form-item"> 44 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label4')}}</div>
56 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label5')}}:</div> 45 <div class="value orange">
57 <div class="value orange"> 46 <template v-if="locale == 'en'">
58 <template v-if="locale == 'en'"> 47 <span>{{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}</span>
59 <span>{{policyDetail.insuredNameEn ? policyDetail.insuredNameEn : policyDetail.insuredNameCn}}</span> 48 </template>
60 </template> 49 <template v-else>
61 <template v-else> 50 <span>{{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}</span>
62 <span>{{policyDetail.insuredNameCn ? policyDetail.insuredNameCn : policyDetail.insuredNameEn}}</span> 51 </template>
63 </template> 52 </div>
64 </div> 53 </div>
65 </div> 54 <div class="form-item">
66 55 <div class="desc" :class="{'ltr-zero':locale == 'en'}">{{$t('vhis.label5')}}:</div>
67 </div> 56 <div class="value orange">
68 <div class="download"> 57 <template v-if="locale == 'en'">
69 <div class="border2 download-item" @click="downloadPolicy"> 58 <span>{{policyDetail.insuredNameEn ? policyDetail.insuredNameEn : policyDetail.insuredNameCn}}</span>
70 <div class="cont"> 59 </template>
71 <img class="icon" src="@/assets/images/vhis/vhis-download.png"> 60 <template v-else>
72 <span class="t1">{{$t('vhis.btn1')}}</span> 61 <span>{{policyDetail.insuredNameCn ? policyDetail.insuredNameCn : policyDetail.insuredNameEn}}</span>
62 </template>
63 </div>
73 </div> 64 </div>
65
74 </div> 66 </div>
75 </div> 67 <div class="download">
76 <hr class="line1"> 68 <div class="border2 download-item" @click="downloadPolicy">
77 <div class="bottom-wrap "> 69 <div class="cont">
78 <div class="notice" :class="{'ltz':locale == 'en'}"> 70 <img class="icon" src="@/assets/images/vhis/vhis-download.png">
79 <span>{{$t('vhis.tip1')}}</span> 71 <span class="t1">{{$t('vhis.btn1')}}</span>
80 <span class="orange"> 72 </div>
81 <template v-if="locale == 'en'">
82 {{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}
83 </template>
84 <template v-else>
85 {{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}
86 </template>
87 </span>
88 <span>{{$t('vhis.tip2')}}</span>
89 <span class="orange">{{policyDetail.nowYmd1}}</span>
90 <span>{{$t('vhis.ymd1')}}</span>
91 <span class="orange">{{policyDetail.nowYmd2}}</span>
92 <span>{{$t('vhis.ymd2')}}</span>
93 <span class="orange">{{policyDetail.nowYmd3}}</span>
94 <span>{{$t('vhis.ymd3')}}{{$t('vhis.tip3')}}</span>
95 </div>
96 <div class="btn-wrap">
97 <div class="submit-btn flex-center " @click="handleConfirmPolicy">
98 <van-loading v-if="loading" />
99 {{$t('vhis.btn2')}}
100 </div> 73 </div>
101 <div class="submit-btn " @click="handleIgnorePolicy">{{$t('vhis.btn3')}}</div>
102 </div> 74 </div>
103 <div class="flex-center contact"> 75 <hr class="line1">
104 {{$t('vhis.tip4')}} 76 <div class="bottom-wrap ">
105 <span class="pointer" @click="toContact()">{{$t('vhis.tip5')}}</span> 77 <div class="notice" :class="{'ltz':locale == 'en'}">
78 <span>{{$t('vhis.tip1')}}</span>
79 <span class="orange">
80 <template v-if="locale == 'en'">
81 {{policyDetail.clientNameEn ? policyDetail.clientNameEn : policyDetail.clientNameCn}}
82 </template>
83 <template v-else>
84 {{policyDetail.clientNameCn ? policyDetail.clientNameCn : policyDetail.clientNameEn}}
85 </template>
86 </span>
87 <span>{{$t('vhis.tip2')}}</span>
88 <span class="orange">{{policyDetail.nowYmd1}}</span>
89 <span>{{$t('vhis.ymd1')}}</span>
90 <span class="orange">{{policyDetail.nowYmd2}}</span>
91 <span>{{$t('vhis.ymd2')}}</span>
92 <span class="orange">{{policyDetail.nowYmd3}}</span>
93 <span>{{$t('vhis.ymd3')}}{{$t('vhis.tip3')}}</span>
94 </div>
95 <div class="btn-wrap">
96 <div class="submit-btn flex-center " @click="handleConfirmPolicy">
97 <van-loading v-if="loading" />
98 {{$t('vhis.btn2')}}
99 </div>
100 <div class="submit-btn " @click="handleIgnorePolicy">{{$t('vhis.btn3')}}</div>
101 </div>
102 <div class="flex-center contact">
103 {{$t('vhis.tip4')}}
104 <span class="pointer" @click="toContact()">{{$t('vhis.tip5')}}</span>
105 </div>
106 </div> 106 </div>
107 </div> 107 </div>
108 </div>
109 108
109 </div>
110 </div> 110 </div>
111
111 </div> 112 </div>
112 113
114 <modal2-comp :visible="showSuccessTip" :close="()=>{showSuccessTip = false}" :content="$t('vhis.tip6')" :target="$t('vhis.tip7')" @targetCallbak="toTarget"></modal2-comp>
115 <modal2-comp :visible="showDownloadError" :close="()=>{showDownloadError = false}" :content="$t('glbalTips.sysError')" ></modal2-comp>
113 </div> 116 </div>
114 </template> 117 </template>
115 118
......
...@@ -99,7 +99,8 @@ function initQueryConfig() { ...@@ -99,7 +99,8 @@ function initQueryConfig() {
99 PK: rsaKey1, 99 PK: rsaKey1,
100 E: rsaKeyIndex1, 100 E: rsaKeyIndex1,
101 vhis: vhis1, 101 vhis: vhis1,
102 policies: policies 102 policies: policies,
103 oneAccountCenterOff: process.env.VUE_APP_ONE_ACCOUNT_CENTER_OFF == "true" ? true : false
103 }; 104 };
104 105
105 httpGet({ 106 httpGet({
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <template> 2 <template>
3 <div> 3 <div>
4 <auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true" ref="auth" :tipModel="'m2'"></auth> 4 <auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true" ref="auth" :tipModel="'m2'"></auth>
5 <modal-upload-card-comp :visible="modalUploadCardVisiable" :show-confirm="true" @close="modalUploadCardVisiable=false" @onSubmit="handleUpdatePolicyWithFile"></modal-upload-card-comp> 5 <modal-upload-card-comp v-if="modalUploadCardVisiable" :visible="modalUploadCardVisiable" :showType="showType" :show-confirm="true" @close="modalUploadCardVisiable=false" @onSubmit="handleUpdatePolicyWithFile"></modal-upload-card-comp>
6 <modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp> 6 <modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
7 <template v-if="showForm"> 7 <template v-if="showForm">
8 8
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
29 <div class="icon"><img src="@/assets/images/policy-change-information/icon-pci-info.png"></div> {{$t('policyChangeInformation.name')}} 29 <div class="icon"><img src="@/assets/images/policy-change-information/icon-pci-info.png"></div> {{$t('policyChangeInformation.name')}}
30 </div> 30 </div>
31 <div class="ipt-wrap"> 31 <div class="ipt-wrap">
32 <input class="ipt" type="text" v-model="data.name"> 32 <input v-if="locale == 'en'" class="ipt" type="text" v-model="data.nameEn">
33 <input v-else class="ipt" type="text" v-model="data.nameCn">
33 </div> 34 </div>
34 </div> 35 </div>
35 36
......
...@@ -226,7 +226,7 @@ export default { ...@@ -226,7 +226,7 @@ export default {
226 this.initData(); 226 this.initData();
227 227
228 setTimeout(() => { 228 setTimeout(() => {
229 console.log("queryConfigData:", this.$root.queryConfigData); 229 // console.log("queryConfigData:", this.$root.queryConfigData);
230 // console.log("queryConfigData:", window.vueInstance.queryConfigData); // 挂载到windows的访问方法 230 // console.log("queryConfigData:", window.vueInstance.queryConfigData); // 挂载到windows的访问方法
231 // 放localStorage直接是localStorage.getItem("queryConfig"); 231 // 放localStorage直接是localStorage.getItem("queryConfig");
232 }, 3000) 232 }, 3000)
......
...@@ -128,6 +128,9 @@ export default { ...@@ -128,6 +128,9 @@ export default {
128 let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false; 128 let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false;
129 let b2 = this.values.passwordRepeat != this.values.password ? true : false; 129 let b2 = this.values.passwordRepeat != this.values.password ? true : false;
130 return b1 || b2; 130 return b1 || b2;
131 },
132 oneAccountCenterOff() {
133 return window.global.oneAccountCenterOff;
131 } 134 }
132 }, 135 },
133 methods: { 136 methods: {
...@@ -181,7 +184,6 @@ export default { ...@@ -181,7 +184,6 @@ export default {
181 let mobileOptions = JSON.parse(JSON.stringify(this.i18n.register.mobileOptions)); 184 let mobileOptions = JSON.parse(JSON.stringify(this.i18n.register.mobileOptions));
182 this.mobileOptions = mobileOptions; 185 this.mobileOptions = mobileOptions;
183 this.mobileTip = this.mobileOptions[0]; 186 this.mobileTip = this.mobileOptions[0];
184 console.log(this.mobileOptions)
185 }, 187 },
186 handlerIsShowImageVcode() { 188 handlerIsShowImageVcode() {
187 return new Promise((resolve, reject) => { 189 return new Promise((resolve, reject) => {
...@@ -217,19 +219,55 @@ export default { ...@@ -217,19 +219,55 @@ export default {
217 // 刷新图形二维码 219 // 刷新图形二维码
218 }, 220 },
219 handlerLogin() { 221 handlerLogin() {
220 if ((this.type == 1 && this.pwdLoginDisabled) || (this.type == 2 && this.otpLoginDisabled)) { 222 if (this.oneAccountCenterOff) {
221 return; 223 this.selfLogin();
224 } else {
225 if ((this.type == 1 && this.pwdLoginDisabled) || (this.type == 2 && this.otpLoginDisabled)) {
226 return;
227 }
228 this.refreshDeviceId();
229 if (!this.loginCheck.agreeProtocol) {
230 this._showAgreeProtocalTips();
231 return;
232 }
233 if (this.type == 1) {
234 this._passwordLogin();
235 } else {
236 this._otpLogin();
237 }
222 } 238 }
223 this.refreshDeviceId(); 239 },
224 if (!this.loginCheck.agreeProtocol) { 240 selfLogin() {
225 this._showAgreeProtocalTips(); 241 if (this.loading) {
226 return; 242 return;
227 } 243 }
228 if (this.type == 1) { 244 this.loading = true;
229 this._passwordLogin(); 245 let data = {
230 } else { 246 account: this.loginForm.userId,
231 this._otpLogin(); 247 password: this.loginForm.password
232 } 248 };
249 httpPost({
250 url: api.doLoginV2,
251 data: data
252 }).then(res => {
253 this.loading = false;
254 this.$store.commit("SET_USER_INFO", res);
255 this._redirectTo();
256 }).catch(e => {
257 this.loading = false;
258 switch (e.code) {
259 case 404:
260 this.errorTips.e2 = this.i18n.login.tips.e5;
261 break;
262 case 1102:
263 this.errorTips.e2 = this.i18n.login.tips.e6;
264 break;
265 case 1101:
266 this.errorTips.e2 = this.i18n.login.tips.e7;
267 break;
268 }
269 })
270
233 }, 271 },
234 _passwordLogin() { 272 _passwordLogin() {
235 // 刷新图形二维码 273 // 刷新图形二维码
......
...@@ -13,16 +13,18 @@ ...@@ -13,16 +13,18 @@
13 <div class="box"> 13 <div class="box">
14 <!-- 帐密登陆 --> 14 <!-- 帐密登陆 -->
15 <div v-if="type == 1" class="login"> 15 <div v-if="type == 1" class="login">
16 <!-- <div class="login-tit"> 16 <template v-if="!oneAccountCenterOff">
17 <img v-if="locale == 'zh'" src="@/assets/images/login/login-tit-zh.png"> 17 <div class="login-tit">
18 <img v-if="locale == 'tc'" src="@/assets/images/login/login-tit-tc.png"> 18 <img v-if="locale == 'zh'" src="@/assets/images/login/login-tit-zh.png">
19 <img v-if="locale == 'en'" class="img-en" src="@/assets/images/login/login-tit-en.png"> 19 <img v-if="locale == 'tc'" src="@/assets/images/login/login-tit-tc.png">
20 </div> 20 <img v-if="locale == 'en'" class="img-en" src="@/assets/images/login/login-tit-en.png">
21 <div class="login-nav"> 21 </div>
22 <div @click="onLoginTypeHandler(1)" class="login-nav-tit text-r pointer active">{{$t('login.loginType1')}}</div> 22 <div class="login-nav">
23 <div class="login-nav-v-line"></div> 23 <div @click="onLoginTypeHandler(1)" class="login-nav-tit text-r pointer active">{{$t('login.loginType1')}}</div>
24 <div @click="onLoginTypeHandler(2)" class="login-nav-tit pointer">{{$t('login.loginType2')}}</div> 24 <div class="login-nav-v-line"></div>
25 </div> --> 25 <div @click="onLoginTypeHandler(2)" class="login-nav-tit pointer">{{$t('login.loginType2')}}</div>
26 </div>
27 </template>
26 <div class="gird-g form"> 28 <div class="gird-g form">
27 <div class="pure-u-1 form-item"> 29 <div class="pure-u-1 form-item">
28 <div class="label"> 30 <div class="label">
...@@ -69,7 +71,7 @@ ...@@ -69,7 +71,7 @@
69 </div> 71 </div>
70 <div class="login-func"> 72 <div class="login-func">
71 <div @click="toRegisterPage()" class="login-func-btn pointer">{{$t('login.register')}}</div> 73 <div @click="toRegisterPage()" class="login-func-btn pointer">{{$t('login.register')}}</div>
72 <!-- <div @click="onForgetHandler()" class="login-func-btn pointer">{{$t('login.forget')}}</div> --> 74 <div v-if="!oneAccountCenterOff" @click="onForgetHandler()" class="login-func-btn pointer">{{$t('login.forget')}}</div>
73 </div> 75 </div>
74 </div> 76 </div>
75 77
......
...@@ -10,6 +10,7 @@ import { ...@@ -10,6 +10,7 @@ import {
10 import Auth from '@components/auth/auth.vue'; 10 import Auth from '@components/auth/auth.vue';
11 import modalComp from '@/components/modal-comp/modal-comp.vue'; 11 import modalComp from '@/components/modal-comp/modal-comp.vue';
12 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue'; 12 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
13 import Modal2Comp from '@/components/modal2-comp/modal2-comp.vue';
13 import { passwordEncrypt } from '@/utils/encrypt.js'; 14 import { passwordEncrypt } from '@/utils/encrypt.js';
14 import Vue from 'vue'; 15 import Vue from 'vue';
15 import { Loading } from 'vant'; 16 import { Loading } from 'vant';
...@@ -20,6 +21,7 @@ export default { ...@@ -20,6 +21,7 @@ export default {
20 return { 21 return {
21 loading: false, 22 loading: false,
22 showForm: false, 23 showForm: false,
24 showError: false,
23 key: 'value', 25 key: 'value',
24 type: 1, // 1:输入用户信息 2:找回密码 3:核对信息 4.重置密码 26 type: 1, // 1:输入用户信息 2:找回密码 3:核对信息 4.重置密码
25 values: { 27 values: {
...@@ -65,6 +67,9 @@ export default { ...@@ -65,6 +67,9 @@ export default {
65 this.modalVisiable = false; 67 this.modalVisiable = false;
66 this.modalSimpleVisiable = false; 68 this.modalSimpleVisiable = false;
67 }, 69 },
70 oneAccountCenterOff() {
71 return window.global.oneAccountCenterOff;
72 },
68 resetPwd() { 73 resetPwd() {
69 if (this.submitBtnDisabled) { 74 if (this.submitBtnDisabled) {
70 return; 75 return;
...@@ -94,8 +99,15 @@ export default { ...@@ -94,8 +99,15 @@ export default {
94 } 99 }
95 this.loading = true; 100 this.loading = true;
96 101
102 let url = api.changePassword;
103 if (this.oneAccountCenterOff) {
104 url = api.changePasswordV2;
105 newPwd = this.values.pwd;
106 oldPwd = this.values.oldPwd;
107 }
108
97 httpPost({ 109 httpPost({
98 url: api.changePassword, 110 url: url,
99 data: { 111 data: {
100 oldPwd: oldPwd, 112 oldPwd: oldPwd,
101 newPwd: newPwd 113 newPwd: newPwd
...@@ -111,8 +123,8 @@ export default { ...@@ -111,8 +123,8 @@ export default {
111 this.showModal(message, "succ"); 123 this.showModal(message, "succ");
112 break 124 break
113 case "COMMON_ERROR_E0": 125 case "COMMON_ERROR_E0":
114 message = this.i18n().session.sidExpire;
115 this.targetPath = "/login?callback=/password/reset"; 126 this.targetPath = "/login?callback=/password/reset";
127 message = this.i18n().session.sidExpire;
116 this.step.error2 = message; 128 this.step.error2 = message;
117 // this.showModal(message, "info"); 129 // this.showModal(message, "info");
118 break; 130 break;
...@@ -123,10 +135,15 @@ export default { ...@@ -123,10 +135,15 @@ export default {
123 135
124 }).catch(err => { 136 }).catch(err => {
125 this.loading = false; 137 this.loading = false;
126 let message = this.i18n().session.sidExpire; 138 if (err.code == 404) {
127 this.targetPath = "/login?callback=/password/reset"; 139 this.showError = true;
128 this.step.error2 = message; 140 }
129 // this.showModal(message, "info"); 141 });
142 },
143 sessionLostModalClose() {
144 this.targetPath = "/login?callback=/password/reset";
145 this.$router.push({
146 path: this.targetPath
130 }); 147 });
131 }, 148 },
132 checkPassword(password) { 149 checkPassword(password) {
...@@ -162,9 +179,9 @@ export default { ...@@ -162,9 +179,9 @@ export default {
162 } 179 }
163 }, 180 },
164 userLogout() { 181 userLogout() {
165 this.$router.push({ 182 // this.$router.push({
166 path: "/" 183 // path: "/"
167 }); 184 // });
168 this.showForm = false; 185 this.showForm = false;
169 }, 186 },
170 userLogin(data) { 187 userLogin(data) {
...@@ -222,6 +239,7 @@ export default { ...@@ -222,6 +239,7 @@ export default {
222 components: { 239 components: {
223 modalComp, 240 modalComp,
224 modalSimpleComp, 241 modalSimpleComp,
225 Auth 242 Auth,
243 Modal2Comp
226 } 244 }
227 } 245 }
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
3 <div> 3 <div>
4 <modal-simple-comp :visible="modalSimpleVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="closeModal" :overlay="closeModal" :close="closeModal"></modal-simple-comp> 4 <modal-simple-comp :visible="modalSimpleVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="closeModal" :overlay="closeModal" :close="closeModal"></modal-simple-comp>
5 <modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp> 5 <modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
6 <modal2-comp :visible="showError" :close="sessionLostModalClose" :content="$t('glbalTips.sessionLost')" ></modal2-comp>
6 <div class="ebg"></div> 7 <div class="ebg"></div>
7 <div class="content"> 8 <div class="content">
8 <div class="top-space"></div> 9 <div class="top-space"></div>
......
...@@ -87,10 +87,21 @@ export default { ...@@ -87,10 +87,21 @@ export default {
87 let b4 = !checkVerifyCode(this.registerForm.opt); 87 let b4 = !checkVerifyCode(this.registerForm.opt);
88 return b1 || b2 || b3 || b4; 88 return b1 || b2 || b3 || b4;
89 }, 89 },
90 registerDisabledV2() {
91 let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false;
92 let b2 = this.values.passwordRepeat != this.values.password ? true : false;
93 let b3 = !this.registerCheck.agreeProtocol;
94 let b4 = !this.registerForm.mobileNo ? true : false;
95 return b1 || b2 || b3 || b4;
96
97 },
90 submitDisabled() { 98 submitDisabled() {
91 let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false; 99 let b1 = !this.values.password || this.checkPassword(this.values.password) ? true : false;
92 let b2 = this.values.passwordRepeat != this.values.password ? true : false; 100 let b2 = this.values.passwordRepeat != this.values.password ? true : false;
93 return b1 || b2; 101 return b1 || b2;
102 },
103 oneAccountCenterOff() {
104 return window.global.oneAccountCenterOff;
94 } 105 }
95 }, 106 },
96 methods: { 107 methods: {
...@@ -255,6 +266,37 @@ export default { ...@@ -255,6 +266,37 @@ export default {
255 }); 266 });
256 }); 267 });
257 }, 268 },
269 registerV2Handler() {
270 if (this.registerDisabledV2) {
271 return;
272 }
273 if (this.loading) {
274 return;
275 }
276 this._checkMobileLegal().then(() => {
277 let data = {
278 account: this.registerForm.mobileNo,
279 password: this.values.password
280 }
281 this.loading = true;
282 httpPost({
283 url: api.doRegisterV2,
284 data: data
285 }).then(res => {
286 this.loading = false;
287 this.$store.commit("SET_USER_INFO", res);
288 this._showSuccessMessage();
289 }).catch(e => {
290 this.loading = false;
291 switch (e.code) {
292 case 1103:
293 let message = this.i18n.register.tips.e5;
294 this.errorTips.p1 = message;
295 break;
296 }
297 })
298 });
299 },
258 _validateOTPandRepeat() { 300 _validateOTPandRepeat() {
259 return new Promise((resolve, reject) => { 301 return new Promise((resolve, reject) => {
260 let data = { 302 let data = {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
6 <!-- 会员协议 --> 6 <!-- 会员协议 -->
7 <modal-protocol-comp :visible="modalProtocolVisiable" :overlay="closeModal" :close="closeModal"></modal-protocol-comp> 7 <modal-protocol-comp :visible="modalProtocolVisiable" :overlay="closeModal" :close="closeModal"></modal-protocol-comp>
8 <div class="ebg"></div> 8 <div class="ebg"></div>
9 <div class="content"> 9 <div class="content" v-if="!oneAccountCenterOff">
10 <div class="top-space"></div> 10 <div class="top-space"></div>
11 <div class="step"> 11 <div class="step">
12 <img v-if="type == 1" src="@/assets/images/register/register-step-1.png"> 12 <img v-if="type == 1" src="@/assets/images/register/register-step-1.png">
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
16 <!-- 手机验证 --> 16 <!-- 手机验证 -->
17 <div v-if="type == 1" class="login"> 17 <div v-if="type == 1" class="login">
18 18
19 <!-- <div class="login-tit"> 19 <div class="login-tit">
20 <img v-if="locale == 'zh'" src="@/assets/images/login/login-tit-zh.png"> 20 <img v-if="locale == 'zh'" src="@/assets/images/login/login-tit-zh.png">
21 <img v-if="locale == 'tc'" src="@/assets/images/login/login-tit-tc.png"> 21 <img v-if="locale == 'tc'" src="@/assets/images/login/login-tit-tc.png">
22 <img v-if="locale == 'en'" class="img-en" src="@/assets/images/login/login-tit-en.png"> 22 <img v-if="locale == 'en'" class="img-en" src="@/assets/images/login/login-tit-en.png">
23 </div> --> 23 </div>
24 <div class="login-tit2">{{$t('register.title')}}</div> 24 <div class="login-tit2">{{$t('register.title')}}</div>
25 <div class="gird-g form"> 25 <div class="gird-g form">
26 <!-- <div class="pure-u-1 form-item"> 26 <!-- <div class="pure-u-1 form-item">
...@@ -124,6 +124,74 @@ ...@@ -124,6 +124,74 @@
124 </div> 124 </div>
125 </div> 125 </div>
126 </div> 126 </div>
127
128 <div class="content" v-else>
129 <div class="top-space"></div>
130 <div class="box">
131 <!-- 手机验证 -->
132 <div class="login">
133
134 <div class="gird-g form">
135 <div class="pure-u-1 form-item">
136
137 <div class="label">
138 <img src="@/assets/images/register/icon-register-phone.png"> {{mobileTip.name}}
139 </div>
140 <div class="ipt-wrap">
141 <div class="region-tel ipt-wrap">
142 <img class="down-arrow" src="@/assets/images/reservation/re-down-arrow.png" alt="">
143 <el-select class="ipt" v-model="mobileNoType">
144 <el-option v-for="(item,index) in mobileOptions" :key="index" :value="item.type" :label="item.areaCode">{{item.areaCode}}</el-option>
145 </el-select>
146 </div>
147
148 <div class="ipt ipt2" :class="{err : errorTips.p1.length > 0}">
149 <input :placeholder="mobileTip.placeHolder" class="ipt-tel" type="text" v-model="registerForm.mobileNo">
150 </div>
151 </div>
152 <div class="validator" v-if="errorTips.p1.length > 0 ">
153 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.p1}}
154 </div>
155 </div>
156
157 <div class="pure-u-1 form-item">
158 <div class="label">
159 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('register.newPassword')}}
160 </div>
161 <div class="ipt-wrap">
162 <input :placeholder="$t('register.newPasswordPlaceholder')" class="ipt" :class="{err : errorTips.p4.length > 0}" type="password" v-model="values.password">
163 </div>
164 <div class="validator" v-if="errorTips.p4.length > 0 ">
165 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.p4}}
166 </div>
167 </div>
168 <div class="pure-u-1 form-item">
169 <div class="label">
170 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('register.newPasswordSure')}}
171 </div>
172 <div class="ipt-wrap">
173 <input :placeholder="$t('register.newPasswordSurePlaceholder')" class="ipt" :class="{err : errorTips.p5.length > 0}" type="password" v-model="values.passwordRepeat">
174 </div>
175 <div class="validator" v-if="errorTips.p5.length > 0 ">
176 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.p5}}
177 </div>
178 </div>
179
180 </div>
181
182 <div class="login-protocol pointer" @click="registerCheck.agreeProtocol = !registerCheck.agreeProtocol">
183 <img v-if="!registerCheck.agreeProtocol" class="check" src="@/assets/images/login/uncheck.png">
184 <img v-if="registerCheck.agreeProtocol" class="check" src="@/assets/images/login/check.png"> {{$t('login.agree')}} &nbsp;
185 <span @click="onProtocolHandler()" class="protocol pointer">{{$t('login.protocol')}}</span>
186 </div>
187 <div @click="registerV2Handler()" class="login-submit pointer flex-center" :class="{disabled: registerDisabledV2}">
188 <van-loading v-if="loading" />
189 <span>{{$t('register.register')}}</span>
190 </div>
191 </div>
192
193 </div>
194 </div>
127 </div> 195 </div>
128 </template> 196 </template>
129 197
......