Showing
4 changed files
with
21 additions
and
3 deletions
@@ -15,6 +15,8 @@ | @@ -15,6 +15,8 @@ | ||
15 | </template> | 15 | </template> |
16 | 16 | ||
17 | <script> | 17 | <script> |
18 | +import {mapState} from 'vuex'; | ||
19 | + | ||
18 | export default { | 20 | export default { |
19 | name: 'HeaderUfo', | 21 | name: 'HeaderUfo', |
20 | props: { | 22 | props: { |
@@ -24,9 +26,16 @@ export default { | @@ -24,9 +26,16 @@ export default { | ||
24 | default: 1 | 26 | default: 1 |
25 | } | 27 | } |
26 | }, | 28 | }, |
29 | + computed: { | ||
30 | + ...mapState(['yoho']) | ||
31 | + }, | ||
27 | methods: { | 32 | methods: { |
28 | onBack() { | 33 | onBack() { |
29 | - this.$yoho.finishPage({}); | 34 | + if (this.yoho.homePage) { |
35 | + this.$yoho.finishPage({}); | ||
36 | + } else { | ||
37 | + this.$router.go(-1); | ||
38 | + } | ||
30 | } | 39 | } |
31 | } | 40 | } |
32 | }; | 41 | }; |
@@ -45,7 +45,7 @@ export default { | @@ -45,7 +45,7 @@ export default { | ||
45 | placeholder: '请输入持卡人姓名', | 45 | placeholder: '请输入持卡人姓名', |
46 | type: 'name', | 46 | type: 'name', |
47 | errorTip: '您输入的姓名不符合规范,请重新输入', | 47 | errorTip: '您输入的姓名不符合规范,请重新输入', |
48 | - regx: /^[u4e00-u9fa5a-zA-Z]{2,}$/ | 48 | + regx: /^([\u4e00-\u9fa5]|[A-Za-z]){2,}$/ |
49 | }, | 49 | }, |
50 | { | 50 | { |
51 | title: '身份证号', | 51 | title: '身份证号', |
@@ -107,7 +107,7 @@ export default { | @@ -107,7 +107,7 @@ export default { | ||
107 | methods: { | 107 | methods: { |
108 | ...mapActions(['fetchBankList', 'checkBankCard', 'bindBankCard']), | 108 | ...mapActions(['fetchBankList', 'checkBankCard', 'bindBankCard']), |
109 | isReadonly(item) { | 109 | isReadonly(item) { |
110 | - return !!item.tapGo; | 110 | + return !!item.select; |
111 | }, | 111 | }, |
112 | inputChange(index, e) { | 112 | inputChange(index, e) { |
113 | this.changeFormValue(index, e.target.value); | 113 | this.changeFormValue(index, e.target.value); |
@@ -36,7 +36,13 @@ export default { | @@ -36,7 +36,13 @@ export default { | ||
36 | data() { | 36 | data() { |
37 | return {}; | 37 | return {}; |
38 | }, | 38 | }, |
39 | + mounted() { | ||
40 | + if (!this.bankCardList.length) { | ||
41 | + this.fetchBankCard(); | ||
42 | + } | ||
43 | + }, | ||
39 | methods: { | 44 | methods: { |
45 | + ...mapActions(['fetchBankCard']) | ||
40 | }, | 46 | }, |
41 | computed: { | 47 | computed: { |
42 | ...mapState(['bankCardList']) | 48 | ...mapState(['bankCardList']) |
@@ -22,6 +22,7 @@ export default function() { | @@ -22,6 +22,7 @@ export default function() { | ||
22 | visible: true, | 22 | visible: true, |
23 | pageVisible: false, | 23 | pageVisible: false, |
24 | direction: 'forword', | 24 | direction: 'forword', |
25 | + homePage: true | ||
25 | }, | 26 | }, |
26 | mutations: { | 27 | mutations: { |
27 | [Types.SET_ENV](state, {context}) { | 28 | [Types.SET_ENV](state, {context}) { |
@@ -52,6 +53,8 @@ export default function() { | @@ -52,6 +53,8 @@ export default function() { | ||
52 | }); | 53 | }); |
53 | state.direction = 'forword'; | 54 | state.direction = 'forword'; |
54 | } | 55 | } |
56 | + | ||
57 | + state.homePage = state.historys.length <= 1; | ||
55 | }, | 58 | }, |
56 | [Types.NEED_LOGIN](state, {needLogin}) { | 59 | [Types.NEED_LOGIN](state, {needLogin}) { |
57 | state.context.needLogin = needLogin; | 60 | state.context.needLogin = needLogin; |
-
Please register or login to post a comment