|
|
|
@ -2,35 +2,55 @@ |
|
|
|
<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)"> |
|
|
|
<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> |
|
|
|
<view class="lf-p-20"> |
|
|
|
<view class="list-title"> |
|
|
|
{{item.product.title}} |
|
|
|
<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> |
|
|
|
<view class="lf-p-20"> |
|
|
|
<view class="list-title"> |
|
|
|
{{item.product.title}} |
|
|
|
</view> |
|
|
|
<view class="list-price"> |
|
|
|
<!-- <text>{{item.price}}元</text> --> |
|
|
|
<lf-price :price="item.price"></lf-price> |
|
|
|
<text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">{{item.original_price}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="list-price"> |
|
|
|
<!-- <text>{{item.price}}元</text> --> |
|
|
|
<lf-price :price="item.price"></lf-price> |
|
|
|
<text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">{{item.original_price}}</text> |
|
|
|
</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)"> |
|
|
|
<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> |
|
|
|
<view class="lf-p-20"> |
|
|
|
<view class="list-title"> |
|
|
|
{{item.product.title}} |
|
|
|
<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> |
|
|
|
<view class="lf-p-20"> |
|
|
|
<view class="list-title"> |
|
|
|
{{item.product.title}} |
|
|
|
</view> |
|
|
|
<view class="list-price"> |
|
|
|
<!-- <text>{{item.price}}元</text> --> |
|
|
|
<lf-price :price="item.price"></lf-price> |
|
|
|
<text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">{{item.original_price}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="list-price"> |
|
|
|
<!-- <text>{{item.price}}元</text> --> |
|
|
|
<lf-price :price="item.price"></lf-price> |
|
|
|
<text class="lf-m-l-20 lf-font-24 lf-color-666 lf-line-through">{{item.original_price}}</text> |
|
|
|
</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> |
|
|
|
@ -49,16 +69,11 @@ |
|
|
|
}, |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
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(); |
|
|
|
} |
|
|
|
|