86df2077 by joe

基本功能調整

1 parent fe41890b
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
47 let userInfo = JSON.parse(decodeURIComponent(userInfoStr)); 47 let userInfo = JSON.parse(decodeURIComponent(userInfoStr));
48 this.$store.commit("SET_USER_INFO", userInfo); 48 this.$store.commit("SET_USER_INFO", userInfo);
49 if (userInfo && userInfo.sid) { 49 if (userInfo && userInfo.sid) {
50 httpPost({ url: api.profile, sidStr: userInfo.sid }).then(res => { 50 httpPost({ url: api.baseInfo, sidStr: userInfo.sid }).then(res => {
51 if (res) { 51 if (res) {
52 this.$store.commit("SET_USER_INFO", userInfo); 52 this.$store.commit("SET_USER_INFO", userInfo);
53 } else { 53 } else {
......
1 module.exports = { 1 module.exports = {
2 load: "/pingan_hklife_webapi/user/load", 2 load: "/pingan_hklife_webapi/user/load",
3 logout: "/pingan_hklife_webapi/user/logout", 3 logout: "/pingan_hklife_webapi/user/logout",
4 // 基本信息
5 baseInfo: "/pingan_hklife_webapi/user/baseInfo",
4 // 用户身份信息 6 // 用户身份信息
5 profile: "/pingan_hklife_webapi/user/profile", 7 profile: "/pingan_hklife_webapi/user/profile",
6 // 是否显示图形验证码接口 8 // 是否显示图形验证码接口
......
...@@ -15,10 +15,10 @@ module.exports = { ...@@ -15,10 +15,10 @@ module.exports = {
15 datePicker: { 15 datePicker: {
16 datePlaceholder: "please select date" 16 datePlaceholder: "please select date"
17 }, 17 },
18 modalUploadCard:{ 18 modalUploadCard: {
19 tit:"請上傳證件資料", 19 tit: "請上傳證件資料",
20 front:"證件正面", 20 front: "證件正面",
21 back:"證件反面", 21 back: "證件反面",
22 } 22 }
23 }, 23 },
24 nav: { 24 nav: {
...@@ -43,6 +43,12 @@ module.exports = { ...@@ -43,6 +43,12 @@ module.exports = {
43 value: "" 43 value: ""
44 }, 44 },
45 { 45 {
46 name: "profile",
47 path: "/infomation/improve",
48 type: "auth",
49 value: ""
50 },
51 {
46 name: "logout", 52 name: "logout",
47 path: "", 53 path: "",
48 type: "auth", 54 type: "auth",
...@@ -617,7 +623,7 @@ module.exports = { ...@@ -617,7 +623,7 @@ module.exports = {
617 } 623 }
618 }, 624 },
619 policyChangeInformation: { 625 policyChangeInformation: {
620 title : "Change of Customer Information", 626 title: "Change of Customer Information",
621 hkClient: "HK Customer", 627 hkClient: "HK Customer",
622 yes: "是", 628 yes: "是",
623 no: "否", 629 no: "否",
...@@ -729,6 +735,14 @@ module.exports = { ...@@ -729,6 +735,14 @@ module.exports = {
729 e1: "請填寫該項內容", 735 e1: "請填寫該項內容",
730 e2: "請填寫正確的聯繫方式" 736 e2: "請填寫正確的聯繫方式"
731 } 737 }
738 },
739 unauth: {
740 tips: "If you have a ping an all in one account account, it can help us provide better services for you",
741 or: "or",
742 login: " login",
743 register: " register",
744 baseInfoTip : "Your complete information can help us to provide you with complete services",
745 infoBtn : " Go to perfection"
732 } 746 }
733 } 747 }
734 } 748 }
......
...@@ -43,6 +43,12 @@ module.exports = { ...@@ -43,6 +43,12 @@ module.exports = {
43 value: "" 43 value: ""
44 }, 44 },
45 { 45 {
46 name: "個人信息",
47 path: "/infomation/improve",
48 type: "auth",
49 value: ""
50 },
51 {
46 name: "登出", 52 name: "登出",
47 path: "", 53 path: "",
48 type: "auth", 54 type: "auth",
...@@ -729,6 +735,14 @@ module.exports = { ...@@ -729,6 +735,14 @@ module.exports = {
729 e1: "請填寫該項內容", 735 e1: "請填寫該項內容",
730 e2: "請填寫正確的聯繫方式" 736 e2: "請填寫正確的聯繫方式"
731 } 737 }
738 },
739 unauth: {
740 tips: "如您有平安一賬通賬戶,可幫助我們更好地為您提供服務",
741 or: "或",
742 login: "登錄",
743 register: "註冊",
744 baseInfoTip : "您的完整信息可幫助我們為你提供完整服務",
745 infoBtn : "前往完善"
732 } 746 }
733 } 747 }
734 } 748 }
......
1 import {
2 mapState
3 } from 'vuex';
4
5 export default {
6 props: {
7 checkProfile: false,
8 },
9 data() {
10 return {
11 key: 'value',
12 showProfileInfo: false,
13 showUnAuth: false
14 }
15 },
16 components: {},
17 computed: {
18 ...mapState({
19 userInfo: state => state.userInfo
20 }),
21 locale() {
22 return this.$i18n.locale || 'tc';
23 },
24 i18n() {
25 return this.$i18n.messages && this.$i18n.locale ? this.$i18n.messages[this.$i18n.locale] : {};
26 },
27 showPanel(){
28 return this.showProfileInfo || this.showUnAuth;
29 }
30 },
31 methods: {
32 initData() {
33 if (this.userInfo && this.userInfo.name) {
34 this.loginAction();
35 } else {
36 this.logoutAction();
37 }
38 },
39 loginAction() {
40 this.showUnAuth = false;
41 if (this.checkProfile) {
42 if (this.userInfo.hadFullInfo == 1) {
43 this.$emit("onLogin", this.userInfo);
44 } else {
45 this.showProfileInfo = true;
46 }
47 } else {
48 this.$emit("onLogin", this.userInfo);
49 }
50 },
51 logoutAction() {
52 this.showUnAuth = true;
53 this.$emit("onLogout", {});
54 },
55 gotoLoginPage() {
56 this.$router.push({ path: "/login" });
57 },
58 gotoRegisterPage() {
59 this.$router.push({ path: "/register" });
60 },
61 gotoInformationPage(){
62 this.$router.push({ path: "/infomation/improve" });
63 }
64 },
65 mounted() {
66 this.initData();
67 },
68 created() { },
69 watch: {
70 userInfo(val) {
71 if (val && val.name) {
72 this.loginAction();
73 } else {
74 this.logoutAction();
75 }
76 }
77 },
78 }
1 .empty-line{
2 margin-bottom:500px;
3 }
...\ No newline at end of file ...\ No newline at end of file
1 <template>
2 <div v-if="showPanel">
3 <div v-if="showUnAuth">
4 <div class="alert">
5 <img class="icon" src="@/assets/images/common/icon-alert-i.png" alt="">
6 <div class="txt">
7 {{$t('customService.unauth.tips')}}
8 <span class="pointer btn" @click="gotoLoginPage">{{$t('customService.unauth.login')}}</span> {{$t('customService.unauth.or')}}
9 <span class="pointer btn" @click="gotoRegisterPage">{{$t('customService.unauth.register')}}</span>
10 </div>
11
12 <!-- <img class="pointer close" src="@/assets/images/common/icon-alert-close.png" alt=""> -->
13 </div>
14 </div>
15
16 <div v-if="showProfileInfo">
17 <div class="alert">
18 <img class="icon" src="@/assets/images/common/icon-alert-i.png" alt="">
19 <div class="txt">
20 {{$t('customService.unauth.baseInfoTip')}}
21 <span class="pointer btn" @click="gotoInformationPage">{{$t('customService.unauth.infoBtn')}}</span>
22 </div>
23
24 <!-- <img class="pointer close" src="@/assets/images/common/icon-alert-close.png" alt=""> -->
25 </div>
26 </div>
27 <div class="empty-line"></div>
28 </div>
29 </template>
30
31 <script src="./auth.js"></script>
32 <style lang="scss" scoped>
33 @import "./auth.scss";
34 </style>
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
107 }, 107 },
108 showLogoutTip() { 108 showLogoutTip() {
109 // 登出后的提示 109 // 登出后的提示
110 alert("登出成功"); 110 // alert("登出成功");
111 } 111 }
112 }, 112 },
113 computed: { 113 computed: {
......
...@@ -4,10 +4,13 @@ import { ...@@ -4,10 +4,13 @@ import {
4 httpPost 4 httpPost
5 } from '@/api/fetch-api.js' 5 } from '@/api/fetch-api.js'
6 6
7 import Auth from '@components/auth/auth.vue';
8
7 export default { 9 export default {
8 name: "InsuranceQuery", 10 name: "InsuranceQuery",
9 data() { 11 data() {
10 return { 12 return {
13 showForm: false,
11 dataForm: { 14 dataForm: {
12 15
13 }, 16 },
...@@ -48,8 +51,17 @@ export default { ...@@ -48,8 +51,17 @@ export default {
48 data.v8 = "現金"; 51 data.v8 = "現金";
49 } 52 }
50 this.$set(this, 'dataForm', data); 53 this.$set(this, 'dataForm', data);
54 },
55 userLogout() {
56 this.showForm = false;
57 },
58 userLogin(data) {
59 this.showForm = true;
51 } 60 }
52 }, 61 },
62 components: {
63 Auth
64 },
53 mounted() { 65 mounted() {
54 this.test(); 66 this.test();
55 }, 67 },
......
1 <template> 1 <template>
2 <div class="container"> 2 <div class="container">
3 <div> 3 <auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true"></auth>
4 <div v-if="showForm">
4 <div class="cell-group"> 5 <div class="cell-group">
5 <div class="table-header orange"> 6 <div class="table-header orange">
6 <div class="normal-header"> 7 <div class="normal-header">
......
...@@ -4,9 +4,12 @@ import { ...@@ -4,9 +4,12 @@ import {
4 httpPost 4 httpPost
5 } from '@/api/fetch-api.js' 5 } from '@/api/fetch-api.js'
6 6
7 import Auth from '@components/auth/auth.vue';
8
7 export default { 9 export default {
8 data() { 10 data() {
9 return { 11 return {
12 showForm: false,
10 key: 'value', 13 key: 'value',
11 checked1: false, 14 checked1: false,
12 checked2: false, 15 checked2: false,
...@@ -27,7 +30,9 @@ export default { ...@@ -27,7 +30,9 @@ export default {
27 }, 30 },
28 } 31 }
29 }, 32 },
30 components: {}, 33 components: {
34 Auth
35 },
31 computed: { 36 computed: {
32 locale() { 37 locale() {
33 return this.$i18n.locale || 'tc'; 38 return this.$i18n.locale || 'tc';
...@@ -128,7 +133,13 @@ export default { ...@@ -128,7 +133,13 @@ export default {
128 sep = "&"; 133 sep = "&";
129 } 134 }
130 return path; 135 return path;
131 } 136 },
137 userLogout() {
138 this.showForm = false;
139 },
140 userLogin(data) {
141 this.showForm = true;
142 }
132 }, 143 },
133 watch: { 144 watch: {
134 'data.mobile': function () { 145 'data.mobile': function () {
......
1 1
2 <template> 2 <template>
3 <div class="container border"> 3 <div>
4 <div class="form"> 4 <auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true"></auth>
5 <div class="form-item"> 5 <div class="container border" v-if="showForm">
6 <div class="label"> 6 <div class="form">
7 <div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-phone.png"></div>{{$t('policyChangeContact.phone')}} 7 <div class="form-item">
8 </div> 8 <div class="label">
9 <div class="ipt-wrap"> 9 <div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-phone.png"></div>{{$t('policyChangeContact.phone')}}
10 <input class="ipt mail-ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="data.mobile">
11 <div class="agree" @click="checked1 = !checked1">
12 <img v-if="!checked1" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
13 <img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
14 <span>{{$t("policyChangeContact.checkTips")}}</span>
15 </div> 10 </div>
11 <div class="ipt-wrap">
12 <input class="ipt mail-ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="data.mobile">
13 <div class="agree" @click="checked1 = !checked1">
14 <img v-if="!checked1" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
15 <img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
16 <span>{{$t("policyChangeContact.checkTips")}}</span>
17 </div>
16 18
17 </div> 19 </div>
18 <div class="validator" v-if="errorTips.e1.length > 0"> 20 <div class="validator" v-if="errorTips.e1.length > 0">
19 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e1}} 21 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e1}}
20 </div>
21 </div>
22 <div class="form-item">
23 <div class="label">
24 <div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-location.png"></div>{{$t('policyChangeContact.address')}}
25 </div>
26 <div class="ipt-wrap">
27 <input class="ipt mail-ipt" type="text" :class="{err : errorTips.e2.length > 0}" v-model="data.address">
28 <div class="agree" @click="checked2 = !checked2">
29 <img v-if="!checked2" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
30 <img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
31 <span>{{$t("policyChangeContact.checkTips")}}</span>
32 </div> 22 </div>
33 </div> 23 </div>
34 <div class="validator" v-if="errorTips.e2.length > 0"> 24 <div class="form-item">
35 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e2}} 25 <div class="label">
36 </div> 26 <div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-location.png"></div>{{$t('policyChangeContact.address')}}
37 </div> 27 </div>
38 <div class="form-item"> 28 <div class="ipt-wrap">
39 <div class="label"> 29 <input class="ipt mail-ipt" type="text" :class="{err : errorTips.e2.length > 0}" v-model="data.address">
40 <div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-mail.png"></div>{{$t('policyChangeContact.email')}} 30 <div class="agree" @click="checked2 = !checked2">
41 </div> 31 <img v-if="!checked2" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
42 <div class="ipt-wrap"> 32 <img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
43 <input class="ipt mail-ipt" type="text" :class="{err : errorTips.e3.length > 0}" v-model="data.email"> 33 <span>{{$t("policyChangeContact.checkTips")}}</span>
44 <div class="agree" @click="checked3 = !checked3"> 34 </div>
45 <img v-if="!checked3" class="check-icon pointer" src="@/assets/images/reservation/un-check.png"> 35 </div>
46 <img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png"> 36 <div class="validator" v-if="errorTips.e2.length > 0">
47 <span>{{$t("policyChangeContact.checkTips")}}</span> 37 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e2}}
48 </div> 38 </div>
49 </div> 39 </div>
40 <div class="form-item">
41 <div class="label">
42 <div class="icon"><img src="@/assets/images/policy-change-contact/icon-pcc-mail.png"></div>{{$t('policyChangeContact.email')}}
43 </div>
44 <div class="ipt-wrap">
45 <input class="ipt mail-ipt" type="text" :class="{err : errorTips.e3.length > 0}" v-model="data.email">
46 <div class="agree" @click="checked3 = !checked3">
47 <img v-if="!checked3" class="check-icon pointer" src="@/assets/images/reservation/un-check.png">
48 <img v-else class="check-icon pointer" src="@/assets/images/reservation/check.png">
49 <span>{{$t("policyChangeContact.checkTips")}}</span>
50 </div>
51 </div>
50 52
51 <div class="validator" v-if="errorTips.e3.length > 0"> 53 <div class="validator" v-if="errorTips.e3.length > 0">
52 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}} 54 <img src="@/assets/images/common/icon-notice.png" alt="">{{errorTips.e3}}
55 </div>
53 </div> 56 </div>
54 </div> 57 </div>
55 </div> 58 <div class="submit-btn" @click="updateContactsHandler">
56 <div class="submit-btn" @click="updateContactsHandler"> 59 {{$t("policyChangeContact.submit")}}
57 {{$t("policyChangeContact.submit")}} 60 </div>
58 </div> 61 </div>
59 </div> 62 </div>
60 </template> 63 </template>
......
...@@ -4,13 +4,18 @@ import { ...@@ -4,13 +4,18 @@ import {
4 httpPost 4 httpPost
5 } from '@/api/fetch-api.js' 5 } from '@/api/fetch-api.js'
6 6
7 import Auth from '@components/auth/auth.vue';
8
7 export default { 9 export default {
8 data() { 10 data() {
9 return { 11 return {
12 showForm: false,
10 key: 'value' 13 key: 'value'
11 } 14 }
12 }, 15 },
13 components: {}, 16 components: {
17 Auth
18 },
14 computed: { 19 computed: {
15 locale() { 20 locale() {
16 return this.$i18n.locale || 'tc'; 21 return this.$i18n.locale || 'tc';
...@@ -36,7 +41,13 @@ export default { ...@@ -36,7 +41,13 @@ export default {
36 }) 41 })
37 } 42 }
38 }, 43 },
39 initData() {} 44 initData() {},
45 userLogout() {
46 this.showForm = false;
47 },
48 userLogin(data) {
49 this.showForm = true;
50 }
40 }, 51 },
41 mounted() {}, 52 mounted() {},
42 created() {} 53 created() {}
......
1 1
2 <template> 2 <template>
3 <div> 3 <div>
4 <div class="container policy-change-guide-container"> 4 <auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true"></auth>
5 <div class="container policy-change-guide-container" v-if="showForm">
5 <div class="table"> 6 <div class="table">
6 <div class="table-header orange"> 7 <div class="table-header orange">
7 <div class="table-header-item w1">{{$t('policyChangeGuide.head1')}}</div> 8 <div class="table-header-item w1">{{$t('policyChangeGuide.head1')}}</div>
...@@ -49,8 +50,7 @@ ...@@ -49,8 +50,7 @@
49 </div> 50 </div>
50 </div> 51 </div>
51 </div> 52 </div>
52 53 <div class="notice" v-if="showForm">
53 <div class="notice">
54 <img class="icon" src="@/assets/images/policy-change-guide/icon-pcg-notice.png" alt=""> {{$t("policyChangeGuide.notice")}} <span @click="toContactUs" class="act">{{$t("policyChangeGuide.noticeLink")}}</span> 54 <img class="icon" src="@/assets/images/policy-change-guide/icon-pcg-notice.png" alt=""> {{$t("policyChangeGuide.notice")}} <span @click="toContactUs" class="act">{{$t("policyChangeGuide.noticeLink")}}</span>
55 </div> 55 </div>
56 </div> 56 </div>
......
...@@ -4,11 +4,13 @@ import { ...@@ -4,11 +4,13 @@ import {
4 httpPost 4 httpPost
5 } from '@/api/fetch-api.js' 5 } from '@/api/fetch-api.js'
6 6
7 import Auth from '@components/auth/auth.vue';
7 import modalUploadCardComp from '@/components/modal-upload-card-comp/modal-upload-card-comp.vue'; 8 import modalUploadCardComp from '@/components/modal-upload-card-comp/modal-upload-card-comp.vue';
8 9
9 export default { 10 export default {
10 data() { 11 data() {
11 return { 12 return {
13 showForm: false,
12 key: 'value', 14 key: 'value',
13 isHkCus: true, 15 isHkCus: true,
14 checked: false, 16 checked: false,
...@@ -16,7 +18,8 @@ export default { ...@@ -16,7 +18,8 @@ export default {
16 } 18 }
17 }, 19 },
18 components: { 20 components: {
19 modalUploadCardComp 21 modalUploadCardComp,
22 Auth
20 }, 23 },
21 computed: { 24 computed: {
22 locale() { 25 locale() {
...@@ -27,7 +30,13 @@ export default { ...@@ -27,7 +30,13 @@ export default {
27 } 30 }
28 }, 31 },
29 methods: { 32 methods: {
30 initData() {} 33 initData() {},
34 userLogout() {
35 this.showForm = false;
36 },
37 userLogin(data) {
38 this.showForm = true;
39 }
31 }, 40 },
32 mounted() {}, 41 mounted() {},
33 created() {} 42 created() {}
......
1 1
2 <template> 2 <template>
3 <div> 3 <div>
4 <auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true"></auth>
4 <modal-upload-card-comp :visible="modalUploadCardVisiable" :show-confirm="true" ></modal-upload-card-comp> 5 <modal-upload-card-comp :visible="modalUploadCardVisiable" :show-confirm="true" ></modal-upload-card-comp>
5 <div class="container border"> 6 <div class="container border" v-if="showForm">
6 <div class="table"> 7 <div class="table">
7 <div class="table-header orange"> 8 <div class="table-header orange">
8 <div class="table-header-item">{{$t('policyChangeInformation.title')}}</div> 9 <div class="table-header-item">{{$t('policyChangeInformation.title')}}</div>
......
1 1
2 <template> 2 <template>
3 <div> 3 <div>
4 <div class="alert">
5 <img class="icon" src="@/assets/images/common/icon-alert-i.png" alt="">
6 <div class="txt">
7 如您有平安一賬通賬戶,可幫助我們更好地為您提供服務,
8 <span class="pointer btn">登錄</span>
9 <span class="pointer btn">註冊</span>
10 </div>
11
12 <img class="pointer close" src="@/assets/images/common/icon-alert-close.png" alt="">
13 </div>
14 4
15 <div class="reservation-container"> 5 <div class="reservation-container">
16 <div class="gird-g form"> 6 <div class="gird-g form">
......
...@@ -4,12 +4,15 @@ import { ...@@ -4,12 +4,15 @@ import {
4 httpPost 4 httpPost
5 } from '@/api/fetch-api.js' 5 } from '@/api/fetch-api.js'
6 6
7 import Auth from '@components/auth/auth.vue';
7 import modalComp from '@/components/modal-comp/modal-comp.vue'; 8 import modalComp from '@/components/modal-comp/modal-comp.vue';
9 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
8 import DatePicker from '@/components/date-picker/date-picker.vue' 10 import DatePicker from '@/components/date-picker/date-picker.vue'
9 11
10 export default { 12 export default {
11 data() { 13 data() {
12 return { 14 return {
15 showForm: false,
13 key: 'value', 16 key: 'value',
14 values: { 17 values: {
15 // 返回的token,串连整个流程,后台安全校验使用 18 // 返回的token,串连整个流程,后台安全校验使用
...@@ -22,7 +25,8 @@ export default { ...@@ -22,7 +25,8 @@ export default {
22 }, 25 },
23 birthDate: "", 26 birthDate: "",
24 information: { 27 information: {
25 cnName: "", 28 firstName: "",
29 lastName: "",
26 sex: "", 30 sex: "",
27 birthDate: "", 31 birthDate: "",
28 idNo: "", 32 idNo: "",
...@@ -35,6 +39,7 @@ export default { ...@@ -35,6 +39,7 @@ export default {
35 e4: "", 39 e4: "",
36 e5: "", 40 e5: "",
37 }, 41 },
42 modalSimpleVisiable: false,
38 modalVisiable: false, 43 modalVisiable: false,
39 targetPath: "", 44 targetPath: "",
40 modalIcon: "succ", 45 modalIcon: "succ",
...@@ -43,7 +48,9 @@ export default { ...@@ -43,7 +48,9 @@ export default {
43 }, 48 },
44 components: { 49 components: {
45 modalComp, 50 modalComp,
46 DatePicker 51 DatePicker,
52 Auth,
53 modalSimpleComp
47 }, 54 },
48 computed: { 55 computed: {
49 locale() { 56 locale() {
...@@ -59,18 +66,41 @@ export default { ...@@ -59,18 +66,41 @@ export default {
59 idTypeCandidates() { 66 idTypeCandidates() {
60 let i18n = this.$i18n.messages[this.$i18n.locale]; 67 let i18n = this.$i18n.messages[this.$i18n.locale];
61 return i18n.infomationImprove.candidates.idType; 68 return i18n.infomationImprove.candidates.idType;
69 },
70 submitBtnDisabled() {
71 let b1 = !this.information.firstName ? true : false;
72 let b2 = !this.information.lastName ? true : false;
73 let b3 = !this.information.sex ? true : false;
74 let b4 = !this.information.birthDate ? true : false;
75 let b5 = !this.information.idNo ? true : false;
76 let b6 = !this.information.idType ? true : false;
77 return b1 || b2 || b3 || b4 || b5 || b6;
62 } 78 }
63 }, 79 },
64 methods: { 80 methods: {
65 showModal(content, icon) { 81 showModal(content, icon) {
66 icon = !icon || typeof icon === "undefined" ? "succ" : "succ"; 82 icon = !icon || typeof icon === "undefined" ? "succ" : icon;
67 this.modalIcon = icon; 83 this.modalIcon = icon;
68 this.modalContent = content; 84 this.modalContent = content;
69 this.modalVisiable = true; 85 if (icon == "succ") {
86 this.modalVisiable = true;
87 } else {
88 this.modalSimpleVisiable = true;
89 }
90 },
91 closeModal() {
92 this.modalVisiable = false;
93 this.modalSimpleVisiable = false;
70 }, 94 },
71 initData() { 95 initData() {
96 httpPost({ url: api.profile, sid: true }).then(content => {
97 this.information = content;
98 })
72 }, 99 },
73 onUpdateHandler() { 100 onUpdateHandler() {
101 if (this.submitBtnDisabled) {
102 return;
103 }
74 let b1 = this.checkCnName(); 104 let b1 = this.checkCnName();
75 let b2 = this.checkIdNo(); 105 let b2 = this.checkIdNo();
76 let b3 = this.checkBirthday(); 106 let b3 = this.checkBirthday();
...@@ -212,6 +242,12 @@ export default { ...@@ -212,6 +242,12 @@ export default {
212 "path": this.targetPath 242 "path": this.targetPath
213 }); 243 });
214 } 244 }
245 },
246 userLogout() {
247 this.showForm = false;
248 },
249 userLogin(data) {
250 this.showForm = true;
215 } 251 }
216 }, 252 },
217 mounted() { 253 mounted() {
......
1 1
2 2
3 <template> 3 <template>
4 <div class="content"> 4 <div>
5 <modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp> 5 <modal-simple-comp :visible="modalSimpleVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="closeModal" :overlay="closeModal" :close="closeModal"></modal-simple-comp>
6 <div class="ebg"> 6 <modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp>
7 <img src="@/assets/images/common/login-bg.png"> 7 <div class="content">
8 </div> 8 <div class="ebg">
9 <div class="top-space"></div> 9 <img src="@/assets/images/common/login-bg.png">
10 <div class="box"> 10 </div>
11 <div class="login"> 11 <div class="top-space"></div>
12 <div class="login-tit">{{$t('infomationImprove.title')}}</div> 12 <div class="box">
13 <div class="login-tit-space-1"></div> 13 <div class="login">
14 <div class="gird-g form"> 14 <auth @onLogin="userLogin" @onLogout="userLogout"></auth>
15 15 <template v-if="showForm">
16 <div class="pure-u-1 pure-u-md-1-2 form-item"> 16 <div class="login-tit">{{$t('infomationImprove.title')}}</div>
17 <div class="label"> 17 <div class="login-tit-space-1"></div>
18 <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c1')}} 18 <div class="gird-g form">
19 </div> 19 <div class="pure-u-1 pure-u-md-1-2 form-item">
20 <div class="ipt-wrap"> 20 <div class="label">
21 <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.cnName"> 21 <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c1')}}
22 </div> 22 </div>
23 <div class="validator" v-if="errorTips.e1.length > 0 "> 23 <div class="ipt-wrap">
24 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}} 24 <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.firstName">
25 </div> 25 </div>
26 </div> 26 <div class="validator" v-if="errorTips.e1.length > 0 ">
27 27 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}}
28 <div class="pure-u-1 pure-u-md-1-2 form-item"> 28 </div>
29 <div class="label"> 29 </div>
30 <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c2')}}
31 </div>
32 <div class="ipt-wrap">
33 <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.cnName">
34 </div>
35 <div class="validator" v-if="errorTips.e1.length > 0 ">
36 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}}
37 </div>
38 </div>
39
40 <div class="pure-u-1 form-item">
41 <div class="label">
42 <img src="@/assets/images/improve-infomation/icon-improve-infomation-sex.png"> {{$t('infomationImprove.t2')}}
43 </div>
44 <div class="ipt-wrap">
45 <div class="down-arrow"></div>
46 <select class="ipt" :class="{err : errorTips.e2.length > 0}" v-model="information.sex">
47 <template v-if="sexCandidates">
48 <option v-for="(item,index) in sexCandidates" :key="index" :value="item.value">{{item.name}}</option>
49 </template>
50 </select>
51 </div>
52 <div class="validator" v-if="errorTips.e2.length > 0 ">
53 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e2}}
54 </div>
55 </div>
56 30
57 <div class="pure-u-1 form-item"> 31 <div class="pure-u-1 pure-u-md-1-2 form-item">
58 <div class="label"> 32 <div class="label">
59 <img src="@/assets/images/improve-infomation/icon-improve-infomation-date.png"> {{$t('infomationImprove.t3')}} 33 <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c2')}}
60 </div> 34 </div>
61 <div class="ipt-wrap"> 35 <div class="ipt-wrap">
62 <!-- <input class="ipt" type="date" :class="{err : errorTips.e3.length > 0}" v-model="birthDate"> --> 36 <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.lastName">
63 <date-picker class="date" v-model="birthDate"></date-picker> 37 </div>
64 </div> 38 <div class="validator" v-if="errorTips.e1.length > 0 ">
65 <div class="validator" v-if="errorTips.e3.length > 0 "> 39 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}}
66 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e3}} 40 </div>
67 </div> 41 </div>
68 </div>
69 42
70 <div class="pure-u-1 form-item"> 43 <div class="pure-u-1 form-item">
71 <div class="label"> 44 <div class="label">
72 <img src="@/assets/images/improve-infomation/icon-improve-infomation-card.png"> {{$t('infomationImprove.t4')}} 45 <img src="@/assets/images/improve-infomation/icon-improve-infomation-sex.png"> {{$t('infomationImprove.t2')}}
73 </div> 46 </div>
74 <div class="ipt-wrap"> 47 <div class="ipt-wrap">
75 <div class="down-arrow"></div> 48 <div class="down-arrow"></div>
76 <select class="ipt" :class="{err : errorTips.e4.length > 0}" v-model="information.idType"> 49 <select class="ipt" :class="{err : errorTips.e2.length > 0}" v-model="information.sex">
77 <template v-if="idTypeCandidates"> 50 <template v-if="sexCandidates">
78 <option v-for="(item,index) in idTypeCandidates" :key="index" :value="item.value">{{item.name}}</option> 51 <option v-for="(item,index) in sexCandidates" :key="index" :value="item.value">{{item.name}}</option>
79 </template> 52 </template>
80 </select> 53 </select>
81 </div> 54 </div>
82 <div class="validator" v-if="errorTips.e4.length > 0 "> 55 <div class="validator" v-if="errorTips.e2.length > 0 ">
83 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e4}} 56 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e2}}
84 </div> 57 </div>
85 </div> 58 </div>
86 59
87 <div class="pure-u-1 form-item"> 60 <div class="pure-u-1 form-item">
88 <div class="label"> 61 <div class="label">
89 <img src="@/assets/images/improve-infomation/icon-improve-infomation-card.png"> {{$t('infomationImprove.t5')}} 62 <img src="@/assets/images/improve-infomation/icon-improve-infomation-date.png"> {{$t('infomationImprove.t3')}}
90 </div> 63 </div>
91 <div class="ipt-wrap"> 64 <div class="ipt-wrap">
92 <input class="ipt" type="text" :class="{err : errorTips.e5.length > 0}" v-model="information.idNo"> 65 <!-- <input class="ipt" type="date" :class="{err : errorTips.e3.length > 0}" v-model="birthDate"> -->
93 </div> 66 <date-picker class="date" v-model="information.birthDate"></date-picker>
94 <div class="validator" v-if="errorTips.e5.length > 0 "> 67 </div>
95 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e5}} 68 <div class="validator" v-if="errorTips.e3.length > 0 ">
96 </div> 69 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e3}}
97 </div> 70 </div>
71 </div>
98 72
73 <div class="pure-u-1 form-item">
74 <div class="label">
75 <img src="@/assets/images/improve-infomation/icon-improve-infomation-card.png"> {{$t('infomationImprove.t4')}}
76 </div>
77 <div class="ipt-wrap">
78 <div class="down-arrow"></div>
79 <select class="ipt" :class="{err : errorTips.e4.length > 0}" v-model="information.idType">
80 <template v-if="idTypeCandidates">
81 <option v-for="(item,index) in idTypeCandidates" :key="index" :value="item.value">{{item.name}}</option>
82 </template>
83 </select>
84 </div>
85 <div class="validator" v-if="errorTips.e4.length > 0 ">
86 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e4}}
87 </div>
99 </div> 88 </div>
100 89
101 <div class="login-btn-wrap"> 90 <div class="pure-u-1 form-item">
102 <div @click="onUpdateHandler()" class="login-submit pointer">{{$t('infomationImprove.submit')}}</div> 91 <div class="label">
92 <img src="@/assets/images/improve-infomation/icon-improve-infomation-card.png"> {{$t('infomationImprove.t5')}}
93 </div>
94 <div class="ipt-wrap">
95 <input class="ipt" type="text" :class="{err : errorTips.e5.length > 0}" v-model="information.idNo">
96 </div>
97 <div class="validator" v-if="errorTips.e5.length > 0 ">
98 <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e5}}
103 </div> 99 </div>
100 </div>
101
102 </div>
103 <div class="login-btn-wrap">
104 <div @click="onUpdateHandler()" class="login-submit pointer" :class="{disabled: submitBtnDisabled}">{{$t('infomationImprove.submit')}}</div>
104 </div> 105 </div>
106 </template>
107 </div>
105 108
106 </div> 109 </div>
107 </div> 110 </div>
111 </div>
108 </template> 112 </template>
109 113
110 <script src="./infomation-improve.js"></script> 114 <script src="./infomation-improve.js"></script>
......
...@@ -42,9 +42,11 @@ export default { ...@@ -42,9 +42,11 @@ export default {
42 }, 42 },
43 loginForm: { 43 loginForm: {
44 // userId: "18334783910", 44 // userId: "18334783910",
45 // password: "qweqwe123" 45 // password: "qweqwe123",
46 userId: "18145729463", 46 userId: "18145729463",
47 password: "ccc123!@#", 47 password: "ccc123!@#",
48 // userId: "",
49 // password: "",
48 50
49 imageValue: "", 51 imageValue: "",
50 mobileNo: "", 52 mobileNo: "",
......
...@@ -7,6 +7,7 @@ import { ...@@ -7,6 +7,7 @@ import {
7 httpPost 7 httpPost
8 } from '@/api/fetch-api.js' 8 } from '@/api/fetch-api.js'
9 9
10 import Auth from '@components/auth/auth.vue';
10 import modalComp from '@/components/modal-comp/modal-comp.vue'; 11 import modalComp from '@/components/modal-comp/modal-comp.vue';
11 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue'; 12 import modalSimpleComp from '@/components/modal-simple-comp/modal-simple-comp.vue';
12 import { passwordEncrypt } from '@/utils/encrypt.js'; 13 import { passwordEncrypt } from '@/utils/encrypt.js';
...@@ -14,6 +15,7 @@ import { passwordEncrypt } from '@/utils/encrypt.js'; ...@@ -14,6 +15,7 @@ import { passwordEncrypt } from '@/utils/encrypt.js';
14 export default { 15 export default {
15 data() { 16 data() {
16 return { 17 return {
18 showForm: false,
17 key: 'value', 19 key: 'value',
18 type: 1, // 1:输入用户信息 2:找回密码 3:核对信息 4.重置密码 20 type: 1, // 1:输入用户信息 2:找回密码 3:核对信息 4.重置密码
19 values: { 21 values: {
...@@ -135,7 +137,13 @@ export default { ...@@ -135,7 +137,13 @@ export default {
135 "path": this.targetPath 137 "path": this.targetPath
136 }); 138 });
137 } 139 }
138 } 140 },
141 userLogout() {
142 this.showForm = false;
143 },
144 userLogin(data) {
145 this.showForm = true;
146 }
139 }, 147 },
140 watch: { 148 watch: {
141 'values.oldPwd': function () { 149 'values.oldPwd': function () {
...@@ -164,6 +172,7 @@ export default { ...@@ -164,6 +172,7 @@ export default {
164 created() { }, 172 created() { },
165 components: { 173 components: {
166 modalComp, 174 modalComp,
167 modalSimpleComp 175 modalSimpleComp,
176 Auth
168 } 177 }
169 } 178 }
......
...@@ -10,44 +10,47 @@ ...@@ -10,44 +10,47 @@
10 <div class="top-space"></div> 10 <div class="top-space"></div>
11 <div class="box"> 11 <div class="box">
12 <div class="login"> 12 <div class="login">
13 <div class="login-tit">{{$t('passwordReset.type4.title')}}</div> 13 <auth @onLogin="userLogin" @onLogout="userLogout"></auth>
14 <div class="login-tit-space-4"></div> 14 <template v-if="showForm">
15 <div class="gird-g form"> 15 <div class="login-tit">{{$t('passwordReset.type4.title')}}</div>
16 <div class="pure-u-1 form-item"> 16 <div class="login-tit-space-4"></div>
17 <div class="label"> 17 <div class="gird-g form">
18 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('passwordReset.oldPwd')}} 18 <div class="pure-u-1 form-item">
19 </div> 19 <div class="label">
20 <div class="ipt-wrap"> 20 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('passwordReset.oldPwd')}}
21 <input :placeholder="$t('passwordReset.oldPwdPlaceholde')" class="ipt" type="password" v-model="values.oldPwd"> 21 </div>
22 </div> 22 <div class="ipt-wrap">
23 <div class="validator" v-if="step.error0.length > 0 "> 23 <input :placeholder="$t('passwordReset.oldPwdPlaceholde')" class="ipt" type="password" v-model="values.oldPwd">
24 <img src="@/assets/images/common/icon-notice.png" alt=""> {{step.error0}} 24 </div>
25 </div> 25 <div class="validator" v-if="step.error0.length > 0 ">
26 </div> 26 <img src="@/assets/images/common/icon-notice.png" alt=""> {{step.error0}}
27 <div class="pure-u-1 form-item"> 27 </div>
28 <div class="label"> 28 </div>
29 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('passwordReset.type4.t1')}} 29 <div class="pure-u-1 form-item">
30 </div> 30 <div class="label">
31 <div class="ipt-wrap"> 31 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('passwordReset.type4.t1')}}
32 <input :placeholder="$t('passwordReset.type4.t1Placeholder')" class="ipt" type="password" v-model="values.pwd"> 32 </div>
33 </div> 33 <div class="ipt-wrap">
34 <div class="validator" v-if="step.error1.length > 0 "> 34 <input :placeholder="$t('passwordReset.type4.t1Placeholder')" class="ipt" type="password" v-model="values.pwd">
35 <img src="@/assets/images/common/icon-notice.png" alt=""> {{step.error1}} 35 </div>
36 </div> 36 <div class="validator" v-if="step.error1.length > 0 ">
37 </div> 37 <img src="@/assets/images/common/icon-notice.png" alt=""> {{step.error1}}
38 <div class="pure-u-1 form-item"> 38 </div>
39 <div class="label"> 39 </div>
40 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('passwordReset.type4.t2')}} 40 <div class="pure-u-1 form-item">
41 </div> 41 <div class="label">
42 <div class="ipt-wrap"> 42 <img src="@/assets/images/register/icon-register-lock.png"> {{$t('passwordReset.type4.t2')}}
43 <input :placeholder="$t('passwordReset.type4.t2Placeholder')" class="ipt" type="password" v-model="values.pwdRepeat"> 43 </div>
44 </div> 44 <div class="ipt-wrap">
45 <div class="validator" v-if="step.error2.length > 0 "> 45 <input :placeholder="$t('passwordReset.type4.t2Placeholder')" class="ipt" type="password" v-model="values.pwdRepeat">
46 <img src="@/assets/images/common/icon-notice.png" alt=""> {{step.error2}} 46 </div>
47 <div class="validator" v-if="step.error2.length > 0 ">
48 <img src="@/assets/images/common/icon-notice.png" alt=""> {{step.error2}}
49 </div>
47 </div> 50 </div>
48 </div> 51 </div>
49 </div> 52 <div @click="resetPwd()" class="login-submit pointer" :class="{disabled: submitBtnDisabled}">{{$t('passwordReset.type4.submit')}}</div>
50 <div @click="resetPwd()" class="login-submit pointer" :class="{disabled: submitBtnDisabled}">{{$t('passwordReset.type4.submit')}}</div> 53 </template>
51 </div> 54 </div>
52 </div> 55 </div>
53 </div> 56 </div>
......