Refactor(首页):优化页面加载,图片使用懒加载
This commit is contained in:
@@ -5,13 +5,15 @@
|
|||||||
v-if="!item.isFarmerShop"
|
v-if="!item.isFarmerShop"
|
||||||
:src="item[imageKey]"
|
:src="item[imageKey]"
|
||||||
class="img"
|
class="img"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
:src="item.farmerShopCover"
|
:src="item.farmerShopCover"
|
||||||
v-if="item.farmerShopCoverType === 1 && item.isFarmerShop"
|
v-if="item.farmerShopCoverType === 1 && item.isFarmerShop"
|
||||||
class="img"
|
class="img"
|
||||||
mode="heightFix|widthFix">
|
mode="heightFix|widthFix"
|
||||||
</image>
|
lazy-load
|
||||||
|
/>
|
||||||
<image
|
<image
|
||||||
:src="item.farmerShopCover + '?vframe/jpg/offset/1'"
|
:src="item.farmerShopCover + '?vframe/jpg/offset/1'"
|
||||||
mode="heightFix|widthFix"
|
mode="heightFix|widthFix"
|
||||||
@@ -20,30 +22,35 @@
|
|||||||
:show-fullscreen-btn="false"
|
:show-fullscreen-btn="false"
|
||||||
:show-play-btn="false"
|
:show-play-btn="false"
|
||||||
class="img"
|
class="img"
|
||||||
:poster="item.farmerShopCover + '?vframe/jpg/offset/1'">
|
:poster="item.farmerShopCover + '?vframe/jpg/offset/1'"
|
||||||
</image>
|
lazy-load
|
||||||
|
/>
|
||||||
|
|
||||||
<image
|
<image
|
||||||
v-if="item.isOldBrand"
|
v-if="item.isOldBrand"
|
||||||
:src="webUrl + '/home/old-mark.png'"
|
:src="webUrl + '/home/old-mark.png'"
|
||||||
class="mark-img"
|
class="mark-img"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-if="item.isGiftCard"
|
v-if="item.isGiftCard"
|
||||||
style="left: 0;width: 120rpx;"
|
style="left: 0;width: 120rpx;"
|
||||||
:src="webUrl + '/home/gift-tag.png'"
|
:src="webUrl + '/home/gift-tag.png'"
|
||||||
class="mark-img"
|
class="mark-img"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-if="item.isLandmarkGoods"
|
v-if="item.isLandmarkGoods"
|
||||||
:src="webUrl + '/home/mark-land.png'"
|
:src="webUrl + '/home/mark-land.png'"
|
||||||
class="mark-img"
|
class="mark-img"
|
||||||
style="right: 20rpx"
|
style="right: 20rpx"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-if="item.isCountyFamous"
|
v-if="item.isCountyFamous"
|
||||||
:src="webUrl + '/home/qixian-mark.png'"
|
:src="webUrl + '/home/qixian-mark.png'"
|
||||||
class="mark-img"
|
class="mark-img"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
<image
|
<image
|
||||||
v-if="item.isIch"
|
v-if="item.isIch"
|
||||||
@@ -55,6 +62,7 @@
|
|||||||
v-if="item.isFarmerShop"
|
v-if="item.isFarmerShop"
|
||||||
:src="webUrl + '/orderIcon/nm.png'"
|
:src="webUrl + '/orderIcon/nm.png'"
|
||||||
class="mark-img-nm"
|
class="mark-img-nm"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.isFarmerShop" class="more-t v12-pt-2 v12-font-bold v12-font-28 v12-px-2" >{{ item.farmerShopContent }}</view>
|
<view v-if="item.isFarmerShop" class="more-t v12-pt-2 v12-font-bold v12-font-28 v12-px-2" >{{ item.farmerShopContent }}</view>
|
||||||
@@ -83,12 +91,14 @@
|
|||||||
<text class="v12-font-20">
|
<text class="v12-font-20">
|
||||||
¥
|
¥
|
||||||
</text>
|
</text>
|
||||||
{{ item[priceKey] }}</text>
|
{{ item[priceKey] }}
|
||||||
|
</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.isNegotiable === 0" class="btn" @click.stop="$emit('add', item)">
|
<view v-if="item.isNegotiable === 0" class="btn" @click.stop="$emit('add', item)">
|
||||||
<image
|
<image
|
||||||
:src="webUrl + '/home/icon-cart.png'"
|
:src="webUrl + '/home/icon-cart.png'"
|
||||||
class="img"
|
class="img"
|
||||||
|
lazy-load
|
||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -97,7 +107,7 @@
|
|||||||
v-if="item.isFarmerShop"
|
v-if="item.isFarmerShop"
|
||||||
class="v12-justify-start v12-align-center v12-pt-2 v12-px-2 v12-pb-2">
|
class="v12-justify-start v12-align-center v12-pt-2 v12-px-2 v12-pb-2">
|
||||||
<view class="btn v12-mr-2">
|
<view class="btn v12-mr-2">
|
||||||
<image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100"></image>
|
<image :src="item.farmerShopLogo" class="nm-img-logo v12-radius-100" lazy-load />
|
||||||
</view>
|
</view>
|
||||||
<view class="one-t v12-font-24 v12-dark1-text" style="width:230rpx">{{ item.farmerShopName }}/{{ item.farmerShopCityName || '-' }}</view>
|
<view class="one-t v12-font-24 v12-dark1-text" style="width:230rpx">{{ item.farmerShopName }}/{{ item.farmerShopCityName || '-' }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user