选中颜色
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<view class="title">我的商品</view>
|
||||
<u-checkbox-group>
|
||||
<view class="list">
|
||||
<shopItem @xuanzhong="xuanzhong" class="items" v-for="(i,j) in list" :key="j" :image="i.goods_image" :title="i.goods_name" :price="i.goods_marketprice" :num="i.goods_salenum" :sid="i.goods_id" ref="shop"></shopItem>
|
||||
<shopItem @xuanzhong="xuanzhong" :wxuanzhong="sele.indexOf(i.goods_id + '') > -1" class="items" v-for="(i,j) in list" :key="j" :image="i.goods_image" :title="i.goods_name" :price="i.goods_marketprice" :num="i.goods_salenum" :sid="i.goods_id" ref="shop"></shopItem>
|
||||
</view>
|
||||
</u-checkbox-group>
|
||||
<view class="jiaru" @click="jiaru">加入售货袋</view>
|
||||
<view class="jiaru" @click="jiaru" :style="{'background-color': sele.length > 0 ? 'rgba(255, 120, 15, 1' : ''}">加入售货袋</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -45,6 +45,11 @@ export default {
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
this.sele = uni.getStorageSync("gouwudai").split(',')
|
||||
if(this.sele[0] == ""){
|
||||
this.sele = []
|
||||
}
|
||||
console.log(this.sele[0])
|
||||
this.$u.api.getStoreGoodsList().then((res)=>{
|
||||
this.list = res.data.list
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user