From 9227ec61759c799caaed6efc0d9189c1c39f439f Mon Sep 17 00:00:00 2001 From: xiaowang Date: Thu, 21 May 2026 18:43:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9D=82=E5=8A=A1=EF=BC=9A=E6=95=B4=E7=90=86?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=B9=B6=E6=94=B6=E5=8F=A3=20YumiNail=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/skills/gitnexus/gitnexus-cli/SKILL.md | 83 + .../gitnexus/gitnexus-debugging/SKILL.md | 89 + .../gitnexus/gitnexus-exploring/SKILL.md | 78 + .../skills/gitnexus/gitnexus-guide/SKILL.md | 64 + .../gitnexus-impact-analysis/SKILL.md | 97 + .../gitnexus/gitnexus-refactoring/SKILL.md | 121 + .gitignore | 4 + .idea/compiler.xml | 17 +- .idea/dataSources.xml | 21 + .idea/sqldialects.xml | 3 - AGENTS.md | 43 + CLAUDE.md | 43 + PROJECT_MEMORY.md | 219 ++ README.md | 49 +- WeChatProgram/app.js | 60 + WeChatProgram/app.json | 4 +- WeChatProgram/app.wxss | 64 +- .../components/product-card/product-card.wxss | 18 +- WeChatProgram/pages/auth/index.js | 3 +- WeChatProgram/pages/auth/index.wxml | 12 +- WeChatProgram/pages/auth/index.wxss | 52 +- WeChatProgram/pages/cart/index.js | 5 +- WeChatProgram/pages/cart/index.wxml | 8 +- WeChatProgram/pages/cart/index.wxss | 41 +- WeChatProgram/pages/coupons/index.js | 5 +- WeChatProgram/pages/coupons/index.wxml | 4 +- WeChatProgram/pages/coupons/index.wxss | 12 +- WeChatProgram/pages/home/index.js | 9 +- WeChatProgram/pages/home/index.wxml | 8 +- WeChatProgram/pages/home/index.wxss | 20 +- WeChatProgram/pages/orders/index.js | 5 +- WeChatProgram/pages/orders/index.wxml | 4 +- WeChatProgram/pages/orders/index.wxss | 22 +- WeChatProgram/pages/product-detail/index.js | 19 +- WeChatProgram/pages/product-detail/index.wxml | 4 +- WeChatProgram/pages/product-detail/index.wxss | 34 +- WeChatProgram/pages/products/index.js | 3 +- WeChatProgram/pages/products/index.wxml | 4 +- WeChatProgram/pages/products/index.wxss | 25 +- WeChatProgram/pages/profile/index.js | 5 +- WeChatProgram/pages/profile/index.wxml | 2 +- WeChatProgram/pages/profile/index.wxss | 20 +- WeChatProgram/pages/settings/index.js | 3 +- WeChatProgram/pages/settings/index.wxml | 4 +- WeChatProgram/pages/settings/index.wxss | 27 +- WeChatProgram/pages/shop-detail/index.js | 17 +- WeChatProgram/pages/shop-detail/index.wxml | 2 +- WeChatProgram/pages/shop-detail/index.wxss | 13 +- WeChatProgram/pages/wishlist/index.js | 5 +- WeChatProgram/pages/wishlist/index.wxml | 4 +- WeChatProgram/pages/wishlist/index.wxss | 8 +- WeChatProgram/utils/request.js | 6 +- WeChatProgram/utils/theme.js | 137 ++ WeChatProgram/utils/theme.test.js | 33 + YumiNail-Admin-Program/pages/login/index.wxml | 4 +- .../pages/manage/index.wxml | 4 +- YumiNail-Admin-Program/pages/profile/index.js | 16 +- .../pages/profile/index.wxml | 4 +- .../pages/workbench/index.wxml | 10 +- YumiNail-Admin-Program/utils/permission.js | 8 +- YumiNail-Calendar-Core/pom.xml | 137 -- .../YumiNailCalendarCoreApplication.java | 12 - .../common/ConflictException.java | 8 - .../common/GlobalExceptionHandler.java | 64 - .../yuminailcalendarcore/common/Result.java | 33 - .../config/JacksonConfig.java | 18 - .../config/MyBatisPlusConfig.java | 22 - .../config/MyMetaObjectHandler.java | 22 - .../controller/AppointmentController.java | 123 - .../controller/BackupController.java | 59 - .../controller/CustomerController.java | 55 - .../controller/HealthController.java | 16 - .../controller/OrderController.java | 65 - .../dto/AppointmentBatchDeleteRequest.java | 15 - .../dto/AppointmentImportRequest.java | 15 - .../dto/AppointmentSaveRequest.java | 69 - .../dto/AppointmentStatusUpdateRequest.java | 17 - .../dto/BackupImportRequest.java | 22 - .../dto/CustomerSaveRequest.java | 33 - .../dto/OrderSaveRequest.java | 42 - .../entity/AppointmentDO.java | 50 - .../entity/BaseEntity.java | 22 - .../entity/CustomerDO.java | 23 - .../entity/ServiceOrderDO.java | 38 - .../mapper/AppointmentMapper.java | 7 - .../mapper/CustomerMapper.java | 7 - .../mapper/ServiceOrderMapper.java | 7 - .../service/AppointmentService.java | 42 - .../service/CustomerService.java | 21 - .../service/ServiceOrderService.java | 23 - .../service/impl/AppointmentServiceImpl.java | 574 ----- .../service/impl/CustomerServiceImpl.java | 193 -- .../service/impl/ServiceOrderServiceImpl.java | 283 --- .../vo/AppointmentDashboardVO.java | 30 - .../vo/AppointmentExportVO.java | 21 - .../vo/AppointmentVO.java | 52 - .../vo/BackupExportVO.java | 27 - .../vo/CalendarDaySummaryVO.java | 19 - .../yuminailcalendarcore/vo/CustomerVO.java | 34 - .../vo/IncomeTrendPointVO.java | 14 - .../vo/ServiceOrderVO.java | 42 - .../src/main/resources/application.yaml | 32 - .../resources/files/YumiNail-Calendar.sql | 75 - .../src/main/resources/log4j2.xml | 63 - YumiNail-Calendar-Core/项目详细总结.md | 13 - YumiNail-Calendar-Frontend/index.html | 12 - YumiNail-Calendar-Frontend/package-lock.json | 1952 ---------------- YumiNail-Calendar-Frontend/package.json | 24 - YumiNail-Calendar-Frontend/public/vite.svg | 1 - YumiNail-Calendar-Frontend/src/App.vue | 2060 ----------------- .../src/api/appointment.ts | 78 - YumiNail-Calendar-Frontend/src/api/backup.ts | 11 - .../src/api/customer.ts | 20 - YumiNail-Calendar-Frontend/src/api/http.ts | 48 - YumiNail-Calendar-Frontend/src/api/order.ts | 27 - .../src/components/AppointmentDrawer.vue | 275 --- .../src/components/AppointmentList.vue | 309 --- .../src/components/CalendarBoard.vue | 261 --- .../src/components/CustomerDrawer.vue | 110 - .../src/components/CustomerList.vue | 161 -- .../src/components/OrderDrawer.vue | 181 -- .../src/components/OrderList.vue | 169 -- YumiNail-Calendar-Frontend/src/main.ts | 7 - YumiNail-Calendar-Frontend/src/style.css | 427 ---- .../src/types/appointment.ts | 184 -- .../src/utils/action-loading.ts | 51 - .../src/utils/business.ts | 150 -- YumiNail-Calendar-Frontend/src/utils/date.ts | 105 - YumiNail-Calendar-Frontend/src/utils/id.ts | 3 - .../src/utils/storage.ts | 90 - YumiNail-Calendar-Frontend/tsconfig.app.json | 20 - YumiNail-Calendar-Frontend/tsconfig.json | 7 - YumiNail-Calendar-Frontend/tsconfig.node.json | 26 - YumiNail-Calendar-Frontend/vite.config.ts | 37 - YumiNail-Calendar-Frontend/项目详细总结.md | 13 - YumiNail-Calendar-Gateway/pom.xml | 113 - .../YumiNailCalendarGatewayApplication.java | 15 - .../config/CorsConfig.java | 25 - .../config/GatewayConfig.java | 14 - .../filter/AuthGlobalFilter.java | 60 - .../src/main/resources/application.yaml | 25 - .../src/main/resources/log4j2.xml | 62 - YumiNail-Calendar-Gateway/项目详细总结.md | 9 - .../yuminailcore/aspect/PermissionAspect.java | 34 +- .../yuminailcore/config/JacksonConfig.java | 31 +- .../controller/AdminOrderController.java | 7 +- .../controller/AdminProductController.java | 11 +- .../controller/AnnouncementController.java | 2 +- .../controller/DashboardController.java | 90 + .../MessageHubPushConfigController.java | 2 +- .../ObjectStorageFileController.java | 2 +- .../controller/PermissionController.java | 6 +- .../controller/ProductController.java | 59 +- .../controller/ShopController.java | 4 +- .../controller/SystemMessageController.java | 2 +- .../SystemParameterConfigController.java | 15 +- .../controller/VipRechargePlanController.java | 8 +- .../xiaowang/yuminailcore/dto/ShopDTO.java | 17 + .../yuminailcore/entity/BalanceDO.java | 13 +- .../xiaowang/yuminailcore/entity/ShopDO.java | 25 + .../yuminailcore/service/ProductService.java | 8 + .../service/VipRechargePlanService.java | 2 + .../service/impl/ProductServiceImpl.java | 113 +- .../service/impl/ShopServiceImpl.java | 39 +- .../service/impl/UserAssetServiceImpl.java | 22 +- .../service/impl/UserServiceImpl.java | 177 +- .../impl/VipRechargePlanServiceImpl.java | 60 + .../impl/WechatMiniAuthServiceImpl.java | 25 + .../support/AdminScopeHelper.java | 18 + .../support/PermissionCatalog.java | 229 ++ .../support/PermissionPolicy.java | 82 +- .../support/ShopThemeSupport.java | 24 + .../support/UserShopBindingSupport.java | 24 +- .../security/UploadSecurityValidator.java | 57 +- .../support/security/UserSessionService.java | 4 + .../yuminailcore/vo/DashboardStatsVO.java | 11 + .../com/xiaowang/yuminailcore/vo/ShopVO.java | 17 + YumiNail-Core/src/main/resources/API.md | 5 +- .../src/main/resources/files/YumiNail.sql | 416 +--- YumiNail-Core/src/test/java/TestBCrypt.java | 18 + .../xiaowang/yuminailcore/PasswordTest.java | 20 + .../controller/AdminOrderControllerTest.java | 77 + .../controller/ProductControllerTest.java | 93 + .../impl/WechatMiniAuthServiceImplTest.java | 183 ++ .../impl/WechatMiniClientServiceImplTest.java | 61 + .../support/PermissionCatalogTest.java | 64 + .../support/ShopThemeSupportTest.java | 30 + YumiNail-Frontend/src/App.vue | 161 +- YumiNail-Frontend/src/api/admin.ts | 58 +- YumiNail-Frontend/src/api/index.ts | 12 +- YumiNail-Frontend/src/api/shop.ts | 24 + YumiNail-Frontend/src/api/user.ts | 10 + YumiNail-Frontend/src/components.d.ts | 2 + .../src/components/BottomNav.vue | 36 +- .../src/components/SystemMessageCard.vue | 219 ++ .../src/composables/useShopTheme.ts | 120 + .../src/utils/admin-auth-bootstrap.ts | 16 +- YumiNail-Frontend/src/utils/admin-session.ts | 2 + YumiNail-Frontend/src/utils/image-upload.ts | 19 +- YumiNail-Frontend/src/utils/permission.ts | 22 + .../src/utils/platform-admin-permissions.ts | 11 + YumiNail-Frontend/src/utils/shop-theme.ts | 168 ++ .../src/views/ArtistOrderView.vue | 70 +- YumiNail-Frontend/src/views/AuthView.vue | 20 +- YumiNail-Frontend/src/views/CartView.vue | 927 ++++++-- YumiNail-Frontend/src/views/CouponView.vue | 81 +- YumiNail-Frontend/src/views/HomeView.vue | 104 +- YumiNail-Frontend/src/views/OrderView.vue | 46 +- .../src/views/ProductDetailView.vue | 84 +- .../src/views/ProductListView.vue | 131 +- YumiNail-Frontend/src/views/ProfileView.vue | 78 +- YumiNail-Frontend/src/views/SettingsView.vue | 40 +- .../src/views/ShopDetailView.vue | 438 ++-- YumiNail-Frontend/src/views/WishlistView.vue | 69 +- .../src/views/admin/AdminLayout.vue | 141 +- .../src/views/admin/AdminLoginView.vue | 41 +- .../src/views/admin/CommentsView.vue | 61 +- .../src/views/admin/CouponsView.vue | 61 +- .../src/views/admin/DashboardView.vue | 319 +-- .../src/views/admin/HomeView.vue | 98 +- .../src/views/admin/ManageView.vue | 59 +- .../views/admin/MessageHubPushConfigsView.vue | 64 +- .../src/views/admin/OrdersView.vue | 141 +- .../src/views/admin/ProductsView.vue | 47 +- .../src/views/admin/ProfileView.vue | 18 +- .../src/views/admin/ShopsView.vue | 1261 +++++++++- .../src/views/admin/SystemMessagesView.vue | 536 +++-- .../src/views/admin/UsersView.vue | 132 +- .../src/views/admin/VipRechargePlansView.vue | 12 +- .../src/views/admin/admin-helpers.ts | 2 +- YumiNail-Frontend/vite.config.ts | 7 +- docs/README.md | 19 + docs/architecture/功能清单.md | 134 -- docs/architecture/后台管理小程序功能清单.md | 133 -- docs/architecture/后台管理小程序架构说明.md | 199 -- docs/architecture/整体架构总览.md | 149 -- docs/architecture/普通前台能力对齐记录.md | 63 - docs/architecture/项目架构分析.md | 378 --- docs/base.md | 5 - .../2026-03-19-业务链路与后台权限整改.md | 107 - docs/changes/2026-03-19-全量打包与代码提交.md | 29 - .../2026-03-19-预约时间落库与预约校验补齐.md | 63 - .../changes/2026-03-20-SQL复核与初始化模板.md | 120 - .../2026-03-20-后台登录增加店铺必选.md | 38 - docs/changes/2026-03-20-待优化建议落地.md | 191 -- docs/changes/2026-03-20-权限初始化规则落地.md | 128 - docs/changes/2026-03-21-前后端打包产物归档.md | 31 - .../2026-03-21-前端时间输入改为选择器.md | 48 - ...26-03-21-后台无店铺时管理员登录引导修复.md | 53 - .../2026-03-21-后台登录店铺ID精度修复.md | 30 - ...26-03-21-后台登录店铺展示与中文提示修复.md | 48 - .../2026-03-21-店铺默认VIP自动券初始化.md | 30 - .../2026-03-21-店长美甲师默认后台权限同步.md | 30 - ...2026-03-21-用户管理手机号与所属店铺修复.md | 79 - ...2026-03-23-MessageHub-Gmail体检提示优化.md | 90 - ...-23-MessageHub-Spug短信发送官方文档修正.md | 96 - ...-23-MessageHub完整SQL与YumiNail调用复核.md | 112 - ...-MessageHub来源系统白名单与系统默认通道.md | 83 - .../2026-03-23-MessageHub模板ID自动生成.md | 52 - ...3-23-MessageHub测试发送模板化与通道排序.md | 69 - ...23-MessageHub测试发送链路与Spug兼容修复.md | 74 - .../2026-03-23-MessageHub短信模板管理补齐.md | 72 - .../2026-03-23-MessageHub短信模板绑定通道.md | 77 - .../2026-03-23-MessageHub管理页快捷导航.md | 32 - .../2026-03-23-MessageHub资源文档补充.md | 31 - .../2026-03-23-MessageHub通道ID指定发送.md | 53 - .../2026-03-23-MessageHub通道配置后台化.md | 62 - ...26-03-24-Frontend宽屏适配改为响应式布局.md | 46 - .../2026-03-24-Frontend电脑端宽屏适配.md | 48 - ...2026-03-24-MessageHub运行时目录移出项目.md | 30 - ...-Core-MessageHub客户端改为读取Nacos配置.md | 46 - .../2026-03-24-前后端与MessageHub打包归档.md | 34 - .../2026-03-24-模块打包产物命名统一.md | 23 - docs/changes/2026-03-25-八个问题修复.md | 157 -- docs/changes/2026-03-25-前后台体验优化补完.md | 83 - .../2026-03-25-多店铺登录与店铺级联整理.md | 106 - docs/changes/2026-03-25-服务启动排查与修复.md | 85 - .../2026-03-25-登录店铺预加载404兼容处理.md | 46 - ...026-03-26-YumiNail主SQL整合首次部署脚本.md | 49 - .../2026-03-26-作品图片多选上传与5MB压缩.md | 37 - .../2026-03-26-全站文件上传改为分片上传.md | 87 - .../2026-03-26-前后台切换底部导航闪现修复.md | 20 - ...26-03-26-后台删除用户后列表残留二次修复.md | 87 - .../2026-03-26-后台用户停用删除落库修复.md | 73 - ...2026-03-26-后台用户停用删除解绑语义重构.md | 116 - ...用户手机号唯一校验与店长新增美甲师修复.md | 68 - .../2026-03-26-后端上传大小限制调整为5MB.md | 30 - docs/changes/2026-03-26-登录提示文案收口.md | 57 - .../2026-03-26-登录状态与自动停用规则补齐.md | 83 - .../2026-03-26-编辑表单前端暂存功能.md | 65 - .../2026-03-26-账号输入限制为字母数字.md | 51 - docs/changes/2026-03-26-首页Banner位置调整.md | 17 - .../2026-03-26-首页热门门店改为Banner轮播.md | 23 - ...03-27-YumiNail主SQL同步标签店铺唯一约束.md | 46 - ...2026-03-27-作品优惠券全选与标签店铺修复.md | 93 - docs/changes/2026-03-27-全局雪花ID精度治理.md | 95 - .../2026-03-27-关键业务代码补充注释.md | 43 - .../2026-03-27-后台表格与购物车美甲师修复.md | 54 - ...3-27-商品详情与购物车美甲师可约口径对齐.md | 70 - .../2026-03-27-店长新增美甲师下拉选项修复.md | 37 - .../2026-03-27-店长编辑美甲师权限误报修复.md | 34 - docs/changes/2026-03-27-权限不足提示细化.md | 34 - .../2026-03-27-权限分配前端提示与禁选补齐.md | 75 - ...026-03-27-移除docs-product目录的git跟踪.md | 18 - ...2026-03-27-美甲师默认权限矩阵与文档对齐.md | 39 - .../2026-03-27-美甲师默认补入订单确认权限.md | 68 - ...-03-27-解绑降级优惠券编码与余额流水修复.md | 51 - ...27-雪花ID精度导致美甲师编辑鉴权失败修复.md | 33 - .../2026-03-27_tag_shop_unique_patch.sql | 38 - ...26-03-30-后台作品管理支持编辑点赞收藏数.md | 30 - docs/changes/2026-03-30-整包打包记录.md | 46 - .../2026-03-30-统一时间高位雪花ID收口重构.md | 88 - .../2026-03-30-雪花ID数据库对齐补丁.md | 120 - ...26-04-01-后台作品上传分片与数量限制调整.md | 43 - ...26-04-01-小程序作品页筛选区真机样式修复.md | 28 - .../2026-04-01-小程序我的页顶部留白收紧.md | 28 - docs/changes/2026-04-01-小程序页面设计优化.md | 113 - .../2026-04-02-小程序加购与优惠券筛选对齐.md | 69 - ...2026-04-02-小程序微信手机号一键登录接入.md | 125 - .../2026-04-02-小程序登录页简化重构.md | 51 - .../2026-04-02-微信优先登录布局调整.md | 19 - docs/changes/2026-04-02-登录页整体居中对齐.md | 16 - .../2026-04-02-登录页顶部引导文案移除.md | 19 - ...-04-02-网页端与小程序端用户入口能力对齐.md | 67 - .../2026-04-02-项目总览与功能清单文档完善.md | 58 - ...-04-03-美甲师订单查看与用户下单防重收口.md | 67 - ...2026-04-03-订单锁续租与下单成功提示修补.md | 64 - .../2026-04-08-后台管理小程序首版落地.md | 104 - .../2026-04-13-WeChatProgram页面文案精简.md | 44 - .../2026-04-13-作品页顶部标题文案移除.md | 17 - .../2026-04-13-前台作品搜索扩展到标签名.md | 26 - ...2026-04-13-后台管理小程序启动兼容性修复.md | 22 - ...26-04-13-小程序作品页筛选区紧凑吸顶改造.md | 28 - .../2026-04-14-共享作品卡片加购收口.md | 27 - .../2026-04-14-共享作品卡片窄列重排.md | 28 - .../2026-04-14-头像签名地址与对象路径修复.md | 35 - .../2026-04-20-小程序前后台全局优化收口.md | 114 - ...26-04-20-小程序前后台防呆与重复提交收口.md | 55 - ...22-网页端与小程序端普通前台能力对齐收口.md | 66 - ...2026-04-23-后端响应速度与慢请求日志收口.md | 69 - .../2026-04-23-网页前台极窄宽度防压缩收口.md | 37 - ...2026-04-23-网页前台模块切换整页闪烁修复.md | 27 - .../2026-04-23-网页后台移动端适配收口.md | 73 - .../2026-04-23-项目文档整理与前端说明迁移.md | 54 - ...26-04-23-首页精选与热门作品卡片尺寸统一.md | 29 - .../2026-04-23-首页精选作品单卡铺满修复.md | 27 - ...cement-vip-recharge-contact-test-report.md | 31 - ...6-system-message-and-mysql-mcp-followup.md | 49 - ...026-05-16-店长参与制作与VIP中心测试报告.md | 49 - .../changes/2026-05-17-newcomer-call-guide.md | 73 - docs/changes/Gateway-Core整改记录.md | 205 -- docs/features/待优化建议.md | 11 - docs/features/权限初始化待确认.md | 7 - docs/features/美甲师日历表.md | 485 ---- docs/ops/database-config.md | 46 + docs/ops/production-servers.md | 48 + docx/YumiNail-测试报告.docx | Bin 38461 -> 0 bytes docx/YumiNail-测试案例.docx | Bin 37861 -> 0 bytes memory/README.md | 30 + memory/bugs.md | 89 + memory/context.md | 155 ++ memory/progress.md | 88 + 362 files changed, 8358 insertions(+), 19928 deletions(-) create mode 100644 .claude/skills/gitnexus/gitnexus-cli/SKILL.md create mode 100644 .claude/skills/gitnexus/gitnexus-debugging/SKILL.md create mode 100644 .claude/skills/gitnexus/gitnexus-exploring/SKILL.md create mode 100644 .claude/skills/gitnexus/gitnexus-guide/SKILL.md create mode 100644 .claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md create mode 100644 .claude/skills/gitnexus/gitnexus-refactoring/SKILL.md create mode 100644 AGENTS.md create mode 100644 CLAUDE.md create mode 100644 PROJECT_MEMORY.md create mode 100644 WeChatProgram/utils/theme.js create mode 100644 WeChatProgram/utils/theme.test.js delete mode 100644 YumiNail-Calendar-Core/pom.xml delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/YumiNailCalendarCoreApplication.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/common/ConflictException.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/common/GlobalExceptionHandler.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/common/Result.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/config/JacksonConfig.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/config/MyBatisPlusConfig.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/config/MyMetaObjectHandler.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/controller/AppointmentController.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/controller/BackupController.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/controller/CustomerController.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/controller/HealthController.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/controller/OrderController.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/dto/AppointmentBatchDeleteRequest.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/dto/AppointmentImportRequest.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/dto/AppointmentSaveRequest.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/dto/AppointmentStatusUpdateRequest.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/dto/BackupImportRequest.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/dto/CustomerSaveRequest.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/dto/OrderSaveRequest.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/entity/AppointmentDO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/entity/BaseEntity.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/entity/CustomerDO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/entity/ServiceOrderDO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/mapper/AppointmentMapper.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/mapper/CustomerMapper.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/mapper/ServiceOrderMapper.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/service/AppointmentService.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/service/CustomerService.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/service/ServiceOrderService.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/service/impl/AppointmentServiceImpl.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/service/impl/CustomerServiceImpl.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/service/impl/ServiceOrderServiceImpl.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/AppointmentDashboardVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/AppointmentExportVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/AppointmentVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/BackupExportVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/CalendarDaySummaryVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/CustomerVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/IncomeTrendPointVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/java/com/xiaowang/yuminailcalendarcore/vo/ServiceOrderVO.java delete mode 100644 YumiNail-Calendar-Core/src/main/resources/application.yaml delete mode 100644 YumiNail-Calendar-Core/src/main/resources/files/YumiNail-Calendar.sql delete mode 100644 YumiNail-Calendar-Core/src/main/resources/log4j2.xml delete mode 100644 YumiNail-Calendar-Core/项目详细总结.md delete mode 100644 YumiNail-Calendar-Frontend/index.html delete mode 100644 YumiNail-Calendar-Frontend/package-lock.json delete mode 100644 YumiNail-Calendar-Frontend/package.json delete mode 100644 YumiNail-Calendar-Frontend/public/vite.svg delete mode 100644 YumiNail-Calendar-Frontend/src/App.vue delete mode 100644 YumiNail-Calendar-Frontend/src/api/appointment.ts delete mode 100644 YumiNail-Calendar-Frontend/src/api/backup.ts delete mode 100644 YumiNail-Calendar-Frontend/src/api/customer.ts delete mode 100644 YumiNail-Calendar-Frontend/src/api/http.ts delete mode 100644 YumiNail-Calendar-Frontend/src/api/order.ts delete mode 100644 YumiNail-Calendar-Frontend/src/components/AppointmentDrawer.vue delete mode 100644 YumiNail-Calendar-Frontend/src/components/AppointmentList.vue delete mode 100644 YumiNail-Calendar-Frontend/src/components/CalendarBoard.vue delete mode 100644 YumiNail-Calendar-Frontend/src/components/CustomerDrawer.vue delete mode 100644 YumiNail-Calendar-Frontend/src/components/CustomerList.vue delete mode 100644 YumiNail-Calendar-Frontend/src/components/OrderDrawer.vue delete mode 100644 YumiNail-Calendar-Frontend/src/components/OrderList.vue delete mode 100644 YumiNail-Calendar-Frontend/src/main.ts delete mode 100644 YumiNail-Calendar-Frontend/src/style.css delete mode 100644 YumiNail-Calendar-Frontend/src/types/appointment.ts delete mode 100644 YumiNail-Calendar-Frontend/src/utils/action-loading.ts delete mode 100644 YumiNail-Calendar-Frontend/src/utils/business.ts delete mode 100644 YumiNail-Calendar-Frontend/src/utils/date.ts delete mode 100644 YumiNail-Calendar-Frontend/src/utils/id.ts delete mode 100644 YumiNail-Calendar-Frontend/src/utils/storage.ts delete mode 100644 YumiNail-Calendar-Frontend/tsconfig.app.json delete mode 100644 YumiNail-Calendar-Frontend/tsconfig.json delete mode 100644 YumiNail-Calendar-Frontend/tsconfig.node.json delete mode 100644 YumiNail-Calendar-Frontend/vite.config.ts delete mode 100644 YumiNail-Calendar-Frontend/项目详细总结.md delete mode 100644 YumiNail-Calendar-Gateway/pom.xml delete mode 100644 YumiNail-Calendar-Gateway/src/main/java/com/xiaowang/yuminailcalendargateway/YumiNailCalendarGatewayApplication.java delete mode 100644 YumiNail-Calendar-Gateway/src/main/java/com/xiaowang/yuminailcalendargateway/config/CorsConfig.java delete mode 100644 YumiNail-Calendar-Gateway/src/main/java/com/xiaowang/yuminailcalendargateway/config/GatewayConfig.java delete mode 100644 YumiNail-Calendar-Gateway/src/main/java/com/xiaowang/yuminailcalendargateway/filter/AuthGlobalFilter.java delete mode 100644 YumiNail-Calendar-Gateway/src/main/resources/application.yaml delete mode 100644 YumiNail-Calendar-Gateway/src/main/resources/log4j2.xml delete mode 100644 YumiNail-Calendar-Gateway/项目详细总结.md create mode 100644 YumiNail-Core/src/main/java/com/xiaowang/yuminailcore/support/PermissionCatalog.java create mode 100644 YumiNail-Core/src/main/java/com/xiaowang/yuminailcore/support/ShopThemeSupport.java create mode 100644 YumiNail-Core/src/test/java/TestBCrypt.java create mode 100644 YumiNail-Core/src/test/java/com/xiaowang/yuminailcore/PasswordTest.java create mode 100644 YumiNail-Core/src/test/java/com/xiaowang/yuminailcore/controller/AdminOrderControllerTest.java create mode 100644 YumiNail-Core/src/test/java/com/xiaowang/yuminailcore/controller/ProductControllerTest.java create mode 100644 YumiNail-Core/src/test/java/com/xiaowang/yuminailcore/service/impl/WechatMiniAuthServiceImplTest.java create mode 100644 YumiNail-Core/src/test/java/com/xiaowang/yuminailcore/service/impl/WechatMiniClientServiceImplTest.java create mode 100644 YumiNail-Core/src/test/java/com/xiaowang/yuminailcore/support/PermissionCatalogTest.java create mode 100644 YumiNail-Core/src/test/java/com/xiaowang/yuminailcore/support/ShopThemeSupportTest.java create mode 100644 YumiNail-Frontend/src/components/SystemMessageCard.vue create mode 100644 YumiNail-Frontend/src/composables/useShopTheme.ts create mode 100644 YumiNail-Frontend/src/utils/platform-admin-permissions.ts create mode 100644 YumiNail-Frontend/src/utils/shop-theme.ts create mode 100644 docs/README.md delete mode 100644 docs/architecture/功能清单.md delete mode 100644 docs/architecture/后台管理小程序功能清单.md delete mode 100644 docs/architecture/后台管理小程序架构说明.md delete mode 100644 docs/architecture/整体架构总览.md delete mode 100644 docs/architecture/普通前台能力对齐记录.md delete mode 100644 docs/architecture/项目架构分析.md delete mode 100644 docs/base.md delete mode 100644 docs/changes/2026-03-19-业务链路与后台权限整改.md delete mode 100644 docs/changes/2026-03-19-全量打包与代码提交.md delete mode 100644 docs/changes/2026-03-19-预约时间落库与预约校验补齐.md delete mode 100644 docs/changes/2026-03-20-SQL复核与初始化模板.md delete mode 100644 docs/changes/2026-03-20-后台登录增加店铺必选.md delete mode 100644 docs/changes/2026-03-20-待优化建议落地.md delete mode 100644 docs/changes/2026-03-20-权限初始化规则落地.md delete mode 100644 docs/changes/2026-03-21-前后端打包产物归档.md delete mode 100644 docs/changes/2026-03-21-前端时间输入改为选择器.md delete mode 100644 docs/changes/2026-03-21-后台无店铺时管理员登录引导修复.md delete mode 100644 docs/changes/2026-03-21-后台登录店铺ID精度修复.md delete mode 100644 docs/changes/2026-03-21-后台登录店铺展示与中文提示修复.md delete mode 100644 docs/changes/2026-03-21-店铺默认VIP自动券初始化.md delete mode 100644 docs/changes/2026-03-21-店长美甲师默认后台权限同步.md delete mode 100644 docs/changes/2026-03-21-用户管理手机号与所属店铺修复.md delete mode 100644 docs/changes/2026-03-23-MessageHub-Gmail体检提示优化.md delete mode 100644 docs/changes/2026-03-23-MessageHub-Spug短信发送官方文档修正.md delete mode 100644 docs/changes/2026-03-23-MessageHub完整SQL与YumiNail调用复核.md delete mode 100644 docs/changes/2026-03-23-MessageHub来源系统白名单与系统默认通道.md delete mode 100644 docs/changes/2026-03-23-MessageHub模板ID自动生成.md delete mode 100644 docs/changes/2026-03-23-MessageHub测试发送模板化与通道排序.md delete mode 100644 docs/changes/2026-03-23-MessageHub测试发送链路与Spug兼容修复.md delete mode 100644 docs/changes/2026-03-23-MessageHub短信模板管理补齐.md delete mode 100644 docs/changes/2026-03-23-MessageHub短信模板绑定通道.md delete mode 100644 docs/changes/2026-03-23-MessageHub管理页快捷导航.md delete mode 100644 docs/changes/2026-03-23-MessageHub资源文档补充.md delete mode 100644 docs/changes/2026-03-23-MessageHub通道ID指定发送.md delete mode 100644 docs/changes/2026-03-23-MessageHub通道配置后台化.md delete mode 100644 docs/changes/2026-03-24-Frontend宽屏适配改为响应式布局.md delete mode 100644 docs/changes/2026-03-24-Frontend电脑端宽屏适配.md delete mode 100644 docs/changes/2026-03-24-MessageHub运行时目录移出项目.md delete mode 100644 docs/changes/2026-03-24-YumiNail-Core-MessageHub客户端改为读取Nacos配置.md delete mode 100644 docs/changes/2026-03-24-前后端与MessageHub打包归档.md delete mode 100644 docs/changes/2026-03-24-模块打包产物命名统一.md delete mode 100644 docs/changes/2026-03-25-八个问题修复.md delete mode 100644 docs/changes/2026-03-25-前后台体验优化补完.md delete mode 100644 docs/changes/2026-03-25-多店铺登录与店铺级联整理.md delete mode 100644 docs/changes/2026-03-25-服务启动排查与修复.md delete mode 100644 docs/changes/2026-03-25-登录店铺预加载404兼容处理.md delete mode 100644 docs/changes/2026-03-26-YumiNail主SQL整合首次部署脚本.md delete mode 100644 docs/changes/2026-03-26-作品图片多选上传与5MB压缩.md delete mode 100644 docs/changes/2026-03-26-全站文件上传改为分片上传.md delete mode 100644 docs/changes/2026-03-26-前后台切换底部导航闪现修复.md delete mode 100644 docs/changes/2026-03-26-后台删除用户后列表残留二次修复.md delete mode 100644 docs/changes/2026-03-26-后台用户停用删除落库修复.md delete mode 100644 docs/changes/2026-03-26-后台用户停用删除解绑语义重构.md delete mode 100644 docs/changes/2026-03-26-后台用户手机号唯一校验与店长新增美甲师修复.md delete mode 100644 docs/changes/2026-03-26-后端上传大小限制调整为5MB.md delete mode 100644 docs/changes/2026-03-26-登录提示文案收口.md delete mode 100644 docs/changes/2026-03-26-登录状态与自动停用规则补齐.md delete mode 100644 docs/changes/2026-03-26-编辑表单前端暂存功能.md delete mode 100644 docs/changes/2026-03-26-账号输入限制为字母数字.md delete mode 100644 docs/changes/2026-03-26-首页Banner位置调整.md delete mode 100644 docs/changes/2026-03-26-首页热门门店改为Banner轮播.md delete mode 100644 docs/changes/2026-03-27-YumiNail主SQL同步标签店铺唯一约束.md delete mode 100644 docs/changes/2026-03-27-作品优惠券全选与标签店铺修复.md delete mode 100644 docs/changes/2026-03-27-全局雪花ID精度治理.md delete mode 100644 docs/changes/2026-03-27-关键业务代码补充注释.md delete mode 100644 docs/changes/2026-03-27-后台表格与购物车美甲师修复.md delete mode 100644 docs/changes/2026-03-27-商品详情与购物车美甲师可约口径对齐.md delete mode 100644 docs/changes/2026-03-27-店长新增美甲师下拉选项修复.md delete mode 100644 docs/changes/2026-03-27-店长编辑美甲师权限误报修复.md delete mode 100644 docs/changes/2026-03-27-权限不足提示细化.md delete mode 100644 docs/changes/2026-03-27-权限分配前端提示与禁选补齐.md delete mode 100644 docs/changes/2026-03-27-移除docs-product目录的git跟踪.md delete mode 100644 docs/changes/2026-03-27-美甲师默认权限矩阵与文档对齐.md delete mode 100644 docs/changes/2026-03-27-美甲师默认补入订单确认权限.md delete mode 100644 docs/changes/2026-03-27-解绑降级优惠券编码与余额流水修复.md delete mode 100644 docs/changes/2026-03-27-雪花ID精度导致美甲师编辑鉴权失败修复.md delete mode 100644 docs/changes/2026-03-27_tag_shop_unique_patch.sql delete mode 100644 docs/changes/2026-03-30-后台作品管理支持编辑点赞收藏数.md delete mode 100644 docs/changes/2026-03-30-整包打包记录.md delete mode 100644 docs/changes/2026-03-30-统一时间高位雪花ID收口重构.md delete mode 100644 docs/changes/2026-03-30-雪花ID数据库对齐补丁.md delete mode 100644 docs/changes/2026-04-01-后台作品上传分片与数量限制调整.md delete mode 100644 docs/changes/2026-04-01-小程序作品页筛选区真机样式修复.md delete mode 100644 docs/changes/2026-04-01-小程序我的页顶部留白收紧.md delete mode 100644 docs/changes/2026-04-01-小程序页面设计优化.md delete mode 100644 docs/changes/2026-04-02-小程序加购与优惠券筛选对齐.md delete mode 100644 docs/changes/2026-04-02-小程序微信手机号一键登录接入.md delete mode 100644 docs/changes/2026-04-02-小程序登录页简化重构.md delete mode 100644 docs/changes/2026-04-02-微信优先登录布局调整.md delete mode 100644 docs/changes/2026-04-02-登录页整体居中对齐.md delete mode 100644 docs/changes/2026-04-02-登录页顶部引导文案移除.md delete mode 100644 docs/changes/2026-04-02-网页端与小程序端用户入口能力对齐.md delete mode 100644 docs/changes/2026-04-02-项目总览与功能清单文档完善.md delete mode 100644 docs/changes/2026-04-03-美甲师订单查看与用户下单防重收口.md delete mode 100644 docs/changes/2026-04-03-订单锁续租与下单成功提示修补.md delete mode 100644 docs/changes/2026-04-08-后台管理小程序首版落地.md delete mode 100644 docs/changes/2026-04-13-WeChatProgram页面文案精简.md delete mode 100644 docs/changes/2026-04-13-作品页顶部标题文案移除.md delete mode 100644 docs/changes/2026-04-13-前台作品搜索扩展到标签名.md delete mode 100644 docs/changes/2026-04-13-后台管理小程序启动兼容性修复.md delete mode 100644 docs/changes/2026-04-13-小程序作品页筛选区紧凑吸顶改造.md delete mode 100644 docs/changes/2026-04-14-共享作品卡片加购收口.md delete mode 100644 docs/changes/2026-04-14-共享作品卡片窄列重排.md delete mode 100644 docs/changes/2026-04-14-头像签名地址与对象路径修复.md delete mode 100644 docs/changes/2026-04-20-小程序前后台全局优化收口.md delete mode 100644 docs/changes/2026-04-20-小程序前后台防呆与重复提交收口.md delete mode 100644 docs/changes/2026-04-22-网页端与小程序端普通前台能力对齐收口.md delete mode 100644 docs/changes/2026-04-23-后端响应速度与慢请求日志收口.md delete mode 100644 docs/changes/2026-04-23-网页前台极窄宽度防压缩收口.md delete mode 100644 docs/changes/2026-04-23-网页前台模块切换整页闪烁修复.md delete mode 100644 docs/changes/2026-04-23-网页后台移动端适配收口.md delete mode 100644 docs/changes/2026-04-23-项目文档整理与前端说明迁移.md delete mode 100644 docs/changes/2026-04-23-首页精选与热门作品卡片尺寸统一.md delete mode 100644 docs/changes/2026-04-23-首页精选作品单卡铺满修复.md delete mode 100644 docs/changes/2026-05-16-announcement-vip-recharge-contact-test-report.md delete mode 100644 docs/changes/2026-05-16-system-message-and-mysql-mcp-followup.md delete mode 100644 docs/changes/2026-05-16-店长参与制作与VIP中心测试报告.md delete mode 100644 docs/changes/2026-05-17-newcomer-call-guide.md delete mode 100644 docs/changes/Gateway-Core整改记录.md delete mode 100644 docs/features/待优化建议.md delete mode 100644 docs/features/权限初始化待确认.md delete mode 100644 docs/features/美甲师日历表.md create mode 100644 docs/ops/database-config.md create mode 100644 docs/ops/production-servers.md delete mode 100644 docx/YumiNail-测试报告.docx delete mode 100644 docx/YumiNail-测试案例.docx create mode 100644 memory/README.md create mode 100644 memory/bugs.md create mode 100644 memory/context.md create mode 100644 memory/progress.md diff --git a/.claude/skills/gitnexus/gitnexus-cli/SKILL.md b/.claude/skills/gitnexus/gitnexus-cli/SKILL.md new file mode 100644 index 00000000..cd9a83be --- /dev/null +++ b/.claude/skills/gitnexus/gitnexus-cli/SKILL.md @@ -0,0 +1,83 @@ +--- +name: gitnexus-cli +description: "Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos. Examples: \"Index this repo\", \"Reanalyze the codebase\", \"Generate a wiki\"" +--- + +# GitNexus CLI Commands + +All commands work via `npx` — no global install required. + +## Commands + +### analyze — Build or refresh the index + +```bash +npx gitnexus analyze +``` + +Run from the project root. This parses all source files, builds the knowledge graph, writes it to `.gitnexus/`, and generates CLAUDE.md / AGENTS.md context files. + +| Flag | Effect | +| -------------- | ---------------------------------------------------------------- | +| `--force` | Force full re-index even if up to date | +| `--embeddings` | Enable embedding generation for semantic search (off by default) | +| `--drop-embeddings` | Drop existing embeddings on rebuild. By default, an `analyze` without `--embeddings` preserves them. | + +**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook detects staleness after `git commit` and `git merge` and notifies the agent to run `analyze` — the hook does not run analyze itself, to avoid blocking the agent for up to 120s and risking KuzuDB corruption on timeout. + +### status — Check index freshness + +```bash +npx gitnexus status +``` + +Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed. + +### clean — Delete the index + +```bash +npx gitnexus clean +``` + +Deletes the `.gitnexus/` directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project. + +| Flag | Effect | +| --------- | ------------------------------------------------- | +| `--force` | Skip confirmation prompt | +| `--all` | Clean all indexed repos, not just the current one | + +### wiki — Generate documentation from the graph + +```bash +npx gitnexus wiki +``` + +Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use). + +| Flag | Effect | +| ------------------- | ----------------------------------------- | +| `--force` | Force full regeneration | +| `--model ` | LLM model (default: minimax/minimax-m2.5) | +| `--base-url ` | LLM API base URL | +| `--api-key ` | LLM API key | +| `--concurrency ` | Parallel LLM calls (default: 3) | +| `--gist` | Publish wiki as a public GitHub Gist | + +### list — Show all indexed repos + +```bash +npx gitnexus list +``` + +Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information. + +## After Indexing + +1. **Read `gitnexus://repo/{name}/context`** to verify the index loaded +2. Use the other GitNexus skills (`exploring`, `debugging`, `impact-analysis`, `refactoring`) for your task + +## Troubleshooting + +- **"Not inside a git repository"**: Run from a directory inside a git repo +- **Index is stale after re-analyzing**: Restart Claude Code to reload the MCP server +- **Embeddings slow**: Omit `--embeddings` (it's off by default) or set `OPENAI_API_KEY` for faster API-based embedding diff --git a/.claude/skills/gitnexus/gitnexus-debugging/SKILL.md b/.claude/skills/gitnexus/gitnexus-debugging/SKILL.md new file mode 100644 index 00000000..9510b97a --- /dev/null +++ b/.claude/skills/gitnexus/gitnexus-debugging/SKILL.md @@ -0,0 +1,89 @@ +--- +name: gitnexus-debugging +description: "Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\"" +--- + +# Debugging with GitNexus + +## When to Use + +- "Why is this function failing?" +- "Trace where this error comes from" +- "Who calls this method?" +- "This endpoint returns 500" +- Investigating bugs, errors, or unexpected behavior + +## Workflow + +``` +1. gitnexus_query({query: ""}) → Find related execution flows +2. gitnexus_context({name: ""}) → See callers/callees/processes +3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow +4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed +``` + +> If "Index is stale" → run `npx gitnexus analyze` in terminal. + +## Checklist + +``` +- [ ] Understand the symptom (error message, unexpected behavior) +- [ ] gitnexus_query for error text or related code +- [ ] Identify the suspect function from returned processes +- [ ] gitnexus_context to see callers and callees +- [ ] Trace execution flow via process resource if applicable +- [ ] gitnexus_cypher for custom call chain traces if needed +- [ ] Read source files to confirm root cause +``` + +## Debugging Patterns + +| Symptom | GitNexus Approach | +| -------------------- | ---------------------------------------------------------- | +| Error message | `gitnexus_query` for error text → `context` on throw sites | +| Wrong return value | `context` on the function → trace callees for data flow | +| Intermittent failure | `context` → look for external calls, async deps | +| Performance issue | `context` → find symbols with many callers (hot paths) | +| Recent regression | `detect_changes` to see what your changes affect | + +## Tools + +**gitnexus_query** — find code related to error: + +``` +gitnexus_query({query: "payment validation error"}) +→ Processes: CheckoutFlow, ErrorHandling +→ Symbols: validatePayment, handlePaymentError, PaymentException +``` + +**gitnexus_context** — full context for a suspect: + +``` +gitnexus_context({name: "validatePayment"}) +→ Incoming calls: processCheckout, webhookHandler +→ Outgoing calls: verifyCard, fetchRates (external API!) +→ Processes: CheckoutFlow (step 3/7) +``` + +**gitnexus_cypher** — custom call chain traces: + +```cypher +MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"}) +RETURN [n IN nodes(path) | n.name] AS chain +``` + +## Example: "Payment endpoint returns 500 intermittently" + +``` +1. gitnexus_query({query: "payment error handling"}) + → Processes: CheckoutFlow, ErrorHandling + → Symbols: validatePayment, handlePaymentError + +2. gitnexus_context({name: "validatePayment"}) + → Outgoing calls: verifyCard, fetchRates (external API!) + +3. READ gitnexus://repo/my-app/process/CheckoutFlow + → Step 3: validatePayment → calls fetchRates (external) + +4. Root cause: fetchRates calls external API without proper timeout +``` diff --git a/.claude/skills/gitnexus/gitnexus-exploring/SKILL.md b/.claude/skills/gitnexus/gitnexus-exploring/SKILL.md new file mode 100644 index 00000000..927a4e4b --- /dev/null +++ b/.claude/skills/gitnexus/gitnexus-exploring/SKILL.md @@ -0,0 +1,78 @@ +--- +name: gitnexus-exploring +description: "Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How does X work?\", \"What calls this function?\", \"Show me the auth flow\"" +--- + +# Exploring Codebases with GitNexus + +## When to Use + +- "How does authentication work?" +- "What's the project structure?" +- "Show me the main components" +- "Where is the database logic?" +- Understanding code you haven't seen before + +## Workflow + +``` +1. READ gitnexus://repos → Discover indexed repos +2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness +3. gitnexus_query({query: ""}) → Find related execution flows +4. gitnexus_context({name: ""}) → Deep dive on specific symbol +5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow +``` + +> If step 2 says "Index is stale" → run `npx gitnexus analyze` in terminal. + +## Checklist + +``` +- [ ] READ gitnexus://repo/{name}/context +- [ ] gitnexus_query for the concept you want to understand +- [ ] Review returned processes (execution flows) +- [ ] gitnexus_context on key symbols for callers/callees +- [ ] READ process resource for full execution traces +- [ ] Read source files for implementation details +``` + +## Resources + +| Resource | What you get | +| --------------------------------------- | ------------------------------------------------------- | +| `gitnexus://repo/{name}/context` | Stats, staleness warning (~150 tokens) | +| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores (~300 tokens) | +| `gitnexus://repo/{name}/cluster/{name}` | Area members with file paths (~500 tokens) | +| `gitnexus://repo/{name}/process/{name}` | Step-by-step execution trace (~200 tokens) | + +## Tools + +**gitnexus_query** — find execution flows related to a concept: + +``` +gitnexus_query({query: "payment processing"}) +→ Processes: CheckoutFlow, RefundFlow, WebhookHandler +→ Symbols grouped by flow with file locations +``` + +**gitnexus_context** — 360-degree view of a symbol: + +``` +gitnexus_context({name: "validateUser"}) +→ Incoming calls: loginHandler, apiMiddleware +→ Outgoing calls: checkToken, getUserById +→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3) +``` + +## Example: "How does payment processing work?" + +``` +1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes +2. gitnexus_query({query: "payment processing"}) + → CheckoutFlow: processPayment → validateCard → chargeStripe + → RefundFlow: initiateRefund → calculateRefund → processRefund +3. gitnexus_context({name: "processPayment"}) + → Incoming: checkoutHandler, webhookHandler + → Outgoing: validateCard, chargeStripe, saveTransaction +4. Read src/payments/processor.ts for implementation details +``` diff --git a/.claude/skills/gitnexus/gitnexus-guide/SKILL.md b/.claude/skills/gitnexus/gitnexus-guide/SKILL.md new file mode 100644 index 00000000..937ac73d --- /dev/null +++ b/.claude/skills/gitnexus/gitnexus-guide/SKILL.md @@ -0,0 +1,64 @@ +--- +name: gitnexus-guide +description: "Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: \"What GitNexus tools are available?\", \"How do I use GitNexus?\"" +--- + +# GitNexus Guide + +Quick reference for all GitNexus MCP tools, resources, and the knowledge graph schema. + +## Always Start Here + +For any task involving code understanding, debugging, impact analysis, or refactoring: + +1. **Read `gitnexus://repo/{name}/context`** — codebase overview + check index freshness +2. **Match your task to a skill below** and **read that skill file** +3. **Follow the skill's workflow and checklist** + +> If step 1 warns the index is stale, run `npx gitnexus analyze` in the terminal first. + +## Skills + +| Task | Skill to read | +| -------------------------------------------- | ------------------- | +| Understand architecture / "How does X work?" | `gitnexus-exploring` | +| Blast radius / "What breaks if I change X?" | `gitnexus-impact-analysis` | +| Trace bugs / "Why is X failing?" | `gitnexus-debugging` | +| Rename / extract / split / refactor | `gitnexus-refactoring` | +| Tools, resources, schema reference | `gitnexus-guide` (this file) | +| Index, status, clean, wiki CLI commands | `gitnexus-cli` | + +## Tools Reference + +| Tool | What it gives you | +| ---------------- | ------------------------------------------------------------------------ | +| `query` | Process-grouped code intelligence — execution flows related to a concept | +| `context` | 360-degree symbol view — categorized refs, processes it participates in | +| `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence | +| `detect_changes` | Git-diff impact — what do your current changes affect | +| `rename` | Multi-file coordinated rename with confidence-tagged edits | +| `cypher` | Raw graph queries (read `gitnexus://repo/{name}/schema` first) | +| `list_repos` | Discover indexed repos | + +## Resources Reference + +Lightweight reads (~100-500 tokens) for navigation: + +| Resource | Content | +| ---------------------------------------------- | ----------------------------------------- | +| `gitnexus://repo/{name}/context` | Stats, staleness check | +| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores | +| `gitnexus://repo/{name}/cluster/{clusterName}` | Area members | +| `gitnexus://repo/{name}/processes` | All execution flows | +| `gitnexus://repo/{name}/process/{processName}` | Step-by-step trace | +| `gitnexus://repo/{name}/schema` | Graph schema for Cypher | + +## Graph Schema + +**Nodes:** File, Function, Class, Interface, Method, Community, Process +**Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS + +```cypher +MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"}) +RETURN caller.name, caller.filePath +``` diff --git a/.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md b/.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md new file mode 100644 index 00000000..e19af280 --- /dev/null +++ b/.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md @@ -0,0 +1,97 @@ +--- +name: gitnexus-impact-analysis +description: "Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\"" +--- + +# Impact Analysis with GitNexus + +## When to Use + +- "Is it safe to change this function?" +- "What will break if I modify X?" +- "Show me the blast radius" +- "Who uses this code?" +- Before making non-trivial code changes +- Before committing — to understand what your changes affect + +## Workflow + +``` +1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this +2. READ gitnexus://repo/{name}/processes → Check affected execution flows +3. gitnexus_detect_changes() → Map current git changes to affected flows +4. Assess risk and report to user +``` + +> If "Index is stale" → run `npx gitnexus analyze` in terminal. + +## Checklist + +``` +- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents +- [ ] Review d=1 items first (these WILL BREAK) +- [ ] Check high-confidence (>0.8) dependencies +- [ ] READ processes to check affected execution flows +- [ ] gitnexus_detect_changes() for pre-commit check +- [ ] Assess risk level and report to user +``` + +## Understanding Output + +| Depth | Risk Level | Meaning | +| ----- | ---------------- | ------------------------ | +| d=1 | **WILL BREAK** | Direct callers/importers | +| d=2 | LIKELY AFFECTED | Indirect dependencies | +| d=3 | MAY NEED TESTING | Transitive effects | + +## Risk Assessment + +| Affected | Risk | +| ------------------------------ | -------- | +| <5 symbols, few processes | LOW | +| 5-15 symbols, 2-5 processes | MEDIUM | +| >15 symbols or many processes | HIGH | +| Critical path (auth, payments) | CRITICAL | + +## Tools + +**gitnexus_impact** — the primary tool for symbol blast radius: + +``` +gitnexus_impact({ + target: "validateUser", + direction: "upstream", + minConfidence: 0.8, + maxDepth: 3 +}) + +→ d=1 (WILL BREAK): + - loginHandler (src/auth/login.ts:42) [CALLS, 100%] + - apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%] + +→ d=2 (LIKELY AFFECTED): + - authRouter (src/routes/auth.ts:22) [CALLS, 95%] +``` + +**gitnexus_detect_changes** — git-diff based impact analysis: + +``` +gitnexus_detect_changes({scope: "staged"}) + +→ Changed: 5 symbols in 3 files +→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline +→ Risk: MEDIUM +``` + +## Example: "What breaks if I change validateUser?" + +``` +1. gitnexus_impact({target: "validateUser", direction: "upstream"}) + → d=1: loginHandler, apiMiddleware (WILL BREAK) + → d=2: authRouter, sessionManager (LIKELY AFFECTED) + +2. READ gitnexus://repo/my-app/processes + → LoginFlow and TokenRefresh touch validateUser + +3. Risk: 2 direct callers, 2 processes = MEDIUM +``` diff --git a/.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md b/.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md new file mode 100644 index 00000000..f48cc01b --- /dev/null +++ b/.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md @@ -0,0 +1,121 @@ +--- +name: gitnexus-refactoring +description: "Use when the user wants to rename, extract, split, move, or restructure code safely. Examples: \"Rename this function\", \"Extract this into a module\", \"Refactor this class\", \"Move this to a separate file\"" +--- + +# Refactoring with GitNexus + +## When to Use + +- "Rename this function safely" +- "Extract this into a module" +- "Split this service" +- "Move this to a new file" +- Any task involving renaming, extracting, splitting, or restructuring code + +## Workflow + +``` +1. gitnexus_impact({target: "X", direction: "upstream"}) → Map all dependents +2. gitnexus_query({query: "X"}) → Find execution flows involving X +3. gitnexus_context({name: "X"}) → See all incoming/outgoing refs +4. Plan update order: interfaces → implementations → callers → tests +``` + +> If "Index is stale" → run `npx gitnexus analyze` in terminal. + +## Checklists + +### Rename Symbol + +``` +- [ ] gitnexus_rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — preview all edits +- [ ] Review graph edits (high confidence) and ast_search edits (review carefully) +- [ ] If satisfied: gitnexus_rename({..., dry_run: false}) — apply edits +- [ ] gitnexus_detect_changes() — verify only expected files changed +- [ ] Run tests for affected processes +``` + +### Extract Module + +``` +- [ ] gitnexus_context({name: target}) — see all incoming/outgoing refs +- [ ] gitnexus_impact({target, direction: "upstream"}) — find all external callers +- [ ] Define new module interface +- [ ] Extract code, update imports +- [ ] gitnexus_detect_changes() — verify affected scope +- [ ] Run tests for affected processes +``` + +### Split Function/Service + +``` +- [ ] gitnexus_context({name: target}) — understand all callees +- [ ] Group callees by responsibility +- [ ] gitnexus_impact({target, direction: "upstream"}) — map callers to update +- [ ] Create new functions/services +- [ ] Update callers +- [ ] gitnexus_detect_changes() — verify affected scope +- [ ] Run tests for affected processes +``` + +## Tools + +**gitnexus_rename** — automated multi-file rename: + +``` +gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true}) +→ 12 edits across 8 files +→ 10 graph edits (high confidence), 2 ast_search edits (review) +→ Changes: [{file_path, edits: [{line, old_text, new_text, confidence}]}] +``` + +**gitnexus_impact** — map all dependents first: + +``` +gitnexus_impact({target: "validateUser", direction: "upstream"}) +→ d=1: loginHandler, apiMiddleware, testUtils +→ Affected Processes: LoginFlow, TokenRefresh +``` + +**gitnexus_detect_changes** — verify your changes after refactoring: + +``` +gitnexus_detect_changes({scope: "all"}) +→ Changed: 8 files, 12 symbols +→ Affected processes: LoginFlow, TokenRefresh +→ Risk: MEDIUM +``` + +**gitnexus_cypher** — custom reference queries: + +```cypher +MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"}) +RETURN caller.name, caller.filePath ORDER BY caller.filePath +``` + +## Risk Rules + +| Risk Factor | Mitigation | +| ------------------- | ----------------------------------------- | +| Many callers (>5) | Use gitnexus_rename for automated updates | +| Cross-area refs | Use detect_changes after to verify scope | +| String/dynamic refs | gitnexus_query to find them | +| External/public API | Version and deprecate properly | + +## Example: Rename `validateUser` to `authenticateUser` + +``` +1. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true}) + → 12 edits: 10 graph (safe), 2 ast_search (review) + → Files: validator.ts, login.ts, middleware.ts, config.json... + +2. Review ast_search edits (config.json: dynamic reference!) + +3. gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false}) + → Applied 12 edits across 8 files + +4. gitnexus_detect_changes({scope: "all"}) + → Affected: LoginFlow, TokenRefresh + → Risk: MEDIUM — run tests for these flows +``` diff --git a/.gitignore b/.gitignore index 9392dd61..1475fe2d 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,8 @@ docs/_book # TODO: where does this rule come from? test/ +!YumiNail-Core/src/test/ +!YumiNail-Core/src/test/** # ---> Python # Byte-compiled / optimized / DLL files @@ -262,6 +264,8 @@ YumiNail-Admin-Program/utils/config.local.js # Local release/test artifacts release-packages/ +.codex-run/ +output/ .codex-temp-* *.swp diff --git a/.idea/compiler.xml b/.idea/compiler.xml index aa3a0cde..03d76123 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -7,7 +7,6 @@ - @@ -15,22 +14,16 @@ - - - - - - - - - - - + + + + + diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml index 6509128a..f731d3c4 100644 --- a/.idea/sqldialects.xml +++ b/.idea/sqldialects.xml @@ -1,9 +1,6 @@ - - - \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..e244bd5d --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,43 @@ + +# GitNexus — Code Intelligence + +This project is indexed by GitNexus as **xiaowang** (12294 symbols, 23811 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. + +> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. + +## Always Do + +- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user. +- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. +- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits. +- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance. +- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`. + +## Never Do + +- NEVER edit a function, class, or method without first running `gitnexus_impact` on it. +- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis. +- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph. +- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope. + +## Resources + +| Resource | Use for | +|----------|---------| +| `gitnexus://repo/xiaowang/context` | Codebase overview, check index freshness | +| `gitnexus://repo/xiaowang/clusters` | All functional areas | +| `gitnexus://repo/xiaowang/processes` | All execution flows | +| `gitnexus://repo/xiaowang/process/{name}` | Step-by-step execution trace | + +## CLI + +| Task | Read this skill file | +|------|---------------------| +| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` | +| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` | +| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` | +| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` | +| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` | +| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` | + + diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..e244bd5d --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,43 @@ + +# GitNexus — Code Intelligence + +This project is indexed by GitNexus as **xiaowang** (12294 symbols, 23811 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. + +> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. + +## Always Do + +- **MUST run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `gitnexus_impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user. +- **MUST run `gitnexus_detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. +- **MUST warn the user** if impact analysis returns HIGH or CRITICAL risk before proceeding with edits. +- When exploring unfamiliar code, use `gitnexus_query({query: "concept"})` to find execution flows instead of grepping. It returns process-grouped results ranked by relevance. +- When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use `gitnexus_context({name: "symbolName"})`. + +## Never Do + +- NEVER edit a function, class, or method without first running `gitnexus_impact` on it. +- NEVER ignore HIGH or CRITICAL risk warnings from impact analysis. +- NEVER rename symbols with find-and-replace — use `gitnexus_rename` which understands the call graph. +- NEVER commit changes without running `gitnexus_detect_changes()` to check affected scope. + +## Resources + +| Resource | Use for | +|----------|---------| +| `gitnexus://repo/xiaowang/context` | Codebase overview, check index freshness | +| `gitnexus://repo/xiaowang/clusters` | All functional areas | +| `gitnexus://repo/xiaowang/processes` | All execution flows | +| `gitnexus://repo/xiaowang/process/{name}` | Step-by-step execution trace | + +## CLI + +| Task | Read this skill file | +|------|---------------------| +| Understand architecture / "How does X work?" | `.claude/skills/gitnexus/gitnexus-exploring/SKILL.md` | +| Blast radius / "What breaks if I change X?" | `.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md` | +| Trace bugs / "Why is X failing?" | `.claude/skills/gitnexus/gitnexus-debugging/SKILL.md` | +| Rename / extract / split / refactor | `.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md` | +| Tools, resources, schema reference | `.claude/skills/gitnexus/gitnexus-guide/SKILL.md` | +| Index, status, clean, wiki CLI commands | `.claude/skills/gitnexus/gitnexus-cli/SKILL.md` | + + diff --git a/PROJECT_MEMORY.md b/PROJECT_MEMORY.md new file mode 100644 index 00000000..868d737f --- /dev/null +++ b/PROJECT_MEMORY.md @@ -0,0 +1,219 @@ +# YumiNail 项目记忆文件 + +这份文件给后续接手本仓库的 AI/开发者快速建立上下文。切换工作区或开启新会话后,优先阅读本文,再看 `README.md`、`YumiNail-Core/src/main/resources/API.md` 和相关源码。 + +## 1. 项目定位 + +`E:\code\xiaowang` 是 YumiNail 美甲业务系统主仓库。 + +当前主链路: + +- `YumiNail-Frontend`:Vue 3 Web 前台 + Web 后台管理。 +- `WeChatProgram`:微信小程序用户端。 +- `YumiNail-Gateway`:Spring Cloud Gateway 主业务网关。 +- `YumiNail-Core`:Spring Boot 核心业务服务。 +- `YumiNail-Admin-Program`:后台小程序/管理端实验入口,当前不是主要验收面。 + +已从主仓库移除独立日历实验项目: + +- `YumiNail-Calendar-Core` +- `YumiNail-Calendar-Gateway` +- `YumiNail-Calendar-Frontend` + +预约日历现在以内置模块存在于 `YumiNail-Core + YumiNail-Frontend`,数据直接来自主系统订单表和订单项表。 + +## 2. 强约束 + +- 所有 shell 命令必须带 `rtk` 前缀,例如 `rtk npm run build`、`rtk mvn -q -DskipTests compile`。 +- 不新增散落 SQL 文件。结构、补列、索引、权限种子和测试数据都集中到: + - `YumiNail-Core/src/main/resources/files/YumiNail.sql` +- 涉及真实数据库 SQL 时,优先使用 MySQL MCP 执行;如果 MCP 无 DDL 权限,再说明阻塞。 +- 不要回滚用户已有改动。这个仓库经常有大量未提交改动,必须按任务范围谨慎编辑。 +- 手动改文件优先用 `apply_patch`。 +- Web UI 风格偏“柔和浅粉白”,不要再混用大量蓝紫、灰、棕色主题。 +- 页面文案必须中文,避免出现英文验收/测试提示。 + +## 3. 当前重要业务状态 + +### 店长参与制作 + +- 店长账号保持 `type=2`。 +- 通过 `t_nail_artist_info.participate_production` 控制是否参与美甲制作。 +- 参与制作的店长会进入可预约人员体系,用户预约时可选择。 +- 美甲师管理列表需要展示普通美甲师和参与制作店长。 + +### VIP 与余额 + +- `t_balance` 需要同时有: + - `last_update_time`:业务展示字段。 + - `update_time`:MyBatis/BaseEntity 通用更新时间字段。 +- 之前用户报错 `Unknown column 'update_time'`,已补到 SQL 和真实库。 +- VIP 充值配置只展示档位,不接支付、不写余额流水。 +- VIP 等级来源优先取启用的 VIP 充值配置中的等级;没有配置时使用默认等级。 + +### 消息/公告 + +- 消息通知和公告是两个独立模块。 +- 消息通知: + - 可发布文本和单张图片。 + - 可弹窗一次,也可在消息通知模块查看。 +- 公告: + - 首页顶部滚动展示。 + - 不进入消息历史,不弹窗。 +- 消息范围/公告范围都支持管理员平台级、店铺级、指定用户;店长只能管理本店范围。 + +### 地图与店铺位置 + +- 店铺地图位置展示给用户时只显示地点名称/地址,不显示经纬度。 +- 经纬度只作为隐藏数据,用于距离计算、地图预览和导航。 +- 管理员在参数管理中配置地图相关 key。 +- 当前需求倾向:位置选择与展示主要使用腾讯位置服务;高德主要用于导航跳转,Web Key 和小程序 Key 分开配置。 + +### 店铺有效期 + +- `t_shop.authorization_expire_time` 表示授权有效期。 +- 为空代表长期有效。 +- 到期不改 `status`,而是动态冻结。 +- 前台用户登录过期店铺提示“店铺已被冻结”。 +- 后台账号可登录,但非平台管理员业务功能禁用,首页提示授权到期。 + +### 用户关系与自定义角色 + +- 店长可创建店铺内自定义角色,分配角色名和权限。 +- 用户有“店铺 + 直属上级”关系。 +- 自注册可填邀请码绑定上级;不填默认归属当前店铺店长。 +- 后台用户管理必须多维筛选并注意脱敏。 + +### 预约日历 + +- 日历接口在 `YumiNail-Core` 主系统内。 +- 数据来自 `t_order`、`t_order_item.artist_id`、`t_order_item.appointment_time`。 +- 美甲师和参与制作店长查看自己的预约。 +- Web 页面 `/artist-calendar` 是主入口。 +- 预约详情可跳转关联订单、展示订单金额,也可跳转用户选择的作品。 + +## 4. 最近修过的关键坑 + +- 后台管理员登录后立刻提示过期: + - 后台请求应只使用 `adminAccessToken/adminRefreshToken`。 + - `AdminLoginView` 返回前台时不要误删前台 token。 +- 图片上传 JPG 被拒: + - 分片上传的 chunk 不能按最终图片 MIME 校验。 + - 初始化阶段校验原文件元数据;chunk 只校验非空、大小和危险扩展名。 + - JPG MIME 需兼容 `image/jpeg`、`image/jpg`、`image/pjpeg`。 +- 优惠券时间保存失败: + - 后端 Jackson 需兼容 `yyyy-MM-dd HH:mm:ss` 和 ISO `yyyy-MM-ddTHH:mm:ss`。 +- 小程序作品详情未登录跳登录: + - 作品详情是匿名可访问。 + - 只有收藏、加购、下单、评论等动作需要登录。 + - 白名单接口返回 401 时不要触发全局“登录过期”跳转。 +- 小程序页面不可滚动: + - 只在弹窗遮罩上 `catchtouchmove`。 + - 登录页使用可滚动容器,小屏也要能看到按钮。 + +## 5. 运行与验证命令 + +后端: + +```powershell +rtk mvn -q -DskipTests compile +``` + +分别在: + +- `E:\code\xiaowang\YumiNail-Core` +- `E:\code\xiaowang\YumiNail-Gateway` + +Web 前端: + +```powershell +rtk npm run build +``` + +在: + +- `E:\code\xiaowang\YumiNail-Frontend` + +小程序 JS 语法检查: + +```powershell +rtk powershell -NoProfile -Command '& { Get-ChildItem -LiteralPath "WeChatProgram" -Recurse -Filter "*.js" | ForEach-Object { node --check $_.FullName } }' +``` + +## 6. 数据库与配置 + +- 真实 datasource 以 Nacos `YumiNail-Dev / DEFAULT_GROUP / datasource.yaml` 为准。 +- 用户曾明确要求:不要把生产/开发配置写到本地文件里,涉及配置修改应走 Nacos。 +- MySQL MCP 可用于查询和 DML;DDL 可能因权限受限失败,需要确认 MCP 权限。 +- 常用校验: + +```sql +SELECT COLUMN_NAME +FROM information_schema.COLUMNS +WHERE TABLE_SCHEMA = DATABASE() + AND TABLE_NAME = 't_balance' + AND COLUMN_NAME IN ('update_time', 'last_update_time'); +``` + +## 7. 文档与代码风格 + +- 新手友好注释是用户明确要求过的方向,但不要机械生成无意义注释。 +- 推荐注释重点: + - Controller:接口路径、参数用途、调用链。 + - Service/ServiceImpl:业务规则、权限边界、关键校验。 + - DTO/VO:字段含义和前端调用注意点。 +- 避免英文测试文案、英文占位验收数据出现在用户界面。 +- 避免大范围重写乱码文件,除非该文件正好在本轮任务范围内。 + +## 8. Web 前端体验偏好 + +- 用户端页面参考小程序布局,顶部栏风格统一。 +- 作品列表: + - 不要左侧分类栏。 + - 使用顶部横向滑动、吸顶标签栏,类似小红书。 +- 作品详情: + - 图片可点击放大。 + - 详情信息保持高密度,重点展示所属门店、可约美甲师。 + - 分享链接无需登录即可查看详情。 +- 我的订单: + - 订单号支持一键复制。 + - 提供多维筛选。 +- 后台: + - 侧边栏响应式可折叠。 + - 左上角 Logo/标题不要挤在一起。 + - 仪表盘显示订单金额、客户数、美甲师数、今日/近 7 日增量、快捷跳转。 + +## 9. 常见文件入口 + +后端: + +- `YumiNail-Core/src/main/java/com/xiaowang/yuminailcore/controller` +- `YumiNail-Core/src/main/java/com/xiaowang/yuminailcore/service` +- `YumiNail-Core/src/main/java/com/xiaowang/yuminailcore/service/impl` +- `YumiNail-Core/src/main/java/com/xiaowang/yuminailcore/support/security` +- `YumiNail-Core/src/main/resources/files/YumiNail.sql` + +Web: + +- `YumiNail-Frontend/src/api` +- `YumiNail-Frontend/src/views` +- `YumiNail-Frontend/src/views/admin` +- `YumiNail-Frontend/src/components` +- `YumiNail-Frontend/src/style.css` + +小程序: + +- `WeChatProgram/pages` +- `WeChatProgram/api` +- `WeChatProgram/utils/request.js` +- `WeChatProgram/app.wxss` + +## 10. 接手建议 + +1. 先读本文件和 `README.md`。 +2. 运行 `git status --short`,确认已有改动,不要回滚无关文件。 +3. 根据任务锁定最小文件范围。 +4. 后端改动后编译 Core/Gateway。 +5. Web 改动后跑 `npm run build`。 +6. 小程序改动后跑全量 `node --check`。 +7. 涉及 SQL,先改 `YumiNail.sql`,再用 MySQL MCP 对真实库执行或校验。 diff --git a/README.md b/README.md index 21e07aef..e21770fc 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,11 @@ ## 项目简介 -本仓库围绕 `YumiNail` 美甲业务系统展开,当前包含 3 组主要能力: +本仓库围绕 `YumiNail` 美甲业务系统展开,当前主链路包括: -1. `YumiNail` 主业务系统 - 覆盖网页前台、后台管理、网关、核心业务、数据库初始化脚本。 -2. `WeChatProgram` - 面向普通用户的小程序端,和主业务系统共用一套核心后端接口。 -3. `YumiNail-Calendar-*` 日历子系统 - 提供独立的预约日历前端、网关和后端服务。 +1. `YumiNail` 主业务系统:Web 前台、Web 后台、网关、核心后端和数据库初始化脚本。 +2. `WeChatProgram`:面向普通用户的小程序端,复用主业务后端接口。 +3. `YumiNail-Core` 内置美甲师预约日历模块:日历数据直接来自主系统订单和订单项,不再维护独立日历服务。 `MessageHub` 已拆分为独立仓库:`http://wcy111.top:3000/xiaowang/messgehub.git`。 @@ -20,50 +17,18 @@ | `YumiNail-Frontend` | Vue 3 前端 | 用户前台 + 后台管理 SPA | | `WeChatProgram` | 微信小程序 | 用户端小程序入口 | | `YumiNail-Gateway` | Spring Cloud Gateway | 主业务统一 API 入口 | -| `YumiNail-Core` | Spring Boot | 用户、店铺、商品、订单、优惠券、权限、文件等核心业务 | -| `YumiNail-Calendar-Frontend` | Vue 3 前端 | 美甲师预约日历独立前端 | -| `YumiNail-Calendar-Gateway` | Gateway | 日历系统网关 | -| `YumiNail-Calendar-Core` | Spring Boot | 日历系统后端 | +| `YumiNail-Core` | Spring Boot | 用户、店铺、作品、订单、优惠券、权限、文件、预约日历等核心业务 | | `docs` | 文档目录 | 架构分析、变更记录、需求跟踪、实施记录 | ## 运行依赖 - `Nacos`:注册中心与配置中心 -- `MySQL`:主业务、日历系统数据存储 +- `MySQL`:主业务数据存储 - `Redis`:登录态、验证码、缓存、临时 ticket - `RabbitMQ`:主业务异步消息投递 - `MinIO`:对象存储与图片文件访问 - `JDK 21`、`Maven`、`Node.js / npm` -## 文档入口 - -- [整体架构总览](docs/architecture/整体架构总览.md) -- [项目架构分析](docs/architecture/项目架构分析.md) -- [功能清单](docs/architecture/功能清单.md) -- [网页前端 README](YumiNail-Frontend/README.md) -- [网页前端项目详细总结](YumiNail-Frontend/项目详细总结.md) -- [待优化建议](docs/features/待优化建议.md) -- [历史变更记录](docs/changes/) - ## 初始化说明 -### YumiNail 主业务 - -- 首次部署空库时,优先执行: - - `YumiNail-Core/src/main/resources/files/YumiNail.sql` -- 已部署环境做增量升级时,再按补丁文件逐步执行: - - `YumiNail-Core/src/main/resources/files/*.sql` - -## 推荐阅读顺序 - -1. 先阅读 [README](README.md) 了解模块边界。 -2. 再阅读 [整体架构总览](docs/architecture/整体架构总览.md) 把握系统关系。 -3. 接着阅读 [项目架构分析](docs/architecture/项目架构分析.md) 了解登录、权限、白名单、消息链路与部署口径。 -4. 如需查看业务能力范围,阅读 [功能清单](docs/architecture/功能清单.md)。 -5. 如需查看最近改动,阅读 `docs/changes/` 下对应日期文档。 - -## 维护约定 - -- 每次任务完成后,在 `docs/changes/` 留存一份变更记录。 -- 待确认或待实现建议放在 `docs/features/`。 -- 若涉及 SQL 结构或初始化变更,需要同时给出增量 SQL,并同步更新首次部署所需的初始化 SQL。 +数据库初始化脚本集中在 `YumiNail-Core/src/main/resources/files/YumiNail.sql`。新增结构、补列、索引、权限种子和验收数据都应继续收口到该文件,不再新增散落 SQL 文件。 diff --git a/WeChatProgram/app.js b/WeChatProgram/app.js index 5b796396..fbd0dd02 100644 --- a/WeChatProgram/app.js +++ b/WeChatProgram/app.js @@ -1,8 +1,11 @@ const authApi = require('./api/auth') const cartApi = require('./api/cart') +const shopApi = require('./api/shop') const userApi = require('./api/user') const auth = require('./utils/auth') const idleSession = require('./utils/idle-session') +const theme = require('./utils/theme') +const file = require('./utils/file') const { IDLE_TIMEOUT_MS, IDLE_WARNING_MS } = require('./utils/config') App({ @@ -10,6 +13,7 @@ App({ userInfo: null, isLoggedIn: false, cartCount: 0, + shopTheme: theme.DEFAULT_SHOP_THEME, pendingProductFilter: null, pendingWechatMiniLogin: null, wechatMiniAutoLoginState: 'idle' @@ -41,6 +45,7 @@ App({ const isLoggedIn = auth.isLoggedIn() this.globalData.userInfo = userInfo this.globalData.isLoggedIn = isLoggedIn + this.refreshShopTheme(userInfo) if (userInfo && userInfo.shopId) { auth.setPreferredMiniLoginShopId(userInfo.shopId) @@ -161,6 +166,7 @@ App({ auth.setSession(payload) this.globalData.userInfo = auth.getStoredUserInfo() this.globalData.isLoggedIn = auth.isLoggedIn() + this.refreshShopTheme(this.globalData.userInfo) if (this.globalData.userInfo && this.globalData.userInfo.shopId) { auth.setPreferredMiniLoginShopId(this.globalData.userInfo.shopId) @@ -173,6 +179,7 @@ App({ auth.updateStoredUserInfo(userInfo) this.globalData.userInfo = userInfo this.globalData.isLoggedIn = auth.isLoggedIn() + this.refreshShopTheme(userInfo) if (userInfo && userInfo.shopId) { auth.setPreferredMiniLoginShopId(userInfo.shopId) @@ -183,9 +190,62 @@ App({ auth.clearSession() this.globalData.userInfo = null this.globalData.isLoggedIn = false + this.setShopTheme(null) this.clearCartBadge() }, + setShopTheme(shop) { + const resolvedTheme = theme.resolveShopTheme(shop) + this.globalData.shopTheme = resolvedTheme + this.syncThemeToCurrentPages() + if (resolvedTheme.backgroundImageFileId) { + this.resolveShopThemeBackground(shop, resolvedTheme.backgroundImageFileId) + } + }, + + async resolveShopThemeBackground(shop, fileId) { + try { + const backgroundImageUrl = await file.getSignedUrl(fileId) + if ( + !backgroundImageUrl + || !this.globalData.shopTheme + || this.globalData.shopTheme.backgroundImageFileId !== String(fileId) + ) { + return + } + this.globalData.shopTheme = theme.resolveShopTheme({ + ...(shop || {}), + themeBackgroundImageUrl: backgroundImageUrl + }) + this.syncThemeToCurrentPages() + } catch (error) {} + }, + + async refreshShopTheme(userInfo) { + if (!userInfo || !userInfo.shopId) { + this.setShopTheme(null) + return + } + try { + const shop = await shopApi.getShopById(userInfo.shopId) + if (this.globalData.userInfo && String(this.globalData.userInfo.shopId) === String(userInfo.shopId)) { + this.setShopTheme(shop) + } + } catch (error) { + this.setShopTheme(null) + } + }, + + syncThemeToCurrentPages() { + const pages = typeof getCurrentPages === 'function' ? getCurrentPages() : [] + const data = theme.pageThemeData(this.globalData.shopTheme) + pages.forEach(page => { + if (page && typeof page.setData === 'function') { + page.setData(data) + } + }) + }, + async refreshSessionUserInfo() { if (!auth.isLoggedIn()) { return diff --git a/WeChatProgram/app.json b/WeChatProgram/app.json index 83bd2349..59b51f45 100644 --- a/WeChatProgram/app.json +++ b/WeChatProgram/app.json @@ -19,12 +19,12 @@ "navigationBarTextStyle": "black", "navigationStyle": "custom", "backgroundTextStyle": "light", - "backgroundColor": "#fff7f8" + "backgroundColor": "#fff7f9" }, "tabBar": { "color": "#8f7b83", "selectedColor": "#c6597d", - "backgroundColor": "#fffaf9", + "backgroundColor": "#fff7f9", "borderStyle": "black", "position": "bottom", "list": [ diff --git a/WeChatProgram/app.wxss b/WeChatProgram/app.wxss index 7af11a15..851b655e 100644 --- a/WeChatProgram/app.wxss +++ b/WeChatProgram/app.wxss @@ -1,8 +1,15 @@ page { - min-height: 100%; - background: - radial-gradient(circle at top right, rgba(255, 205, 219, 0.38), transparent 32%), - linear-gradient(180deg, #fff7f8 0%, #fffdfc 100%); + --theme-primary: #c6597d; + --theme-secondary: #e9b7c7; + --theme-accent: #9f4967; + --theme-page-bg: #fff7f9; + --theme-card-bg: #ffffff; + --theme-border: #efd8e0; + --theme-primary-soft: #fbf1f4; + --theme-gradient: linear-gradient(135deg, #c6597d 0%, #e9b7c7 100%); + --theme-gradient-soft: linear-gradient(145deg, #ffffff 0%, #fff1f5 58%, #ffe8ef 100%); + min-height: 100vh; + background: var(--theme-page-bg); color: #2d2430; font-size: 28rpx; } @@ -39,6 +46,7 @@ button::after { .page-shell { min-height: 100vh; padding-bottom: calc(env(safe-area-inset-bottom) + 48rpx); + background: var(--theme-page-bg); } .page-content { @@ -47,14 +55,14 @@ button::after { .page-card { overflow: hidden; - background: #ffffff; - border: 1rpx solid rgba(239, 216, 224, 0.86); + background: var(--theme-card-bg); + border: 1rpx solid var(--theme-border); border-radius: 32rpx; box-shadow: 0 22rpx 56rpx rgba(122, 67, 88, 0.1); } .glass-card { - background: rgba(255, 255, 255, 0.8); + background: rgba(255, 255, 255, 0.82); border: 1rpx solid rgba(255, 255, 255, 0.9); border-radius: 32rpx; box-shadow: 0 22rpx 56rpx rgba(122, 67, 88, 0.08); @@ -64,8 +72,8 @@ button::after { overflow: hidden; padding: 34rpx 30rpx; border-radius: 36rpx; - background: linear-gradient(145deg, #fffdfd 0%, #fff1f5 56%, #ffe8ef 100%); - border: 1rpx solid rgba(244, 214, 224, 0.92); + background: var(--theme-gradient-soft); + border: 1rpx solid var(--theme-border); box-shadow: 0 28rpx 64rpx rgba(122, 67, 88, 0.1); } @@ -74,7 +82,7 @@ button::after { font-size: 22rpx; font-weight: 700; letter-spacing: 2rpx; - color: #c6597d; + color: var(--theme-primary); } .hero-title { @@ -114,7 +122,7 @@ button::after { } .hero-action.primary { - background: linear-gradient(135deg, #ff8cb0 0%, #c6597d 100%); + background: var(--theme-gradient); color: #ffffff; } @@ -145,7 +153,7 @@ button::after { font-size: 22rpx; font-weight: 700; letter-spacing: 2rpx; - color: #c6597d; + color: var(--theme-primary); } .section-title { @@ -165,7 +173,7 @@ button::after { .section-link { font-size: 24rpx; - color: #c6597d; + color: var(--theme-primary); font-weight: 700; } @@ -213,7 +221,7 @@ button::after { width: 100%; height: 92rpx; border-radius: 999rpx; - background: linear-gradient(135deg, #ff8cb0 0%, #c6597d 100%); + background: var(--theme-gradient); color: #ffffff; font-size: 30rpx; font-weight: 700; @@ -226,8 +234,8 @@ button::after { width: 100%; height: 84rpx; border-radius: 999rpx; - border: 2rpx solid #efd7df; - background: #ffffff; + border: 2rpx solid var(--theme-border); + background: var(--theme-card-bg); color: #7a5262; font-size: 28rpx; font-weight: 600; @@ -241,8 +249,8 @@ button::after { height: 68rpx; padding: 0 26rpx; border-radius: 999rpx; - background: #fdf0f4; - color: #c6597d; + background: var(--theme-primary-soft); + color: var(--theme-primary); font-size: 24rpx; font-weight: 600; } @@ -264,8 +272,8 @@ button::after { min-height: 92rpx; padding: 0 28rpx; border-radius: 24rpx; - background: #fbf5f7; - border: 1rpx solid rgba(239, 216, 224, 0.92); + background: var(--theme-primary-soft); + border: 1rpx solid var(--theme-border); color: #2d2430; font-size: 28rpx; } @@ -287,18 +295,18 @@ button::after { } .status-text.success { - color: #2ea36f; + color: var(--theme-primary); } .status-text.error { - color: #d5536f; + color: var(--theme-accent); } .hint-card { padding: 20rpx 22rpx; border-radius: 22rpx; - background: #fff8ea; - color: #9b6900; + background: var(--theme-primary-soft); + color: var(--theme-accent); font-size: 24rpx; line-height: 1.7; } @@ -336,17 +344,17 @@ button::after { } .chip { - background: #fce8ef; - color: #c6597d; + background: var(--theme-primary-soft); + color: var(--theme-primary); } .soft-chip { - background: #fbf5f7; + background: var(--theme-primary-soft); color: #8d7a84; } .divider-line { width: 100%; height: 2rpx; - background: #f3e7eb; + background: var(--theme-border); } diff --git a/WeChatProgram/components/product-card/product-card.wxss b/WeChatProgram/components/product-card/product-card.wxss index f3d2529c..284fc4a4 100644 --- a/WeChatProgram/components/product-card/product-card.wxss +++ b/WeChatProgram/components/product-card/product-card.wxss @@ -4,8 +4,8 @@ min-width: 0; overflow: hidden; border-radius: 28rpx; - background: #ffffff; - border: 1rpx solid rgba(239, 216, 224, 0.84); + background: var(--theme-card-bg); + border: 1rpx solid var(--theme-border); box-shadow: 0 18rpx 42rpx rgba(122, 67, 88, 0.08); } @@ -16,7 +16,7 @@ .product-cover { width: 100%; height: 288rpx; - background: #f7ecf0; + background: var(--theme-primary-soft); } .product-cover-shadow { @@ -82,8 +82,8 @@ max-width: 100%; padding: 6rpx 14rpx; border-radius: 999rpx; - background: #fbecf1; - color: #c6597d; + background: var(--theme-primary-soft); + color: var(--theme-primary); font-size: 18rpx; line-height: 1; overflow: hidden; @@ -114,7 +114,7 @@ font-size: 34rpx; line-height: 1.12; font-weight: 800; - color: #d5536f; + color: var(--theme-accent); } .product-stats { @@ -132,7 +132,7 @@ width: 64rpx; height: 64rpx; border-radius: 22rpx; - background: linear-gradient(135deg, #ff8cb0 0%, #c6597d 100%); + background: var(--theme-gradient); box-shadow: 0 14rpx 30rpx rgba(198, 89, 125, 0.22); } @@ -209,8 +209,8 @@ height: 56rpx; padding: 0 18rpx; border-radius: 999rpx; - background: #f8eef1; - color: #8f6e7a; + background: var(--theme-primary-soft); + color: var(--theme-accent); font-size: 20rpx; font-weight: 700; white-space: nowrap; diff --git a/WeChatProgram/pages/auth/index.js b/WeChatProgram/pages/auth/index.js index 372b22d0..7b3545e2 100644 --- a/WeChatProgram/pages/auth/index.js +++ b/WeChatProgram/pages/auth/index.js @@ -4,6 +4,7 @@ const userApi = require('../../api/user') const authStore = require('../../utils/auth') const actionGuard = require('../../utils/action-guard') const navigation = require('../../utils/navigation') +const theme = require('../../utils/theme') const { runWithLoading } = require('../../utils/loading') const { createKeyboardSafeData, @@ -23,7 +24,7 @@ const phoneRegex = /^1[3-9]\d{9}$/ Page({ data: Object.assign(createKeyboardSafeData({ cursorSpacing: 108 - }), { + }), theme.pageThemeData(getApp().globalData.shopTheme), { redirect: '', activeTab: 'login', loginType: 'password', diff --git a/WeChatProgram/pages/auth/index.wxml b/WeChatProgram/pages/auth/index.wxml index 2033791b..abc65f07 100644 --- a/WeChatProgram/pages/auth/index.wxml +++ b/WeChatProgram/pages/auth/index.wxml @@ -1,7 +1,7 @@ - - + + - + @@ -11,7 +11,7 @@ - diff --git a/WeChatProgram/pages/auth/index.wxss b/WeChatProgram/pages/auth/index.wxss index 4e88ca6d..a6dba1ff 100644 --- a/WeChatProgram/pages/auth/index.wxss +++ b/WeChatProgram/pages/auth/index.wxss @@ -1,9 +1,11 @@ .auth-page-root { min-height: 100vh; + overflow: visible; } .auth-scroll { - min-height: 100%; + height: 100vh; + box-sizing: border-box; } .auth-page-shell { @@ -11,18 +13,16 @@ } .auth-page { - background: - radial-gradient(circle at top right, rgba(255, 204, 219, 0.32), transparent 30%), - linear-gradient(180deg, #fff8fa 0%, #fffdfc 100%); + background: var(--theme-page-bg); } .auth-content { min-height: 100%; display: flex; flex-direction: column; - justify-content: center; + justify-content: flex-start; align-items: center; - padding: 24rpx 24rpx 40rpx; + padding: 24rpx 24rpx calc(80rpx + env(safe-area-inset-bottom)); } .auth-content.keyboard-active { @@ -38,7 +38,7 @@ } .auth-panel { - margin-top: 0; + margin-top: 24rpx; } .reset-card { @@ -62,7 +62,7 @@ margin-bottom: 14rpx; padding: 10rpx; border-radius: 999rpx; - background: #faf4f6; + background: var(--theme-primary-soft); } .tab-item, @@ -80,16 +80,16 @@ .tab-item.active, .toggle-item.active { - background: #fde8ef; - color: #c6597d; + background: var(--theme-primary-soft); + color: var(--theme-primary); } .wechat-login-panel { padding: 24rpx 22rpx; border-radius: 28rpx; - background: linear-gradient(145deg, #f3fff8 0%, #e4fff0 52%, #d5fae6 100%); - border: 1rpx solid rgba(121, 214, 152, 0.46); - box-shadow: 0 18rpx 38rpx rgba(45, 175, 93, 0.12); + background: var(--theme-gradient-soft); + border: 1rpx solid var(--theme-border); + box-shadow: 0 18rpx 38rpx rgba(122, 67, 88, 0.1); } .wechat-login-copy { @@ -117,13 +117,13 @@ } .wechat-login-btn.primary-btn { - background: linear-gradient(135deg, #32d16d 0%, #13a847 100%); - box-shadow: 0 16rpx 36rpx rgba(19, 168, 71, 0.24); + background: var(--theme-gradient); + box-shadow: 0 16rpx 36rpx rgba(122, 67, 88, 0.16); } .wechat-login-btn-disabled { - color: #5d8f69; - border-color: rgba(121, 214, 152, 0.42); + color: var(--theme-accent); + border-color: var(--theme-border); background: rgba(255, 255, 255, 0.82); } @@ -132,7 +132,7 @@ margin-top: 14rpx; font-size: 22rpx; line-height: 1.6; - color: #58806a; + color: var(--theme-accent); } .mini-login-resume { @@ -207,8 +207,8 @@ height: 92rpx; padding: 0 18rpx; border-radius: 24rpx; - background: #fde8ef; - color: #c6597d; + background: var(--theme-primary-soft); + color: var(--theme-primary); font-size: 24rpx; font-weight: 700; } @@ -226,7 +226,7 @@ .aux-link { font-size: 24rpx; - color: #c6597d; + color: var(--theme-primary); font-weight: 600; } @@ -268,8 +268,8 @@ } .agreement-check.checked { - border-color: #c6597d; - background: #c6597d; + border-color: var(--theme-primary); + background: var(--theme-primary); } .agreement-copy { @@ -278,7 +278,7 @@ } .agreement-link { - color: #c6597d; + color: var(--theme-primary); font-weight: 700; } @@ -331,7 +331,7 @@ margin-top: 22rpx; padding: 20rpx; border-radius: 22rpx; - background: #fff7f8; + background: var(--theme-primary-soft); color: #5a4a52; font-size: 24rpx; line-height: 1.85; @@ -366,7 +366,7 @@ font-size: 22rpx; font-weight: 700; letter-spacing: 2rpx; - color: #c6597d; + color: var(--theme-primary); } .mini-shop-title { diff --git a/WeChatProgram/pages/cart/index.js b/WeChatProgram/pages/cart/index.js index e26a22f8..ee93b02a 100644 --- a/WeChatProgram/pages/cart/index.js +++ b/WeChatProgram/pages/cart/index.js @@ -3,6 +3,7 @@ const couponApi = require('../../api/coupon') const orderApi = require('../../api/order') const auth = require('../../utils/auth') const navigation = require('../../utils/navigation') +const theme = require('../../utils/theme') const { resolveLegacyImage } = require('../../utils/file') const { NO_COUPON_KEY } = require('../../utils/config') const { runWithLoading } = require('../../utils/loading') @@ -113,7 +114,7 @@ function buildCheckoutIssues(items) { * Call guide: page data drives the WXML template, and each method is called by user events or lifecycle callbacks. */ Page({ - data: { + data: Object.assign(theme.pageThemeData(getApp().globalData.shopTheme), { isLoggedIn: false, loading: false, minDate: getMinDateText(), @@ -128,7 +129,7 @@ Page({ totalAmountText: '¥0.00', checkoutIssues: [], submittingOrder: false - }, + }), /** * `onShow` page method. Use this from WXML event bindings or lifecycle hooks. diff --git a/WeChatProgram/pages/cart/index.wxml b/WeChatProgram/pages/cart/index.wxml index d2116f79..e6030bd8 100644 --- a/WeChatProgram/pages/cart/index.wxml +++ b/WeChatProgram/pages/cart/index.wxml @@ -1,6 +1,6 @@ - + - + 登录后查看购物车 @@ -97,14 +97,14 @@