优化首页及湖畔好店页面

This commit is contained in:
赵毅 2025-08-18 17:02:19 +08:00
parent b53bf393d4
commit ffc510fc08
5 changed files with 58 additions and 8 deletions

View File

@ -2,8 +2,15 @@ page {
background-color: #fff; background-color: #fff;
} }
.container { .header {
/* padding-top: 100rpx; */ display: flex;
align-items: center;
}
.header_tit {
width: 100%;
position: absolute;
text-align: center;
} }
.local { .local {
@ -336,4 +343,22 @@ page {
font-size: 24rpx; font-size: 24rpx;
color: #999999; color: #999999;
margin-top: 14rpx; margin-top: 14rpx;
}
.empty {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-weight: normal;
font-size: 28rpx;
color: #999999;
margin-top: 110rpx;
width: 100%;
}
.empty image {
width: 366rpx;
height: 226rpx;
margin-bottom: 27rpx;
} }

View File

@ -1,5 +1,9 @@
<template> <template>
<view class="container"> <view class="container">
<view class="header" :style="{ paddingTop: top + 'px', height: localHeight + 'px' }">
<u-icon bold color="#000" size="40" name="arrow-left" @click="back"></u-icon>
<view class="header_tit">{{ headerTitle }}</view>
</view>
<view class="local"> <view class="local">
<image id="local" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png" <image id="local" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png"
mode="aspectFill"></image> mode="aspectFill"></image>
@ -14,7 +18,7 @@
<input type="text" placeholder="请输入您想搜索的内容" /> <input type="text" placeholder="请输入您想搜索的内容" />
</view> </view>
</view> </view>
<view class="merchantList"> <view class="merchantList" v-if="merchatList.length > 0">
<view class="merchantItem" v-for="item in merchatList" :key="item.id" @click="Info(item)"> <view class="merchantItem" v-for="item in merchatList" :key="item.id" @click="Info(item)">
<view class="merchantItem_left"> <view class="merchantItem_left">
<image :src="picUrl + item.bigImg[0]" mode="aspectFill"></image> <image :src="picUrl + item.bigImg[0]" mode="aspectFill"></image>
@ -55,6 +59,14 @@
</view> </view>
</view> </view>
</view> </view>
<view v-else>
<view class="empty">
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_nearbyList_empty.png"
mode="aspectFill"></image>
暂无数据
</view>
</view>
<view class="btnList"> <view class="btnList">
<view class="btn_left"> <view class="btn_left">
@ -90,6 +102,7 @@ import { apiArr } from "../../../api/v2local";
export default { export default {
data() { data() {
return { return {
headerTitle: "",
picUrl, picUrl,
top: "", top: "",
localHeight: "", localHeight: "",
@ -108,6 +121,7 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.changeId = JSON.parse(options.item).id; this.changeId = JSON.parse(options.item).id;
this.headerTitle = JSON.parse(options.item).cate_name;
const meun = menuButtonInfo(); const meun = menuButtonInfo();
this.top = meun.top; this.top = meun.top;
// this.top = meun.height + meun.top; // this.top = meun.height + meun.top;
@ -125,6 +139,9 @@ export default {
}, },
methods: { methods: {
back() {
NavgateTo("1");
},
swiperChange(e) { swiperChange(e) {
this.currentIndex = e.detail.current; this.currentIndex = e.detail.current;
}, },

View File

@ -4,7 +4,6 @@ page {
.pay-container { .pay-container {
padding: 30rpx; padding: 30rpx;
min-height: 100vh;
} }
.header { .header {

View File

@ -506,6 +506,7 @@
"path": "classify/index", "path": "classify/index",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#fff" "navigationBarBackgroundColor": "#fff"
} }
}, },

View File

@ -496,12 +496,14 @@ export default {
}); });
}, },
headerServerClick2(e) { async headerServerClick2(e) {
if (e.title == '更多') { if (e.title == '更多') {
NavgateTo('/packages/localLife/index/index') NavgateTo('/packages/localLife/index/index')
} }
const cate_id = this.categoryList.find(item => item.cate_name == e.title)?.id; const cate_id = this.categoryList.find(item => item.cate_name == e.title)?.id;
if (cate_id) { this.switchCategory(cate_id) } if (cate_id) {
await this.switchCategory(cate_id);
}
return return
}, },
@ -991,12 +993,18 @@ export default {
this.hotWord = res.search_hot_word.split(/[,]/) this.hotWord = res.search_hot_word.split(/[,]/)
}, },
switchCategory(id) { async switchCategory(id) {
this.currentCategoryId = id; this.currentCategoryId = id;
this.activeCategoryId = `category-${id}`; this.activeCategoryId = `category-${id}`;
this.getMechantList() await this.getMechantList(); //
this.showDropdown = false; this.showDropdown = false;
this.$nextTick(() => {
uni.pageScrollTo({
scrollTop: 1000,
duration: 300
});
});
}, },
toggleDropdown() { toggleDropdown() {