优化首页及湖畔好店页面

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;
}
.container {
/* padding-top: 100rpx; */
.header {
display: flex;
align-items: center;
}
.header_tit {
width: 100%;
position: absolute;
text-align: center;
}
.local {
@ -336,4 +343,22 @@ page {
font-size: 24rpx;
color: #999999;
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>
<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">
<image id="local" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png"
mode="aspectFill"></image>
@ -14,7 +18,7 @@
<input type="text" placeholder="请输入您想搜索的内容" />
</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_left">
<image :src="picUrl + item.bigImg[0]" mode="aspectFill"></image>
@ -55,6 +59,14 @@
</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="btn_left">
@ -90,6 +102,7 @@ import { apiArr } from "../../../api/v2local";
export default {
data() {
return {
headerTitle: "",
picUrl,
top: "",
localHeight: "",
@ -108,6 +121,7 @@ export default {
},
onLoad(options) {
this.changeId = JSON.parse(options.item).id;
this.headerTitle = JSON.parse(options.item).cate_name;
const meun = menuButtonInfo();
this.top = meun.top;
// this.top = meun.height + meun.top;
@ -125,6 +139,9 @@ export default {
},
methods: {
back() {
NavgateTo("1");
},
swiperChange(e) {
this.currentIndex = e.detail.current;
},

View File

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

View File

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

View File

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