Commit c1b1c75ff4e5e2656668e71290a0cf80542613de

Authored by zhiyangdu
1 parent e119d67b

优化爱心屋tab组件

src/components/tabBox/tabBox.vue
... ... @@ -25,6 +25,20 @@
25 25 <discountZone v-if="item.style == '1'" @more="toDetail" @toDetail="toDetail"
26 26 :discountZoneInfo="item">
27 27 </discountZone>
  28 + <!--天天特惠-->
  29 + <preferential v-if="item.style == '2'" @more="toDetail" @toDetail="toDetail"
  30 + :preferentialInfo="item">
  31 + </preferential>
  32 +
  33 + <!--视听专区-->
  34 + <videoArea v-if="item.style == '13'" @more="toDetail" @toDetail="toDetail"
  35 + :videoAreaInfo="item">
  36 + </videoArea>
  37 +
  38 + <!-- style_7组件 -->
  39 + <style-7 v-if="item.style == '7'" @more="toDetail" @bannerJump="toDetail" @jump=$parent.jump @addCart=$parent.addCart
  40 + :styles="item">
  41 + </style-7>
28 42 </div>
29 43 <!-- 商品推荐 -->
30 44 <div class="skeleton commodity" ref="commodity">
... ... @@ -49,6 +63,9 @@
49 63 import imgListBox from "@/components/imgListBox/imgListBox";
50 64 import columnCommodityListBox from "@/components/columnCommodityListBox/columnCommodityListBox";
51 65 import discountZone from "@/components/discountZone/discountZone";
  66 + import preferential from "@/components/preferential/preferential";
  67 + import videoArea from "@/components/videoArea/videoArea";
  68 + import style7 from "@/components/style_7/style_7";
52 69 export default {
53 70 name: 'name',
54 71 data () {
... ... @@ -72,7 +89,10 @@
72 89 htmlBox,
73 90 imgListBox,
74 91 columnCommodityListBox,
75   - discountZone
  92 + discountZone,
  93 + preferential,
  94 + videoArea,
  95 + style7,
76 96 },
77 97 created(){
78 98 // 初始化的时选中关爱屋
... ... @@ -94,12 +114,11 @@
94 114 * @param {object} item [通用跳转对象]
95 115 */
96 116 toDetail(item) {
97   -
98 117 // 判断是否有通用跳转函数
99   - if (typeof this.$parent.gotoDetail === "function") {
  118 + if (typeof this.$parent.toDetail === "function") {
100 119  
101 120 // 调用通用跳转
102   - this.$parent.gotoDetail(item);
  121 + this.$parent.toDetail(item);
103 122 }
104 123 },
105 124 /**
... ...