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
+164 -128
View File
@@ -149,147 +149,157 @@
<view :class="isMyInn ? 'my-inn-page' : ''">
<!-- v4 商品列表 -->
<view v-if="activeIndex === 0" class="goods-section">
<view class="flex flex-wrap">
<view
v-for="(item,index) in goodsList"
:key="index"
class="item"
@click="goGoodsConByID(item)"
>
<image
:src="item.image"
class="cover"
/>
<view class="">
<view class="name more-t">{{ item.storeName }}</view>
<view class="price-line flex ai-center">
<view v-if="isLoadGoodListoSuccess">
<view v-if="goodsList.length > 0">
<view class="flex flex-wrap">
<view
v-for="(item,index) in goodsList"
:key="index"
class="item"
@click="goGoodsConByID(item)"
>
<image
:src="webUrl + '/20221118104357701129.png'"
class="label"
mode="scaleToFill"
:src="item.image"
class="cover"
/>
<text>{{ item.price }}</text>
<view class="">
<view class="name more-t">{{ item.storeName }}</view>
<view class="price-line flex ai-center">
<image
:src="webUrl + '/20221118104357701129.png'"
class="label"
mode="scaleToFill"
/>
<text>{{ item.price }}</text>
</view>
</view>
<view class="sales-line flex ai-center">
<image
:src="webUrl + '/20221118092713277343.png'"
class="icon"
mode="scaleToFill"
/>
<text>{{ item.sales }}人已购买</text>
</view>
</view>
</view>
<view class="sales-line flex ai-center">
<image
:src="webUrl + '/20221118092713277343.png'"
class="icon"
mode="scaleToFill"
/>
<text>{{ item.sales }}人已购买</text>
<view class="btn">
<view class="btn-cont" @click="viewAllGoodHandle">
查看所有商品
<text class="iconfont icon-jiantou"></text>
</view>
</view>
</view>
</view>
<view v-show="goodsList.length > 0" class="btn">
<view class="btn-cont" @click="viewAllGoodHandle">
查看所有商品
<text class="iconfont icon-jiantou"></text>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view>
<goo-skeleton v-else />
</view>
<!-- 最新资讯 -->
<view
v-if="activeIndex === 1"
class="info-section"
>
<view v-if="infoArray.length > 0" class="info-wrapper">
<view class="info-list">
<view
v-for="(item, index) in infoArray"
:key="index"
class="info-item"
>
<view v-if="isLoadInfoListSuccess">
<view v-if="infoArray.length > 0" class="info-wrapper">
<view class="info-list">
<view
:class="item.isTop === 1 ? 'info-item-top' : ''"
:style="{
'background-image': item.isTop ? ('url(' + webUrl + '/page/hotel/info-top-bg.png)') : 'none'
}"
class="info-item-header"
@click="infoClick(item)"
v-for="(item, index) in infoArray"
:key="index"
class="info-item"
>
<view class="name one-t">
{{ item.name }}
</view>
<view class="intro more-t">
{{ item.intro }}
</view>
</view>
<view class="info-item-body">
<view v-if="item.type === 'NT_VIDEO'" class="video">
<video
:src="item.video"
:poster="item.video + '?vframe/jpg/offset/1'"
controls
play-btn-position="center"
class="video-item"
/>
</view>
<view v-else>
<img-box
:imgList="item.resources"
:num="item.resources.length"
:img-radius="10"
style="width: 100%;"
/>
</view>
</view>
<view class="info-item-bottom">
<view class="time">
{{ item.createdTime ? item.createdTime.replace(/-/g, '.').substr(0, 10) : '' }}
</view>
<view class="btns">
<view class="flex">
<image
:src="webUrl + '/20230803152147141807.png'"
class="icon"
/>
<text class="seeNum-txt">{{ item.pv }}</text>
<view
:class="item.isTop === 1 ? 'info-item-top' : ''"
:style="{
'background-image': item.isTop ? ('url(' + webUrl + '/page/hotel/info-top-bg.png)') : 'none'
}"
class="info-item-header"
@click="infoClick(item)"
>
<view class="name one-t">
{{ item.name }}
</view>
<view class="flex">
<image
:src="webUrl + '/20230803151302213857.png'"
class="icon"
/>
<text class="seeNum-txt">{{ item.zan }}</text>
<view class="intro more-t">
{{ item.intro }}
</view>
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
<image
:src="webUrl + '/page/hotel/more.png'"
class="icon"
</view>
<view class="info-item-body">
<view v-if="item.type === 'NT_VIDEO'" class="video">
<video
:src="item.video"
:poster="item.video + '?vframe/jpg/offset/1'"
controls
play-btn-position="center"
class="video-item"
/>
<view
v-if="item.showMore"
class="more-wrapper"
>
</view>
<view v-else>
<img-box
:imgList="item.resources"
:num="item.resources.length"
:img-radius="10"
style="width: 100%;"
/>
</view>
</view>
<view class="info-item-bottom">
<view class="time">
{{ item.createdTime ? item.createdTime.replace(/-/g, '.').substr(0, 10) : '' }}
</view>
<view class="btns">
<view class="flex">
<image
:src="webUrl + '/20230803152147141807.png'"
class="icon"
/>
<text class="seeNum-txt">{{ item.pv }}</text>
</view>
<view class="flex">
<image
:src="webUrl + '/20230803151302213857.png'"
class="icon"
/>
<text class="seeNum-txt">{{ item.zan }}</text>
</view>
<view v-if="isMyInn" class="flex more-btn" @click="toggleMoreHandle(index)">
<image
:src="webUrl + '/page/hotel/more.png'"
class="icon"
/>
<view
v-if="item.isTop === 0"
class="more-item"
@click="setTopInfoHandle(item, 1)"
v-if="item.showMore"
class="more-wrapper"
>
<image
:src="webUrl + '/page/hotel/settop.png'"
class="more-icon"
/>
置顶动态
</view>
<view
v-else
class="more-item"
@click="setTopInfoHandle(item, 0)"
>
<image
:src="webUrl + '/page/hotel/delete.png'"
class="more-icon"
/>
取消置顶
</view>
<view class="more-item" @click="deleteInnInfo(item, index)">
<image
:src="webUrl + '/page/hotel/delete.png'"
class="more-icon"
/>
删除动态
<view
v-if="item.isTop === 0"
class="more-item"
@click="setTopInfoHandle(item, 1)"
>
<image
:src="webUrl + '/page/hotel/settop.png'"
class="more-icon"
/>
置顶动态
</view>
<view
v-else
class="more-item"
@click="setTopInfoHandle(item, 0)"
>
<image
:src="webUrl + '/page/hotel/delete.png'"
class="more-icon"
/>
取消置顶
</view>
<view class="more-item" @click="deleteInnInfo(item, index)">
<image
:src="webUrl + '/page/hotel/delete.png'"
class="more-icon"
/>
删除动态
</view>
</view>
</view>
</view>
@@ -297,7 +307,11 @@
</view>
</view>
</view>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view>
<goo-skeleton v-else />
</view>
<!-- 企业文化 -->
<view
@@ -325,19 +339,27 @@
/>
</view>
</view>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view>
<!-- 商家资质 -->
<view
v-if="activeIndex === 3"
class="qualifications-section"
>
<image
v-for="(item, index) in inn.qualifications"
:key="index"
:src="item.image"
class="store-img"
mode="widthFix"
/>
<view v-if="inn.qualifications.length > 0">
<image
v-for="(item, index) in inn.qualifications"
:key="index"
:src="item.image"
class="store-img"
mode="widthFix"
/>
</view>
<view v-else class="tab-no-data">
店主还没有上传内容哦~
</view>
</view>
</view>
<view v-if="isMyInn" class="bottom-view acea-row">
@@ -434,7 +456,9 @@ export default {
{ text: '最新资讯', value: 1, isShow: true },
{ text: '企业文化', value: 2, isShow: true },
{ text: '商家资质', value: 3, isShow: true }
]
],
isLoadGoodListoSuccess: false,
isLoadInfoListSuccess: false
}
},
// 必须在页面加 onPageScroll(e){} ,才能滑动显示背景
@@ -617,6 +641,7 @@ export default {
if (_this.loading) {
return
}
_this.isLoadInfoListSuccess = false
_this.loading = true
_this.infoArray = []
getHotelNewsList({
@@ -635,6 +660,7 @@ export default {
}))
}).finally(() => {
_this.loading = false
_this.isLoadInfoListSuccess = true
uni.stopPullDownRefresh()
})
},
@@ -660,6 +686,7 @@ export default {
if (data.hasProduct <= 0) {
_this.activeIndex = 1
_this.tabList[0].isShow = false
_this.isLoadInfoListSuccess = true
} else {
_this.fetchGoods()
}
@@ -741,6 +768,7 @@ export default {
}
},
fetchGoods() {
this.isLoadGoodListoSuccess = false
getHotelGoodList({
id: this.inn.id,
page: 1,
@@ -755,6 +783,8 @@ export default {
}
}
}
}).finally(() => {
this.isLoadGoodListoSuccess = true
})
},
call: function () {
@@ -1292,4 +1322,10 @@ export default {
}
}
}
.tab-no-data {
text-align: center;
font-size: 32rpx;
color: #999;
line-height: 80rpx;
}
</style>
+2 -2
View File
@@ -99,7 +99,7 @@
</view>
</view>
</view>
<view class="item is_required">
<!-- <view class="item is_required">
<view class="cell acea-row row-column">
<view class="cell-title">店铺简介</view>
<view>
@@ -111,7 +111,7 @@
/>
</view>
</view>
</view>
</view> -->
<view class="item">
<view class="img-upload">
<tm-upload