fix: 修改未来到家以及我的社区的部分内容修订

- 未来到家:金刚区图标去底块并对齐首页尺寸;瀑布流默认展示全部小类商品
- 我的社区:岁银改临时事件并扩充各分类假数据;公告改资讯卡样式(阅读数+更新时间);
  轮播/横幅统一 300rpx 圆角、指示点右下角;tab 去灰底改红色横杠;默认页轮播换新图
- 首页:金刚区间距加大;推荐 tab 改为附近;扫一扫按钮转红色系;清理遗留 console.log

Claude-Session: https://claude.ai/code/session_01WQrg6u9Cp9sFPLF6vmbJDq
This commit is contained in:
wutong 2026-07-08 18:17:12 +08:00
parent 88632c52ed
commit 4b83a95d2e
7 changed files with 294 additions and 78 deletions

View File

@ -64,6 +64,8 @@ a {
width: 130rpx;
height: 130rpx;
border-radius: 50%;
/* 扫一扫按钮:橙色系图标整体转为选中态红色系,更突出 */
filter: hue-rotate(-20deg) saturate(1.25);
}

View File

@ -10,7 +10,7 @@
},
{
"id": 3,
"category_name": "岁银"
"category_name": "临时事件"
},
{
"id": 4,
@ -20,23 +20,99 @@
"defaultInfoList": [
{
"id": 1,
"category_id": 1,
"title": "物业介绍",
"pic": "https://static.hshuishang.com/Group_3677.png"
"pic": "https://static.hshuishang.com/Group_3677.png",
"reads": 89000,
"update_date": "2025-12-15"
},
{
"id": 5,
"category_id": 1,
"title": "物业服务团队正式亮相",
"pic": "https://static.hshuishang.com/Group_3678.png",
"reads": 32150,
"update_date": "2025-12-11"
},
{
"id": 9,
"category_id": 1,
"title": "园区环境提升工作简报",
"pic": "https://static.hshuishang.com/Group_3679.png",
"reads": 27860,
"update_date": "2025-12-05"
},
{
"id": 2,
"category_id": 2,
"title": "物业缴费",
"pic": "https://static.hshuishang.com/Group_3680.png"
"pic": "https://static.hshuishang.com/Group_3680.png",
"reads": 65020,
"update_date": "2025-12-12"
},
{
"id": 6,
"category_id": 2,
"title": "物业费12月缴费提醒",
"pic": "https://static.hshuishang.com/Group_3677.png",
"reads": 48221,
"update_date": "2025-12-10"
},
{
"id": 10,
"category_id": 2,
"title": "线上缴费操作指南",
"pic": "https://static.hshuishang.com/Group_3678.png",
"reads": 19340,
"update_date": "2025-12-03"
},
{
"id": 3,
"title": "岁银",
"pic": "https://static.hshuishang.com/Group_3679.png"
"category_id": 3,
"title": "临时停水通知",
"pic": "https://static.hshuishang.com/Group_3679.png",
"reads": 56780,
"update_date": "2025-12-14"
},
{
"id": 7,
"category_id": 3,
"title": "电梯维护保养工作顺利完成",
"pic": "https://static.hshuishang.com/Group_3680.png",
"reads": 41200,
"update_date": "2025-12-08"
},
{
"id": 11,
"category_id": 3,
"title": "小区消防演练通知",
"pic": "https://static.hshuishang.com/Group_3677.png",
"reads": 23100,
"update_date": "2025-12-02"
},
{
"id": 4,
"category_id": 4,
"title": "报事报修",
"pic": "https://static.hshuishang.com/Group_3678.png"
"pic": "https://static.hshuishang.com/Group_3678.png",
"reads": 36980,
"update_date": "2025-12-09"
},
{
"id": 8,
"category_id": 4,
"title": "报修流程优化公告",
"pic": "https://static.hshuishang.com/Group_3679.png",
"reads": 18560,
"update_date": "2025-12-06"
},
{
"id": 12,
"category_id": 4,
"title": "冬季管道防冻温馨提示",
"pic": "https://static.hshuishang.com/Group_3680.png",
"reads": 15420,
"update_date": "2025-12-01"
}
],
"defaultNoticeList": [
@ -45,20 +121,60 @@
"title": "物业介绍",
"content": "您好!\n     物业服务中心是小区专属服务团队,核心服务包括:岁银收缴、公共区域清洁维护、设施设备(电梯/水电/绿化)检修、秩序安全管理,及应急事件响应、活动组织等日常事务。\n     我们始终以\"用心服务、共建美好\"为宗旨,欢迎大家监督并提出改进建议。感谢您的理解与配合,让我们携手维护舒心的园区环境!"
},
{
"id": 5,
"title": "物业服务团队正式亮相",
"content": "各位业主:\n     物业服务中心团队已全面到岗涵盖客服、维修、保洁、秩序四大板块将为您提供7×24小时贴心服务。欢迎大家监督指导共建美好家园。"
},
{
"id": 9,
"title": "园区环境提升工作简报",
"content": "各位业主:\n     本月园区完成绿化补植300平方米、健身器材翻新12组、楼道照明检修全覆盖。后续将持续推进环境提升工作感谢大家的支持与配合。"
},
{
"id": 2,
"title": "物业缴费",
"content": "各位业主:\n     为简化缴费流程,提升服务效率,物业已上线\"线上+线下\"一体化缴费功能,支持岁银、车位费、公共能耗费等各类费用便捷缴纳,具体使用说明如下:\n一、线上缴费推荐\n     1. 小程序端操作:打开物业专属小程序,进入\"我的-物业缴费\"页面,系统将自动展示您需缴纳的费用账单(含费用类型、金额、缴费周期等明细);确认账单无误后,选择微信支付,点击\"确认缴费\"即可完成。\n     2. 账单查询:在缴费页面点击\"缴费记录\",可查看缴费明细(含缴费时间、金额、凭证号)。\n二、线下缴费备用\n若您偏好线下办理可前往物业前台通过现金、银行卡、移动支付微信/支付宝扫码)完成缴费。"
},
{
"id": 6,
"title": "物业费12月缴费提醒",
"content": "请业主及时缴纳物业费,您的支持是我们持续提升服务品质的动力。可通过小程序\"物业缴费\"在线缴纳,也可前往物业前台办理。"
},
{
"id": 10,
"title": "线上缴费操作指南",
"content": "线上缴费三步走:进入小程序\"物业缴费\"页面,核对账单明细,微信支付完成缴费。缴费记录可随时查询,电子凭证自动留存。"
},
{
"id": 3,
"title": "岁银",
"content": "各位业主:\n     上线\"岁银\"功能,其核心规则与使用方式如下,覆盖所有房产通用场景:\n一、岁银的获取方式\n     通过周边合作门店消费,即可获得岁银;\n二、跨房产通用一份公积金多房产可用\n     您的个人岁银不绑定单一房产可通用至您已加入的所有房产。例如您的个人公积金既可抵扣A小区的岁银也可抵扣您加入的B小区的水电费、C小区的燃气费无需额外转移或申请。\n三、查询与透明化\n     在物业平台\"我的-岁银\"页面,可实时查看:个人公积金余额、所属房产的总额、抵扣记录(含抵扣房产、金额、个人扣除份额),确保每笔使用清晰可溯。"
"title": "临时停水通知",
"content": "各位业主:\n     因市政供水管网维修本小区将于12月16日9:00-17:00临时停水请提前做好储水准备。维修期间给您带来不便敬请谅解。如有疑问请联系物业服务中心。"
},
{
"id": 7,
"title": "电梯维护保养工作顺利完成",
"content": "本次维护对小区全部电梯进行了全面检查与保养,确保运行安全稳定。后续将按季度开展例行保养,保障业主出行安全。"
},
{
"id": 11,
"title": "小区消防演练通知",
"content": "为提升园区应急处置能力物业将于12月20日上午10:00在中心广场组织消防演练届时将有烟雾及警报声请业主不必惊慌欢迎参与观摩学习。"
},
{
"id": 4,
"title": "报事报修",
"content": "各位业主:\n     小程序\"报事报修\"功能,覆盖全物业类型通用场景,操作简单、响应高效,具体介绍如下:\n一、报修流程\n1、进入功能打开物业小程序点击\"报事报修\"图标,选择报修页面;\n2、填写信息选择\"详细地址\"、\"报修类型\"(水电故障/家电维修/公共设施损坏等),补充问题描述(如\"厨房水龙头漏水\"\"办公室空调不制冷\"),可上传现场照片(便于维修人员预判问题);\n3、提交确认核对信息后点击\"提交报修\",系统自动生成报修单号,同步推送至物业维修部。\n二、报修范围室内水电、家电、门窗、厨卫设施维修等\n三、进度追踪\n1、实时查进度在\"我的报修\"页面,可查看报修单状态,维修人员接单后会主动联系确认上门时间;\n2、紧急情况如水管爆裂、断电可先拨打物业24小时热线再补填在线报修单确保问题快速解决"
},
{
"id": 8,
"title": "报修流程优化公告",
"content": "报事报修流程全新升级新增在线进度查询、维修评价功能平均响应时间缩短至30分钟。您的每一条反馈都是我们改进的动力。"
},
{
"id": 12,
"title": "冬季管道防冻温馨提示",
"content": "冬季气温骤降,请业主注意做好户内水管保温防冻措施,长期无人居住的房屋建议关闭进户阀门并排空管道存水,避免冻裂造成损失。"
}
]
}

