Commit 2e93e4bab0c9471ef2ea56565ac658d7ec48e4c5

Authored by 王强
2 parents 15771acd d7bb2900
src/components/tabBox/tabBox.vue
@@ -8,14 +8,14 @@ @@ -8,14 +8,14 @@
8 <div class="tabBox_main" ref="tabsSwiperBox"> 8 <div class="tabBox_main" ref="tabsSwiperBox">
9 <div class="tabbar" v-for="(item, index) in tabbaromponents&&tabbaromponents.ads" :key="index"> 9 <div class="tabbar" v-for="(item, index) in tabbaromponents&&tabbaromponents.ads" :key="index">
10 <!-- 关爱屋简介 --> 10 <!-- 关爱屋简介 -->
11 - <div class="skeleton brief" ref="brief"> 11 + <div :style="{backgroundColor:tabbar[0].color || tabbarBackgroud}" class="skeleton brief" ref="brief">
12 <html-box 12 <html-box
13 v-if="item.style === '14'" 13 v-if="item.style === '14'"
14 :htmls="item.content"> 14 :htmls="item.content">
15 </html-box> 15 </html-box>
16 </div> 16 </div>
17 <!-- 精品推荐 --> 17 <!-- 精品推荐 -->
18 - <div class="skeleton boutique" ref="boutique"> 18 + <div :style="{backgroundColor:tabbar[1].color || tabbarBackgroud}" class="skeleton boutique" ref="boutique">
19 <img-list-box 19 <img-list-box
20 v-if="item.style === '12'" 20 v-if="item.style === '12'"
21 @detail="toDetail" 21 @detail="toDetail"
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 </style-7> 41 </style-7>
42 </div> 42 </div>
43 <!-- 商品推荐 --> 43 <!-- 商品推荐 -->
44 - <div class="skeleton commodity" ref="commodity"> 44 + <div :style="{backgroundColor:tabbar[2].color || tabbarBackgroud}" class="skeleton commodity" ref="commodity">
45 <!--infinite-scroll-immediate-check="true"可避免上拉多次调用接口问题--> 45 <!--infinite-scroll-immediate-check="true"可避免上拉多次调用接口问题-->
46 <div class="column-commodity-list" infinite-scroll-immediate-check="true" v-infinite-scroll="loadCommodity" infinite-scroll-disabled="paging.commodity.loading" :infinite-scroll-distance="paging.distance"> 46 <div class="column-commodity-list" infinite-scroll-immediate-check="true" v-infinite-scroll="loadCommodity" infinite-scroll-disabled="paging.commodity.loading" :infinite-scroll-distance="paging.distance">
47 <column-commodity-list-box 47 <column-commodity-list-box
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 } 84 }
85 } 85 }
86 }, 86 },
87 - props:["tabbar"], 87 + props:["tabbar","tabbarBackgroud"],
88 components: { 88 components: {
89 htmlBox, 89 htmlBox,
90 imgListBox, 90 imgListBox,
src/pages/mall/mall.vue
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 :styles="item"> 42 :styles="item">
43 </style-7> 43 </style-7>
44 </div> 44 </div>
45 - <tabBox v-if="tabbar" :tabbar="tabbar"></tabBox> 45 + <tabBox v-if="tabbar" :tabbar="tabbar" :tabbarBackgroud="tabbarBackgroud"></tabBox>
46 </div> 46 </div>
47 <!-- </van-pull-refresh> --> 47 <!-- </van-pull-refresh> -->
48 </div> 48 </div>
@@ -69,7 +69,8 @@ @@ -69,7 +69,8 @@
69 banner:null, // banner 69 banner:null, // banner
70 navs: null, // 导航 70 navs: null, // 导航
71 ads: null, // 列表 71 ads: null, // 列表
72 - tabbar:null // tabbar嵌套组件 72 + tabbar:null, // tabbar嵌套组件
  73 + tabbarBackgroud:null // 整体tabbar背景
73 } 74 }
74 }, 75 },
75 components:{ 76 components:{
@@ -157,6 +158,10 @@ @@ -157,6 +158,10 @@
157 if (datas.tabbar && datas.tabbar.length) { 158 if (datas.tabbar && datas.tabbar.length) {
158 this.$set(this, "tabbar", datas.tabbar); 159 this.$set(this, "tabbar", datas.tabbar);
159 } 160 }
  161 + // 设置tabbarBackgroud数据
  162 + if (datas.color && datas.color.length) {
  163 + this.$set(this, "tabbarBackgroud", datas.color);
  164 + }
160 /* 获取优选库精选活动数据 结束 */ 165 /* 获取优选库精选活动数据 结束 */
161 166
162 } else if (res.code == 400) { 167 } else if (res.code == 400) {