基本功能調整
Showing
23 changed files
with
291 additions
and
40 deletions
... | @@ -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 | } | ... | ... |
... | @@ -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", |
... | @@ -730,6 +736,14 @@ module.exports = { | ... | @@ -730,6 +736,14 @@ module.exports = { |
730 | e1: "請填寫該項內容", | 736 | e1: "請填寫該項內容", |
731 | e2: "請填寫正確的聯繫方式" | 737 | e2: "請填寫正確的聯繫方式" |
732 | } | 738 | } |
739 | }, | ||
740 | unauth: { | ||
741 | tips: "如您有平安一账通账户,可帮助我们更好地为您提供服务", | ||
742 | or: "或", | ||
743 | login: "登录", | ||
744 | register: "注册", | ||
745 | baseInfoTip : "您的完整信息可帮助我们为您提供完整服务", | ||
746 | infoBtn : "前往完善" | ||
733 | } | 747 | } |
734 | } | 748 | } |
735 | } | 749 | } | ... | ... |
src/components/auth/auth.js
0 → 100644
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 | } |
src/components/auth/auth.scss
0 → 100644
src/components/auth/auth.vue
0 → 100644
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> |
... | @@ -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,6 +133,12 @@ export default { | ... | @@ -128,6 +133,12 @@ export default { |
128 | sep = "&"; | 133 | sep = "&"; |
129 | } | 134 | } |
130 | return path; | 135 | return path; |
136 | }, | ||
137 | userLogout() { | ||
138 | this.showForm = false; | ||
139 | }, | ||
140 | userLogin(data) { | ||
141 | this.showForm = true; | ||
131 | } | 142 | } |
132 | }, | 143 | }, |
133 | watch: { | 144 | watch: { | ... | ... |
1 | 1 | ||
2 | <template> | 2 | <template> |
3 | <div class="container border"> | 3 | <div> |
4 | <auth @onLogin="userLogin" @onLogout="userLogout" :checkProfile="true"></auth> | ||
5 | <div class="container border" v-if="showForm"> | ||
4 | <div class="form"> | 6 | <div class="form"> |
5 | <div class="form-item"> | 7 | <div class="form-item"> |
6 | <div class="label"> | 8 | <div class="label"> |
... | @@ -57,6 +59,7 @@ | ... | @@ -57,6 +59,7 @@ |
57 | {{$t("policyChangeContact.submit")}} | 59 | {{$t("policyChangeContact.submit")}} |
58 | </div> | 60 | </div> |
59 | </div> | 61 | </div> |
62 | </div> | ||
60 | </template> | 63 | </template> |
61 | 64 | ||
62 | <script src="./policy-change-contact.js"></script> | 65 | <script src="./policy-change-contact.js"></script> | ... | ... |
... | @@ -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; |
85 | if (icon == "succ") { | ||
69 | this.modalVisiable = true; | 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-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> | 6 | <modal-comp :visible="modalVisiable" :show-confirm="false" :icon="modalIcon" :content="modalContent" :confirm="modalCallback" :overlay="modalCallback"></modal-comp> |
7 | <div class="content"> | ||
6 | <div class="ebg"> | 8 | <div class="ebg"> |
7 | <img src="@/assets/images/common/login-bg.png"> | 9 | <img src="@/assets/images/common/login-bg.png"> |
8 | </div> | 10 | </div> |
9 | <div class="top-space"></div> | 11 | <div class="top-space"></div> |
10 | <div class="box"> | 12 | <div class="box"> |
11 | <div class="login"> | 13 | <div class="login"> |
14 | <auth @onLogin="userLogin" @onLogout="userLogout"></auth> | ||
15 | <template v-if="showForm"> | ||
12 | <div class="login-tit">{{$t('infomationImprove.title')}}</div> | 16 | <div class="login-tit">{{$t('infomationImprove.title')}}</div> |
13 | <div class="login-tit-space-1"></div> | 17 | <div class="login-tit-space-1"></div> |
14 | <div class="gird-g form"> | 18 | <div class="gird-g form"> |
15 | |||
16 | <div class="pure-u-1 pure-u-md-1-2 form-item"> | 19 | <div class="pure-u-1 pure-u-md-1-2 form-item"> |
17 | <div class="label"> | 20 | <div class="label"> |
18 | <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c1')}} | 21 | <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c1')}} |
19 | </div> | 22 | </div> |
20 | <div class="ipt-wrap"> | 23 | <div class="ipt-wrap"> |
21 | <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.cnName"> | 24 | <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.firstName"> |
22 | </div> | 25 | </div> |
23 | <div class="validator" v-if="errorTips.e1.length > 0 "> | 26 | <div class="validator" v-if="errorTips.e1.length > 0 "> |
24 | <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}} | 27 | <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}} |
... | @@ -30,7 +33,7 @@ | ... | @@ -30,7 +33,7 @@ |
30 | <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c2')}} | 33 | <img src="@/assets/images/improve-infomation/icon-improve-infomation-user.png"> {{$t('infomationImprove.t1c2')}} |
31 | </div> | 34 | </div> |
32 | <div class="ipt-wrap"> | 35 | <div class="ipt-wrap"> |
33 | <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.cnName"> | 36 | <input class="ipt" :class="{err : errorTips.e1.length > 0}" type="text" v-model="information.lastName"> |
34 | </div> | 37 | </div> |
35 | <div class="validator" v-if="errorTips.e1.length > 0 "> | 38 | <div class="validator" v-if="errorTips.e1.length > 0 "> |
36 | <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}} | 39 | <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e1}} |
... | @@ -60,7 +63,7 @@ | ... | @@ -60,7 +63,7 @@ |
60 | </div> | 63 | </div> |
61 | <div class="ipt-wrap"> | 64 | <div class="ipt-wrap"> |
62 | <!-- <input class="ipt" type="date" :class="{err : errorTips.e3.length > 0}" v-model="birthDate"> --> | 65 | <!-- <input class="ipt" type="date" :class="{err : errorTips.e3.length > 0}" v-model="birthDate"> --> |
63 | <date-picker class="date" v-model="birthDate"></date-picker> | 66 | <date-picker class="date" v-model="information.birthDate"></date-picker> |
64 | </div> | 67 | </div> |
65 | <div class="validator" v-if="errorTips.e3.length > 0 "> | 68 | <div class="validator" v-if="errorTips.e3.length > 0 "> |
66 | <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e3}} | 69 | <img src="@/assets/images/common/icon-notice.png" alt=""> {{errorTips.e3}} |
... | @@ -97,14 +100,15 @@ | ... | @@ -97,14 +100,15 @@ |
97 | </div> | 100 | </div> |
98 | 101 | ||
99 | </div> | 102 | </div> |
100 | |||
101 | <div class="login-btn-wrap"> | 103 | <div class="login-btn-wrap"> |
102 | <div @click="onUpdateHandler()" class="login-submit pointer">{{$t('infomationImprove.submit')}}</div> | 104 | <div @click="onUpdateHandler()" class="login-submit pointer" :class="{disabled: submitBtnDisabled}">{{$t('infomationImprove.submit')}}</div> |
103 | </div> | 105 | </div> |
106 | </template> | ||
104 | </div> | 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,6 +137,12 @@ export default { | ... | @@ -135,6 +137,12 @@ export default { |
135 | "path": this.targetPath | 137 | "path": this.targetPath |
136 | }); | 138 | }); |
137 | } | 139 | } |
140 | }, | ||
141 | userLogout() { | ||
142 | this.showForm = false; | ||
143 | }, | ||
144 | userLogin(data) { | ||
145 | this.showForm = true; | ||
138 | } | 146 | } |
139 | }, | 147 | }, |
140 | watch: { | 148 | watch: { |
... | @@ -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,6 +10,8 @@ | ... | @@ -10,6 +10,8 @@ |
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 | <auth @onLogin="userLogin" @onLogout="userLogout"></auth> | ||
14 | <template v-if="showForm"> | ||
13 | <div class="login-tit">{{$t('passwordReset.type4.title')}}</div> | 15 | <div class="login-tit">{{$t('passwordReset.type4.title')}}</div> |
14 | <div class="login-tit-space-4"></div> | 16 | <div class="login-tit-space-4"></div> |
15 | <div class="gird-g form"> | 17 | <div class="gird-g form"> |
... | @@ -48,6 +50,7 @@ | ... | @@ -48,6 +50,7 @@ |
48 | </div> | 50 | </div> |
49 | </div> | 51 | </div> |
50 | <div @click="resetPwd()" class="login-submit pointer" :class="{disabled: submitBtnDisabled}">{{$t('passwordReset.type4.submit')}}</div> | 52 | <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> | ... | ... |
-
Please register or sign in to post a comment