View File

@ -109,11 +109,12 @@ image {
}
.swiperBox1 {
height: 500rpx;
/* 与首页轮播一致300rpx 高(绑定/未绑定统一) */
height: 300rpx;
width: 710rpx;
/* 与首页 banner 一致:内缩圆角卡片,两侧留白让 .container 续色透出 */
margin: 20rpx auto 0;
border-radius: 16rpx;
border-radius: 20rpx;
overflow: hidden;
position: relative;
}
@ -124,10 +125,15 @@ image {
position: relative;
/* 头区已改普通流,去掉原为绝对定位 searchBox 预留的 170rpx 顶部空隙 */
margin: 20rpx auto 0;
/* 与绑定态一致:圆角由容器统一裁切 */
border-radius: 20rpx;
overflow: hidden;
}
.swiperBox_no_img{
border-radius: 15rpx;
/* 铺满容器,保证与绑定态同尺寸展示(圆角由容器裁切) */
width: 100%;
height: 100%;
}
.swiperBox1 swiper {
@ -141,9 +147,9 @@ image {
.dot {
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 107rpx;
/* 指示点放右下角(与首页轮播一致) */
right: 24rpx;
bottom: 20rpx;
display: flex;
align-items: center;
justify-content: center;
@ -158,7 +164,9 @@ image {
}
.swiperBox2_img {
border-radius: 20rpx 20rpx 0 0;
/* 铺满 300rpx 容器(圆角由容器裁切) */
width: 100%;
height: 100%;
}
.active {
@ -166,16 +174,29 @@ image {
}
.swiperBox2 {
height: 150rpx;
/* 与首页轮播一致300rpx 高(绑定/未绑定统一),圆角与顶部轮播同款 */
height: 300rpx;
width: 710rpx;
/* 与金刚区互换后位于其下方,去掉原上叠 banner 的 -96rpx改正常上间距 */
margin: 30rpx auto 0;
border-radius: 20rpx;
overflow: hidden;
}
.swiperBox2 swiper {
height: 100%;
}
.swiperBox_no2 {
height: 150rpx;
height: 300rpx;
width: 710rpx;
margin: 30rpx auto 0;
border-radius: 20rpx;
overflow: hidden;
}
.swiperBox_no2 swiper {
height: 100%;
}
.funcList {
@ -216,7 +237,8 @@ image {
margin-top: 32rpx;
display: flex;
align-items: center;
background: #F6F6FA;
/* 去掉灰色背景条,与页面白底一致 */
background: #ffffff;
height: 100rpx;
padding: 0 20rpx;
box-sizing: border-box;
@ -234,23 +256,31 @@ image {
.active2 {
font-size: 30rpx;
font-weight: 700;
color: #ff3929;
position: relative;
}
/* 选中标记:红色短横杠(替换原弧形图片) */
.active2::after {
content: '';
background: url(https://static.hshuishang.com/property-img-file/com_active.png) no-repeat;
background-size: 100% 100%;
width: 52rpx;
height: 22rpx;
background: #ff3929;
width: 44rpx;
height: 6rpx;
border-radius: 3rpx;
position: absolute;
left: 50%;
bottom: -16rpx;
bottom: -14rpx;
transform: translateX(-50%);
}
.newsList {
margin-bottom: 30rpx;
/* 公告块白卡样式(对齐设计稿):白底圆角卡包裹列表,绑定/未绑定一致 */
margin: 20rpx 20rpx 30rpx;
padding: 6rpx 24rpx;
background: #ffffff;
border: 1rpx solid #f0f0f2;
border-radius: 20rpx;
box-shadow: 0 6rpx 20rpx rgba(0, 0, 0, 0.04);
}
.newsItem {
@ -289,12 +319,12 @@ image {
overflow: hidden;
}
/* 宣传栏:图左 + 右侧标题与内容预览 */
/* 宣传栏:图左 + 右侧标题与内容预览(外层已是白卡,条目不再额外留边) */
.newsItemL {
display: flex;
align-items: center;
padding: 30rpx 0;
margin: 0 20rpx;
margin: 0;
box-sizing: border-box;
border-bottom: 1rpx solid #EBEBEB;
}
@ -338,6 +368,30 @@ image {
overflow: hidden;
}
/* 资讯条目底部:阅读数(左)+ 更新时间(右) */
.newsItemL_meta {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 14rpx;
}
.newsItemL_reads {
display: flex;
align-items: center;
font-size: 22rpx;
color: #9a9fa8;
}
.newsItemL_reads text {
margin-left: 6rpx;
}
.newsItemL_time {
font-size: 22rpx;
color: #9a9fa8;
}
.tips {
font-size: 26rpx;
color: #999999;

View File

@ -20,12 +20,13 @@
<view class="swiperBox_no1">
<swiper @animationfinish="swipers" autoplay circular>
<image src="https://static.hshuishang.com/community_no_image1.png" mode="aspectFill"
class="swiperBox_no_img" @click="addCommunity" />
<swiper-item v-for="(img, index) in defaultBannerImgs" :key="index">
<image :src="img" mode="aspectFill" class="swiperBox_no_img" @click="addCommunity" />
</swiper-item>
</swiper>
<view class="dot">
<view :class="['dotItem', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList"
<view :class="['dotItem', currentIdx == index ? 'active' : '']" v-for="(item, index) in defaultBannerImgs"
:key="index">
</view>
</view>
@ -42,9 +43,11 @@
</view>
<view class="swiperBox_no2">
<swiper @animationfinish="swipers" autoplay circular>
<image src="https://static.hshuishang.com/community_no_image2.png" mode="aspectFill"
class="swiperBox_no_img" @click="addCommunity" />
<!-- 横幅轮播无指示点不绑 animationfinish避免污染顶部轮播的 currentIdx -->
<swiper autoplay circular>
<swiper-item v-for="(img, index) in defaultStreamerImgs" :key="index">
<image :src="img" mode="aspectFill" class="swiperBox_no_img" @click="addCommunity" />
</swiper-item>
</swiper>
</view>
@ -55,7 +58,7 @@
</view>
</view>
<!-- 宣传栏片在左标题在右标题下方展示内容预览 -->
<!-- 宣传栏+ 标题/预览 + 底部阅读数与更新时间未绑定用假数据 -->
<view class="newsList" v-if="defaultCategoryList.length > 0">
<view class="newsItemL" v-for="item in defaultInfoList" @click="defaultDetail(item)" :key="item.id">
<view class="newsItemL_pic">
@ -64,6 +67,13 @@
<view class="newsItemL_body">
<view class="newsItemL_tit">{{ item.title }}</view>
<view class="newsItemL_desc">{{ contentPreview(item.id) }}</view>
<view class="newsItemL_meta">
<view class="newsItemL_reads" v-if="newsReads(item)">
<u-icon name="eye" color="#9a9fa8" size="26"></u-icon>
<text>{{ newsReads(item) }}次阅读</text>
</view>
<text class="newsItemL_time" v-if="newsTime(item)">更新于 {{ newsTime(item) }}</text>
</view>
</view>
</view>
</view>
@ -97,12 +107,13 @@
<view class="swiperBox_no1" v-else>
<swiper @animationfinish="swipers" autoplay circular>
<image src="https://static.hshuishang.com/community_no_image1.png" mode="aspectFill"
class="swiperBox_no_img" />
<swiper-item v-for="(img, index) in defaultBannerImgs" :key="index">
<image :src="img" mode="aspectFill" class="swiperBox_no_img" />
</swiper-item>
</swiper>
<view class="dot">
<view :class="['dotItem', currentIdx == index ? 'active' : '']" v-for="(item, index) in bannerList"
<view :class="['dotItem', currentIdx == index ? 'active' : '']" v-for="(item, index) in defaultBannerImgs"
:key="index">
</view>
</view>
@ -119,7 +130,8 @@
</view>
<view class="swiperBox2" v-if="streamerList.length > 0">
<swiper @animationfinish="swipers" autoplay circular>
<!-- 横幅轮播无指示点不绑 animationfinish避免污染顶部轮播的 currentIdx -->
<swiper autoplay circular>
<swiper-item v-for="(item, index) in streamerList" :key="index" @click="headerServerClick(item)">
<image :src="item.ad_picture" mode="aspectFill" class="swiperBox2_img" />
</swiper-item>
@ -127,9 +139,11 @@
</view>
<view class="swiperBox_no2" v-else>
<swiper @animationfinish="swipers" autoplay circular>
<image src="https://static.hshuishang.com/community_no_image2.png" mode="aspectFill"
class="swiperBox_no_img" />
<!-- 横幅轮播无指示点不绑 animationfinish避免污染顶部轮播的 currentIdx -->
<swiper autoplay circular>
<swiper-item v-for="(img, index) in defaultStreamerImgs" :key="index">
<image :src="img" mode="aspectFill" class="swiperBox_no_img" />
</swiper-item>
</swiper>
</view>
@ -152,7 +166,7 @@
</view>
</view>
<!-- 已绑定临时通知列表图左 + 右侧标题与内容预览 -->
<!-- 已绑定通知列表图左 + 标题/预览 + 底部阅读数与更新时间与未绑定同形式 -->
<view class="newsList" v-if="categoryList.length > 0">
<view class="newsItemL" v-for="item in infoList" @click="detail(item)" :key="item.id">
<view class="newsItemL_pic">
@ -161,6 +175,13 @@
<view class="newsItemL_body">
<view class="newsItemL_tit">{{ item.title }}</view>
<view class="newsItemL_desc">{{ noticePreview(item) }}</view>
<view class="newsItemL_meta">
<view class="newsItemL_reads" v-if="newsReads(item)">
<u-icon name="eye" color="#9a9fa8" size="26"></u-icon>
<text>{{ newsReads(item) }}次阅读</text>
</view>
<text class="newsItemL_time" v-if="newsTime(item)">更新于 {{ newsTime(item) }}</text>
</view>
</view>
</view>
</view>
@ -173,6 +194,13 @@
<view class="newsItemL_body">
<view class="newsItemL_tit">{{ item.title }}</view>
<view class="newsItemL_desc">{{ contentPreview(item.id) }}</view>
<view class="newsItemL_meta">
<view class="newsItemL_reads" v-if="newsReads(item)">
<u-icon name="eye" color="#9a9fa8" size="26"></u-icon>
<text>{{ newsReads(item) }}次阅读</text>
</view>
<text class="newsItemL_time" v-if="newsTime(item)">更新于 {{ newsTime(item) }}</text>
</view>
</view>
</view>
</view>
@ -293,6 +321,17 @@ export default {
ads1Show: false,
ads2Show: false,
// /广 1/2/3 10/20
defaultBannerImgs: [
"https://static.hshuishang.com/static/1.jpg",
"https://static.hshuishang.com/static/2.jpg",
"https://static.hshuishang.com/static/3.jpg",
],
defaultStreamerImgs: [
"https://static.hshuishang.com/static/10.jpg",
"https://static.hshuishang.com/static/20.jpg",
],
bannerList: [], //广
currentIdx: 0,
streamerList: [], //广
@ -404,8 +443,8 @@ export default {
if (!this.originalDefaultInfoList) {
this.originalDefaultInfoList = JSON.parse(JSON.stringify(dataJson.defaultInfoList));
}
//
this.defaultInfoList = this.originalDefaultInfoList.filter(info => info.id === this.defaultCategoryList[0].id);
// category_id
this.defaultInfoList = this.originalDefaultInfoList.filter(info => info.category_id === this.defaultCategoryList[0].id);
}
}, 100);
},
@ -560,7 +599,6 @@ export default {
page_num: 1,
page_size: 50,
});
console.log(res, "xx");
// rowNum colNum
const totalItems = this.rowNum * this.colNum - 3;
@ -660,7 +698,6 @@ export default {
},
headerServerClick(e) {
console.log("当前点击内容", e);
if (!e.target_page) {
this.NotOpen();
return;
@ -686,9 +723,6 @@ export default {
extraData: {
data1: "test",
},
success(res) {
console.log("打开成功", res);
},
});
} else {
//
@ -770,8 +804,8 @@ export default {
this.originalDefaultInfoList = JSON.parse(JSON.stringify(dataJson.defaultInfoList));
}
// ID
this.defaultInfoList = this.originalDefaultInfoList.filter(info => info?.id === item?.id);
// ID category_id
this.defaultInfoList = this.originalDefaultInfoList.filter(info => info?.category_id === item?.id);
return;
}
@ -834,12 +868,10 @@ export default {
},
detail(e) {
console.log(e);
NavgateTo("../noticeDesc/index?id=" + e.id);
},
defaultDetail(e) {
console.log(e);
NavgateTo("../defaultNotice/index?id=" + e.id);
},
@ -855,6 +887,24 @@ export default {
return text.length > 50 ? text.slice(0, 50) + "…" : text;
},
// reads /
newsReads(item) {
if (!item) return 0;
return item.reads || item.view_count || item.read_num || 0;
},
// update_date / update_timepublish_time
newsTime(item) {
if (!item) return "";
const t =
item.update_date ||
item.update_time ||
item.publish_time ||
item.create_time ||
"";
return t ? String(t).slice(0, 10) : "";
},
// +
noticePreview(item) {
if (!item) return "";

View File

@ -3,7 +3,7 @@
说明顶部红头品牌 + 城市 + 关键词搜索二级分类以金刚区展示
下面商品用瀑布流与首页好店一致两列图片按原始宽高比
大类到家服务 / 家政服务 tab 忽略金刚区改为铺开展示两大类下的全部小类
后端 /service/category/sub-list默认瀑布流取金刚区第一个小类的商品列表
后端 /service/category/sub-list瀑布流默认展示全部小类的商品category_id=0 不过滤
-->
<template>
<view class="fh-page">
@ -35,8 +35,8 @@
<!-- 金刚区二级分类 -->
<view class="fh-grid" v-if="categoryList.length">
<view class="fh-grid-item" v-for="cat in categoryList" :key="cat.id" @tap="selectCate(cat)">
<image class="fh-grid-icon" :src="picUrl + cat.category_pic" mode="aspectFit" />
<text class="fh-grid-txt" :class="{ on: currentCate === cat.id }">{{ cat.category_name }}</text>
<image class="fh-grid-icon" :src="picUrl + cat.category_pic" mode="aspectFill" />
<text class="fh-grid-txt">{{ cat.category_name }}</text>
</view>
</view>
@ -124,8 +124,8 @@ export default {
methods: {
async initData() {
await this.loadCategory()
//
this.currentCate = this.categoryList.length ? this.categoryList[0].id : 0
// category_id=0
this.currentCate = 0
this.keyword = ''
await this.loadList(true)
},
@ -346,13 +346,11 @@ page { background: #f5f6f8; }
margin-bottom: 26rpx;
}
.fh-grid-icon {
/* 设计稿分类图标底 46×46px ≈ 80rpx浅暖底 #FFF4F0 */
width: 80rpx;
height: 80rpx;
border-radius: 18rpx;
background: #fff4f0;
box-sizing: border-box;
padding: 8rpx;
/* 与首页金刚区一致index2.css .grid-icon84rpx、圆角 24rpx无底块无边框 */
width: 84rpx;
height: 84rpx;
border-radius: 24rpx;
display: block;
}
.fh-grid-txt {
margin-top: 12rpx;
@ -361,10 +359,6 @@ page { background: #f5f6f8; }
color: #111;
text-align: center;
}
.fh-grid-txt.on {
color: #ff3929;
font-weight: 600;
}
/* ===== 瀑布流(与首页好店一致) ===== */
.wf {

View File

@ -170,12 +170,12 @@ page {
background: #fff;
}
/* 金刚区(自绘 flex上下留白 = .grid 的 margin24rpx无组件内建空间 */
/* 金刚区(自绘 flex上下留白 = .grid 的 margin40rpx无组件内建空间 */
.grid {
display: flex;
flex-wrap: wrap;
padding: 0;
margin: 24rpx 0;
margin: 40rpx 0;
}
.grid-item {

View File

@ -70,7 +70,7 @@
<!-- 分类条移到瀑布上方上滑时吸顶(top=页头高度)仅瀑布在其下滚动 -->
<scroll-view scroll-x class="hd-cate" v-if="lifeCircleList.length" :style="{ top: cateTop + 'px' }">
<view class="hd-cate-item" :class="{ on: currentTab === 'recommend' }" @tap="selectRecommend">推荐</view>
<view class="hd-cate-item" :class="{ on: currentTab === 'recommend' }" @tap="selectRecommend">附近</view>
<view class="hd-cate-item" v-for="(item, index) in lifeCircleList" :key="index"
:class="{ on: currentTab === item.title }" @tap="selectCircle(item)">
{{ item.title }}
@ -225,7 +225,7 @@ export default {
searchPlaceholder() {
return this.hotWord && this.hotWord.length ? this.hotWord[0] : '搜索好店 / 商家 / 优惠'
},
// //广
// //广
isRecommend() {
return this.currentTab === 'recommend'
}
@ -293,7 +293,7 @@ export default {
// #endif
},
// id
// id
recommendCateId() {
const target = this.lifeCircleList.find(c => c.title === '美食圈') || this.lifeCircleList[0]
if (target) {
@ -303,7 +303,7 @@ export default {
return this.categoryList.length ? this.categoryList[0].id : null
},
//
//
async selectRecommend() {
this.currentTab = 'recommend'
const id = this.recommendCateId()
@ -391,14 +391,14 @@ export default {
this.getCateList().catch(e => console.warn('好店分类/瀑布加载失败:', e)) // +
},
fail: (err) => {
console.log('地图API解析地址失败:', err)
console.warn('地图API解析地址失败:', err)
uni.showToast({ title: '定位失败,请检查网络', icon: 'none' })
uni.hideLoading()
}
})
},
fail: (err) => {
console.log('获取位置信息失败:', err)
console.warn('获取位置信息失败:', err)
if (err.errMsg && err.errMsg.indexOf('auth deny') >= 0) {
uni.showModal({
title: '提示', content: '需要您授权位置信息才能使用此功能', confirmText: '去授权',
@ -535,7 +535,7 @@ export default {
const res = await request(apiArr2.getCateList, 'POST', { isShop: 1 }, { slice: false })
if (res.rows && res.rows.length) {
this.categoryList = res.rows
//
//
this.currentTab = 'recommend'
this.currentCategoryId = this.recommendCateId() || res.rows[0].id
await this.getMechantList(true)