|
|
|
@ -2,7 +2,8 @@ |
|
|
|
<view> |
|
|
|
<u-waterfall v-model="dataList" ref="uWaterfall"> |
|
|
|
<template v-slot:left="{leftList}"> |
|
|
|
<view class="list-warter" v-for="(item, index) in leftList" :key="index" @click="onClick(item.id)"> |
|
|
|
<view class="list-warter" v-for="(item, index) in leftList" :key="index"> |
|
|
|
<view v-if="!item.is_ad" @click="onClick(item.id)"> |
|
|
|
<u-lazy-load threshold="-450" border-radius="8px 8px 0 0" :image="item.product.picture" :index="index"> |
|
|
|
<view class="list-label">已售{{item.sale}}</view> |
|
|
|
</u-lazy-load> |
|
|
|
@ -17,9 +18,19 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else @click="goAd(item.type,item.url)"> |
|
|
|
<u-lazy-load threshold="-450" border-radius="8px 8px 0 0" :image="item.picture" :index="index"></u-lazy-load> |
|
|
|
<view class="lf-p-20"> |
|
|
|
<view class="list-title"> |
|
|
|
{{item.title}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
<template v-slot:right="{rightList}"> |
|
|
|
<view class="list-warter" v-for="(item, index) in rightList" :key="index" @click="onClick(item.id)"> |
|
|
|
<view class="list-warter" v-for="(item, index) in rightList" :key="index"> |
|
|
|
<view v-if="!item.is_ad" @click="onClick(item.id)"> |
|
|
|
<u-lazy-load threshold="-450" border-radius="8px 8px 0 0" :image="item.product.picture" :index="index"> |
|
|
|
<view class="list-label">已售{{item.sale}}</view> |
|
|
|
</u-lazy-load> |
|
|
|
@ -34,6 +45,15 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else @click="goAd(item.type,item.url)"> |
|
|
|
<u-lazy-load threshold="-450" border-radius="8px 8px 0 0" :image="item.picture" :index="index"></u-lazy-load> |
|
|
|
<view class="lf-p-20"> |
|
|
|
<view class="list-title"> |
|
|
|
{{item.title}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
</u-waterfall> |
|
|
|
</view> |
|
|
|
@ -54,11 +74,6 @@ |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
dataList: { |
|
|
|
// let arr = []; |
|
|
|
// if(this.list && this.list.length){ |
|
|
|
// arr = this.list; |
|
|
|
// } |
|
|
|
// return arr; |
|
|
|
get() { return this.list; }, |
|
|
|
set(newValue) { console.log('newvalue',newValue) } |
|
|
|
}, |
|
|
|
@ -74,6 +89,15 @@ |
|
|
|
this.$url('/pages/goodsDetail/index?goods_id='+id); |
|
|
|
this.$emit('click'); |
|
|
|
}, |
|
|
|
goAd(type,url){ |
|
|
|
if(url) { |
|
|
|
if(type == 0) { |
|
|
|
this.$url(url); |
|
|
|
}else { |
|
|
|
this.$url('/pages/index/urlWeb?url='+url); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
clear() { |
|
|
|
this.$refs.uWaterfall.clear(); |
|
|
|
} |
|
|
|
|