Showing
6 changed files
with
17 additions
and
18 deletions
@@ -72,7 +72,8 @@ export default { | @@ -72,7 +72,8 @@ export default { | ||
72 | handleChange(index) { | 72 | handleChange(index) { |
73 | const nav = this.navList[index]; | 73 | const nav = this.navList[index]; |
74 | 74 | ||
75 | - if (this.activeKey === nav.label) { | 75 | + // 第二次点击 |
76 | + if (this.activeKey === nav.label && index === 0) { | ||
76 | this.showFilter = !this.showFilter; | 77 | this.showFilter = !this.showFilter; |
77 | this.$emit('on-filter-change', this.showFilter); | 78 | this.$emit('on-filter-change', this.showFilter); |
78 | return; | 79 | return; |
@@ -53,7 +53,6 @@ export default { | @@ -53,7 +53,6 @@ export default { | ||
53 | methods: { | 53 | methods: { |
54 | updateNav() { | 54 | updateNav() { |
55 | this.navList = []; | 55 | this.navList = []; |
56 | - console.log(); | ||
57 | this.getTabs().forEach((pane, index) => { | 56 | this.getTabs().forEach((pane, index) => { |
58 | this.navList.push({ | 57 | this.navList.push({ |
59 | label: pane.label, | 58 | label: pane.label, |
@@ -2,10 +2,10 @@ | @@ -2,10 +2,10 @@ | ||
2 | <LayoutApp> | 2 | <LayoutApp> |
3 | <Tabs> | 3 | <Tabs> |
4 | <template slot="panes"> | 4 | <template slot="panes"> |
5 | - <TabPane label="有货优惠券" disable="true"> | 5 | + <TabPane label="有货优惠券" :disable="true"> |
6 | <YohoPage></YohoPage> | 6 | <YohoPage></YohoPage> |
7 | </TabPane> | 7 | </TabPane> |
8 | - <TabPane label="UFO优惠券" disable="false"> | 8 | + <TabPane label="UFO优惠券" :disable="true"> |
9 | <UfoPage></UfoPage> | 9 | <UfoPage></UfoPage> |
10 | </TabPane> | 10 | </TabPane> |
11 | </template> | 11 | </template> |
@@ -27,19 +27,7 @@ export default { | @@ -27,19 +27,7 @@ export default { | ||
27 | store.dispatch('coupon/yoho/fetchYohoList', { | 27 | store.dispatch('coupon/yoho/fetchYohoList', { |
28 | type: TYPE.notuse, | 28 | type: TYPE.notuse, |
29 | refresh: true | 29 | refresh: true |
30 | - }), | ||
31 | - store.dispatch('coupon/yoho/fetchYohoList', { | ||
32 | - type: TYPE.use, | ||
33 | - refresh: true | ||
34 | - }), | ||
35 | - store.dispatch('coupon/yoho/fetchYohoList', { | ||
36 | - type: TYPE.overtime, | ||
37 | - refresh: true | ||
38 | - }), | ||
39 | - store.dispatch('coupon/yoho/fetchUfoList', { | ||
40 | - limit: 100, | ||
41 | - page: 1 | ||
42 | - }), | 30 | + }) |
43 | ]); | 31 | ]); |
44 | }, | 32 | }, |
45 | components: { | 33 | components: { |
@@ -114,6 +114,16 @@ export default { | @@ -114,6 +114,16 @@ export default { | ||
114 | }, | 114 | }, |
115 | mounted() { | 115 | mounted() { |
116 | this.fetchYohoNum(); | 116 | this.fetchYohoNum(); |
117 | + | ||
118 | + this.$store.dispatch('coupon/yoho/fetchYohoList', { | ||
119 | + type: TYPE.use, | ||
120 | + refresh: true | ||
121 | + }); | ||
122 | + | ||
123 | + this.$store.dispatch('coupon/yoho/fetchYohoList', { | ||
124 | + type: TYPE.overtime, | ||
125 | + refresh: true | ||
126 | + }); | ||
117 | }, | 127 | }, |
118 | methods: { | 128 | methods: { |
119 | ...mapActions(['getCouponCode', 'fetchYohoList', 'fetchYohoNum']), | 129 | ...mapActions(['getCouponCode', 'fetchYohoList', 'fetchYohoNum']), |
-
Please register or login to post a comment