修改店铺页面店铺显示问题

master
lemon橪 2021-08-11 09:49:09 +08:00
parent b93395d0dc
commit 1fbb43c848
2 changed files with 27 additions and 19 deletions

View File

@ -12,8 +12,8 @@
{{ storeInfo.storeName || ''}}
</div>
<div class="flex store-message">
<div> <span>{{ storeInfo.goodsNum || 0 }}</span>关注 </div>
<div> <span>{{ storeInfo.collectionNum || 0 }}</span>件商品 </div>
<div> <span>{{ storeInfo.collectionNum || 0 }}</span>关注 </div>
<div> <span>{{ storeInfo.goodsNum || 0 }}</span>件商品 </div>
</div>
</div>
<div class="collection">
@ -59,7 +59,7 @@
<div class="contant" v-if="current == 0">
<view v-if="!goodsList.length" class="empty"></view>
<view v-else class="item" v-for="(item,index) in goodsList" :key="index" @click="navigateToGoodsDetail(item)">
<u-image width="100%" height="324rpx" :src="item.thumbnail">
<u-image width="100%" height="330rpx" mode="aspectFit" :src="item.thumbnail">
<u-loading slot="loading"></u-loading>
</u-image>
<div class="name">{{ item.goodsName }}</div>
@ -140,23 +140,12 @@ export default {
//
uni.showShareMenu({ withShareTicket: true });
// #endif
this.init();
},
onShow() {
this.goodsList = [];
this.categoryList = [];
this.couponList = [];
this.goodsParams.pageNumber = 1;
if (this.$options.filters.isLogin("auth")) {
this.enableGoodsIsCollect();
if (this.goodsList.length == 0) {
this.init();
}
//
this.getStoreData();
//
this.getGoodsData();
//
this.getCouponsData();
//
this.getCategoryData();
},
//
onReachBottom() {
@ -165,6 +154,26 @@ export default {
},
methods: {
/**
* 初始化信息
*/
init() {
this.goodsList = [];
this.categoryList = [];
this.couponList = [];
this.goodsParams.pageNumber = 1;
if (this.$options.filters.isLogin("auth")) {
this.enableGoodsIsCollect();
}
//
this.getStoreData();
//
this.getGoodsData();
//
this.getCouponsData();
//
this.getCategoryData();
},
/**
* 联系客服
*/
@ -173,7 +182,6 @@ export default {
// #ifdef MP-WEIXIN
const params = {
// originalPrice: this.goodsDetail.original || this.goodsDetail.price,
uuid: storage.getUuid(),
token: storage.getAccessToken(),

View File

@ -5,7 +5,7 @@
<div class="contant">
<view v-if="!goodsList.length" class="empty"></view>
<view v-else class="item" v-for="(item,index) in goodsList" :key="index" @click="navigateToGoodsDetail(item)">
<u-image width="100%" height="324rpx" :src="item.thumbnail">
<u-image width="100%" mode="aspectFit" height="324rpx" :src="item.thumbnail">
<u-loading slot="loading"></u-loading>
</u-image>
<div class="name">{{ item.goodsName }}</div>