Authored by htoooth

fix

@@ -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;
1 <template> 1 <template>
2 - <div :class="prefixCls" v-show="show"> 2 + <div :class="prefixCls" v-if="show">
3 <slot></slot> 3 <slot></slot>
4 </div> 4 </div>
5 </template> 5 </template>
@@ -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: {
@@ -32,6 +32,7 @@ export default { @@ -32,6 +32,7 @@ export default {
32 created() { 32 created() {
33 }, 33 },
34 mounted() { 34 mounted() {
  35 + this.getList();
35 }, 36 },
36 methods: { 37 methods: {
37 getList() { 38 getList() {
@@ -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']),