Fix(店铺):[#998, #997]界面调整

This commit is contained in:
lifizer
2024-03-22 20:50:11 +08:00
parent 7eafde60e1
commit e0aca00b5a
2 changed files with 166 additions and 130 deletions
+38 -2
View File
@@ -149,6 +149,8 @@
<view :class="isMyInn ? 'my-inn-page' : ''"> <view :class="isMyInn ? 'my-inn-page' : ''">
<!-- v4 商品列表 --> <!-- v4 商品列表 -->
<view v-if="activeIndex === 0" class="goods-section"> <view v-if="activeIndex === 0" class="goods-section">
<view v-if="isLoadGoodListoSuccess">
<view v-if="goodsList.length > 0">
<view class="flex flex-wrap"> <view class="flex flex-wrap">
<view <view
v-for="(item,index) in goodsList" v-for="(item,index) in goodsList"
@@ -181,18 +183,25 @@
</view> </view>
</view> </view>
</view> </view>
<view v-show="goodsList.length > 0" class="btn"> <view class="btn">
<view class="btn-cont" @click="viewAllGoodHandle"> <view class="btn-cont" @click="viewAllGoodHandle">
查看所有商品 查看所有商品
<text class="iconfont icon-jiantou"></text> <text class="iconfont icon-jiantou"></text>
</view> </view>
</view> </view>
</view> </view>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view>
<goo-skeleton v-else />
</view>
<!-- 最新资讯 --> <!-- 最新资讯 -->
<view <view
v-if="activeIndex === 1" v-if="activeIndex === 1"
class="info-section" class="info-section"
> >
<view v-if="isLoadInfoListSuccess">
<view v-if="infoArray.length > 0" class="info-wrapper"> <view v-if="infoArray.length > 0" class="info-wrapper">
<view class="info-list"> <view class="info-list">
<view <view
@@ -298,6 +307,11 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view>
<goo-skeleton v-else />
</view> </view>
<!-- 企业文化 --> <!-- 企业文化 -->
<view <view
@@ -325,12 +339,16 @@
/> />
</view> </view>
</view> </view>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view> </view>
<!-- 商家资质 --> <!-- 商家资质 -->
<view <view
v-if="activeIndex === 3" v-if="activeIndex === 3"
class="qualifications-section" class="qualifications-section"
> >
<view v-if="inn.qualifications.length > 0">
<image <image
v-for="(item, index) in inn.qualifications" v-for="(item, index) in inn.qualifications"
:key="index" :key="index"
@@ -339,6 +357,10 @@
mode="widthFix" mode="widthFix"
/> />
</view> </view>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view>
</view> </view>
<view v-if="isMyInn" class="bottom-view acea-row"> <view v-if="isMyInn" class="bottom-view acea-row">
<view class="bottom-btn" @click="publishBtnClick"> <view class="bottom-btn" @click="publishBtnClick">
@@ -434,7 +456,9 @@ export default {
{ text: '最新资讯', value: 1, isShow: true }, { text: '最新资讯', value: 1, isShow: true },
{ text: '企业文化', value: 2, isShow: true }, { text: '企业文化', value: 2, isShow: true },
{ text: '商家资质', value: 3, isShow: true } { text: '商家资质', value: 3, isShow: true }
] ],
isLoadGoodListoSuccess: false,
isLoadInfoListSuccess: false
} }
}, },
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景 // 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
@@ -617,6 +641,7 @@ export default {
if (_this.loading) { if (_this.loading) {
return return
} }
_this.isLoadInfoListSuccess = false
_this.loading = true _this.loading = true
_this.infoArray = [] _this.infoArray = []
getHotelNewsList({ getHotelNewsList({
@@ -635,6 +660,7 @@ export default {
})) }))
}).finally(() => { }).finally(() => {
_this.loading = false _this.loading = false
_this.isLoadInfoListSuccess = true
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}) })
}, },
@@ -660,6 +686,7 @@ export default {
if (data.hasProduct <= 0) { if (data.hasProduct <= 0) {
_this.activeIndex = 1 _this.activeIndex = 1
_this.tabList[0].isShow = false _this.tabList[0].isShow = false
_this.isLoadInfoListSuccess = true
} else { } else {
_this.fetchGoods() _this.fetchGoods()
} }
@@ -741,6 +768,7 @@ export default {
} }
}, },
fetchGoods() { fetchGoods() {
this.isLoadGoodListoSuccess = false
getHotelGoodList({ getHotelGoodList({
id: this.inn.id, id: this.inn.id,
page: 1, page: 1,
@@ -755,6 +783,8 @@ export default {
} }
} }
} }
}).finally(() => {
this.isLoadGoodListoSuccess = true
}) })
}, },
call: function () { call: function () {
@@ -1292,4 +1322,10 @@ export default {
} }
} }
} }
.tab-no-data {
text-align: center;
font-size: 32rpx;
color: #999;
line-height: 80rpx;
}
</style> </style>
+2 -2
View File
@@ -99,7 +99,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="item is_required"> <!-- <view class="item is_required">
<view class="cell acea-row row-column"> <view class="cell acea-row row-column">
<view class="cell-title">店铺简介</view> <view class="cell-title">店铺简介</view>
<view> <view>
@@ -111,7 +111,7 @@
/> />
</view> </view>
</view> </view>
</view> </view> -->
<view class="item"> <view class="item">
<view class="img-upload"> <view class="img-upload">
<tm-upload <tm-upload