From 0713ad4cf76b4c22f7a2d07509c850290bdf80de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com>
Date: Thu, 23 Jul 2026 18:39:49 +0800
Subject: [PATCH] =?UTF-8?q?feat(user):=20=E5=90=88=E5=B9=B6=E5=88=87?=
=?UTF-8?q?=E6=8D=A2=E5=BC=80=E5=8F=91=E8=80=85=E8=8F=9C=E5=8D=95=E5=B9=B6?=
=?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5=E8=BD=AE=E6=92=AD=E5=9B=BE?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 用户菜单根据 isDeveloper 字段切换显示申请或进入开发者中心
- 已审核用户菜单高亮显示“进入开发者中心”
- 去除冗余开发者中心菜单条目,简化结构
- 重新设计开发者中心页面UI,统一门店中心风格
- 顶部展示开发者头像及昵称手机号信息
- 功能卡片展示“我的应用”、“API Key”和“我的工单”,异步加载数量角标
- 底部添加“开发者帮助与支持”入口,替代门店订阅消息卡片
- 未登录或非开发者状态显示相应空态及操作按钮
- 首页轮播图为空时不显示容器,功能入口自动上移,优化空状态体验
- 优化登录状态与权限校验逻辑,防止页面闪烁和无权限展示
---
.idea/workspace.xml | 29 ++++++++++++++++-------------
.workbuddy/memory/2026-07-23.md | 8 +++++++-
src/pages/index/index.tsx | 14 +++++---------
3 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 3517864..aaa055b 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,10 @@
-
+
+
+
+
@@ -116,15 +119,7 @@
-
-
-
-
- 1776019228297
-
-
-
- 1776019228297
+
@@ -510,7 +505,15 @@
1784802589434
-
+
+
+ 1784802954848
+
+
+
+ 1784802954848
+
+
@@ -530,7 +533,6 @@
-
@@ -555,7 +557,8 @@
-
+
+
\ No newline at end of file
diff --git a/.workbuddy/memory/2026-07-23.md b/.workbuddy/memory/2026-07-23.md
index 6ad5071..8d04e1f 100644
--- a/.workbuddy/memory/2026-07-23.md
+++ b/.workbuddy/memory/2026-07-23.md
@@ -77,4 +77,10 @@
- FEATURE_CARDS 三张:我的应用(📦/蓝)、API Key(🔑/绿)、我的工单(🎫/橙),各自 desc + url;角标沿用 `Badge`,展示各功能的计数(stats.apps/keys/tickets,由 getMyApps/getAppApiKeyStats/getMyTickets 的 total 取),卡片渲染后异步填充。
- 底部卡片改为「开发者帮助与支持」(💡 蓝圈)→ `/pages/user/help-center/index`(替代门店中心的订阅消息卡,订阅模板是门店专属,开发者无对应模板)。
- 保留两个空态:!isLoggedIn「请先登录」、!isDeveloper「尚未加入开发者中心」+ 申请按钮(保留原 apply 入口,store center 无此场景故无按钮);首屏用 `userLoading`(来自 useUser) 转圈防闪烁。
-- 不再引入 NavBar/StatCard/EntryGrid/Loading(可能内部用 nutui,踩 weapp 空白坑),只用 `@tarojs/components` + 自定义 `Badge`,与门店中心一致。
\ No newline at end of file
+- 不再引入 NavBar/StatCard/EntryGrid/Loading(可能内部用 nutui,踩 weapp 空白坑),只用 `@tarojs/components` + 自定义 `Badge`,与门店中心一致。
+
+## 首页轮播图空时不显示
+
+**需求**:`pages/index/index` 的轮播图(banner)若为空则不显示。
+
+**改动**(`src/pages/index/index.tsx` 轮播图渲染段):把外层 `.index-banner-wrap` 容器从「`bannerSlides.length>0` 渲染 Swiper,否则渲染『暂无轮播图』占位框」改为「`bannerSlides.length > 0 &&` 整个容器才渲染」;空时整块(含占位框)不显示,下方功能入口自动上移。
\ No newline at end of file
diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx
index 315fa41..23d3769 100644
--- a/src/pages/index/index.tsx
+++ b/src/pages/index/index.tsx
@@ -280,9 +280,9 @@ const IndexPage: React.FC = () => {
)}
)}
- {/* 轮播图 */}
-
- {bannerSlides.length > 0 ? (
+ {/* 轮播图:有数据才显示,为空则不渲染 */}
+ {bannerSlides.length > 0 && (
+
{
))}
- ) : (
-
- 暂无轮播图
-
- )}
-
+
+ )}
{/* 功能入口网格 */}