Author SHA1 Message Date
xiaowang 787545eb04 Merge pull request '同步中文工作流文件名到生产' (#87) from sit into prod
自动发布生产环境 Nacos / publish (push) Failing after 29s
同步中文工作流文件名到生产
2026-10-16 15:01:52 +08:00
xiaowang 2f21b11117 Merge pull request '同步中文工作流文件名' (#86) from dev into sit
自动发布测试环境 Nacos 配置 / publish (push) Successful in 27s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
同步中文工作流文件名
2026-10-16 14:55:32 +08:00
xiaowang 3ad792115c fix(actions): use Chinese workflow filenames
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
自动发布开发环境 Nacos 配置 / publish (push) Successful in 29s
2026-10-16 14:48:49 +08:00
xiaowang ecccda37b1 Merge pull request '更新 Gitea 工作流中文显示名称' (#85) from sit into prod
自动发布生产环境 Nacos / publish (push) Failing after 32s
2026-10-16 14:03:28 +08:00
xiaowang 21986185ab Merge pull request '修复工作流中文名称显示' (#84) from dev into sit
自动发布测试环境 Nacos 配置 / publish (push) Successful in 33s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 5s
2026-10-16 13:50:24 +08:00
xiaowang 3ffa920d1c fix(actions): display workflow names in Chinese
自动发布开发环境 Nacos 配置 / publish (push) Successful in 30s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-16 13:44:44 +08:00
xiaowang 7cd44489b7 Merge pull request '同步环境发布工作流修复到生产' (#83) from sit into prod
自动发布生产环境 Nacos / publish (push) Failing after 31s
2026-10-16 13:20:00 +08:00
xiaowang b9cd8caaab Merge pull request '补充所有环境发布记录持久化挂载' (#82) from dev into sit
自动发布测试环境 Nacos 配置 / publish (push) Successful in 28s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-16 13:10:49 +08:00
xiaowang 768b7848c5 fix(actions): persist release store for all environments
自动发布开发环境 Nacos 配置 / publish (push) Successful in 29s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-16 13:06:54 +08:00
xiaowang 52fc3df992 Merge pull request '修复 SIT 发布记录跨任务持久化' (#81) from dev into sit
自动发布测试环境 Nacos 配置 / publish (push) Successful in 27s
2026-10-16 12:48:23 +08:00
xiaowang 51cf60f242 fix(actions): persist SIT release store across jobs
自动发布开发环境 Nacos 配置 / publish (push) Successful in 29s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-16 12:42:41 +08:00
xiaowang b27f1f58b1 补充 Runner 发布记录持久化
自动发布测试环境 Nacos 配置 / publish (push) Failing after 4s
2026-10-16 11:44:35 +08:00
xiaowang eb1a18d7be 补充 Runner 发布记录持久化说明
自动发布开发环境 Nacos 配置 / publish (push) Successful in 34s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-16 11:39:00 +08:00
xiaowang 15e4947891 Merge pull request '修复 Gitea 工作流 YAML 解析与 Nacos 发布' (#79) from dev into sit
自动发布测试环境 Nacos 配置 / publish (push) Successful in 31s
2026-10-16 10:56:50 +08:00
xiaowang cbd2efeeb5 修复 Nacos 发布配置路径识别
自动发布开发环境 Nacos 配置 / publish (push) Successful in 34s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 2s
2026-10-16 10:49:36 +08:00
xiaowang af85d6320d 修复 Gitea 工作流 YAML 解析错误
自动发布开发环境 Nacos 配置 / publish (push) Failing after 30s
2026-10-16 10:08:20 +08:00
xiaowang 548b2e496a Merge pull request 'Sit' (#78) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/78
2026-10-16 09:23:54 +08:00
xiaowang ac3daf4626 Merge pull request '修复工作流触发器解析' (#77) from dev into sit
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/77
2026-10-16 09:23:10 +08:00
xiaowang d2a2840fa8 修复工作流触发器解析
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-15 18:01:30 +08:00
xiaowang e5b771b599 Merge pull request 'Sit' (#76) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/76
2026-10-15 17:56:54 +08:00
xiaowang 9a0a33ee51 Merge pull request '修复工作流中文名称解析' (#75) from dev into sit
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/75
2026-10-15 17:47:30 +08:00
xiaowang ce810e8ded 修复工作流中文名称解析
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-15 17:30:33 +08:00
xiaowang be9f67fd87 Merge pull request 'Sit' (#74) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/74
2026-10-15 16:28:31 +08:00
xiaowang b1be204220 Merge pull request '修改 10 个工作流名称,统一使用中文环境名称' (#73) from dev into sit
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/73
2026-10-15 16:27:34 +08:00
xiaowang 59fe99bec8 修改 10 个工作流名称,统一使用中文环境名称
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-15 16:26:24 +08:00
xiaowang 7e5027b17d Merge pull request '重整三环境发布与回退工作流' (#70) from dev into sit
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/70
2026-10-15 11:31:11 +08:00
xiaowang ac84f8f206 重整三环境发布与回退工作流
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-15 11:26:28 +08:00
xiaowang 697708d754 Merge pull request 'sit微信小程序app-secret补充' (#69) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 30s
Salon SIT 自动发布 / deploy (push) Successful in 5m56s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/69
2026-10-14 22:40:45 +08:00
xiaowang 28510db233 sit微信小程序app-secret补充
发布 Nacos 配置 / publish (push) Successful in 30s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 3s
2026-10-14 22:31:13 +08:00
xiaowang 2b621a6fe0 Merge pull request 'fix(salon): restore object storage signed URL config' (#68) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 33s
Salon SIT 自动发布 / deploy (push) Failing after 3m56s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/68
2026-10-14 17:59:43 +08:00
xiaowang 6c7f8aef30 fix(salon): restore object storage signed URL config
发布 Nacos 配置 / publish (push) Successful in 30s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 2s
2026-10-14 17:57:47 +08:00
xiaowang 39fce9da7e Merge pull request '补充MessageHub Token迁移说明' (#67) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 34s
Salon SIT 自动发布 / deploy (push) Failing after 4m54s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/67
2026-10-14 16:18:04 +08:00
xiaowang 8635eccb06 补充MessageHub Token迁移说明
发布 Nacos 配置 / publish (push) Successful in 34s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-14 15:37:00 +08:00
xiaowang 065a5c7fb8 迁移Salon SIT MessageHub Token到Nacos密钥配置 2026-10-14 15:34:28 +08:00
xiaowang a29a468ed3 合并双端初始化SQL并清理版本脚本 2026-10-14 14:57:53 +08:00
xiaowang d6cc82a4bc Merge pull request '统一ArtList与Salon历史命名 整理三环境中间件配置分层' (#66) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 43s
Salon SIT 自动发布 / deploy (push) Failing after 4m38s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/66
2026-10-14 14:22:39 +08:00
xiaowang c957994006 统一ArtList与Salon历史命名
发布 Nacos 配置 / publish (push) Successful in 44s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-14 13:04:10 +08:00
xiaowang fe782b47d5 文档:设计ArtList与Salon命名统一迁移 2026-10-14 11:37:50 +08:00
xiaowang 52ac5d6cea 整理三环境中间件配置分层 2026-10-14 11:20:30 +08:00
xiaowang 4cedbb826d 文档:设计三环境中间件配置分层整理 2026-10-14 10:19:37 +08:00
xiaowang 7eb1f9a62f Merge pull request 'sit中redis密码修改' (#65) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 36s
Salon SIT 自动发布 / deploy (push) Successful in 2m57s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/65
2026-10-14 09:20:14 +08:00
xiaowang 3cf2fbdcc6 sit中redis密码修改
发布 Nacos 配置 / publish (push) Successful in 27s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 2s
2026-10-14 09:19:27 +08:00
xiaowang 138d3eae57 Merge pull request '功能:优化Salon作品选择与历史补单' (#64) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 34s
Salon SIT 自动发布 / deploy (push) Successful in 3m32s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/64
2026-10-14 09:15:03 +08:00
xiaowang 261723bc6e 功能:优化Salon作品选择与历史补单
发布 Nacos 配置 / publish (push) Successful in 30s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-14 00:47:10 +08:00
xiaowang d6f3652a70 Merge pull request 'Dev合并到sit' (#63) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 31s
Salon SIT 自动发布 / deploy (push) Successful in 3m36s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/63
2026-10-14 00:27:29 +08:00
xiaowang 4101ab3408 将历史补单字段合并到初始化SQL
发布 Nacos 配置 / publish (push) Successful in 32s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-13 14:37:54 +08:00
xiaowang 5145dc44c6 补充历史补单小程序页面 2026-10-13 12:40:21 +08:00
xiaowang bd8d95fcd9 新增历史补单与服务中状态 2026-10-13 12:36:01 +08:00
xiaowang 3ab615ccd4 功能:支持待分配预约与首次排班引导 2026-10-12 23:52:20 +08:00
xiaowang 59608ef57f 文档:设计待分配预约与首次排班引导 2026-10-12 23:15:15 +08:00
xiaowang 3b98e4746a 优化:统一小程序业务引用选择交互 2026-10-12 22:24:24 +08:00
xiaowang fa1fed006e 修复:预约作品弹层滚动穿透 2026-10-12 17:37:51 +08:00
xiaowang 2714bd7201 优化:规划日期快捷新增预约 2026-10-12 17:15:27 +08:00
xiaowang e4aff0803a 功能:增加店长员工审核与登录提醒 2026-10-12 16:45:42 +08:00
xiaowang 247472fcae 优化:资料弹窗使用圆形默认头像 2026-10-12 15:35:19 +08:00
xiaowang 960c042c17 文档:设计资料弹窗默认头像优化 2026-10-12 15:31:00 +08:00
xiaowang 7411414419 修复:同步SIT数据源覆盖凭据
发布 Nacos 配置 / publish (push) Successful in 33s
Salon SIT 自动发布 / deploy (push) Successful in 3m40s
通过 dev → sit 受保护分支晋级发布完整数据源配置。
2026-10-12 11:39:15 +08:00
xiaowang e18c2b06d5 修复:同步SIT数据源覆盖凭据
发布 Nacos 配置 / publish (push) Successful in 29s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-12 11:38:01 +08:00
xiaowang 09db9fceaa 修复:更新SIT中间件业务凭据
发布 Nacos 配置 / publish (push) Successful in 36s
Salon SIT 自动发布 / deploy (push) Failing after 3m39s
通过 dev → sit 受保护分支晋级发布 SIT 配置。
2026-10-12 11:16:34 +08:00
xiaowang 66b9e2dc2d 修复:更新SIT中间件业务凭据
发布 Nacos 配置 / publish (push) Successful in 33s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-12 11:14:39 +08:00
xiaowang f185ec4ba5 Merge pull request 'Dev' (#60) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 32s
Salon SIT 自动发布 / deploy (push) Failing after 3m3s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/60
2026-10-12 10:53:47 +08:00
xiaowang 7cbfba7cf6 合并:同步sit并解决变更记录冲突
发布 Nacos 配置 / publish (push) Successful in 29s
环境分支晋级检查 / environment-promotion-source (pull_request_target) Successful in 1s
2026-10-12 10:51:28 +08:00
xiaowang 48b25583ee 安全:[skip ci] 固定目标分支晋级检查 2026-10-12 10:35:53 +08:00
xiaowang 63097311ef 安全:[skip ci] 固定目标分支晋级检查 2026-10-12 10:34:55 +08:00
xiaowang ceb210a582 安全:[skip ci] 限制环境晋级来源仓库 2026-10-12 10:31:12 +08:00
xiaowang 126ec43c10 安全:[skip ci] 限制环境晋级来源仓库 2026-10-12 10:30:59 +08:00
xiaowang cbd6e23104 配置:[skip ci] 引导环境分支晋级检查 2026-10-12 10:24:12 +08:00
xiaowang d25f9674c3 配置:[skip ci] 增加环境分支晋级检查 2026-10-12 10:20:58 +08:00
xiaowang 943fa79d16 文档:[skip ci] 设计环境分支保护规则 2026-10-12 10:12:11 +08:00
xiaowang 4d2918f8a8 修复:恢复后端Nacos环境变量引导
Salon SIT 自动发布 / deploy (push) Successful in 3m8s
发布 Nacos 配置 / publish (push) Successful in 41s
2026-10-12 09:49:18 +08:00
xiaowang faa9cadc62 文档:设计后端Nacos启动引导修复 2026-10-12 09:49:18 +08:00
xiaowang 10a3b6413c 修复:恢复后端Nacos环境变量引导
发布 Nacos 配置 / publish (push) Successful in 30s
2026-10-12 09:45:54 +08:00
xiaowang 4004506b65 文档:设计后端Nacos启动引导修复 2026-10-12 09:34:29 +08:00
xiaowang fc148afc69 Merge pull request 'Dev合并到Sit' (#54) from dev into sit
发布 Nacos 配置 / publish (push) Failing after 33s
Salon SIT 自动发布 / deploy (push) Failing after 5m4s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/54
2026-10-12 09:16:31 +08:00
xiaowang bd4ed62368 优化:完善快捷登录与微信资料入口 2026-10-12 09:10:47 +08:00
xiaowang f00c753fd6 优化:提升小程序全链路性能 2026-10-11 16:53:02 +08:00
xiaowang 0e7e60fefd 文档:设计小程序全链路性能优化 2026-10-11 16:24:21 +08:00
xiaowang ef5f638e7e 优化:微信资料改为双按钮 2026-10-10 18:04:00 +08:00
xiaowang 89f51440a0 文档:设计微信资料双按钮 2026-10-10 18:02:42 +08:00
xiaowang d57f9b736a 修复:微信头像选择后未生效 2026-10-10 18:01:34 +08:00
xiaowang ff98e89ab7 文档:设计微信头像选择修复方案 2026-10-10 18:00:18 +08:00
xiaowang cd08d3c3b0 优化:个人资料与手机号设置入口 2026-10-10 17:56:44 +08:00
xiaowang 0ceea1578f 文档:设计个人资料与手机号入口优化 2026-10-10 17:53:35 +08:00
xiaowang d3e9404c17 优化:精简个人信息头像卡 2026-10-10 17:40:27 +08:00
xiaowang 7e62fed56d 文档:设计个人信息头像卡精简方案 2026-10-10 17:38:40 +08:00
xiaowang 804c69c296 优化:个人信息改为独立页面 2026-10-10 17:32:26 +08:00
xiaowang 72bfcffc25 文档:设计小程序个人信息独立页面 2026-10-10 17:26:38 +08:00
xiaowang 9148bdb027 优化:我的页面展示账号头像昵称 2026-10-10 17:04:03 +08:00
xiaowang d511070fc7 文档:设计小程序我的页面账号卡 2026-10-10 17:01:46 +08:00
xiaowang d38c5cd4fe 优化:小程序记住登录与启动跳转 2026-10-10 16:41:37 +08:00
xiaowang ae1b568131 文档:制定小程序记住登录体验优化计划 2026-10-10 16:31:43 +08:00
xiaowang 34e6536b0f 文档:设计小程序记住登录体验优化 2026-10-10 16:31:06 +08:00
xiaowang e69498cc15 整理:删除已合并的重复SQL脚本 2026-10-10 16:14:52 +08:00
xiaowang e7de04717a 修复:后台注册审核接口与退出流程 2026-10-10 16:08:46 +08:00
xiaowang 297af45fea 文档:制定后台审核与退出修复计划 2026-10-10 15:36:00 +08:00
xiaowang c4c17a67d4 文档:设计后台审核与退出修复 2026-10-10 15:21:43 +08:00
xiaowang 6f62137bf8 配置修改添加微信小程序AppSecret
发布 Nacos 配置 / publish (push) Successful in 42s
2026-10-10 14:11:26 +08:00
xiaowang fff1a0a97f 配置:统一后端参数由Nacos明文管理 2026-10-10 11:52:49 +08:00
xiaowang 9e3b37a36c 文档:制定后端Nacos明文配置实施计划 2026-10-10 11:43:09 +08:00
xiaowang 043dfff1b1 文档:设计后端配置统一由Nacos明文管理 2026-10-10 11:41:29 +08:00
xiaowang 4bb8665aab 功能:改造Salon小程序OpenID快捷登录 2026-10-10 11:02:45 +08:00
xiaowang dd3bcd40bc 文档:补充JayuCloud命名统一设计 2026-10-09 17:26:26 +08:00
xiaowang bda3933959 Merge pull request 'Dev' (#53) from dev into sit
发布 Nacos 配置 / publish (push) Failing after 30s
Salon SIT 自动发布 / deploy (push) Successful in 2m57s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/53
2026-09-16 16:55:18 +08:00
xiaowang 1587d1dd8f 同步sit分支解决PR合并冲突
发布 Nacos 配置 / publish (push) Successful in 24s
2026-09-16 16:19:09 +08:00
xiaowang cfe5cfeaf7 Merge remote-tracking branch 'origin/sit' into HEAD
发布 Nacos 配置 / publish (push) Successful in 27s
2026-09-16 16:15:12 +08:00
xiaowang fab7d7789d 精简快捷登录文案
发布 Nacos 配置 / publish (push) Successful in 26s
2026-09-16 12:27:28 +08:00
xiaowang be3d0cccec 简化Salon登录页面布局 2026-09-16 12:22:02 +08:00
xiaowang 5288dbf9b0 调整验证码有效期提示和重发状态 2026-09-16 10:47:01 +08:00
xiaowang e8e8e5a404 完善手机号校验和验证码发送限制 2026-09-16 09:22:30 +08:00
xiaowang 0c827782ff 修复Salon短信模板编码 2026-09-15 23:42:20 +08:00
xiaowang 52dcd143ff 修复SIT短信服务地址
发布 Nacos 配置 / publish (push) Failing after 30s
Salon SIT 自动发布 / deploy (push) Failing after 2m47s
2026-09-15 20:55:12 +08:00
xiaowang 7b68ef32e1 修复SIT短信服务地址 2026-09-15 20:47:33 +08:00
xiaowang 672cd936fe 修复SIT注册审核接口路由 2026-09-14 22:09:00 +08:00
xiaowang 8906eb39db 修复SIT发布跳过测试构建 2026-09-14 16:35:44 +08:00
xiaowang d2d17cef93 更新SIT重建服务器地址 2026-09-14 10:14:26 +08:00
xiaowang 381dad1fed 修复后台登录后跳转404 2026-09-11 16:11:24 +08:00
xiaowang 2ebaaeec77 修正微信注册绑定凭证时效 2026-09-11 15:35:41 +08:00
xiaowang e9a2e74b91 修正已验证手机号登录校验 2026-09-11 15:31:33 +08:00
xiaowang 8c5170cb7e 优化小程序手机号与微信授权登录 2026-09-11 15:27:20 +08:00
xiaowang 966a911014 Merge pull request '实现手机号登录自动进入注册审核流程' (#52) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 26s
Salon SIT 自动发布 / deploy (push) Successful in 3m9s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/52
2026-09-10 13:49:57 +08:00
xiaowang 8d84cb25d4 实现手机号登录自动进入注册审核流程
发布 Nacos 配置 / publish (push) Successful in 27s
Salon 生产发布准备 / prepare (pull_request) Has been skipped
2026-09-08 22:12:29 +08:00
xiaowang c0979f447c Merge pull request 'Dev' (#50) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 25s
Salon SIT 自动发布 / deploy (push) Successful in 3m38s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/50
2026-09-08 21:28:26 +08:00
xiaowang c849f44787 修复注册审核Mapper扫描配置
发布 Nacos 配置 / publish (push) Successful in 26s
2026-09-07 20:48:18 +08:00
xiaowang 8cb5cae808 修复Nacos工作流外部Action下载超时 2026-09-07 20:36:53 +08:00
xiaowang 003dedf5d0 Merge pull request 'Dev' (#49) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 34s
Salon SIT 自动发布 / deploy (push) Failing after 5m3s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/49
2026-09-07 20:29:16 +08:00
xiaowang f02601c25c 修复店务注册接口网关鉴权白名单
发布 Nacos 配置 / publish (push) Failing after 11s
2026-09-07 20:12:36 +08:00
xiaowang 63b226fe61 关联微信新账号与注册申请
发布 Nacos 配置 / publish (push) Successful in 34s
2026-09-07 12:14:02 +08:00
xiaowang a26252c020 补充微信登录和注册申请重提 2026-09-07 12:11:20 +08:00
xiaowang b4af2d6ab1 实现Salon工作台注册审核闭环 2026-09-07 12:09:42 +08:00
xiaowang 28c2c2603e 修复登录验证码表单对齐
发布 Nacos 配置 / publish (push) Successful in 50s
2026-09-07 11:47:44 +08:00
xiaowang 4f4d985673 修复注册页样式解析异常 2026-09-07 11:42:21 +08:00
xiaowang 6c8b3f8447 修正注册表单标题和控件对齐 2026-09-07 11:27:36 +08:00
xiaowang ddf7e4823b 调整登录方式标签顺序 2026-09-07 11:18:39 +08:00
xiaowang 29ad14b24a 修正登录页默认验证码模式 2026-09-07 11:15:51 +08:00
xiaowang edc14b3d41 重设计Salon登录注册工作台流程 2026-09-07 11:09:34 +08:00
xiaowang f3e480de33 Merge pull request '修正Spug短信名称参数' (#48) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 32s
Salon SIT 自动发布 / deploy (push) Successful in 2m55s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/48
2026-09-06 22:00:31 +08:00
xiaowang 211cdc9838 修正Spug短信名称参数
发布 Nacos 配置 / publish (push) Successful in 31s
2026-09-06 21:57:45 +08:00
xiaowang e3bb72b3f1 Merge pull request 'Dev' (#47) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 33s
Salon SIT 自动发布 / deploy (push) Successful in 3m30s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/47
2026-09-06 21:52:19 +08:00
xiaowang 3401c2f5e5 增加Salon短信供应商全局切换
发布 Nacos 配置 / publish (push) Successful in 32s
2026-09-06 21:41:09 +08:00
xiaowang dc46ff359b 切换Salon短信模板为Spug 2026-09-06 20:50:19 +08:00
xiaowang 7c43ab636a 修正Salon短信阿里云通道配置 2026-09-06 18:18:45 +08:00
xiaowang 4260da2942 Merge pull request '修正MessageHub短信通道字段' (#46) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 30s
Salon SIT 自动发布 / deploy (push) Successful in 3m1s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/46
2026-09-06 18:02:08 +08:00
xiaowang 1aee997e48 修正MessageHub短信通道字段
发布 Nacos 配置 / publish (push) Successful in 30s
2026-09-06 17:57:42 +08:00
xiaowang db3defffdf Merge pull request 'Dev' (#45) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 29s
Salon SIT 自动发布 / deploy (push) Successful in 3m23s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/45
2026-09-06 17:42:24 +08:00
xiaowang 1dd4b1c2cb 修正阿里云短信通道编码
发布 Nacos 配置 / publish (push) Successful in 34s
2026-09-06 17:40:06 +08:00
xiaowang 54414f56cd 优化小程序验证码倒计时样式 2026-09-06 17:36:53 +08:00
xiaowang a65063e419 记录小程序验证码倒计时设计 2026-09-06 17:34:49 +08:00
xiaowang ed4cc4e83d 调整Salon短信模板映射 2026-09-06 17:21:25 +08:00
xiaowang 285fed64fa 修复SIT短信模板编码 2026-09-06 17:06:51 +08:00
xiaowang c3a6287547 Merge pull request '修复短信消息缺少消息编号' (#44) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 33s
Salon SIT 自动发布 / deploy (push) Successful in 3m11s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/44
2026-09-06 16:10:04 +08:00
xiaowang 2942f29438 修复短信消息缺少消息编号
发布 Nacos 配置 / publish (push) Successful in 32s
2026-09-06 16:09:19 +08:00
xiaowang fd76865a0a Merge pull request '接入MessageHub标准MQ验证码投递' (#43) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 35s
Salon SIT 自动发布 / deploy (push) Successful in 2m58s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/43
2026-09-06 15:48:08 +08:00
xiaowang 048c19e5fe 接入MessageHub标准MQ验证码投递
发布 Nacos 配置 / publish (push) Successful in 34s
2026-09-06 15:42:56 +08:00
xiaowang a50b7b6c66 增加后台默认密码管理入口 2026-09-05 23:46:35 +08:00
xiaowang 852a715722 修复网页端未知路径跳转逻辑 2026-09-05 23:37:13 +08:00
xiaowang 9ac56115d0 完善小程序排班与预约快捷操作 2026-09-04 16:13:58 +08:00
xiaowang 4209ee732c 在小程序我的页面增加店铺今日概览 2026-09-04 15:50:55 +08:00
xiaowang 89c9deeeb2 收敛Salon网页后台管理范围 2026-09-04 15:17:08 +08:00
xiaowang c0a51a278e 补充用户重置密码提示 2026-09-04 14:10:28 +08:00
xiaowang d5535fbfa2 统一各环境网关JWT发行者配置
发布 Nacos 配置 / publish (push) Successful in 33s
2026-09-04 14:01:15 +08:00
xiaowang c3511d2f47 修复小程序登录店铺选择流程 2026-09-04 13:57:17 +08:00
xiaowang 6dd2233c16 统一小程序多环境请求地址 2026-09-04 13:37:42 +08:00
xiaowang aee4c0ff3d 确认SIT部署前置配置并修正MinIO地址 2026-09-04 09:14:37 +08:00
xiaowang b2fe9dc53a Merge pull request '修复复用发布包时清单目录缺失' (#42) from dev into sit
发布 Nacos 配置 / publish (push) Failing after 1m34s
Salon SIT 自动发布 / deploy (push) Failing after 4m56s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/42
2026-09-04 00:25:28 +08:00
xiaowang 47611d5c7a 修复复用发布包时清单目录缺失
发布 Nacos 配置 / publish (push) Failing after 1s
2026-09-03 23:45:38 +08:00
xiaowang c0fc27a175 Merge pull request '修复Salon部署服务器匹配规则' (#41) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 33s
Salon SIT 自动发布 / deploy (push) Failing after 3m0s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/41
2026-09-03 13:40:41 +08:00
xiaowang 2bf5e9d45b 修复Salon部署服务器匹配规则
发布 Nacos 配置 / publish (push) Successful in 32s
2026-09-03 10:49:10 +08:00
xiaowang b1e8b5a723 Merge pull request '修复发布临时目录缺失' (#40) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 31s
Salon SIT 自动发布 / deploy (push) Failing after 3m49s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/40
2026-09-03 10:43:59 +08:00
xiaowang 006306171b 修复发布临时目录缺失
发布 Nacos 配置 / publish (push) Successful in 35s
2026-09-03 10:30:01 +08:00
xiaowang dddb55f462 改用账号密码执行Salon发布
发布 Nacos 配置 / publish (push) Successful in 34s
Salon SIT 自动发布 / deploy (push) Failing after 2m24s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/39
2026-09-03 10:09:31 +08:00
xiaowang fd35a330e0 改用账号密码执行Salon发布
发布 Nacos 配置 / publish (push) Successful in 37s
2026-09-03 09:46:54 +08:00
xiaowang 5235c77e4a Merge pull request '修复SIT工具链检查管道错误' (#38) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 38s
Salon SIT 自动发布 / deploy (push) Failing after 2m49s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/38
2026-09-02 21:27:21 +08:00
xiaowang 6110227ad6 修复SIT工具链检查管道错误
发布 Nacos 配置 / publish (push) Successful in 32s
2026-09-02 21:25:33 +08:00
xiaowang 63cdf3ef2d Merge pull request '修复SIT前端接口地址配置' (#37) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 30s
Salon SIT 自动发布 / deploy (push) Failing after 26s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/37
2026-09-02 20:46:37 +08:00
xiaowang 629375cd2e 修复SIT前端接口地址配置
发布 Nacos 配置 / publish (push) Successful in 32s
2026-09-02 20:45:35 +08:00
xiaowang 8c7c919ddd 解决dev合并sit的发布流程冲突
发布 Nacos 配置 / publish (push) Successful in 31s
Salon SIT 自动发布 / deploy (push) Failing after 2m49s
2026-09-02 11:50:19 +08:00
xiaowang cad7afb12e 新增Salon SIT单机自动发布流程
发布 Nacos 配置 / publish (push) Successful in 32s
2026-09-01 16:34:02 +08:00
xiaowang f62fb02ef0 改用共享目录传递Salon生产发布包 2026-09-01 16:08:10 +08:00
xiaowang 82f660ff6d Merge pull request '文档提交' (#34) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 36s
Salon 生产发布准备 / prepare (pull_request) Successful in 3m4s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/34
2026-09-01 14:19:13 +08:00
xiaowang 317e482534 文档提交
发布 Nacos 配置 / publish (push) Successful in 57s
2026-09-01 14:13:57 +08:00
GiteaConflictResolver 5aef5bbe79 解决Salon生产发布工作流合并冲突
Salon 生产发布准备 / prepare (pull_request) Successful in 3m35s
2026-08-30 15:03:47 +08:00
xiaowang d5815bcaf4 Merge pull request '修复Salon发布包下载兼容性' (#31) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 34s
Salon 生产发布准备 / prepare (pull_request) Has been skipped
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/31
2026-08-30 14:39:06 +08:00
xiaowang 29291b7b35 修复Salon发布包下载兼容性
发布 Nacos 配置 / publish (push) Successful in 33s
2026-08-30 01:40:52 +08:00
xiaowang a2b3cab0e3 Merge pull request 'Sit' (#30) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/30
2026-08-30 01:28:45 +08:00
xiaowang a8a2d94626 Merge pull request '增加Salon准备部署参数输出' (#29) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 35s
Salon 生产发布准备 / prepare (pull_request) Successful in 3m36s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/29
2026-08-30 01:27:42 +08:00
xiaowang 0fab855185 增加Salon准备部署参数输出
发布 Nacos 配置 / publish (push) Successful in 35s
2026-08-30 01:24:21 +08:00
Gitea运维 ad599674e1 修复Salon流水线Artifact上传兼容性 2026-08-28 16:45:29 +08:00
xiaowang 63c991b1d5 Merge pull request 'Sit' (#28) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/28
2026-08-28 16:05:57 +08:00
xiaowang 347414470e Merge pull request '修复Salon生产包Maven构建阻塞' (#27) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 36s
Salon 生产发布准备 / prepare (pull_request) Successful in 3m7s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/27
2026-08-28 16:05:23 +08:00
xiaowang 184ec8444d 修复Salon生产包Maven构建阻塞
发布 Nacos 配置 / publish (push) Successful in 34s
2026-08-28 15:41:25 +08:00
xiaowang 3e53561caf Merge pull request 'Sit' (#26) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/26
2026-08-28 15:19:44 +08:00
xiaowang 1c3b61bc33 Merge pull request '修复生产构建根目录解析' (#25) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 35s
Salon 生产发布准备 / prepare (pull_request) Failing after 5m10s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/25
2026-08-28 15:19:29 +08:00
xiaowang 10be2b2e9d 修复生产构建根目录解析
发布 Nacos 配置 / publish (push) Successful in 33s
2026-08-28 15:16:28 +08:00
xiaowang e1f7e04d05 Merge pull request 'Sit修复Gitea内网检出超时' (#24) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/24
2026-08-28 15:12:20 +08:00
xiaowang f4a4191a4c Merge pull request '修复Gitea内网检出超时' (#23) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 35s
Salon 生产发布准备 / prepare (pull_request) Failing after 32s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/23
2026-08-28 15:10:35 +08:00
xiaowang c50695d249 修复Gitea内网检出超时
发布 Nacos 配置 / publish (push) Successful in 35s
2026-08-28 15:08:01 +08:00
xiaowang 0bc40b5823 Merge pull request 'Sit' (#22) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/22
2026-08-28 15:05:01 +08:00
xiaowang 0a355a7e68 Merge pull request '修复Gitea合并提交构建失败' (#21) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 38s
Salon 生产发布准备 / prepare (pull_request) Failing after 12s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/21
2026-08-28 15:04:49 +08:00
xiaowang b0181edbd3 修复Gitea合并提交构建失败
发布 Nacos 配置 / publish (push) Successful in 37s
2026-08-28 13:07:49 +08:00
xiaowang cbd00d0597 Merge pull request 'Sit' (#20) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/20
2026-08-28 12:44:33 +08:00
xiaowang d38fd639bc Merge pull request 'Dev' (#19) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 33s
Salon 生产发布准备 / prepare (pull_request) Failing after 1m0s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/19
2026-08-28 12:44:09 +08:00
xiaowang 1bec2e5bcd 修复Gitea Runner构建工具链
发布 Nacos 配置 / publish (push) Successful in 1m59s
2026-08-27 15:43:18 +08:00
xiaowang 2054b32267 补充Salon后端服务端口环境变量 2026-08-27 14:59:01 +08:00
xiaowang 31112b1b1c 补充生产Salon后端环境变量准备说明 2026-08-27 14:48:09 +08:00
xiaowang d63f2011ec 2026-08-27-sit合并到prod,第一次上线部署后端
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/18
2026-08-27 14:27:09 +08:00
xiaowang a2c8f0baea Merge pull request 'Dev合并到sit' (#17) from dev into sit
发布 Nacos 配置 / publish (push) Successful in 30s
Salon 生产发布准备 / prepare (pull_request) Failing after 13m59s
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/17
2026-08-27 14:26:23 +08:00
xiaowang ccadd8dc62 整理开发分支当前代码与项目规则
发布 Nacos 配置 / publish (push) Successful in 34s
2026-08-27 13:28:24 +08:00
xiaowang 57dfe82a5d 补充Salon业务服务器清单 2026-08-27 13:24:43 +08:00
xiaowang 5211c2d6cd 实现Salon生产流水线自动准备 2026-08-27 12:39:20 +08:00
xiaowang 0df0a86d9a 新增Salon生产发布流水线设计 2026-08-27 12:24:22 +08:00
xiaowang e9748119ef 记录Salon生产基础环境准备 2026-08-27 12:13:21 +08:00
xiaowang 216efa6b3c 修正Salon初始化SQL误删业务表 2026-08-27 11:31:27 +08:00
xiaowang c08a65e14f 修复SalonAdmin标识与登录令牌校验 2026-08-27 11:19:43 +08:00
xiaowang a0f659c5c4 修正Salon管理后台品牌环境配置 2026-08-26 23:18:16 +08:00
xiaowang 025af6ba9b 统一Salon管理后台品牌配置 2026-08-26 22:26:06 +08:00
xiaowang fe4baad70c 收敛Salon后台首页管理入口 2026-08-26 22:04:41 +08:00
xiaowang a10769de45 重构Salon管理员后台入口 2026-08-26 21:57:15 +08:00
xiaowang bfe4d4c344 redis密码更改
发布 Nacos 配置 / publish (push) Successful in 29s
2026-08-26 20:50:07 +08:00
xiaowang 8270784e39 修复Dev Salon Redis无用户名认证配置
发布 Nacos 配置 / publish (push) Successful in 33s
2026-08-26 20:30:23 +08:00
xiaowang 346dde8197 配置修改
发布 Nacos 配置 / publish (push) Successful in 35s
2026-08-26 20:21:49 +08:00
xiaowang 581136cb24 配置修改以及bug修复
发布 Nacos 配置 / publish (push) Successful in 33s
2026-08-26 20:18:47 +08:00
xiaowang 2ad41221ff 整理双端初始化SQL脚本 2026-08-26 19:09:56 +08:00
xiaowang 449d57916d 实现Dev和SIT配置推送自动发布
发布 Nacos 配置 / publish (push) Successful in 31s
2026-08-26 18:28:32 +08:00
xiaowang abf34267a1 配置Dev店务Core和Gateway端口 2026-08-26 18:20:38 +08:00
xiaowang 4e9b8c8ede 修正店务Core的MyBatis扫描包名 2026-08-26 18:06:49 +08:00
xiaowang 47a49cd6b3 Merge pull request 'Sit' (#16) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/16
2026-08-26 16:55:05 +08:00
xiaowang df1ec06d39 Merge pull request 'Dev' (#15) from dev into sit
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/15
2026-08-26 16:54:54 +08:00
xiaowang 4703f1e9ed 补全Dev店务数据库默认参数 2026-08-26 16:54:05 +08:00
xiaowang 911e759827 补全Dev店务启动默认参数 2026-08-26 16:52:00 +08:00
xiaowang 2ca3cc3652 补全Dev店务中间件默认配置 2026-08-26 16:45:56 +08:00
xiaowang 3ac1f5a7c8 补充Dev店务Nacos默认凭据 2026-08-26 16:43:55 +08:00
xiaowang 857a07fd7b 补充项目环境变量运维说明 2026-08-26 16:28:35 +08:00
xiaowang 42919aad21 Merge pull request 'Sit' (#14) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/14
2026-08-26 16:17:51 +08:00
xiaowang a6ecf47020 Merge pull request 'Dev' (#13) from dev into sit
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/13
2026-08-26 16:15:55 +08:00
xiaowang 63d133d7c9 增加Dev环境Nacos配置发布流程 2026-08-26 15:35:52 +08:00
xiaowang 24018c42f2 修改包名 2026-08-26 14:02:28 +08:00
xiaowang 90f00feefd Merge pull request 'sit' (#11) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/11
2026-08-26 12:59:41 +08:00
xiaowang 56eb63ca0c Merge pull request '增加Nacos配置回读重试' (#10) from dev into sit
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/10
2026-08-26 12:59:24 +08:00
xiaowang 2a5d18e339 增加Nacos配置回读重试 2026-08-26 12:58:34 +08:00
xiaowang 074cbd0c8c Merge pull request 'sit' (#9) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/9
2026-08-26 12:46:52 +08:00
xiaowang e59bb424f0 Merge pull request '修正Nacos地址路径兼容' (#8) from dev into sit
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/8
2026-08-26 12:46:28 +08:00
xiaowang 4223f42e43 修正Nacos地址路径兼容 2026-08-26 12:44:23 +08:00
xiaowang ee12fee6b6 Merge pull request 'sit' (#7) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/7
2026-08-26 12:21:45 +08:00
xiaowang 8f1b85ec7f Merge pull request '修正流水线仓库访问地址' (#6) from dev into sit
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/6
2026-08-26 12:21:30 +08:00
xiaowang 55b8b8e73c 修正流水线仓库访问地址 2026-08-26 12:11:42 +08:00
xiaowang 4ae6cffdf1 Merge pull request '工作流runner标签调整sit合并到prod' (#4) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/4
2026-08-26 10:43:28 +08:00
xiaowang 8af439f1d2 Merge pull request '调整Nacos流水线Runner标签' (#3) from dev into sit
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/3
2026-08-26 10:42:59 +08:00
xiaowang 8e303f5d9d 调整Nacos流水线Runner标签 2026-08-26 10:40:21 +08:00
xiaowang da6d1b7f5b Merge pull request 'sit合并到prod' (#2) from sit into prod
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/2
2026-08-26 10:13:47 +08:00
xiaowang 2d9cf472a8 Merge pull request 'dev合并到sit-20260826' (#1) from dev into sit
Reviewed-on: http://wcy111.top:3000/xiaowang/JayuCloud/pulls/1
2026-08-26 10:12:13 +08:00
xiaowang 65193c6b6c 实现双中心Nacos顺序发布流水线 2026-08-26 09:55:28 +08:00
xiaowang 0d30999768 澄清Nacos流水线配置仓库归属 2026-08-26 09:43:42 +08:00
xiaowang 542403cf0e 补充生产Gitea发布Nacos准备说明 2026-08-26 09:40:55 +08:00
xiaowang bf29f27629 完善生产与测试环境Nacos配置 2026-08-26 09:33:10 +08:00
xiaowang 501054ce12 新增生产与测试Nacos配置分离设计 2026-08-26 09:26:44 +08:00
xiaowang 75e6d37603 整理项目文档与脚本目录 2026-08-26 00:18:17 +08:00
xiaowang 2831543bac 补齐生产对象存储与中间件配置 2026-08-25 23:36:46 +08:00
xiaowang 4e14468bc1 整理当前项目完整状态 2026-08-25 16:49:57 +08:00
xiaowang 0c83acc7c2 清理设计师端管理免鉴权配置 2026-08-25 16:30:39 +08:00
xiaowang a2491b72b9 移除设计师端后台网关路由 2026-08-25 16:28:40 +08:00
xiaowang abce4a2787 完成JC-ArtList与JC-Salon端侧清理和统一命名 2026-08-25 16:21:05 +08:00
xiaowang aa93695704 补充双端隔离运维文档 2026-08-25 10:59:23 +08:00
xiaowang c7b2daba71 完成设计师端与店务端生产隔离改造 2026-08-25 10:56:55 +08:00
xiaowang 9cfaac3e18 固定0.0.1版本基线 2026-06-28 14:17:47 +08:00
xiaowang 72fcb123d4 优化新建预约时间选择 2026-06-27 16:12:00 +08:00
xiaowang c671ec264c 实现预约草稿和资料头像编辑 2026-06-27 15:19:32 +08:00
xiaowang 7a062791aa 隐藏历史日期可约状态角标 2026-06-27 13:49:11 +08:00
xiaowang 4fa9eb870c 优化规划刷新和导出设置说明 2026-06-27 02:52:47 +08:00
xiaowang 28219e5fc2 修复我的页身份和规划日周视图 2026-06-27 01:46:44 +08:00
xiaowang 223cd755a2 提交剩余工作区改动 2026-06-27 01:11:05 +08:00
xiaowang 13916e61b7 优化员工排班与规划月视图体验 2026-06-27 00:08:18 +08:00
xiaowang 5fc0e35759 实现员工规则排班设置 2026-06-26 21:40:13 +08:00
xiaowang dc6e13f0a8 关闭管理师小程序开发域名校验 2026-06-26 14:33:38 +08:00
xiaowang d502aeae24 修复管理师小程序真机调试 sitemap 配置 2026-06-26 14:19:52 +08:00
xiaowang d31b07d96d 图标 2026-06-26 14:06:50 +08:00
xiaowang 2968556eef 小程序appid修改
一些文档更新
2026-06-26 14:06:40 +08:00
xiaowang 3e04d75f00 优化管理师登录与预约客户选择 2026-06-26 13:32:06 +08:00
xiaowang a5e36dc27c 优化登录记住我体验 2026-06-26 11:55:14 +08:00
xiaowang 0c3e1b9bac 替换甲屿应用图标 2026-06-26 11:29:20 +08:00
xiaowang 078a2b32cd 修复管理师端预约与登录体验 2026-06-26 11:07:54 +08:00
xiaowang f1fdf6e5d3 添加任务问题记录规则 2026-06-26 09:48:34 +08:00
xiaowang 5f808e5344 优化项目选择弹窗关闭按钮 2026-06-25 22:41:53 +08:00
xiaowang 1fab83926a 优化美甲师弹窗关闭按钮 2026-06-25 22:29:47 +08:00
xiaowang 9b46ed7d5d 完善管理师端多店铺登录选择 2026-06-25 22:04:58 +08:00
xiaowang 87254919a8 修复规划页接口失败展示假数据 2026-06-25 17:25:41 +08:00
xiaowang 180433a200 整理上线初始化SQL基线并收口管理师接口 2026-06-25 01:07:41 +08:00
xiaowang 61b8cc6d23 配置化平台品牌名称 2026-06-24 22:13:00 +08:00
xiaowang eda109cb62 完善管理师预约项目与美甲师创建 2026-06-24 20:54:41 +08:00
xiaowang 03c972d90c 更新项目交接文档当前状态 2026-06-24 16:13:49 +08:00
xiaowang b1117325fd 统一项目命名并接回MinIO三副本存储 2026-06-24 15:04:17 +08:00
xiaowang a04833563a 新增任务完成后中文提交规则 2026-06-24 10:39:04 +08:00
xiaowang 0fd96d150e 提交开发分支未提交代码并修正配置 2026-06-23 15:33:06 +08:00
xiaowang a53b27ef20 修复指尖管理师上线配置 2026-06-22 20:39:51 +08:00
xiaowang 9400e53fe9 新增指尖管理师上线部署审计报告 2026-06-22 19:16:59 +08:00
xiaowang 8779c0a79f 删除临时冗余文件 2026-06-15 15:58:38 +08:00
xiaowang 7cbe5b3de5 重构项目文件夹目录 2026-06-15 15:53:55 +08:00
xiaowang 8093e07190 feat: harden appointment flow and refresh handoff docs 2026-06-10 00:19:49 +08:00
2620 changed files with 206348 additions and 121843 deletions
BIN
View File
Binary file not shown.
@@ -5,14 +5,16 @@ description: "Use when the user needs to run GitNexus CLI commands like analyze/
# GitNexus CLI Commands
All commands work via `npx` — no global install required.
Commands below use `node .gitnexus/run.cjs <command>` — the project-local runner `gitnexus analyze` drops next to the index. It auto-selects an available runner at call time (global `gitnexus`, else `pnpm dlx`, else `npx`), so no package-manager assumption and no global install is required.
> **Not analyzed yet, or `node .gitnexus/run.cjs` reports `Cannot find module`** (the gitignored runner is absent — e.g. a fresh clone or `git clean`)? (Re)generate it with `npx gitnexus analyze` from the project root. On **npm 11.x**, if `npx` crashes during install (`node.target is null`), install once with `npm i -g gitnexus` (then `gitnexus analyze`) or use `pnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter dlx gitnexus@latest analyze`. See [#1939](https://github.com/abhigyanpatwari/GitNexus/issues/1939).
## Commands
### analyze — Build or refresh the index
```bash
npx gitnexus analyze
node .gitnexus/run.cjs 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.
@@ -28,7 +30,7 @@ Run from the project root. This parses all source files, builds the knowledge gr
### status — Check index freshness
```bash
npx gitnexus status
node .gitnexus/run.cjs 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.
@@ -36,7 +38,7 @@ Shows whether the current repo has a GitNexus index, when it was last updated, a
### clean — Delete the index
```bash
npx gitnexus clean
node .gitnexus/run.cjs 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.
@@ -49,7 +51,7 @@ Deletes the `.gitnexus/` directory and unregisters the repo from the global regi
### wiki — Generate documentation from the graph
```bash
npx gitnexus wiki
node .gitnexus/run.cjs wiki
```
Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use).
@@ -66,7 +68,7 @@ Generates repository documentation from the knowledge graph using an LLM. Requir
### list — Show all indexed repos
```bash
npx gitnexus list
node .gitnexus/run.cjs list
```
Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information.
@@ -16,23 +16,23 @@ description: "Use when the user is debugging a bug, tracing an error, or asking
## Workflow
```
1. gitnexus_query({query: "<error or symptom>"}) → Find related execution flows
2. gitnexus_context({name: "<suspect>"}) → See callers/callees/processes
1. query({query: "<error or symptom>"}) → Find related execution flows
2. context({name: "<suspect>"}) → See callers/callees/processes
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
4. gitnexus_cypher({query: "MATCH path..."}) → Custom traces if needed
4. cypher({query: "MATCH path..."}) → Custom traces if needed
```
> If "Index is stale" → run `npx gitnexus analyze` in terminal.
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklist
```
- [ ] Understand the symptom (error message, unexpected behavior)
- [ ] gitnexus_query for error text or related code
- [ ] query for error text or related code
- [ ] Identify the suspect function from returned processes
- [ ] gitnexus_context to see callers and callees
- [ ] context to see callers and callees
- [ ] Trace execution flow via process resource if applicable
- [ ] gitnexus_cypher for custom call chain traces if needed
- [ ] cypher for custom call chain traces if needed
- [ ] Read source files to confirm root cause
```
@@ -40,7 +40,7 @@ description: "Use when the user is debugging a bug, tracing an error, or asking
| Symptom | GitNexus Approach |
| -------------------- | ---------------------------------------------------------- |
| Error message | `gitnexus_query` for error text → `context` on throw sites |
| Error message | `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) |
@@ -48,24 +48,24 @@ description: "Use when the user is debugging a bug, tracing an error, or asking
## Tools
**gitnexus_query** — find code related to error:
**query** — find code related to error:
```
gitnexus_query({query: "payment validation error"})
query({query: "payment validation error"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError, PaymentException
```
**gitnexus_context** — full context for a suspect:
**context** — full context for a suspect:
```
gitnexus_context({name: "validatePayment"})
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** — custom call chain traces:
```cypher
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
@@ -75,11 +75,11 @@ RETURN [n IN nodes(path) | n.name] AS chain
## Example: "Payment endpoint returns 500 intermittently"
```
1. gitnexus_query({query: "payment error handling"})
1. query({query: "payment error handling"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError
2. gitnexus_context({name: "validatePayment"})
2. context({name: "validatePayment"})
→ Outgoing calls: verifyCard, fetchRates (external API!)
3. READ gitnexus://repo/my-app/process/CheckoutFlow
@@ -18,20 +18,20 @@ description: "Use when the user asks how code works, wants to understand archite
```
1. READ gitnexus://repos → Discover indexed repos
2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
3. gitnexus_query({query: "<what you want to understand>"}) → Find related execution flows
4. gitnexus_context({name: "<symbol>"}) → Deep dive on specific symbol
3. query({query: "<what you want to understand>"}) → Find related execution flows
4. context({name: "<symbol>"}) → 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.
> If step 2 says "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklist
```
- [ ] READ gitnexus://repo/{name}/context
- [ ] gitnexus_query for the concept you want to understand
- [ ] query for the concept you want to understand
- [ ] Review returned processes (execution flows)
- [ ] gitnexus_context on key symbols for callers/callees
- [ ] context on key symbols for callers/callees
- [ ] READ process resource for full execution traces
- [ ] Read source files for implementation details
```
@@ -47,18 +47,18 @@ description: "Use when the user asks how code works, wants to understand archite
## Tools
**gitnexus_query** — find execution flows related to a concept:
**query** — find execution flows related to a concept:
```
gitnexus_query({query: "payment processing"})
query({query: "payment processing"})
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
→ Symbols grouped by flow with file locations
```
**gitnexus_context** — 360-degree view of a symbol:
**context** — 360-degree view of a symbol:
```
gitnexus_context({name: "validateUser"})
context({name: "validateUser"})
→ Incoming calls: loginHandler, apiMiddleware
→ Outgoing calls: checkToken, getUserById
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
@@ -68,10 +68,10 @@ gitnexus_context({name: "validateUser"})
```
1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
2. gitnexus_query({query: "payment processing"})
2. query({query: "payment processing"})
→ CheckoutFlow: processPayment → validateCard → chargeStripe
→ RefundFlow: initiateRefund → calculateRefund → processRefund
3. gitnexus_context({name: "processPayment"})
3. context({name: "processPayment"})
→ Incoming: checkoutHandler, webhookHandler
→ Outgoing: validateCard, chargeStripe, saveTransaction
4. Read src/payments/processor.ts for implementation details
@@ -15,7 +15,7 @@ For any task involving code understanding, debugging, impact analysis, or refact
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.
> If step 1 warns the index is stale, run `node .gitnexus/run.cjs analyze` in the terminal first.
## Skills
@@ -38,7 +38,38 @@ For any task involving code understanding, debugging, impact analysis, or refact
| `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 |
| `list_repos` | Discover indexed repos (paginated — `limit`/`offset`) |
### Paginating `list_repos`
`list_repos` is paginated so a large registry is not truncated by MCP/LLM token limits. It takes optional `limit` (default **50**, max **200**) and `offset`, and returns:
```jsonc
{
"repositories": [
{ "name": "...", "path": "...", "indexedAt": "...", "lastCommit": "...", "stats": { } }
],
"pagination": {
"total": 437,
"limit": 50,
"offset": 0,
"returned": 50,
"hasMore": true,
"nextOffset": 50
}
}
```
To enumerate **every** repository, keep calling with `offset` set to `pagination.nextOffset` until `hasMore` is `false`:
```text
list_repos {} → repos 1–50, nextOffset 50, hasMore true
list_repos { offset: 50 } → repos 51–100, nextOffset 100, hasMore true
…
list_repos { offset: 400 } → repos 401–437, hasMore false (done)
```
Notes: `offset` ≥ `total` returns an empty page (with `total` still reported). Out-of-range or malformed `limit`/`offset` (non-integer, `limit` outside `[1, 200]`, `offset < 0`) are rejected with a clear error — `limit` above the max is rejected, not silently capped. The order is deterministic (lower-cased name, then path), so paging never skips or duplicates an entry while the registry is unchanged.
## Resources Reference
@@ -17,22 +17,22 @@ description: "Use when the user wants to know what will break if they change som
## Workflow
```
1. gitnexus_impact({target: "X", direction: "upstream"}) → What depends on this
1. 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
3. 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.
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklist
```
- [ ] gitnexus_impact({target, direction: "upstream"}) to find dependents
- [ ] 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
- [ ] detect_changes() for pre-commit check
- [ ] Assess risk level and report to user
```
@@ -55,10 +55,10 @@ description: "Use when the user wants to know what will break if they change som
## Tools
**gitnexus_impact** — the primary tool for symbol blast radius:
**impact** — the primary tool for symbol blast radius:
```
gitnexus_impact({
impact({
target: "validateUser",
direction: "upstream",
minConfidence: 0.8,
@@ -73,10 +73,10 @@ gitnexus_impact({
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
```
**gitnexus_detect_changes** — git-diff based impact analysis:
**detect_changes** — git-diff based impact analysis:
```
gitnexus_detect_changes({scope: "staged"})
detect_changes({scope: "staged"})
→ Changed: 5 symbols in 3 files
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
@@ -86,7 +86,7 @@ gitnexus_detect_changes({scope: "staged"})
## Example: "What breaks if I change validateUser?"
```
1. gitnexus_impact({target: "validateUser", direction: "upstream"})
1. impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
@@ -16,78 +16,78 @@ description: "Use when the user wants to rename, extract, split, move, or restru
## 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
1. impact({target: "X", direction: "upstream"}) → Map all dependents
2. query({query: "X"}) → Find execution flows involving X
3. 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.
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklists
### Rename Symbol
```
- [ ] gitnexus_rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — preview all edits
- [ ] 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
- [ ] If satisfied: rename({..., dry_run: false}) — apply edits
- [ ] 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
- [ ] context({name: target}) — see all incoming/outgoing refs
- [ ] impact({target, direction: "upstream"}) — find all external callers
- [ ] Define new module interface
- [ ] Extract code, update imports
- [ ] gitnexus_detect_changes() — verify affected scope
- [ ] detect_changes() — verify affected scope
- [ ] Run tests for affected processes
```
### Split Function/Service
```
- [ ] gitnexus_context({name: target}) — understand all callees
- [ ] context({name: target}) — understand all callees
- [ ] Group callees by responsibility
- [ ] gitnexus_impact({target, direction: "upstream"}) — map callers to update
- [ ] impact({target, direction: "upstream"}) — map callers to update
- [ ] Create new functions/services
- [ ] Update callers
- [ ] gitnexus_detect_changes() — verify affected scope
- [ ] detect_changes() — verify affected scope
- [ ] Run tests for affected processes
```
## Tools
**gitnexus_rename** — automated multi-file rename:
**rename** — automated multi-file rename:
```
gitnexus_rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
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:
**impact** — map all dependents first:
```
gitnexus_impact({target: "validateUser", direction: "upstream"})
impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware, testUtils
→ Affected Processes: LoginFlow, TokenRefresh
```
**gitnexus_detect_changes** — verify your changes after refactoring:
**detect_changes** — verify your changes after refactoring:
```
gitnexus_detect_changes({scope: "all"})
detect_changes({scope: "all"})
→ Changed: 8 files, 12 symbols
→ Affected processes: LoginFlow, TokenRefresh
→ Risk: MEDIUM
```
**gitnexus_cypher** — custom reference queries:
**cypher** — custom reference queries:
```cypher
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"})
@@ -98,24 +98,24 @@ RETURN caller.name, caller.filePath ORDER BY caller.filePath
| Risk Factor | Mitigation |
| ------------------- | ----------------------------------------- |
| Many callers (>5) | Use gitnexus_rename for automated updates |
| Many callers (>5) | Use rename for automated updates |
| Cross-area refs | Use detect_changes after to verify scope |
| String/dynamic refs | gitnexus_query to find them |
| String/dynamic refs | 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})
1. 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})
3. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false})
→ Applied 12 edits across 8 files
4. gitnexus_detect_changes({scope: "all"})
4. detect_changes({scope: "all"})
→ Affected: LoginFlow, TokenRefresh
→ Risk: MEDIUM — run tests for these flows
```
+18
View File
@@ -0,0 +1,18 @@
import { createHash } from 'node:crypto';
import { access, readFile } from 'node:fs/promises';
import { join } from 'node:path';
import { envName, latestSuccess, recordsRoot, snapshotRoot } from './release-store.mjs';
const environment = envName(process.env.RELEASE_ENVIRONMENT);
const commitSha = process.env.RELEASE_SHA;
const record = await latestSuccess(environment, 'nacos');
if (!commitSha || record.commitSha !== commitSha || record.status !== 'success') throw new Error(`没有提交 ${commitSha} 对应的成功 Nacos 发布`);
if (!record.activeSnapshotId || !record.snapshotId || !Array.isArray(record.files) || record.files.length === 0 || record.files.some((file) => !file.sha256 || !file.dataId || !file.namespace)) throw new Error('Nacos 发布记录不完整');
const destinations = environment === 'prod' ? ['prod-center1', 'prod-center2'] : [environment];
for (const destination of destinations) for (const file of record.files) {
const path = join(snapshotRoot(environment, record.activeSnapshotId), destination, file.namespace, 'DEFAULT_GROUP', file.dataId);
const content = await readFile(path, 'utf8');
if (createHash('sha256').update(content, 'utf8').digest('hex') !== file.sha256) throw new Error(`Nacos 发布快照摘要不匹配:${destination}/${file.namespace}/${file.dataId}`);
}
await access(join(recordsRoot(environment), 'latest-success-nacos.json'));
console.log(JSON.stringify(record));
+20
View File
@@ -0,0 +1,20 @@
const workflow = process.argv[2];
const ref = process.argv[3] || process.env.GITHUB_REF_NAME;
if (!workflow || !ref) throw new Error('用法:node dispatch-workflow.mjs <workflow.yml> <ref>');
const token = process.env.GITHUB_TOKEN;
if (!token) throw new Error('缺少 GITHUB_TOKEN');
const server = process.env.GITHUB_SERVER_URL || 'http://192.168.5.15:3000';
const repository = process.env.GITHUB_REPOSITORY || 'xiaowang/JayuCloud';
const inputs = Object.fromEntries(Object.entries(process.env).filter(([key]) => key.startsWith('DISPATCH_INPUT_')).map(([key, value]) => [key.slice('DISPATCH_INPUT_'.length).toLowerCase(), value]));
if (process.env.AUTO_ROLLBACK === 'true') inputs.auto_rollback = 'true';
const isNacosRollback = /^(回退dev环境nacos配置|回退sit环境nacos配置|回退prod环境nacos配置)\.yml$/.test(workflow);
if (isNacosRollback && !inputs.snapshot_id && process.env.RELEASE_STORE_ROOT && (process.env.RELEASE_ENVIRONMENT || process.env.NACOS_ENVIRONMENT)) {
try { inputs.snapshot_id = JSON.parse(await (await import('node:fs/promises')).readFile(`${process.env.RELEASE_STORE_ROOT}/records/${process.env.RELEASE_ENVIRONMENT || process.env.NACOS_ENVIRONMENT}/pending-nacos.json`, 'utf8')).snapshotId; } catch {}
}
if (isNacosRollback && process.env.AUTO_ROLLBACK === 'true' && !inputs.snapshot_id) {
console.log('没有待处理的 Nacos 发布快照,无需触发 Nacos 回退');
process.exit(0);
}
const response = await fetch(`${server}/api/v1/repos/${repository}/actions/workflows/${workflow}/dispatches`, { method: 'POST', headers: { Authorization: `token ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ ref, inputs }) });
if (!response.ok && response.status !== 204) throw new Error(`触发 ${workflow} 失败:HTTP ${response.status} ${await response.text()}`);
console.log(`已触发 ${workflow} @ ${ref}`);
+79
View File
@@ -0,0 +1,79 @@
import { createHash } from 'node:crypto';
import { mkdir, readFile, readdir, rm } from 'node:fs/promises';
import { join, relative, sep } from 'node:path';
import { atomicWrite, envName, listYamlFiles, recordsRoot, snapshotRoot, writeJson } from './release-store.mjs';
const environment = envName(process.env.NACOS_ENVIRONMENT);
const group = 'DEFAULT_GROUP';
const root = process.cwd();
const configRoot = join(root, 'nacos', 'namespaces', environment);
const files = await listYamlFiles(configRoot);
if (!files.length) throw new Error(`没有可发布的 ${environment} YAML 配置`);
const destinations = (environment === 'prod' ? [['NACOS_PROD', 'prod-center1', 2], ['NACOS_DR', 'prod-center2', 1]] : [[environment === 'dev' ? 'NACOS_DEV' : 'NACOS_SIT', environment, 1]]).map(([prefix, id, nodes]) => {
const urls = required(`${prefix}_URLS`).split(',').map(normalize).filter(Boolean);
if (urls.length < nodes) throw new Error(`${prefix} Nacos 地址不足`);
return { prefix, id, urls, token: null, nodes };
});
for (const destination of destinations) destination.token = await login(destination.urls[0], required(`${destination.prefix}_USERNAME`), required(`${destination.prefix}_PASSWORD`));
const groupName = group;
const runId = process.env.GITHUB_RUN_ID || 'manual';
const commitSha = process.env.GITHUB_SHA || 'unknown';
const recordRoot = recordsRoot(environment);
const snapshotId = `${new Date().toISOString().replaceAll(/[:.]/g, '-')}-${runId}`;
const releaseId = `${environment}-${commitSha.slice(0, 12)}-${runId}`;
const snapshot = snapshotRoot(environment, snapshotId);
const activeSnapshotId = `active-${releaseId}`;
const activeSnapshot = snapshotRoot(environment, activeSnapshotId);
await mkdir(snapshot, { recursive: true });
await mkdir(activeSnapshot, { recursive: true });
const entries = [];
for (const file of files) {
const { namespace, dataId } = info(file);
const content = await readFile(file, 'utf8');
const entry = { namespace, dataId, sha256: sha256(content), previousSha256: {}, previousExists: {} };
entries.push(entry);
for (const destination of destinations) {
const response = await fetch(`${destination.urls[0]}/nacos/v1/cs/configs?${new URLSearchParams({ dataId, group: groupName, tenant: namespace, accessToken: destination.token })}`);
if (!response.ok && response.status !== 404) throw new Error(`读取当前 Nacos 配置失败:${destination.prefix}/${namespace}/${dataId} HTTP ${response.status}`);
const oldContent = await response.text();
entry.previousExists[destination.id] = response.status !== 404;
entry.previousSha256[destination.id] = sha256(oldContent);
await atomicWrite(join(snapshot, destination.id, namespace, groupName, dataId), oldContent);
await atomicWrite(join(activeSnapshot, destination.id, namespace, groupName, dataId), content);
}
}
await writeJson(join(recordRoot, 'pending-nacos.json'), { environment, snapshotId, activeSnapshotId, commitSha, runId, releaseId, files: entries, createdAt: new Date().toISOString() });
try {
for (const file of files) {
const { namespace, dataId } = info(file);
const content = await readFile(file, 'utf8');
for (const destination of destinations) {
const response = await fetch(`${destination.urls[0]}/nacos/v1/cs/configs?accessToken=${encodeURIComponent(destination.token)}`, { method: 'POST', body: new URLSearchParams({ dataId, group: groupName, tenant: namespace, type: 'yaml', content }) });
const result = await response.text();
if (!response.ok || result.trim() !== 'true') throw new Error(`发布失败:${destination.prefix}/${namespace}/${dataId} HTTP ${response.status}`);
await verify(destination, namespace, dataId, content);
}
}
const previous = await optionalJson(join(recordRoot, 'latest-success-nacos.json'));
const record = { environment, status: 'success', commitSha, runId, releaseId, snapshotId, activeSnapshotId, previousReleaseId: previous?.releaseId || null, files: entries, publishedAt: new Date().toISOString() };
await writeJson(join(recordRoot, 'latest-success-nacos.json'), record);
await writeJson(join(recordRoot, 'nacos', `${releaseId}.json`), record);
await rm(join(recordRoot, 'pending-nacos.json'), { force: true });
console.log(`已发布并校验 ${environment} Nacos,回退快照 ${snapshotId}`);
} catch (error) {
console.error(error.message);
console.error(`AUTO_ROLLBACK_SNAPSHOT_ID=${snapshotId}`);
throw error;
}
function required(name) { if (!process.env[name]) throw new Error(`缺少环境变量 ${name}`); return process.env[name]; }
function normalize(value) { return value.replace(/\/+$/, '').replace(/\/nacos$/, ''); }
function sha256(value) { return createHash('sha256').update(value, 'utf8').digest('hex'); }
function info(file) {
const parts = relative(configRoot, file).split(sep);
if (parts.length !== 3 || parts[1] !== group || !parts[0] || !parts[2]) throw new Error(`配置路径无效,必须为 namespace/${group}/dataId:${file}`);
return { namespace: parts[0], dataId: parts[2] };
}
async function optionalJson(path) { try { return JSON.parse(await readFile(path, 'utf8')); } catch { return null; } }
async function login(base, user, password) { const response = await fetch(`${base}/nacos/v1/auth/login`, { method: 'POST', body: new URLSearchParams({ username: user, password }) }); if (!response.ok) throw new Error(`Nacos 登录失败:HTTP ${response.status}`); const result = await response.json(); if (!result.accessToken) throw new Error('Nacos 登录响应缺少 accessToken'); return result.accessToken; }
async function verify(destination, namespace, dataId, expected) { const expectedHash = sha256(expected); for (const base of destination.urls) { let status = 0; let content = ''; for (let attempt = 0; attempt < 3; attempt += 1) { const response = await fetch(`${base}/nacos/v1/cs/configs?${new URLSearchParams({ dataId, group: groupName, tenant: namespace, accessToken: destination.token })}`); status = response.status; content = await response.text(); if (status === 200 && sha256(content) === expectedHash) break; await new Promise((resolve) => setTimeout(resolve, 1000)); } if (status !== 200 || sha256(content) !== expectedHash) throw new Error(`Nacos 校验失败:${destination.prefix}/${base}/${namespace}/${dataId}`); } }
+37
View File
@@ -0,0 +1,37 @@
import { createHash } from 'node:crypto';
import { readFile, readdir } from 'node:fs/promises';
import { join } from 'node:path';
import { envName, latestSuccess, recordsRoot, writeJson } from './release-store.mjs';
const environment = envName(process.env.RELEASE_ENVIRONMENT);
const commitSha = process.env.RELEASE_SHA;
const nacos = await latestSuccess(environment, 'nacos');
const packageDir = process.env.PACKAGE_DIRECTORY;
if (!commitSha || nacos.commitSha !== commitSha || !packageDir) throw new Error('部署记录参数不完整');
if (nacos.status !== 'success' || !nacos.files?.length || !nacos.activeSnapshotId) throw new Error('Nacos 发布已回退或发布记录不完整');
const manifestPath = await findFile(packageDir, 'manifest.json');
const manifest = JSON.parse(await readFile(manifestPath, 'utf8'));
const artifactPaths = {};
for (const [name, fileName] of Object.entries({ core: 'JC-Salon-Core.jar', gateway: 'JC-Salon-Gateway.jar', frontend: 'jc-salon-frontend-dist.tar.gz' })) {
const artifactPath = await findFile(packageDir, fileName);
const sha256 = createHash('sha256').update(await readFile(artifactPath)).digest('hex');
const expected = manifest.artifacts?.find((item) => item.Path?.endsWith(fileName))?.Sha256?.toLowerCase();
if (!expected || expected !== sha256) throw new Error(`发布包摘要不匹配:${fileName}`);
artifactPaths[name] = { path: artifactPath, sha256 };
}
const previous = await optional(join(recordsRoot(environment), 'latest-success-deploy.json'));
const releaseId = `${environment}-${commitSha.slice(0, 12)}-${process.env.GITHUB_RUN_ID || 'manual'}`;
const record = { environment, status: 'success', commitSha, releaseId, nacosReleaseId: nacos.releaseId, snapshotId: nacos.snapshotId, activeSnapshotId: nacos.activeSnapshotId, packageDir, manifestPath, artifacts: artifactPaths, previousReleaseId: previous?.releaseId || null, runId: process.env.GITHUB_RUN_ID || 'manual', deployedAt: new Date().toISOString() };
await writeJson(join(recordsRoot(environment), 'deploy', `${releaseId}.json`), record);
await writeJson(join(recordsRoot(environment), 'latest-success-deploy.json'), record);
console.log(JSON.stringify(record));
async function optional(path) { try { return JSON.parse(await readFile(path, 'utf8')); } catch { return null; } }
async function findFile(root, name) {
for (const entry of await readdir(root, { withFileTypes: true })) {
const path = join(root, entry.name);
if (entry.isDirectory()) { const nested = await optionalFind(path, name); if (nested) return nested; }
else if (entry.name === name) return path;
}
throw new Error(`发布包缺少 ${name}`);
}
async function optionalFind(root, name) { try { return await findFile(root, name); } catch { return null; } }
+10
View File
@@ -0,0 +1,10 @@
import { join } from 'node:path';
import { envName, recordsRoot, readJson, writeJson } from './release-store.mjs';
const environment = envName(process.env.RELEASE_ENVIRONMENT);
const releaseId = process.env.ROLLBACK_RELEASE_ID;
if (!releaseId) throw new Error('缺少 ROLLBACK_RELEASE_ID');
const record = await readJson(join(recordsRoot(environment), 'deploy', `${releaseId}.json`));
if (record.status !== 'success' || !record.packageDir || !record.activeSnapshotId) throw new Error('目标回退版本记录不完整');
await writeJson(join(recordsRoot(environment), 'latest-success-deploy.json'), { ...record, restoredAt: new Date().toISOString() });
console.log(`已将 ${environment} 成功版本指针更新到 ${releaseId}`);
+62
View File
@@ -0,0 +1,62 @@
import { mkdir, readFile, readdir, rename, writeFile } from 'node:fs/promises';
import { dirname, join, resolve } from 'node:path';
export const storeRoot = process.env.RELEASE_STORE_ROOT || '/salon-release';
export function envName(value = process.env.NACOS_ENVIRONMENT) {
if (!['dev', 'sit', 'prod'].includes(value)) throw new Error(`不支持的环境:${value}`);
return value;
}
export function environmentRoot(environment = envName()) {
return join(storeRoot, environment);
}
export function snapshotRoot(environment = envName(), snapshotId) {
return join(storeRoot, 'nacos-snapshots', environment, snapshotId);
}
export function recordsRoot(environment = envName()) {
return join(storeRoot, 'records', environment);
}
export async function atomicWrite(path, content) {
await mkdir(dirname(path), { recursive: true });
const temp = `${path}.tmp-${process.pid}-${Date.now()}`;
await writeFile(temp, content, 'utf8');
await rename(temp, path);
}
export async function readJson(path) {
return JSON.parse(await readFile(path, 'utf8'));
}
export async function writeJson(path, value) {
await atomicWrite(path, `${JSON.stringify(value, null, 2)}\n`);
}
export async function latestSuccess(environment = envName(), kind = 'nacos') {
const path = join(recordsRoot(environment), `latest-success-${kind}.json`);
return readJson(path);
}
export async function releaseRecord(environment, kind, releaseId) {
return readJson(join(recordsRoot(environment), kind, `${releaseId}.json`));
}
export async function listYamlFiles(root) {
const result = [];
for (const entry of await readdir(root, { withFileTypes: true })) {
const path = join(root, entry.name);
if (entry.isDirectory()) result.push(...await listYamlFiles(path));
else if (entry.isFile() && entry.name.endsWith('.yaml')) result.push(path);
}
return result.sort();
}
export function safeRelative(root, path) {
const value = resolve(path);
const base = resolve(root);
if (!value.startsWith(`${base}/`) && !value.startsWith(`${base}\\`)) throw new Error(`路径越界:${path}`);
return value.slice(base.length + 1).replaceAll('\\', '/');
}
+67
View File
@@ -0,0 +1,67 @@
import { createHash } from 'node:crypto';
import { readFile, readdir, rm } from 'node:fs/promises';
import { join } from 'node:path';
import { envName, recordsRoot, snapshotRoot, writeJson } from './release-store.mjs';
const environment = envName(process.env.NACOS_ENVIRONMENT);
const group = 'DEFAULT_GROUP';
const destinations = environment === 'prod' ? [['NACOS_PROD', 'prod-center1'], ['NACOS_DR', 'prod-center2']] : [[environment === 'dev' ? 'NACOS_DEV' : 'NACOS_SIT', environment]];
const targets = [];
for (const [prefix, id] of destinations) {
const urls = required(`${prefix}_URLS`).split(',').map(normalize).filter(Boolean);
if (!urls.length) throw new Error(`${prefix}_URLS 为空`);
targets.push({ prefix, id, urls, token: await login(urls[0], required(`${prefix}_USERNAME`), required(`${prefix}_PASSWORD`)) });
}
const root = recordsRoot(environment);
const pending = await optional(join(root, 'pending-nacos.json'));
const latest = await optional(join(root, 'latest-success-nacos.json'));
let selected = process.env.NACOS_RELEASE_ID
? await optional(join(root, 'nacos', `${process.env.NACOS_RELEASE_ID}.json`))
: null;
if (process.env.NACOS_RELEASE_ID && !selected) throw new Error(`找不到 Nacos 发布记录:${process.env.NACOS_RELEASE_ID}`);
if (!process.env.NACOS_SNAPSHOT_ID && !pending && !selected && latest?.previousReleaseId) selected = await optional(join(root, 'nacos', `${latest.previousReleaseId}.json`));
const snapshotId = process.env.NACOS_SNAPSHOT_ID || (selected ? selected.activeSnapshotId : pending?.snapshotId || latest?.snapshotId);
if (!snapshotId) throw new Error(`没有 ${environment} Nacos 回退快照`);
if (!selected && !pending) selected = await findSnapshotRecord(join(root, 'nacos'), snapshotId);
const snapshot = snapshotRoot(environment, snapshotId);
const entries = selected?.files || pending?.files || latest?.files || [];
const selectedIsActive = selected?.activeSnapshotId === snapshotId;
if (!entries.length) throw new Error('回退记录缺少配置清单');
for (const target of targets) {
for (const entry of entries) {
for (const base of target.urls) {
const exists = selectedIsActive || entry.previousExists?.[target.id] !== false;
const path = join(snapshot, target.id, entry.namespace, group, entry.dataId);
const content = exists ? await readFile(path, 'utf8') : '';
const expectedHash = selectedIsActive ? entry.sha256 : entry.previousSha256?.[target.id];
if (exists && (!expectedHash || sha256(content) !== expectedHash)) throw new Error(`回退快照摘要不匹配:${target.id}/${entry.namespace}/${entry.dataId}`);
const query = new URLSearchParams({ dataId: entry.dataId, group, tenant: entry.namespace, accessToken: target.token });
const response = exists
? await fetch(`${base}/nacos/v1/cs/configs?accessToken=${encodeURIComponent(target.token)}`, { method: 'POST', body: new URLSearchParams({ dataId: entry.dataId, group, tenant: entry.namespace, type: 'yaml', content }) })
: await fetch(`${base}/nacos/v1/cs/configs?${query}`, { method: 'DELETE' });
if (!response.ok || (exists && (await response.text()).trim() !== 'true')) throw new Error(`回退失败:${target.id}/${entry.namespace}/${entry.dataId}`);
const check = await fetch(`${base}/nacos/v1/cs/configs?${new URLSearchParams({ dataId: entry.dataId, group, tenant: entry.namespace, accessToken: target.token })}`);
const actual = await check.text();
if (exists ? (!check.ok || sha256(actual) !== sha256(content)) : check.status !== 404) throw new Error(`回退摘要校验失败:${target.id}/${entry.namespace}/${entry.dataId}`);
}
}
}
await writeJson(join(root, 'last-rollback.json'), { environment, snapshotId, source: process.env.AUTO_ROLLBACK === 'true' ? 'automatic' : 'manual', rollbackAt: new Date().toISOString() });
if (selectedIsActive && selected) await writeJson(join(root, 'latest-success-nacos.json'), selected);
await rm(join(root, 'pending-nacos.json'), { force: true });
console.log(`已回退 ${environment} Nacos:${snapshotId}`);
function required(name) { if (!process.env[name]) throw new Error(`缺少环境变量 ${name}`); return process.env[name]; }
function normalize(value) { return value.replace(/\/+$/, '').replace(/\/nacos$/, ''); }
function sha256(value) { return createHash('sha256').update(value, 'utf8').digest('hex'); }
async function optional(path) { try { return JSON.parse(await readFile(path, 'utf8')); } catch { return null; } }
async function findSnapshotRecord(directory, id) {
try {
for (const file of await readdir(directory)) {
if (!file.endsWith('.json')) continue;
const record = await optional(join(directory, file));
if (record?.snapshotId === id || record?.activeSnapshotId === id) return record;
}
} catch {}
return null;
}
async function login(base, user, password) { const response = await fetch(`${base}/nacos/v1/auth/login`, { method: 'POST', body: new URLSearchParams({ username: user, password }) }); if (!response.ok) throw new Error(`Nacos 登录失败:HTTP ${response.status}`); const result = await response.json(); if (!result.accessToken) throw new Error('Nacos 登录响应缺少 accessToken'); return result.accessToken; }
@@ -0,0 +1,87 @@
name: 生产环境回退上一个版本
"on":
workflow_dispatch:
inputs:
auto_rollback:
description: 是否由自动失败流程触发
required: false
type: boolean
concurrency:
group: release-prod
cancel-in-progress: false
jobs:
rollback:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
RELEASE_ENVIRONMENT: prod
RELEASE_STORE_ROOT: /salon-release
NACOS_ENVIRONMENT: prod
AUTO_ROLLBACK: ${{ inputs.auto_rollback }}
WEB_TARGET_HOST: 10.66.0.3
WEB_TARGET_PORT: 22
WEB_TARGET_USER: root
WEB_REMOTE_DIR: /opt/jc-salon-frontend
SALON_PROD_SSH_PASSWORD: ${{ secrets.SALON_PROD_SSH_PASSWORD }}
NACOS_PROD_URLS: ${{ secrets.NACOS_PROD_URLS }}
NACOS_PROD_USERNAME: ${{ secrets.NACOS_PROD_USERNAME }}
NACOS_PROD_PASSWORD: ${{ secrets.NACOS_PROD_PASSWORD }}
NACOS_DR_URLS: ${{ secrets.NACOS_DR_URLS }}
NACOS_DR_USERNAME: ${{ secrets.NACOS_DR_USERNAME }}
NACOS_DR_PASSWORD: ${{ secrets.NACOS_DR_PASSWORD }}
steps:
- name: 检出回退脚本
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 读取上一成功版本
shell: bash
run: |
set -euo pipefail
current=/salon-release/records/prod/latest-success-deploy.json
test -f "$current"
node - <<'NODE' >> "$GITHUB_ENV"
const fs = require('fs');
const latest = JSON.parse(fs.readFileSync('/salon-release/records/prod/latest-success-deploy.json'));
const id = process.env.AUTO_ROLLBACK === 'true' ? latest.releaseId : latest.previousReleaseId;
if (!id) throw new Error('没有可回退的 PROD 成功版本');
const target = JSON.parse(fs.readFileSync(`/salon-release/records/prod/deploy/${id}.json`));
console.log(`PACKAGE_DIRECTORY=${target.packageDir}`);
console.log(`ROLLBACK_SNAPSHOT_ID=${target.activeSnapshotId}`);
console.log(`ROLLBACK_RELEASE_ID=${target.releaseId}`);
console.log(`NACOS_RELEASE_ID=${target.nacosReleaseId}`);
NODE
- name: 安装 SSH 密码工具
shell: bash
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sshpass
- name: 写入 PROD 目标清单
shell: bash
run: |
mkdir -p "$RUNNER_TEMP/salon-prod"
printf '[{"Name":"core01-01","Host":"192.168.10.24","Port":22,"User":"root","Environment":"prod"},{"Name":"core01-02","Host":"192.168.10.25","Port":22,"User":"root","Environment":"prod"},{"Name":"core01-03","Host":"192.168.20.16","Port":22,"User":"root","Environment":"prod"},{"Name":"gateway01-01","Host":"192.168.10.26","Port":22,"User":"root","Environment":"prod"},{"Name":"gateway01-02","Host":"192.168.10.27","Port":22,"User":"root","Environment":"prod"},{"Name":"gateway01-03","Host":"192.168.20.18","Port":22,"User":"root","Environment":"prod"},{"Name":"salon-web","Host":"%s","Port":%s,"User":"%s","Environment":"prod"}]\n' "$WEB_TARGET_HOST" "$WEB_TARGET_PORT" "$WEB_TARGET_USER" > "$RUNNER_TEMP/salon-prod/servers.json"
- name: 恢复 PROD Nacos
shell: bash
env:
NACOS_SNAPSHOT_ID: ${{ env.ROLLBACK_SNAPSHOT_ID }}
NACOS_RELEASE_ID: ${{ env.NACOS_RELEASE_ID }}
AUTO_ROLLBACK: 'true'
NACOS_ROLLBACK_INVALIDATE: 'true'
run: node .gitea/scripts/rollback-nacos.mjs
- name: 恢复 PROD 应用
shell: pwsh
run: ./docs/scripts/deploy-jayucloud-salon-production.ps1 -Deploy -SkipDatabaseInit -RequireSystemd -PackageDirectory "$env:PACKAGE_DIRECTORY" -ServerInfoJsonPath "$env:RUNNER_TEMP/salon-prod/servers.json" -SshPassword "$env:SALON_PROD_SSH_PASSWORD" -CoreRemoteAppDir /opt/jc-salon-core -GatewayRemoteAppDir /opt/jc-salon-gateway -CorePattern '^core01-' -GatewayPattern '^gateway01-' -CoreServiceName jc-salon-core -GatewayServiceName jc-salon-gateway -WebTargetName salon-web -WebRemoteDir "$env:WEB_REMOTE_DIR" -PublicBaseUrl https://salon.yunail.art
- name: 记录回退后的成功版本
shell: bash
run: node .gitea/scripts/record-rollback.mjs
@@ -0,0 +1,78 @@
name: 测试环境回退上一个版本
"on":
workflow_dispatch:
inputs:
auto_rollback:
description: 是否由自动失败流程触发
required: false
type: boolean
concurrency:
group: release-sit
cancel-in-progress: false
jobs:
rollback:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
RELEASE_ENVIRONMENT: sit
RELEASE_STORE_ROOT: /salon-release
NACOS_ENVIRONMENT: sit
AUTO_ROLLBACK: ${{ inputs.auto_rollback }}
WEB_TARGET_HOST: 10.66.0.3
WEB_TARGET_PORT: 22
WEB_TARGET_USER: root
WEB_REMOTE_DIR: /opt/jc-salon-frontend-sit
SALON_PROD_SSH_PASSWORD: ${{ secrets.SALON_PROD_SSH_PASSWORD }}
NACOS_SIT_URLS: ${{ secrets.NACOS_SIT_URLS }}
NACOS_SIT_USERNAME: ${{ secrets.NACOS_SIT_USERNAME }}
NACOS_SIT_PASSWORD: ${{ secrets.NACOS_SIT_PASSWORD }}
steps:
- name: 检出回退脚本
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SERVER_URL: http://192.168.5.15:3000
run: |
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 读取最近成功版本
shell: bash
run: |
set -euo pipefail
test -f /salon-release/records/sit/latest-success-deploy.json
node - <<'NODE' >> "$GITHUB_ENV"
const fs = require('fs');
const latest = JSON.parse(fs.readFileSync('/salon-release/records/sit/latest-success-deploy.json'));
const id = process.env.AUTO_ROLLBACK === 'true' ? latest.releaseId : latest.previousReleaseId;
if (!id) throw new Error('没有可回退的 SIT 成功版本');
const target = JSON.parse(fs.readFileSync(`/salon-release/records/sit/deploy/${id}.json`));
console.log(`PACKAGE_DIRECTORY=${target.packageDir}`);
console.log(`ROLLBACK_SNAPSHOT_ID=${target.activeSnapshotId}`);
console.log(`ROLLBACK_RELEASE_ID=${target.releaseId}`);
console.log(`NACOS_RELEASE_ID=${target.nacosReleaseId}`);
NODE
- name: 安装 SSH 密码工具
shell: bash
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sshpass
- name: 恢复 SIT Nacos
shell: bash
env:
NACOS_SNAPSHOT_ID: ${{ env.ROLLBACK_SNAPSHOT_ID }}
NACOS_RELEASE_ID: ${{ env.NACOS_RELEASE_ID }}
AUTO_ROLLBACK: 'true'
NACOS_ROLLBACK_INVALIDATE: 'true'
run: node .gitea/scripts/rollback-nacos.mjs
- name: 执行 SIT 应用回退
shell: pwsh
run: ./docs/scripts/deploy-jayucloud-salon-production.ps1 -Deploy -SkipDatabaseInit -AllowSitTarget -RequireSystemd -PackageDirectory "$env:PACKAGE_DIRECTORY" -SshPassword "$env:SALON_PROD_SSH_PASSWORD" -CoreRemoteAppDir /opt/jc-salon-core-sit -GatewayRemoteAppDir /opt/jc-salon-gateway-sit -CorePattern '^sit-app01$' -GatewayPattern '^sit-app01$' -CoreServiceName jc-salon-core-sit -GatewayServiceName jc-salon-gateway-sit -CoreHealthPort 181 -GatewayHealthPort 180 -WebTargetName salon-web-sit -WebRemoteDir "$env:WEB_REMOTE_DIR" -PublicBaseUrl https://sit.yunail.art
- name: 记录回退后的成功版本
shell: bash
run: node .gitea/scripts/record-rollback.mjs
@@ -0,0 +1,46 @@
name: 回退开发环境 Nacos 配置
"on":
workflow_dispatch:
inputs:
snapshot_id:
description: 可选快照 ID,留空使用待回退快照
required: false
type: string
auto_rollback:
description: 是否由自动失败流程触发
required: false
type: boolean
concurrency:
group: release-dev
cancel-in-progress: false
jobs:
rollback:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
NACOS_ENVIRONMENT: dev
RELEASE_STORE_ROOT: /salon-release
NACOS_SNAPSHOT_ID: ${{ inputs.snapshot_id }}
NACOS_DEV_URLS: ${{ secrets.NACOS_DEV_URLS }}
NACOS_DEV_USERNAME: ${{ secrets.NACOS_DEV_USERNAME }}
NACOS_DEV_PASSWORD: ${{ secrets.NACOS_DEV_PASSWORD }}
AUTO_ROLLBACK: ${{ inputs.auto_rollback }}
steps:
- name: 检出回退脚本
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SERVER_URL: http://192.168.5.15:3000
run: |
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 恢复并校验 Nacos
shell: bash
run: AUTO_ROLLBACK=${AUTO_ROLLBACK:-false} node .gitea/scripts/rollback-nacos.mjs
@@ -0,0 +1,57 @@
name: 回退生产环境 Nacos 配置
"on":
workflow_dispatch:
inputs:
snapshot_id:
description: 可选快照 ID,留空使用待回退快照
required: false
type: string
auto_rollback:
description: 是否由自动失败流程触发
required: false
type: boolean
concurrency:
group: release-prod
cancel-in-progress: false
jobs:
rollback:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
NACOS_ENVIRONMENT: prod
RELEASE_STORE_ROOT: /salon-release
NACOS_SNAPSHOT_ID: ${{ inputs.snapshot_id }}
NACOS_PROD_URLS: ${{ secrets.NACOS_PROD_URLS }}
NACOS_PROD_USERNAME: ${{ secrets.NACOS_PROD_USERNAME }}
NACOS_PROD_PASSWORD: ${{ secrets.NACOS_PROD_PASSWORD }}
NACOS_DR_URLS: ${{ secrets.NACOS_DR_URLS }}
NACOS_DR_USERNAME: ${{ secrets.NACOS_DR_USERNAME }}
NACOS_DR_PASSWORD: ${{ secrets.NACOS_DR_PASSWORD }}
AUTO_ROLLBACK: ${{ inputs.auto_rollback }}
GITHUB_SERVER_URL: http://192.168.5.15:3000
steps:
- name: 检出回退脚本
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SERVER_URL: http://192.168.5.15:3000
run: |
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 恢复并校验 Nacos
shell: bash
run: AUTO_ROLLBACK=${AUTO_ROLLBACK:-false} node .gitea/scripts/rollback-nacos.mjs
- name: 触发 PROD 应用恢复
if: inputs.auto_rollback == true
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUTO_ROLLBACK: 'true'
run: node .gitea/scripts/dispatch-workflow.mjs prod环境回退上一个版本.yml refs/heads/prod
@@ -0,0 +1,54 @@
name: 回退测试环境 Nacos 配置
"on":
workflow_dispatch:
inputs:
snapshot_id:
description: 可选快照 ID,留空使用待回退快照
required: false
type: string
auto_rollback:
description: 是否由自动失败流程触发
required: false
type: boolean
concurrency:
group: release-sit
cancel-in-progress: false
jobs:
rollback:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
NACOS_ENVIRONMENT: sit
RELEASE_STORE_ROOT: /salon-release
NACOS_SNAPSHOT_ID: ${{ inputs.snapshot_id }}
NACOS_SIT_URLS: ${{ secrets.NACOS_SIT_URLS }}
NACOS_SIT_USERNAME: ${{ secrets.NACOS_SIT_USERNAME }}
NACOS_SIT_PASSWORD: ${{ secrets.NACOS_SIT_PASSWORD }}
AUTO_ROLLBACK: ${{ inputs.auto_rollback }}
GITHUB_SERVER_URL: http://192.168.5.15:3000
steps:
- name: 检出回退脚本
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_SERVER_URL: http://192.168.5.15:3000
run: |
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 恢复并校验 Nacos
shell: bash
run: AUTO_ROLLBACK=${AUTO_ROLLBACK:-false} node .gitea/scripts/rollback-nacos.mjs
- name: 触发 SIT 应用恢复
if: inputs.auto_rollback == true
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUTO_ROLLBACK: 'true'
run: node .gitea/scripts/dispatch-workflow.mjs sit环境回退上一个版本.yml refs/heads/sit
@@ -0,0 +1,43 @@
name: 环境分支晋级检查
on:
pull_request_target:
branches:
- sit
- prod
jobs:
validate-source:
name: environment-promotion-source
runs-on: jayucloud
steps:
- name: 校验环境分支晋级链路
shell: bash
env:
TARGET_BRANCH: ${{ gitea.base_ref }}
SOURCE_BRANCH: ${{ gitea.head_ref }}
SOURCE_REPOSITORY: ${{ gitea.event.pull_request.head.repo.full_name }}
TARGET_REPOSITORY: ${{ gitea.repository }}
run: |
set -euo pipefail
test -n "$TARGET_BRANCH"
test -n "$SOURCE_BRANCH"
test -n "$SOURCE_REPOSITORY"
test -n "$TARGET_REPOSITORY"
if [[ "$SOURCE_REPOSITORY" != "$TARGET_REPOSITORY" ]]; then
echo "拒绝跨仓库环境晋级:$SOURCE_REPOSITORY -> $TARGET_REPOSITORY"
exit 1
fi
case "$TARGET_BRANCH:$SOURCE_BRANCH" in
sit:dev|prod:sit)
echo "允许环境晋级:$SOURCE_BRANCH -> $TARGET_BRANCH"
;;
*)
echo "拒绝环境晋级:$SOURCE_BRANCH -> $TARGET_BRANCH"
echo "允许链路仅为 dev -> sit -> prod"
exit 1
;;
esac
@@ -0,0 +1,44 @@
name: 自动发布开发环境 Nacos 配置
"on":
push:
branches: [dev]
concurrency:
group: release-dev
cancel-in-progress: false
jobs:
publish:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
NACOS_ENVIRONMENT: dev
RELEASE_STORE_ROOT: /salon-release
RELEASE_ENVIRONMENT: dev
NACOS_DEV_URLS: ${{ secrets.NACOS_DEV_URLS }}
NACOS_DEV_USERNAME: ${{ secrets.NACOS_DEV_USERNAME }}
NACOS_DEV_PASSWORD: ${{ secrets.NACOS_DEV_PASSWORD }}
steps:
- name: 检出提交
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
test -n "$GITEA_TOKEN"
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 发布并校验 Nacos
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
trap 'AUTO_ROLLBACK=true RELEASE_ENVIRONMENT=dev node .gitea/scripts/dispatch-workflow.mjs rollback-dev-nacos.yml refs/heads/dev || true' ERR
node .gitea/scripts/publish-nacos.mjs
@@ -0,0 +1,52 @@
name: 自动发布生产环境 Nacos
"on":
push:
branches: [prod]
concurrency:
group: release-prod
cancel-in-progress: false
jobs:
publish:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
NACOS_ENVIRONMENT: prod
RELEASE_STORE_ROOT: /salon-release
RELEASE_ENVIRONMENT: prod
NACOS_PROD_URLS: ${{ secrets.NACOS_PROD_URLS }}
NACOS_PROD_USERNAME: ${{ secrets.NACOS_PROD_USERNAME }}
NACOS_PROD_PASSWORD: ${{ secrets.NACOS_PROD_PASSWORD }}
NACOS_DR_URLS: ${{ secrets.NACOS_DR_URLS }}
NACOS_DR_USERNAME: ${{ secrets.NACOS_DR_USERNAME }}
NACOS_DR_PASSWORD: ${{ secrets.NACOS_DR_PASSWORD }}
steps:
- name: 检出提交
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 发布并校验 Nacos
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
trap 'AUTO_ROLLBACK=true RELEASE_ENVIRONMENT=prod node .gitea/scripts/dispatch-workflow.mjs 回退prod环境nacos配置.yml refs/heads/prod || true' ERR
node .gitea/scripts/publish-nacos.mjs
- name: 触发生产部署
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISPATCH_INPUT_RELEASE_SHA: ${{ github.sha }}
run: node .gitea/scripts/dispatch-workflow.mjs 自动部署prod环境.yml refs/heads/prod
@@ -0,0 +1,49 @@
name: 自动发布测试环境 Nacos 配置
"on":
push:
branches: [sit]
concurrency:
group: release-sit
cancel-in-progress: false
jobs:
publish:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
NACOS_ENVIRONMENT: sit
RELEASE_STORE_ROOT: /salon-release
RELEASE_ENVIRONMENT: sit
NACOS_SIT_URLS: ${{ secrets.NACOS_SIT_URLS }}
NACOS_SIT_USERNAME: ${{ secrets.NACOS_SIT_USERNAME }}
NACOS_SIT_PASSWORD: ${{ secrets.NACOS_SIT_PASSWORD }}
steps:
- name: 检出提交
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$GITHUB_SHA"
git checkout --detach "$GITHUB_SHA"
- name: 发布并校验 Nacos
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
trap 'AUTO_ROLLBACK=true RELEASE_ENVIRONMENT=sit node .gitea/scripts/dispatch-workflow.mjs 回退sit环境nacos配置.yml refs/heads/sit || true' ERR
node .gitea/scripts/publish-nacos.mjs
- name: 触发 SIT 部署
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISPATCH_INPUT_RELEASE_SHA: ${{ github.sha }}
run: node .gitea/scripts/dispatch-workflow.mjs 自动部署sit环境.yml refs/heads/sit
@@ -0,0 +1,85 @@
name: 自动部署生产环境
"on":
workflow_dispatch:
inputs:
release_sha:
description: 已成功发布 PROD Nacos 的提交 SHA
required: true
type: string
concurrency:
group: release-prod
cancel-in-progress: false
jobs:
deploy:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
RELEASE_ENVIRONMENT: prod
RELEASE_SHA: ${{ inputs.release_sha || github.sha }}
RELEASE_STORE_ROOT: /salon-release
WEB_TARGET_HOST: 10.66.0.3
WEB_TARGET_PORT: 22
WEB_TARGET_USER: root
WEB_REMOTE_DIR: /opt/jc-salon-frontend
SALON_PROD_SSH_PASSWORD: ${{ secrets.SALON_PROD_SSH_PASSWORD }}
NACOS_PROD_URLS: ${{ secrets.NACOS_PROD_URLS }}
NACOS_PROD_USERNAME: ${{ secrets.NACOS_PROD_USERNAME }}
NACOS_PROD_PASSWORD: ${{ secrets.NACOS_PROD_PASSWORD }}
NACOS_DR_URLS: ${{ secrets.NACOS_DR_URLS }}
NACOS_DR_USERNAME: ${{ secrets.NACOS_DR_USERNAME }}
NACOS_DR_PASSWORD: ${{ secrets.NACOS_DR_PASSWORD }}
steps:
- name: 检出发布提交
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$RELEASE_SHA"
git checkout --detach "$RELEASE_SHA"
- name: 校验 PROD Nacos 发布记录
shell: bash
run: node .gitea/scripts/assert-nacos-release.mjs
- name: 构建并固化 PROD 发布包
shell: pwsh
env:
VITE_API_BASE_URL: https://salon.yunail.art/api
VITE_ADMIN_API_BASE_URL: https://salon.yunail.art/admin/api
run: ./docs/scripts/deploy-jayucloud-salon-production.ps1 -PackageOnly -SkipTests -SkipDatabaseInit
- name: 保存发布包
shell: bash
run: |
set -euo pipefail
package_dir="/salon-release/packages/prod/${RELEASE_SHA}-${GITHUB_RUN_ID}"
mkdir -p "$package_dir"
cp -a artifacts/release/. "$package_dir/"
echo "PACKAGE_DIRECTORY=$package_dir" >> "$GITHUB_ENV"
- name: 安装 SSH 密码工具
shell: bash
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sshpass
- name: 写入 PROD 目标清单
shell: bash
run: |
mkdir -p "$RUNNER_TEMP/salon-prod"
printf '[{"Name":"core01-01","Host":"192.168.10.24","Port":22,"User":"root","Environment":"prod"},{"Name":"core01-02","Host":"192.168.10.25","Port":22,"User":"root","Environment":"prod"},{"Name":"core01-03","Host":"192.168.20.16","Port":22,"User":"root","Environment":"prod"},{"Name":"gateway01-01","Host":"192.168.10.26","Port":22,"User":"root","Environment":"prod"},{"Name":"gateway01-02","Host":"192.168.10.27","Port":22,"User":"root","Environment":"prod"},{"Name":"gateway01-03","Host":"192.168.20.18","Port":22,"User":"root","Environment":"prod"},{"Name":"salon-web","Host":"%s","Port":%s,"User":"%s","Environment":"prod"}]\n' "$WEB_TARGET_HOST" "$WEB_TARGET_PORT" "$WEB_TARGET_USER" > "$RUNNER_TEMP/salon-prod/servers.json"
- name: 执行 PROD 部署
shell: pwsh
run: ./docs/scripts/deploy-jayucloud-salon-production.ps1 -Deploy -SkipDatabaseInit -RequireSystemd -PackageDirectory "$env:PACKAGE_DIRECTORY" -ServerInfoJsonPath "$env:RUNNER_TEMP/salon-prod/servers.json" -SshPassword "$env:SALON_PROD_SSH_PASSWORD" -CoreRemoteAppDir /opt/jc-salon-core -GatewayRemoteAppDir /opt/jc-salon-gateway -CorePattern '^core01-' -GatewayPattern '^gateway01-' -CoreServiceName jc-salon-core -GatewayServiceName jc-salon-gateway -WebTargetName salon-web -WebRemoteDir "$env:WEB_REMOTE_DIR" -PublicBaseUrl https://salon.yunail.art
- name: 记录成功部署
shell: bash
run: node .gitea/scripts/record-deploy.mjs
- name: 部署失败自动回退
if: failure()
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUTO_ROLLBACK: 'true'
run: node .gitea/scripts/dispatch-workflow.mjs prod环境回退上一个版本.yml refs/heads/prod
@@ -0,0 +1,82 @@
name: 自动部署测试环境
"on":
workflow_dispatch:
inputs:
release_sha:
description: 已成功发布 SIT Nacos 的提交 SHA
required: true
type: string
concurrency:
group: release-sit
cancel-in-progress: false
jobs:
deploy:
runs-on: jayucloud
container:
options: >-
-v /opt/software/panel/apps/gitea/act_runner/salon-release:/salon-release
env:
GITHUB_SERVER_URL: http://192.168.5.15:3000
RELEASE_ENVIRONMENT: sit
RELEASE_SHA: ${{ inputs.release_sha || github.sha }}
RELEASE_STORE_ROOT: /salon-release
WEB_TARGET_HOST: 10.66.0.3
WEB_TARGET_PORT: 22
WEB_TARGET_USER: root
WEB_REMOTE_DIR: /opt/jc-salon-frontend-sit
SALON_PROD_SSH_PASSWORD: ${{ secrets.SALON_PROD_SSH_PASSWORD }}
NACOS_SIT_URLS: ${{ secrets.NACOS_SIT_URLS }}
NACOS_SIT_USERNAME: ${{ secrets.NACOS_SIT_USERNAME }}
NACOS_SIT_PASSWORD: ${{ secrets.NACOS_SIT_PASSWORD }}
steps:
- name: 检出发布提交
shell: bash
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -euo pipefail
git init .
git remote add origin "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git -c http.extraheader="Authorization: token $GITEA_TOKEN" fetch --no-tags --depth=1 origin "$RELEASE_SHA"
git checkout --detach "$RELEASE_SHA"
- name: 校验 SIT Nacos 发布记录
shell: bash
run: node .gitea/scripts/assert-nacos-release.mjs
- name: 构建 SIT 发布包
shell: pwsh
env:
VITE_API_BASE_URL: https://sit.yunail.art/api
VITE_ADMIN_API_BASE_URL: https://sit.yunail.art/admin/api
run: ./docs/scripts/deploy-jayucloud-salon-production.ps1 -PackageOnly -SkipTests -SkipDatabaseInit
- name: 持久化已校验发布包
shell: bash
run: |
set -euo pipefail
package_dir="/salon-release/packages/sit/${RELEASE_SHA}-${GITHUB_RUN_ID}"
mkdir -p "$package_dir"
cp -a artifacts/release/. "$package_dir/"
echo "PACKAGE_DIRECTORY=$package_dir" >> "$GITHUB_ENV"
- name: 安装 SSH 密码工具
shell: bash
run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends sshpass
- name: 写入 SIT 目标清单
shell: bash
run: |
mkdir -p "$RUNNER_TEMP/salon-sit"
printf '[{"Name":"sit-app01","Host":"192.168.10.15","Port":22,"User":"root","Purpose":"Salon SIT Core/Gateway","Environment":"sit"},{"Name":"salon-web-sit","Host":"%s","Port":%s,"User":"%s","Purpose":"Salon SIT NGINX","Environment":"sit"}]\n' "$WEB_TARGET_HOST" "$WEB_TARGET_PORT" "$WEB_TARGET_USER" > "$RUNNER_TEMP/salon-sit/servers.json"
- name: 执行 SIT 部署
shell: pwsh
run: ./docs/scripts/deploy-jayucloud-salon-production.ps1 -Deploy -SkipDatabaseInit -AllowSitTarget -RequireSystemd -PackageDirectory "$env:PACKAGE_DIRECTORY" -ServerInfoJsonPath "$env:RUNNER_TEMP/salon-sit/servers.json" -SshPassword "$env:SALON_PROD_SSH_PASSWORD" -CoreRemoteAppDir /opt/jc-salon-core-sit -GatewayRemoteAppDir /opt/jc-salon-gateway-sit -CorePattern '^sit-app01$' -GatewayPattern '^sit-app01$' -CoreServiceName jc-salon-core-sit -GatewayServiceName jc-salon-gateway-sit -CoreHealthPort 181 -GatewayHealthPort 180 -WebTargetName salon-web-sit -WebRemoteDir "$env:WEB_REMOTE_DIR" -PublicBaseUrl https://sit.yunail.art
- name: 记录成功部署
shell: bash
run: node .gitea/scripts/record-deploy.mjs
- name: 部署失败自动回退
if: failure()
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AUTO_ROLLBACK: 'true'
run: node .gitea/scripts/dispatch-workflow.mjs sit环境回退上一个版本.yml refs/heads/sit
+19 -3
View File
@@ -5,6 +5,12 @@
# Log file
*.log
# Full-regression database backups may contain development user data.
artifacts/full-regression/*backup*.sql
# Local Codex agent skill mirrors; canonical project skills live under .claude/.
.agents/
# BlueJ files
*.ctxt
@@ -34,8 +40,10 @@ docs/_book
# TODO: where does this rule come from?
test/
!YumiNail-Core/src/test/
!YumiNail-Core/src/test/**
!FD-Core/src/test/
!FD-Core/src/test/**
!FD-Gateway/src/test/
!FD-Gateway/src/test/**
# ---> Python
# Byte-compiled / optimized / DLL files
@@ -260,10 +268,17 @@ jspm_packages/
# Mini program local overrides
WeChatProgram/utils/config.local.js
YumiNail-Admin-Program/utils/config.local.js
JayuCloudArtList-Admin-Program/utils/config.local.js
FM-Wechat-Fronted/utils/config.local.js
# 本地敏感服务器信息
docx/服务器信息.xlsx
docx/生产服务器信息.xlsx
# Local release/test artifacts
release-packages/
/.codex-tmp/
/tmp/
artifacts/full-acceptance-*/
artifacts/release/
.codex-run/
@@ -388,3 +403,4 @@ m2repo/
/docs/product/
WeChatProgram/project.private.config.json
/.idea/
-10
View File
@@ -1,10 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Ignored default folder with query files
/queries/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
-29
View File
@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Annotation profile for YumiNail-Core" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="D:/apache-maven-3.9.9/repository/nailart/org/projectlombok/lombok/1.18.32/lombok-1.18.32.jar" />
</processorPath>
<module name="YumiNail-Core" />
</profile>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="YumiNail-Gateway" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="YumiNail-Core" options="-parameters" />
<module name="YumiNail-Gateway" options="-parameters" />
</option>
</component>
</project>
-7
View File
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/YumiNail-Core/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/YumiNail-Gateway/src/main/java" charset="UTF-8" />
</component>
</project>
-25
View File
@@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
</component>
</project>
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/YumiNail-Core/pom.xml" />
<option value="$PROJECT_DIR$/YumiNail-Gateway/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK" />
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/xiaowang.iml" filepath="$PROJECT_DIR$/.idea/xiaowang.iml" />
</modules>
</component>
</project>
Generated
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
+34 -13
View File
@@ -1,36 +1,57 @@
<!-- gitnexus:start -->
# GitNexus — Code Intelligence
This project is indexed by GitNexus as **xiaowang** (17628 symbols, 35093 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
This project is indexed by GitNexus as **JayuCloud** (22596 symbols, 47343 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.
> Index stale? Run `node .gitnexus/run.cjs analyze` from the project root — it auto-selects an available runner. No `.gitnexus/run.cjs` yet? `npx gitnexus analyze` (npm 11 crash → `npm i -g gitnexus`; #1939).
## 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 run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
- **MUST run `detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. For regression review, compare against the default branch: `detect_changes({scope: "compare", base_ref: "master"})`.
- **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"})`.
- When exploring unfamiliar code, use `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 `context({name: "symbolName"})`.
## Never Do
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
- NEVER edit a function, class, or method without first running `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.
- NEVER rename symbols with find-and-replace — use `rename` which understands the call graph.
- NEVER commit changes without running `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 |
| `gitnexus://repo/JayuCloud/context` | Codebase overview, check index freshness |
| `gitnexus://repo/JayuCloud/clusters` | All functional areas |
| `gitnexus://repo/JayuCloud/processes` | All execution flows |
| `gitnexus://repo/JayuCloud/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` |
<!-- gitnexus:end -->
## Project Workflow Rules
- 每次任务中发现的问题、原因和处理方式都需要记录下来,并在后续相关任务中回顾,避免重复发生。
- 后端修改如果涉及 SQL,默认新增版本变更 SQL;只有负责人明确要求重整初始化基线时,才将已存在的变更合并到初始化 SQL。
- 版本变更 SQL 文件名必须使用中文,体现功能和日期,并且 SQL 内容必须是完整可执行脚本。
- 如果修改涉及配置,必须提供说明文档;说明文档同样按 SQL 文件命名规则使用中文命名、体现功能和日期,并放在 `scripts/` 目录下。
- 当前代码、脚本、配置、SQL 和文档已固定为 `0.0.1` 基线;两个端侧初始化 SQL 仅作为空库首次初始化入口,后续 SQL 变更默认使用版本迭代文件,负责人明确要求整合基线时除外。
- 后续涉及脚本、配置、SQL 的任务,必须优先阅读 `scripts/0.0.1版本基线与后续迭代规则_20260628.md`,并在任务记录中写明新增或调整的版本化文件。
- 每次修改代码或者完成任务后,必须整理本次任务相关改动并创建 git 提交;提交信息必须使用中文。
## Browser MCP Preference
- For any browser-related operation, including opening, navigating, clicking, typing, inspecting pages/devtools, taking screenshots, testing pages, or automating local/remote web targets, use the `edgedev` MCP server first.
+24 -13
View File
@@ -1,32 +1,43 @@
<!-- gitnexus:start -->
# GitNexus — Code Intelligence
This project is indexed by GitNexus as **xiaowang** (17628 symbols, 35093 relationships, 300 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
This project is indexed by GitNexus as **JayuCloud** (22596 symbols, 47343 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.
> Index stale? Run `node .gitnexus/run.cjs analyze` from the project root — it auto-selects an available runner. No `.gitnexus/run.cjs` yet? `npx gitnexus analyze` (npm 11 crash → `npm i -g gitnexus`; #1939).
## 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 run impact analysis before editing any symbol.** Before modifying a function, class, or method, run `impact({target: "symbolName", direction: "upstream"})` and report the blast radius (direct callers, affected processes, risk level) to the user.
- **MUST run `detect_changes()` before committing** to verify your changes only affect expected symbols and execution flows. For regression review, compare against the default branch: `detect_changes({scope: "compare", base_ref: "master"})`.
- **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"})`.
- When exploring unfamiliar code, use `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 `context({name: "symbolName"})`.
## Never Do
- NEVER edit a function, class, or method without first running `gitnexus_impact` on it.
- NEVER edit a function, class, or method without first running `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.
- NEVER rename symbols with find-and-replace — use `rename` which understands the call graph.
- NEVER commit changes without running `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 |
| `gitnexus://repo/JayuCloud/context` | Codebase overview, check index freshness |
| `gitnexus://repo/JayuCloud/clusters` | All functional areas |
| `gitnexus://repo/JayuCloud/processes` | All execution flows |
| `gitnexus://repo/JayuCloud/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` |
<!-- gitnexus:end -->
-41
View File
@@ -1,41 +0,0 @@
const request = require('../utils/request')
const { API_DOMAIN } = require('../utils/config')
module.exports = {
login(data) {
return request({
url: '/auth/login',
method: 'POST',
data
})
},
register(data) {
return request({
url: '/auth/register',
method: 'POST',
data
})
},
sendCode(phone) {
return request({
url: '/user/send-verification-code',
method: 'POST',
params: {
__baseUrl: API_DOMAIN
},
data: {
phone,
sceneCode: 'PLANNING_MANAGER_REGISTER'
}
})
},
logout() {
return request({
url: '/auth/logout',
method: 'POST'
})
}
}
-20
View File
@@ -1,20 +0,0 @@
const request = require('../utils/request')
module.exports = {
list(params) {
return request({
url: '/user/list',
params: {
type: 0,
hasOrder: true,
...params
}
})
},
detail(id) {
return request({
url: `/user/detail/${id}`
})
}
}
-39
View File
@@ -1,39 +0,0 @@
const request = require('../utils/request')
module.exports = {
list(params) {
return request({
url: '/nail-artist/list',
params
})
},
detail(userId) {
return request({
url: `/nail-artist/get/${userId}`
})
},
save(data) {
return request({
url: '/nail-artist/save',
method: 'POST',
data
})
},
schedules(params) {
return request({
url: '/artist-schedule/list',
params
})
},
saveSchedule(data) {
return request({
url: '/artist-schedule/save',
method: 'POST',
data
})
}
}
-40
View File
@@ -1,40 +0,0 @@
const request = require('../utils/request')
module.exports = {
calendar(params) {
return request({
url: '/planning/calendar',
params
})
},
createAppointment(data) {
return request({
url: '/planning/appointments',
method: 'POST',
data
})
},
appointment(orderItemId) {
return request({
url: `/planning/appointments/${orderItemId}`
})
},
moveAppointment(orderItemId, data) {
return request({
url: `/planning/appointments/${orderItemId}/time-artist`,
method: 'PUT',
data
})
},
updateStatus(orderId, status) {
return request({
url: `/planning/appointments/${orderId}/status`,
method: 'PUT',
data: { status }
})
}
}
-24
View File
@@ -1,24 +0,0 @@
const request = require('../utils/request')
module.exports = {
settings() {
return request({
url: '/shops/current'
})
},
saveSettings(data) {
return request({
url: '/shops/current',
method: 'PUT',
data
})
},
exportData(params) {
return request({
url: '/export',
params
})
}
}
-31
View File
@@ -1,31 +0,0 @@
const auth = require('./utils/auth')
App({
globalData: {
appName: '指尖管理师',
shopName: 'Yumi Nail',
userInfo: null
},
onLaunch() {
this.bootstrapSession()
},
bootstrapSession() {
const session = auth.getSession()
this.globalData.userInfo = session.userInfo || null
if (session.shopName) {
this.globalData.shopName = session.shopName
}
},
setSession(session) {
auth.setSession(session)
this.bootstrapSession()
},
clearSession() {
auth.clearSession()
this.globalData.userInfo = null
}
})
-64
View File
@@ -1,64 +0,0 @@
{
"pages": [
"pages/login/index",
"pages/register/index",
"pages/planning/index",
"pages/appointment-form/index",
"pages/appointment-detail/index",
"pages/artist-transfer/index",
"pages/customers/index",
"pages/customer-detail/index",
"pages/employees/index",
"pages/employee-detail/index",
"pages/schedule-setting/index",
"pages/leave-management/index",
"pages/color-setting/index",
"pages/employee-orders/index",
"pages/profile/index",
"pages/shop-settings/index",
"pages/export/index",
"pages/password/index",
"pages/about/index"
],
"window": {
"navigationBarTitleText": "指尖管理师",
"navigationBarBackgroundColor": "#F8F5EF",
"navigationBarTextStyle": "black",
"backgroundColor": "#F8F5EF",
"backgroundTextStyle": "dark"
},
"tabBar": {
"color": "#8B8680",
"selectedColor": "#2F6F62",
"backgroundColor": "#FFFDF8",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/planning/index",
"text": "规划",
"iconPath": "assets/tabbar/planning.png",
"selectedIconPath": "assets/tabbar/planning-active.png"
},
{
"pagePath": "pages/customers/index",
"text": "客户",
"iconPath": "assets/tabbar/customers.png",
"selectedIconPath": "assets/tabbar/customers-active.png"
},
{
"pagePath": "pages/employees/index",
"text": "员工",
"iconPath": "assets/tabbar/employees.png",
"selectedIconPath": "assets/tabbar/employees-active.png"
},
{
"pagePath": "pages/profile/index",
"text": "我的",
"iconPath": "assets/tabbar/profile.png",
"selectedIconPath": "assets/tabbar/profile-active.png"
}
]
},
"style": "v2",
"sitemapLocation": "sitemap.json"
}
-257
View File
@@ -1,257 +0,0 @@
page {
min-height: 100%;
background: #f8f5ef;
color: #26231f;
font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 28rpx;
}
view,
text,
button,
input,
textarea,
picker,
scroll-view {
box-sizing: border-box;
}
button {
margin: 0;
padding: 0;
min-width: 0;
border-radius: 0;
background: transparent;
line-height: 1;
}
button::after {
border: 0;
}
.page {
min-height: 100vh;
padding: 22rpx 24rpx 140rpx;
background: #f8f5ef;
}
.page.no-tab {
padding-bottom: 196rpx;
}
.card {
border: 1rpx solid rgba(50, 43, 34, 0.06);
border-radius: 12px;
background: #fffdf8;
box-shadow: 0 10rpx 28rpx rgba(58, 48, 34, 0.06);
}
.section {
margin-top: 20rpx;
}
.section-title {
margin: 4rpx 4rpx 16rpx;
color: #4c4740;
font-size: 28rpx;
font-weight: 700;
}
.row {
display: flex;
align-items: center;
}
.between {
justify-content: space-between;
}
.muted {
color: #9d968e;
}
.tag {
display: inline-flex;
align-items: center;
min-height: 40rpx;
padding: 0 16rpx;
border-radius: 999rpx;
background: #f0ece5;
color: #6d675f;
font-size: 22rpx;
font-weight: 600;
}
.primary-btn,
.secondary-btn,
.text-btn,
.danger-btn {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
min-height: 76rpx;
border-radius: 12px;
font-size: 26rpx;
font-weight: 700;
}
.primary-btn,
.secondary-btn,
.danger-btn {
min-width: 100%;
max-width: 100%;
}
.primary-btn {
background: #6f8f83;
color: #fffdf8;
box-shadow: 0 12rpx 24rpx rgba(111, 143, 131, 0.22);
}
.secondary-btn {
border: 1rpx solid #d8d1c8;
background: #fffdf8;
color: #514b44;
}
.danger-btn {
background: #d98d8d;
color: #fff;
}
.text-btn {
width: auto;
min-width: 0;
max-width: none;
min-height: 56rpx;
color: #6f8f83;
font-size: 26rpx;
}
.compact-btn,
.small-action {
display: inline-flex;
align-items: center;
justify-content: center;
width: 112rpx;
min-width: 112rpx;
max-width: 112rpx;
height: 56rpx;
padding: 0 20rpx;
border-radius: 999rpx;
background: #e5eee9;
color: #55786d;
font-size: 24rpx;
font-weight: 800;
}
.small-action {
width: 112rpx;
min-width: 104rpx;
max-width: 112rpx;
height: 52rpx;
background: #f0ece5;
color: #5f5951;
}
.icon-btn {
display: flex;
align-items: center;
justify-content: center;
width: 64rpx;
min-width: 64rpx;
max-width: 64rpx;
height: 64rpx;
min-height: 64rpx;
padding: 0;
border-radius: 50%;
background: #fffdf8;
color: #4e4942;
box-shadow: 0 6rpx 14rpx rgba(58, 48, 34, 0.05);
}
.form-card {
padding: 8rpx 24rpx;
}
.field {
display: flex;
align-items: center;
min-height: 108rpx;
border-bottom: 1rpx solid #eee8df;
}
.field:last-child {
border-bottom: 0;
}
.field-label {
width: 180rpx;
color: #625c55;
font-size: 26rpx;
font-weight: 600;
}
.field input,
.field textarea,
.field-value {
flex: 1;
color: #27231f;
font-size: 28rpx;
}
.field textarea {
min-height: 140rpx;
padding: 34rpx 0;
}
.fixed-bottom {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 20;
padding: 14rpx 24rpx calc(14rpx + env(safe-area-inset-bottom));
background: rgba(248, 245, 239, 0.94);
backdrop-filter: blur(18rpx);
}
.fab {
position: fixed;
right: 28rpx;
bottom: calc(100rpx + env(safe-area-inset-bottom));
z-index: 18;
display: flex;
align-items: center;
justify-content: center;
width: 84rpx;
min-width: 84rpx;
max-width: 84rpx;
height: 84rpx;
min-height: 84rpx;
padding: 0;
border-radius: 50%;
background: #6f8f83;
color: #fff;
font-size: 46rpx;
font-weight: 300;
line-height: 84rpx;
box-shadow: 0 12rpx 26rpx rgba(111, 143, 131, 0.24);
}
.list {
display: flex;
flex-direction: column;
gap: 18rpx;
}
.list-card {
padding: 24rpx;
}
.empty {
padding: 56rpx 24rpx;
color: #a39b91;
text-align: center;
}
@@ -1 +0,0 @@
Page({})
@@ -1,11 +0,0 @@
<view class="page no-tab about-page">
<view class="brand-card card">
<view class="logo">指</view>
<text class="name">指尖管理师</text>
<text class="desc">专为美甲店店长设计的预约排班日历子系统</text>
</view>
<view class="card about-list">
<view class="row between"><text>版本</text><text class="muted">1.0.0</text></view>
<view class="row between"><text>定位</text><text class="muted">规划 / 客户 / 员工 / 我的</text></view>
</view>
</view>
@@ -1,40 +0,0 @@
.about-page {
padding-top: 80rpx;
}
.brand-card {
display: flex;
flex-direction: column;
align-items: center;
padding: 52rpx 28rpx;
}
.logo {
display: flex;
align-items: center;
justify-content: center;
width: 112rpx;
height: 112rpx;
border-radius: 30rpx;
background: #6f8f83;
color: #fff;
font-size: 52rpx;
font-weight: 900;
}
.name {
margin-top: 22rpx;
font-size: 38rpx;
font-weight: 900;
}
.desc {
margin-top: 12rpx;
color: #90887e;
font-size: 24rpx;
}
.about-list {
margin-top: 20rpx;
padding: 24rpx;
}
@@ -1,64 +0,0 @@
const planningApi = require('../../api/planning')
const mock = require('../../utils/mock')
Page({
data: {
id: '',
appointment: {},
avatarText: '',
timeText: ''
},
onLoad(options) {
this.setData({ id: options.id || '' })
this.loadDetail()
},
async loadDetail() {
try {
const appointment = await planningApi.appointment(this.data.id)
this.applyAppointment(appointment)
} catch (error) {
const demo = mock.buildCalendar(new Date()).appointments[0]
this.applyAppointment(demo)
}
},
applyAppointment(appointment) {
this.setData({
appointment,
avatarText: String(appointment.customerName || '客').slice(0, 1),
timeText: `${(appointment.startTime || '').slice(0, 16)} - ${(appointment.endTime || '').slice(11, 16)}`
})
},
async updateStatus(status) {
try {
await planningApi.updateStatus(this.data.appointment.orderId, status)
wx.showToast({ title: '已更新' })
this.loadDetail()
} catch (error) {
wx.showToast({ title: error.message || '操作失败', icon: 'none' })
}
},
confirm() {
this.updateStatus(1)
},
complete() {
this.updateStatus(2)
},
cancel() {
this.updateStatus(3)
},
goTransfer() {
wx.navigateTo({ url: `/pages/artist-transfer/index?id=${this.data.id}` })
},
back() {
wx.navigateBack()
}
})
@@ -1,46 +0,0 @@
<view class="page no-tab">
<view class="card detail-card">
<view class="detail-head">
<view class="detail-person">
<view class="avatar">{{avatarText}}</view>
<view>
<text class="customer">{{appointment.customerName}}</text>
<text class="phone">{{appointment.customerPhone}}</text>
</view>
</view>
<view class="detail-actions">
<text class="tag">{{appointment.statusText}}</text>
<button class="small-action" bindtap="goTransfer">改派</button>
</view>
</view>
<view class="detail-grid">
<view>
<text class="label">项目</text>
<text class="value">{{appointment.productTitle}}</text>
</view>
<view>
<text class="label">美甲师</text>
<text class="value">{{appointment.artistName}}</text>
</view>
<view>
<text class="label">时间</text>
<text class="value">{{timeText}}</text>
</view>
<view>
<text class="label">时长</text>
<text class="value">{{appointment.durationMinutes}}分钟</text>
</view>
</view>
</view>
<view class="section">
<view class="section-title">备注</view>
<view class="card note-card">{{appointment.remark || '暂无备注'}}</view>
</view>
<view class="fixed-bottom action-row">
<button class="secondary-btn" bindtap="confirm">确认</button>
<button class="primary-btn" bindtap="complete">完成</button>
<button class="danger-btn" bindtap="cancel">取消</button>
</view>
</view>
@@ -1,99 +0,0 @@
.detail-card {
padding: 24rpx;
}
.detail-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18rpx;
}
.detail-person {
display: flex;
align-items: center;
min-width: 0;
gap: 18rpx;
}
.avatar {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 82rpx;
height: 82rpx;
border-radius: 50%;
background: #e5eee9;
color: #5d8175;
font-size: 32rpx;
font-weight: 900;
}
.customer,
.phone {
display: block;
}
.customer {
color: #24211d;
font-size: 32rpx;
font-weight: 800;
}
.phone {
margin-top: 6rpx;
color: #928a81;
font-size: 24rpx;
}
.detail-actions {
display: flex;
flex-shrink: 0;
align-items: center;
gap: 10rpx;
}
.detail-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 22rpx;
margin-top: 28rpx;
}
.label,
.value {
display: block;
}
.label {
color: #9a9288;
font-size: 22rpx;
}
.value {
margin-top: 8rpx;
color: #2d2924;
font-size: 28rpx;
font-weight: 700;
}
.note-card {
padding: 24rpx;
color: #6d655d;
line-height: 1.6;
}
.action-row {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
gap: 14rpx;
}
.action-row .primary-btn,
.action-row .secondary-btn,
.action-row .danger-btn {
width: 100%;
min-width: 0;
max-width: 100%;
}
@@ -1,170 +0,0 @@
const planningApi = require('../../api/planning')
const productsApi = require('../../api/products')
const mock = require('../../utils/mock')
const dateUtil = require('../../utils/date')
Page({
data: {
form: {
customerName: '',
phone: '',
appointmentDate: dateUtil.formatDate(new Date()),
appointmentTime: '13:00',
productId: '',
durationMinutes: '',
artistId: '',
remark: ''
},
products: [],
artists: mock.artists,
selectedProduct: {},
selectedArtist: {},
conflictTip: '',
conflictLevel: 'free',
loading: false
},
onLoad(options) {
this.setData({
'form.appointmentDate': options.date || dateUtil.formatDate(new Date()),
'form.artistId': options.artistId || ''
})
this.loadOptions()
},
async loadOptions() {
const fallbackProducts = [
{ id: 1, title: '纯色美甲', approximateDuration: '90分钟' },
{ id: 2, title: '猫眼延长', approximateDuration: '120分钟' },
{ id: 3, title: '手部护理', approximateDuration: '60分钟' }
]
try {
const productsData = await productsApi.list({ page: 1, size: 100 })
const products = productsData.list || productsData || fallbackProducts
this.setData({ products })
} catch (error) {
this.setData({ products: fallbackProducts })
}
if (this.data.form.artistId) {
const selectedArtist = this.data.artists.find(item => String(item.id) === String(this.data.form.artistId)) || {}
this.setData({ selectedArtist })
}
this.checkAvailability()
},
onInput(event) {
this.setData({
[`form.${event.currentTarget.dataset.field}`]: event.detail.value
})
},
onDateChange(event) {
this.setData({ 'form.appointmentDate': event.detail.value })
this.checkAvailability()
},
onTimeChange(event) {
this.setData({ 'form.appointmentTime': event.detail.value })
this.checkAvailability()
},
onProductChange(event) {
const selectedProduct = this.data.products[Number(event.detail.value)] || {}
this.setData({
selectedProduct,
'form.productId': selectedProduct.id,
'form.durationMinutes': String(parseInt(selectedProduct.approximateDuration, 10) || this.data.form.durationMinutes || 60)
})
this.checkAvailability()
},
onArtistChange(event) {
const selectedArtist = this.data.artists[Number(event.detail.value)] || {}
this.setData({
selectedArtist,
'form.artistId': selectedArtist.id
})
this.checkAvailability()
},
async checkAvailability() {
const form = this.data.form
if (!form.appointmentDate || !form.appointmentTime || !form.artistId) {
this.setData({ conflictTip: '', conflictLevel: 'free' })
return { ok: true }
}
const durationMinutes = Number(form.durationMinutes || 0) || 60
const startMinute = dateUtil.minutesOfDay(form.appointmentTime)
const endMinute = startMinute + durationMinutes
if (startMinute < dateUtil.minutesOfDay('10:00') || endMinute > dateUtil.minutesOfDay('22:00')) {
const tip = '该时间超出营业时间 10:00-22:00'
this.setData({ conflictTip: tip, conflictLevel: 'danger' })
return { ok: false, tip }
}
try {
let calendar
try {
calendar = await planningApi.calendar({
startDate: form.appointmentDate,
endDate: form.appointmentDate,
artistId: form.artistId
})
} catch (error) {
calendar = mock.buildCalendar(form.appointmentDate)
}
const conflicts = (calendar.appointments || []).filter(item => {
if (String(item.artistId) !== String(form.artistId) || item.date !== form.appointmentDate) return false
if (item.status === 3 || item.statusText === '已取消') return false
const itemStart = Number(item.startMinute || dateUtil.minutesOfDay((item.startTime || '').slice(11, 16)))
const itemEnd = itemStart + Number(item.durationMinutes || 60)
return startMinute < itemEnd && endMinute > itemStart
})
if (conflicts.length > 0) {
const first = conflicts[0]
const itemStart = Number(first.startMinute || dateUtil.minutesOfDay((first.startTime || '').slice(11, 16)))
const itemEnd = itemStart + Number(first.durationMinutes || 60)
const tip = `${this.data.selectedArtist.name || '该美甲师'} ${dateUtil.timeFromMinutes(itemStart)}-${dateUtil.timeFromMinutes(itemEnd)} 已有预约`
this.setData({ conflictTip: tip, conflictLevel: 'danger' })
return { ok: false, tip }
}
const tip = `${this.data.selectedArtist.name || '该美甲师'} ${form.appointmentTime}-${dateUtil.timeFromMinutes(endMinute)} 可预约`
this.setData({ conflictTip: tip, conflictLevel: 'free' })
return { ok: true, tip }
} catch (error) {
const tip = '暂未获取到排班,请保存时以系统校验为准'
this.setData({ conflictTip: tip, conflictLevel: 'warn' })
return { ok: true, tip }
}
},
async submit() {
const form = this.data.form
if (!form.customerName || !form.phone || !form.productId || !form.artistId) {
wx.showToast({ title: '请补全预约信息', icon: 'none' })
return
}
const availability = await this.checkAvailability()
if (!availability.ok) {
wx.showToast({ title: availability.tip || '该时段已被预约', icon: 'none' })
return
}
this.setData({ loading: true })
try {
const result = await planningApi.createAppointment({
...form,
productId: Number(form.productId),
artistId: Number(form.artistId),
durationMinutes: Number(form.durationMinutes || 0) || undefined
})
wx.redirectTo({ url: `/pages/appointment-detail/index?id=${result.orderItemId}` })
} catch (error) {
wx.showToast({ title: error.message || '保存失败', icon: 'none' })
} finally {
this.setData({ loading: false })
}
},
back() {
wx.navigateBack()
}
})
@@ -1,3 +0,0 @@
{
"navigationBarTitleText": "新建预约"
}
@@ -1,59 +0,0 @@
<view class="page no-tab">
<view class="card form-card">
<view class="field">
<text class="field-label">客户姓名</text>
<input value="{{form.customerName}}" data-field="customerName" bindinput="onInput" placeholder="请输入客户姓名" />
</view>
<view class="field">
<text class="field-label">手机号</text>
<input value="{{form.phone}}" data-field="phone" bindinput="onInput" placeholder="请输入手机号" />
</view>
<view class="field">
<text class="field-label">预约日期</text>
<picker mode="date" value="{{form.appointmentDate}}" bindchange="onDateChange">
<view class="field-value">{{form.appointmentDate}}</view>
</picker>
</view>
<view class="field">
<text class="field-label">预约时间</text>
<picker mode="time" value="{{form.appointmentTime}}" start="10:00" end="22:00" bindchange="onTimeChange">
<view class="field-value">{{form.appointmentTime}}</view>
</picker>
</view>
<view class="field">
<text class="field-label">项目内容</text>
<picker range="{{products}}" range-key="title" bindchange="onProductChange">
<view class="field-value">{{selectedProduct.title || '请选择项目'}}</view>
</picker>
</view>
<view class="field">
<text class="field-label">预计时长</text>
<input value="{{form.durationMinutes}}" data-field="durationMinutes" bindinput="onInput" type="number" placeholder="默认读取项目时长" />
<text class="unit">分钟</text>
</view>
<view class="field">
<text class="field-label">指定员工</text>
<picker range="{{artists}}" range-key="name" bindchange="onArtistChange">
<view class="field-value">{{selectedArtist.name || '请选择美甲师'}}</view>
</picker>
</view>
<view class="field textarea-field">
<text class="field-label">备注</text>
<textarea value="{{form.remark}}" data-field="remark" bindinput="onInput" placeholder="客户偏好、款式说明" />
</view>
</view>
<view class="capacity-tip card">
<text class="tip-title">容量校验</text>
<text class="tip-text">保存时会校验营业时间、美甲师休息和同时间段容量,冲突会直接拦截。</text>
</view>
<view wx:if="{{conflictTip}}" class="availability-tip card {{conflictLevel}}">
<text class="tip-title">时段检查</text>
<text class="tip-text">{{conflictTip}}</text>
</view>
<view class="fixed-bottom">
<button class="primary-btn" loading="{{loading}}" bindtap="submit">保存预约</button>
</view>
</view>
@@ -1,60 +0,0 @@
.unit {
color: #9a9288;
font-size: 24rpx;
}
.textarea-field {
align-items: flex-start;
}
.capacity-tip {
display: flex;
flex-direction: column;
gap: 8rpx;
margin-top: 20rpx;
padding: 22rpx;
}
.tip-title {
color: #4e4942;
font-size: 26rpx;
font-weight: 800;
}
.tip-text {
color: #90877e;
font-size: 24rpx;
line-height: 1.5;
}
.availability-tip {
display: flex;
flex-direction: column;
gap: 8rpx;
margin-top: 16rpx;
padding: 22rpx;
}
.availability-tip.free {
background: #f3faf5;
}
.availability-tip.warn {
background: #fff8e8;
}
.availability-tip.danger {
background: #fff2f2;
}
.availability-tip.free .tip-title {
color: #4f7d62;
}
.availability-tip.warn .tip-title {
color: #a2763d;
}
.availability-tip.danger .tip-title {
color: #c36a6a;
}
@@ -1,62 +0,0 @@
const planningApi = require('../../api/planning')
const mock = require('../../utils/mock')
const dateUtil = require('../../utils/date')
Page({
data: {
id: '',
artists: [],
selectedArtistId: '',
date: dateUtil.formatDate(new Date()),
time: '13:00',
loading: false
},
onLoad(options) {
this.setData({
id: options.id || '',
artists: mock.artists.map((item, index) => ({
...item,
availableStatus: index === 1 ? 'busy' : index === 2 ? 'full' : 'free',
availableText: index === 1 ? '有冲突' : index === 2 ? '已满' : '可接'
}))
})
},
selectArtist(event) {
this.setData({ selectedArtistId: event.currentTarget.dataset.id })
},
onDateChange(event) {
this.setData({ date: event.detail.value })
},
onTimeChange(event) {
this.setData({ time: event.detail.value })
},
async submit() {
if (!this.data.selectedArtistId) {
wx.showToast({ title: '请选择美甲师', icon: 'none' })
return
}
this.setData({ loading: true })
try {
await planningApi.moveAppointment(this.data.id, {
artistId: Number(this.data.selectedArtistId),
appointmentDate: this.data.date,
appointmentTime: this.data.time
})
wx.showToast({ title: '已改派' })
setTimeout(() => wx.navigateBack(), 500)
} catch (error) {
wx.showToast({ title: error.message || '改派失败', icon: 'none' })
} finally {
this.setData({ loading: false })
}
},
back() {
wx.navigateBack()
}
})
@@ -1,3 +0,0 @@
{
"navigationBarTitleText": "改派员工"
}
@@ -1,35 +0,0 @@
<view class="page no-tab">
<view class="list">
<view wx:for="{{artists}}" wx:key="id" class="card transfer-card {{selectedArtistId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="selectArtist">
<view class="row between">
<view class="row">
<view class="chip-dot large" style="background: {{item.color}};"></view>
<view>
<text class="artist-name">{{item.name}}</text>
<text class="artist-status">{{item.statusText}}</text>
</view>
</view>
<text class="tag {{item.availableStatus}}">{{item.availableText}}</text>
</view>
</view>
</view>
<view class="card form-card section">
<view class="field">
<text class="field-label">新日期</text>
<picker mode="date" value="{{date}}" bindchange="onDateChange">
<view class="field-value">{{date}}</view>
</picker>
</view>
<view class="field">
<text class="field-label">新时间</text>
<picker mode="time" value="{{time}}" start="10:00" end="22:00" bindchange="onTimeChange">
<view class="field-value">{{time}}</view>
</picker>
</view>
</view>
<view class="fixed-bottom">
<button class="primary-btn" loading="{{loading}}" bindtap="submit">确认改派</button>
</view>
</view>
@@ -1,45 +0,0 @@
.transfer-card {
padding: 24rpx;
}
.transfer-card.active {
outline: 3rpx solid #8fb89a;
}
.chip-dot.large {
width: 24rpx;
height: 24rpx;
margin-right: 16rpx;
}
.artist-name,
.artist-status {
display: block;
}
.artist-name {
color: #25211d;
font-size: 30rpx;
font-weight: 800;
}
.artist-status {
margin-top: 6rpx;
color: #948c83;
font-size: 22rpx;
}
.tag.free {
background: #e5eee9;
color: #55786d;
}
.tag.busy {
background: #fbedd7;
color: #a5722a;
}
.tag.full {
background: #f8e2e6;
color: #b06070;
}
@@ -1,25 +0,0 @@
Page({
data: {
id: '',
avatarText: '客',
customer: { name: '王女士', phone: '138****1201' },
stats: { orderCount: 12, amount: 2860, lastTime: '06-01' },
orders: [
{ id: 1, date: '2026-06-01', project: '纯色美甲', amount: 168, artist: '小王' },
{ id: 2, date: '2026-05-18', project: '猫眼延长', amount: 268, artist: '小李' },
{ id: 3, date: '2026-05-02', project: '手部护理', amount: 98, artist: '小张' }
]
},
onLoad(options) {
this.setData({ id: options.id || '' })
},
createAppointment() {
wx.navigateTo({ url: '/pages/appointment-form/index' })
},
back() {
wx.navigateBack()
}
})
@@ -1,40 +0,0 @@
<view class="page no-tab">
<view class="card customer-head">
<view class="customer-identity">
<view class="avatar">{{avatarText}}</view>
<view>
<text class="customer-name">{{customer.name}}</text>
<text class="customer-phone">{{customer.phone}}</text>
</view>
</view>
<button class="small-action" bindtap="createAppointment">新预约</button>
</view>
<view class="stats">
<view class="card stat">
<text class="stat-value">{{stats.orderCount}}</text>
<text class="stat-label">累计订单</text>
</view>
<view class="card stat">
<text class="stat-value">¥{{stats.amount}}</text>
<text class="stat-label">累计消费</text>
</view>
<view class="card stat">
<text class="stat-value">{{stats.lastTime}}</text>
<text class="stat-label">最近消费</text>
</view>
</view>
<view class="section">
<view class="section-title">历史订单</view>
<view class="list">
<view wx:for="{{orders}}" wx:key="id" class="card list-card order-card">
<view>
<text class="order-title">{{item.project}}</text>
<text class="meta">{{item.date}} · {{item.artist}}</text>
</view>
<text class="amount">¥{{item.amount}}</text>
</view>
</view>
</view>
</view>
@@ -1,89 +0,0 @@
.customer-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 18rpx;
padding: 24rpx;
}
.customer-identity {
display: flex;
align-items: center;
min-width: 0;
gap: 18rpx;
}
.avatar {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
width: 84rpx;
height: 84rpx;
border-radius: 50%;
background: #e5eee9;
color: #5b7f73;
font-size: 32rpx;
font-weight: 900;
}
.customer-name,
.customer-phone {
display: block;
}
.customer-name {
font-size: 32rpx;
font-weight: 800;
}
.customer-phone {
margin-top: 8rpx;
color: #928a81;
font-size: 24rpx;
}
.stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 14rpx;
margin-top: 18rpx;
}
.stat {
padding: 16rpx 12rpx;
}
.stat-value,
.stat-label {
display: block;
}
.stat-value {
color: #26231f;
font-size: 28rpx;
font-weight: 800;
}
.stat-label {
margin-top: 8rpx;
color: #91897f;
font-size: 20rpx;
}
.order-card {
display: flex;
align-items: center;
justify-content: space-between;
}
.order-title {
display: block;
font-size: 28rpx;
font-weight: 800;
}
.amount {
color: #6f8f83;
font-weight: 900;
}
@@ -1,44 +0,0 @@
const customersApi = require('../../api/customers')
Page({
data: {
keyword: '',
customers: []
},
onLoad() {
this.loadCustomers()
},
onSearchInput(event) {
this.setData({ keyword: event.detail.value })
clearTimeout(this._timer)
this._timer = setTimeout(() => this.loadCustomers(), 300)
},
async loadCustomers() {
const fallback = [
{ id: 1, name: '王女士', phone: '138****1201', lastTime: '2026-06-01' },
{ id: 2, name: '陈女士', phone: '136****8842', lastTime: '2026-05-29' },
{ id: 3, name: '林女士', phone: '159****6671', lastTime: '2026-05-27' }
]
try {
const data = await customersApi.list({ keyword: this.data.keyword, page: 1, size: 30 })
const list = data.list || data || []
this.setData({
customers: list.map(item => ({
id: item.id,
name: item.nickname || item.name || item.account || '客户',
phone: item.contactPhone || item.phone || '未填写',
lastTime: item.lastOrderTime || item.lastConsumeTime || '-'
}))
})
} catch (error) {
this.setData({ customers: fallback })
}
},
openDetail(event) {
wx.navigateTo({ url: `/pages/customer-detail/index?id=${event.currentTarget.dataset.id}` })
}
})
@@ -1,16 +0,0 @@
<view class="page">
<view class="search-card card">
<input value="{{keyword}}" bindinput="onSearchInput" placeholder="搜索客户姓名或手机号" />
</view>
<view class="list section">
<view wx:for="{{customers}}" wx:key="id" class="card list-card customer-card" data-id="{{item.id}}" bindtap="openDetail">
<view>
<text class="name">{{item.name}}</text>
<text class="meta">{{item.phone}}</text>
<text class="meta">最近消费 {{item.lastTime}}</text>
</view>
<text class="arrow">›</text>
</view>
</view>
</view>
@@ -1,39 +0,0 @@
.search-card {
padding: 0 24rpx;
height: 84rpx;
display: flex;
align-items: center;
}
.search-card input {
width: 100%;
font-size: 26rpx;
}
.customer-card {
display: flex;
align-items: center;
justify-content: space-between;
}
.name,
.meta {
display: block;
}
.name {
color: #292520;
font-size: 30rpx;
font-weight: 800;
}
.meta {
margin-top: 8rpx;
color: #928a81;
font-size: 24rpx;
}
.arrow {
color: #b0a79e;
font-size: 48rpx;
}
@@ -1,30 +0,0 @@
const mock = require('../../utils/mock')
Page({
data: {
id: '',
employee: {}
},
onLoad(options) {
const id = options.id || mock.artists[0].id
const artist = mock.artists.find(item => String(item.id) === String(id)) || mock.artists[0]
this.setData({
id,
employee: {
...artist,
monthOrders: 32,
monthAmount: 5800,
avgAmount: 181
}
})
},
go(event) {
wx.navigateTo({ url: `${event.currentTarget.dataset.url}?id=${this.data.id}` })
},
back() {
wx.navigateBack()
}
})
@@ -1,33 +0,0 @@
<view class="page no-tab">
<view class="card employee-head">
<view class="avatar" style="background: {{employee.color}};">{{employee.shortName}}</view>
<view>
<text class="employee-name">{{employee.name}}</text>
<text class="tag" style="background: {{employee.color}}; color: #fff;">员工色</text>
</view>
</view>
<view class="stats">
<view class="card stat">
<text class="stat-value">{{employee.monthOrders}}</text>
<text class="stat-label">本月订单</text>
</view>
<view class="card stat">
<text class="stat-value">¥{{employee.monthAmount}}</text>
<text class="stat-label">本月营业额</text>
</view>
<view class="card stat">
<text class="stat-value">¥{{employee.avgAmount}}</text>
<text class="stat-label">平均客单价</text>
</view>
</view>
<view class="section">
<view class="menu-grid">
<view class="card menu-card" data-url="/pages/schedule-setting/index" bindtap="go">排班设置</view>
<view class="card menu-card" data-url="/pages/leave-management/index" bindtap="go">请假管理</view>
<view class="card menu-card" data-url="/pages/color-setting/index" bindtap="go">颜色设置</view>
<view class="card menu-card" data-url="/pages/employee-orders/index" bindtap="go">订单记录</view>
</view>
</view>
</view>
@@ -1,68 +0,0 @@
.employee-head {
display: flex;
align-items: center;
gap: 20rpx;
padding: 28rpx;
}
.avatar {
display: flex;
align-items: center;
justify-content: center;
width: 94rpx;
height: 94rpx;
border-radius: 50%;
color: #fff;
font-size: 34rpx;
font-weight: 900;
}
.employee-name {
display: block;
margin-bottom: 12rpx;
font-size: 34rpx;
font-weight: 800;
}
.stats {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 14rpx;
margin-top: 18rpx;
}
.stat {
padding: 18rpx 12rpx;
}
.stat-value,
.stat-label {
display: block;
}
.stat-value {
font-size: 28rpx;
font-weight: 900;
}
.stat-label {
margin-top: 8rpx;
color: #91897f;
font-size: 20rpx;
}
.menu-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 16rpx;
}
.menu-card {
display: flex;
align-items: center;
min-height: 148rpx;
padding: 24rpx;
color: #302c27;
font-size: 30rpx;
font-weight: 800;
}
@@ -1,44 +0,0 @@
const employeesApi = require('../../api/employees')
const mock = require('../../utils/mock')
Page({
data: {
employees: []
},
onLoad() {
this.loadEmployees()
},
async loadEmployees() {
const fallback = mock.artists.map((item, index) => ({
...item,
monthOrders: 32 - index * 5,
monthAmount: 5800 - index * 760
}))
try {
const data = await employeesApi.list({ page: 1, size: 50 })
const list = data.list || data || []
this.setData({
employees: list.map((item, index) => ({
id: item.userId || item.id,
name: item.nickname || item.name || item.artistName || `美甲师${index + 1}`,
shortName: (item.nickname || item.name || '师').slice(-1),
color: mock.artists[index % mock.artists.length].color,
monthOrders: item.monthOrders || item.orderCount || 0,
monthAmount: item.monthAmount || item.turnover || 0
}))
})
} catch (error) {
this.setData({ employees: fallback })
}
},
openDetail(event) {
wx.navigateTo({ url: `/pages/employee-detail/index?id=${event.currentTarget.dataset.id}` })
},
addEmployee() {
wx.showToast({ title: '员工创建沿用后台账号', icon: 'none' })
}
})
@@ -1,19 +0,0 @@
<view class="page">
<view class="list-heading">
<text>美甲师</text>
<button class="compact-btn" bindtap="addEmployee">新增</button>
</view>
<view class="list">
<view wx:for="{{employees}}" wx:key="id" class="card employee-card" data-id="{{item.id}}" bindtap="openDetail">
<view class="employee-left">
<view class="avatar" style="background: {{item.color}};">{{item.shortName}}</view>
<view>
<text class="employee-name">{{item.name}}</text>
<text class="employee-meta">本月 {{item.monthOrders}} 单 · ¥{{item.monthAmount}}</text>
</view>
</view>
<view class="color-pill" style="background: {{item.color}};"></view>
</view>
</view>
</view>
@@ -1,66 +0,0 @@
.list-heading {
display: flex;
align-items: center;
justify-content: flex-start;
width: 100%;
margin-bottom: 16rpx;
color: #4c4740;
font-size: 28rpx;
font-weight: 800;
}
.list-heading text {
flex: 1;
}
.list-heading .compact-btn {
margin-left: auto;
}
.employee-card {
display: flex;
align-items: center;
justify-content: space-between;
padding: 22rpx;
}
.employee-left {
display: flex;
align-items: center;
gap: 18rpx;
}
.avatar {
display: flex;
align-items: center;
justify-content: center;
width: 78rpx;
height: 78rpx;
border-radius: 50%;
color: #fff;
font-size: 28rpx;
font-weight: 900;
}
.employee-name,
.employee-meta {
display: block;
}
.employee-name {
color: #25211d;
font-size: 28rpx;
font-weight: 800;
}
.employee-meta {
margin-top: 8rpx;
color: #91897f;
font-size: 24rpx;
}
.color-pill {
width: 44rpx;
height: 18rpx;
border-radius: 999rpx;
}
@@ -1,15 +0,0 @@
const dateUtil = require('../../utils/date')
Page({
data: {
types: ['订单数据', '客户数据', '员工数据'],
type: '订单数据',
startDate: dateUtil.formatDate(dateUtil.startOfMonth(new Date())),
endDate: dateUtil.formatDate(new Date())
},
onTypeChange(event) { this.setData({ type: this.data.types[Number(event.detail.value)] }) },
onStartDate(event) { this.setData({ startDate: event.detail.value }) },
onEndDate(event) { this.setData({ endDate: event.detail.value }) },
exportExcel() { wx.showToast({ title: '导出任务已创建', icon: 'none' }) },
back() { wx.navigateBack() }
})
@@ -1,8 +0,0 @@
<view class="page no-tab">
<view class="card form-card">
<view class="field"><text class="field-label">导出类型</text><picker range="{{types}}" bindchange="onTypeChange"><view class="field-value">{{type}}</view></picker></view>
<view class="field"><text class="field-label">开始日期</text><picker mode="date" value="{{startDate}}" bindchange="onStartDate"><view class="field-value">{{startDate}}</view></picker></view>
<view class="field"><text class="field-label">结束日期</text><picker mode="date" value="{{endDate}}" bindchange="onEndDate"><view class="field-value">{{endDate}}</view></picker></view>
</view>
<view class="fixed-bottom"><button class="primary-btn" bindtap="exportExcel">导出 Excel</button></view>
</view>
@@ -1,52 +0,0 @@
const authApi = require('../../api/auth')
Page({
data: {
form: {
account: '',
password: ''
},
loading: false
},
onInput(event) {
const field = event.currentTarget.dataset.field
this.setData({
[`form.${field}`]: event.detail.value
})
},
async submit() {
if (!this.data.form.account || !this.data.form.password) {
wx.showToast({ title: '请填写手机号和密码', icon: 'none' })
return
}
this.setData({ loading: true })
try {
const data = await authApi.login({
account: this.data.form.account,
password: this.data.form.password
})
const app = getApp()
app.setSession({
...data,
accessToken: data.accessToken || data.token,
userInfo: data.userInfo || data.user || {},
shopName: data.shopName || (data.shop && data.shop.shopName)
})
wx.reLaunch({ url: '/pages/planning/index' })
} catch (error) {
wx.showToast({ title: error.message || '登录失败', icon: 'none' })
} finally {
this.setData({ loading: false })
}
},
goRegister() {
wx.navigateTo({ url: '/pages/register/index' })
},
wechatLogin() {
wx.showToast({ title: '请先使用账号登录', icon: 'none' })
}
})
@@ -1,3 +0,0 @@
{
"navigationBarTitleText": "登录"
}
@@ -1,25 +0,0 @@
<view class="page no-tab auth-page">
<view class="brand">
<view class="logo">指</view>
<text class="brand-name">指尖管理师</text>
<text class="brand-sub">美甲店预约排班管理</text>
</view>
<view class="card auth-card">
<view class="field">
<text class="field-label">手机号</text>
<input value="{{form.account}}" data-field="account" bindinput="onInput" placeholder="请输入手机号或账号" />
</view>
<view class="field">
<text class="field-label">密码</text>
<input value="{{form.password}}" data-field="password" bindinput="onInput" password placeholder="请输入密码" />
</view>
<button class="primary-btn login-btn" loading="{{loading}}" bindtap="submit">登录</button>
<view class="auth-links">
<button class="text-btn">忘记密码</button>
<button class="text-btn" bindtap="goRegister">注册账号</button>
</view>
</view>
<button class="secondary-btn wechat-btn" bindtap="wechatLogin">微信快捷登录</button>
</view>
@@ -1,58 +0,0 @@
.auth-page {
display: flex;
flex-direction: column;
justify-content: center;
padding-top: 84rpx;
}
.brand {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 54rpx;
}
.logo {
display: flex;
align-items: center;
justify-content: center;
width: 112rpx;
height: 112rpx;
border-radius: 30rpx;
background: #6f8f83;
color: #fffdf8;
font-size: 52rpx;
font-weight: 900;
box-shadow: 0 16rpx 34rpx rgba(111, 143, 131, 0.24);
}
.brand-name {
margin-top: 24rpx;
color: #24211d;
font-size: 42rpx;
font-weight: 800;
}
.brand-sub {
margin-top: 8rpx;
color: #938c83;
font-size: 24rpx;
}
.auth-card {
padding: 12rpx 24rpx 26rpx;
}
.login-btn {
margin-top: 28rpx;
}
.auth-links {
display: flex;
justify-content: space-between;
margin-top: 18rpx;
}
.wechat-btn {
margin-top: 34rpx;
}
@@ -1 +0,0 @@
@@ -1,340 +0,0 @@
const planningApi = require('../../api/planning')
const dateUtil = require('../../utils/date')
const mock = require('../../utils/mock')
Page({
data: {
viewMode: 'month',
viewModes: [
{ value: 'day', label: '日' },
{ value: 'week', label: '周' },
{ value: 'month', label: '月' }
],
monthDisplayMode: 'count',
monthDisplayModes: [
{ value: 'count', label: '单量' },
{ value: 'blocks', label: '点阵' },
{ value: 'rows', label: '横条' }
],
monthRowLabelVisible: false,
weekLabels: ['一', '二', '三', '四', '五', '六', '日'],
currentDate: new Date(),
currentDateText: dateUtil.formatDate(new Date()),
selectedArtistId: '',
selectedArtistName: '全部员工',
dateTitle: '',
rangeText: '',
weekRange: '',
businessStartTime: '10:00',
businessEndTime: '22:00',
artists: [],
appointments: [],
daySummaries: [],
monthDays: [],
weekDays: [],
dayLanes: [],
hours: [],
timelineHeight: 720,
laneWidth: 720,
laneItemWidth: 240,
dayTotal: 0,
freeArtistCount: 0,
pendingCount: 0,
loading: false
},
onLoad() {
this.loadCalendar()
},
onShow() {
if (this._needRefresh) {
this._needRefresh = false
this.loadCalendar()
}
},
switchView(event) {
this.setData({ viewMode: event.currentTarget.dataset.mode })
this.prepareView()
this.loadCalendar()
},
switchMonthDisplay(event) {
this.setData({ monthDisplayMode: event.currentTarget.dataset.mode })
},
toggleMonthRowLabel() {
this.setData({ monthRowLabelVisible: !this.data.monthRowLabelVisible })
},
selectArtist(event) {
const id = event.currentTarget.dataset.id || ''
const artist = this.data.artists.find(item => String(item.id) === String(id))
this.setData({
selectedArtistId: id,
selectedArtistName: artist ? artist.name : '全部员工'
})
this.prepareView()
},
selectDate(event) {
const currentDate = dateUtil.formatDate(event.currentTarget.dataset.date)
this.setData({
currentDate,
currentDateText: currentDate,
viewMode: this.data.viewMode === 'month' ? 'day' : this.data.viewMode
})
this.prepareView()
},
prevRange() {
this.shiftRange(-1)
},
nextRange() {
this.shiftRange(1)
},
goToday() {
const today = new Date()
this.setData({
currentDate: today,
currentDateText: dateUtil.formatDate(today)
})
this.loadCalendar()
},
shiftRange(direction) {
let next
if (this.data.viewMode === 'month') {
next = dateUtil.addMonths(this.data.currentDateText, direction)
} else if (this.data.viewMode === 'week') {
next = dateUtil.addDays(this.data.currentDateText, direction * 7)
} else {
next = dateUtil.addDays(this.data.currentDateText, direction)
}
this.setData({
currentDate: next,
currentDateText: dateUtil.formatDate(next)
})
this.loadCalendar()
},
async loadCalendar() {
const range = this.resolveRange()
this.setData({ loading: true })
try {
const data = await planningApi.calendar({
startDate: range.start,
endDate: range.end,
artistId: this.data.selectedArtistId || undefined
})
this.applyCalendar(data)
} catch (error) {
this.applyCalendar(mock.buildCalendar(this.data.currentDateText))
} finally {
this.setData({ loading: false })
}
},
resolveRange() {
const current = this.data.currentDateText
if (this.data.viewMode === 'week') {
return {
start: dateUtil.formatDate(dateUtil.startOfWeek(current)),
end: dateUtil.formatDate(dateUtil.endOfWeek(current))
}
}
if (this.data.viewMode === 'month') {
return {
start: dateUtil.formatDate(dateUtil.startOfMonth(current)),
end: dateUtil.formatDate(dateUtil.endOfMonth(current))
}
}
return { start: current, end: current }
},
applyCalendar(calendar) {
const artists = calendar.artists || []
this.setData({
businessStartTime: (calendar.businessStartTime || '10:00').slice(0, 5),
businessEndTime: (calendar.businessEndTime || '22:00').slice(0, 5),
artists,
appointments: calendar.appointments || [],
daySummaries: calendar.daySummaries || []
})
this.prepareView()
},
prepareView() {
const current = this.data.currentDateText
const range = this.resolveRange()
const title = this.data.viewMode === 'month'
? dateUtil.formatMonth(current)
: this.data.viewMode === 'week'
? `${range.start.replace(/-/g, '/')} - ${range.end.replace(/-/g, '/')}`
: dateUtil.formatCnDate(current)
this.setData({
dateTitle: title,
rangeText: this.data.viewMode === 'month' ? '月视图' : this.data.viewMode === 'week' ? '周视图' : '日视图',
weekRange: `${range.start.replace(/-/g, '/')} - ${range.end.replace(/-/g, '/')}`,
monthDays: this.buildMonthDays(),
weekDays: this.buildWeekDays(),
...this.buildDayView()
})
},
buildMonthDays() {
const summaryMap = this.summaryMap()
const artistTemplate = this.data.artists.map(artist => ({
artistId: artist.id,
artistName: artist.name,
shortName: artist.shortName,
color: artist.color,
count: 0,
status: 'free'
}))
return dateUtil.monthGrid(this.data.currentDateText).map(day => {
const summary = summaryMap[day.date] || {}
const artistCounts = this.normalizeArtistCounts(summary.artistCounts || artistTemplate)
return {
...day,
totalCount: summary.totalCount || 0,
dayStatus: summary.dayStatus || 'free',
artistCounts,
expandedBlocks: this.buildExpandedBlocks(artistCounts),
rowBlocks: this.buildRowBlocks(artistCounts)
}
})
},
buildWeekDays() {
const start = dateUtil.startOfWeek(this.data.currentDateText)
const summaryMap = this.summaryMap()
return this.data.weekLabels.map((label, index) => {
const target = dateUtil.addDays(start, index)
const date = dateUtil.formatDate(target)
const summary = summaryMap[date] || { artistCounts: [], totalCount: 0 }
const artistCounts = this.normalizeArtistCounts(summary.artistCounts || [])
return {
date,
weekName: `周${label}`,
day: target.getDate(),
totalCount: summary.totalCount || 0,
artistCounts: artistCounts.map(count => ({
...count,
width: Math.max(12, Math.min(100, count.count * 22)),
barWidth: Math.max(14, Math.min(100, count.count * 18))
}))
}
})
},
buildDayView() {
const startMinute = dateUtil.minutesOfDay(this.data.businessStartTime)
const endMinute = dateUtil.minutesOfDay(this.data.businessEndTime)
const timelineHeight = Math.max(560, endMinute - startMinute)
const hours = []
for (let cursor = startMinute; cursor <= endMinute; cursor += 60) {
hours.push({
value: cursor,
label: dateUtil.timeFromMinutes(cursor),
top: cursor - startMinute
})
}
const filteredArtists = this.data.selectedArtistId
? this.data.artists.filter(item => String(item.id) === String(this.data.selectedArtistId))
: this.data.artists
const dayAppointments = this.data.appointments.filter(item => item.date === this.data.currentDateText)
const lanes = filteredArtists.map(artist => {
const blocks = dayAppointments
.filter(item => String(item.artistId) === String(artist.id))
.map(item => {
const itemStart = item.startMinute || dateUtil.minutesOfDay((item.startTime || '').slice(11, 16))
return {
...item,
top: Math.max(0, itemStart - startMinute),
height: Math.max(64, item.durationMinutes || 60),
timeText: `${(item.startTime || '').slice(11, 16)}-${(item.endTime || '').slice(11, 16)}`
}
})
return { ...artist, blocks }
})
const pendingCount = dayAppointments.filter(item => item.status === 0).length
return {
dayLanes: lanes,
hours,
timelineHeight,
laneItemWidth: 248,
laneWidth: Math.max(720, lanes.length * 248),
dayTotal: dayAppointments.length,
freeArtistCount: lanes.filter(item => item.blocks.length === 0).length,
pendingCount
}
},
summaryMap() {
return (this.data.daySummaries || []).reduce((map, item) => {
map[item.date] = item
return map
}, {})
},
normalizeArtistCounts(counts) {
const colorMap = this.data.artists.reduce((map, artist) => {
map[artist.id] = artist
return map
}, {})
return (counts || []).map(count => {
const artist = colorMap[count.artistId] || {}
return {
...count,
color: count.color || artist.color || '#B8B0A6',
shortName: count.shortName || artist.shortName || '?',
count: Number(count.count || 0)
}
})
},
buildExpandedBlocks(artistCounts) {
return (artistCounts || []).reduce((blocks, count) => {
for (let index = 0; index < Number(count.count || 0); index += 1) {
blocks.push({
key: `${count.artistId || count.shortName}-${index}`,
artistId: count.artistId,
color: count.color,
shortName: count.shortName
})
}
return blocks
}, [])
},
buildRowBlocks(artistCounts) {
return (artistCounts || []).reduce((rows, count) => {
for (let index = 0; index < Number(count.count || 0); index += 1) {
rows.push({
key: `${count.artistId || count.shortName}-row-${index}`,
artistId: count.artistId,
color: count.color,
shortName: count.shortName,
artistName: count.artistName || count.shortName
})
}
return rows
}, [])
},
createAppointment() {
wx.navigateTo({
url: `/pages/appointment-form/index?date=${this.data.currentDateText}&artistId=${this.data.selectedArtistId || ''}`
})
},
openAppointment(event) {
wx.navigateTo({
url: `/pages/appointment-detail/index?id=${event.currentTarget.dataset.id}`
})
}
})
@@ -1,143 +0,0 @@
<view class="page planning-page">
<view class="card control-card">
<view class="date-row">
<view class="date-side">
<button class="icon-btn small" bindtap="prevRange">‹</button>
</view>
<view class="date-center">
<text class="date-main">{{dateTitle}}</text>
<text class="date-sub">{{businessStartTime}}-{{businessEndTime}}</text>
</view>
<view class="date-side date-tools">
<button class="today-btn" bindtap="goToday">今</button>
<button class="icon-btn small" bindtap="nextRange">›</button>
</view>
</view>
<view class="segmented">
<view wx:for="{{viewModes}}" wx:key="value" class="segment {{viewMode === item.value ? 'active' : ''}}" data-mode="{{item.value}}" bindtap="switchView">{{item.label}}</view>
</view>
<scroll-view class="artist-filter" scroll-x enable-flex>
<view class="artist-chip {{!selectedArtistId ? 'active' : ''}}" data-id="" bindtap="selectArtist">全部员工</view>
<view wx:for="{{artists}}" wx:key="id" class="artist-chip {{selectedArtistId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="selectArtist">
<view class="chip-dot" style="background: {{item.color}};"></view>
<text>{{item.name}}</text>
<text class="chip-count">{{item.rangeCount || 0}}</text>
</view>
</scroll-view>
</view>
<view wx:if="{{viewMode === 'day'}}" class="section">
<view class="day-summary">
<view class="summary-item card">
<text class="summary-value">{{dayTotal}}</text>
<text class="summary-label">今日预约</text>
</view>
<view class="summary-item card">
<text class="summary-value">{{freeArtistCount}}</text>
<text class="summary-label">可插单员工</text>
</view>
<view class="summary-item card">
<text class="summary-value">{{pendingCount}}</text>
<text class="summary-label">待确认</text>
</view>
</view>
<scroll-view class="day-board card" scroll-y>
<view class="timeline-wrap" style="height: {{timelineHeight}}rpx;">
<view class="time-axis">
<view wx:for="{{hours}}" wx:key="value" class="time-label" style="top: {{item.top}}rpx;">{{item.label}}</view>
</view>
<scroll-view class="lane-scroll" scroll-x enable-flex>
<view class="lanes" style="height: {{timelineHeight}}rpx; width: {{laneWidth}}rpx;">
<view wx:for="{{dayLanes}}" wx:key="artistId" class="artist-lane" style="height: {{timelineHeight}}rpx; width: {{laneItemWidth}}rpx;">
<view class="lane-head">
<view class="chip-dot" style="background: {{item.color}};"></view>
<text>{{item.name}}</text>
</view>
<view wx:for="{{item.blocks}}" wx:for-item="block" wx:key="orderItemId" class="appointment-block {{block.status === 0 ? 'pending' : ''}}" style="top: {{block.top}}rpx; height: {{block.height}}rpx; border-left-color: {{item.color}};" data-id="{{block.orderItemId}}" bindtap="openAppointment">
<text class="block-title">{{block.customerName}}</text>
<text class="block-meta">{{block.timeText}} · {{block.productTitle}}</text>
<text class="block-status">{{block.statusText}}</text>
</view>
<view wx:if="{{item.blocks.length === 0}}" class="lane-empty">全天可约</view>
</view>
</view>
</scroll-view>
</view>
</scroll-view>
</view>
<view wx:if="{{viewMode === 'week'}}" class="section">
<scroll-view class="week-strip" scroll-x enable-flex>
<view wx:for="{{weekDays}}" wx:key="date" class="week-day-card card {{item.date === currentDateText ? 'active' : ''}}" data-date="{{item.date}}" bindtap="selectDate">
<text class="week-name">{{item.weekName}}</text>
<text class="week-date">{{item.day}}</text>
<text class="week-total">{{item.totalCount}}单</text>
<view class="week-bars">
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" class="week-bar" style="background: {{count.color}}; width: {{count.width}}%;"></view>
</view>
</view>
</scroll-view>
<view class="card week-grid">
<view class="week-grid-head">
<text>本周排班密度</text>
<text class="muted">{{weekRange}}</text>
</view>
<view wx:for="{{weekDays}}" wx:key="date" class="week-line">
<view class="week-line-date">{{item.weekName}} {{item.day}}</view>
<view class="week-line-bars">
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" class="week-count-bar" style="background: {{count.color}}; width: {{count.barWidth}}%;">
<text>{{count.shortName}}{{count.count}}</text>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{viewMode === 'month'}}" class="section">
<view class="month-toolbar">
<text class="month-toolbar-title">月历显示</text>
<view class="month-mode-switch">
<view wx:for="{{monthDisplayModes}}" wx:key="value" class="month-mode {{monthDisplayMode === item.value ? 'active' : ''}}" data-mode="{{item.value}}" bindtap="switchMonthDisplay">{{item.label}}</view>
</view>
<view wx:if="{{monthDisplayMode === 'rows'}}" class="row-name-switch {{monthRowLabelVisible ? 'active' : ''}}" bindtap="toggleMonthRowLabel">
<text>姓名</text>
<view class="switch-track"><view class="switch-thumb"></view></view>
</view>
</view>
<view class="month-card card">
<view class="month-week-head">
<text wx:for="{{weekLabels}}" wx:key="*this">{{item}}</text>
</view>
<view class="month-grid">
<view wx:for="{{monthDays}}" wx:key="date" class="month-cell {{item.isCurrentMonth ? '' : 'out-month'}} {{item.date === currentDateText ? 'selected' : ''}}" data-date="{{item.date}}" bindtap="selectDate">
<view class="month-cell-head">
<text class="month-day">{{item.day}}</text>
<text wx:if="{{item.dayStatus === 'full'}}" class="day-mark full">满</text>
<text wx:elif="{{item.dayStatus === 'rest'}}" class="day-mark rest">休</text>
</view>
<view wx:if="{{monthDisplayMode === 'count'}}" class="month-bars">
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" wx:if="{{count.count > 0}}" class="month-artist-bar" style="background: {{count.color}};">
<text>{{count.shortName}}{{count.count}}</text>
</view>
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
</view>
<view wx:else class="month-blocks">
<block wx:if="{{monthDisplayMode === 'blocks'}}">
<view wx:for="{{item.expandedBlocks}}" wx:for-item="block" wx:key="key" class="month-order-block" style="background: {{block.color}};"></view>
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
</block>
<block wx:else>
<view wx:for="{{item.rowBlocks}}" wx:for-item="block" wx:key="key" class="month-row-block {{monthRowLabelVisible ? 'named' : ''}}" style="background: {{block.color}};">
<text wx:if="{{monthRowLabelVisible}}">{{block.artistName}}</text>
</view>
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
</block>
</view>
</view>
</view>
</view>
</view>
<button class="fab" bindtap="createAppointment">+</button>
</view>
@@ -1,586 +0,0 @@
.planning-page {
padding-top: 18rpx;
}
.today-btn {
display: flex;
align-items: center;
justify-content: center;
width: 58rpx;
min-width: 58rpx;
max-width: 58rpx;
height: 52rpx;
min-height: 52rpx;
padding: 0;
border-radius: 999rpx;
background: #e5eee9;
color: #6f8f83;
font-size: 24rpx;
font-weight: 800;
line-height: 52rpx;
}
.control-card {
padding: 18rpx;
}
.date-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12rpx;
}
.date-side {
display: flex;
align-items: center;
width: 128rpx;
}
.date-tools {
justify-content: flex-end;
gap: 8rpx;
}
.icon-btn.small {
width: 52rpx;
min-width: 52rpx;
max-width: 52rpx;
height: 52rpx;
min-height: 52rpx;
font-size: 34rpx;
}
.date-center {
display: flex;
flex-direction: column;
align-items: center;
gap: 4rpx;
}
.date-main {
color: #25211d;
font-size: 32rpx;
font-weight: 800;
}
.date-sub {
color: #9a9288;
font-size: 22rpx;
}
.segmented {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8rpx;
margin-top: 18rpx;
padding: 8rpx;
border-radius: 12px;
background: #f1ece4;
}
.segment {
display: flex;
align-items: center;
justify-content: center;
height: 58rpx;
border-radius: 10px;
color: #7d756c;
font-size: 24rpx;
font-weight: 700;
}
.segment.active {
background: #fffdf8;
color: #2f2a25;
box-shadow: 0 6rpx 14rpx rgba(58, 48, 34, 0.07);
}
.artist-filter {
display: flex;
width: 100%;
margin-top: 16rpx;
white-space: nowrap;
}
.artist-chip {
display: inline-flex;
align-items: center;
height: 52rpx;
margin-right: 10rpx;
padding: 0 16rpx;
border-radius: 999rpx;
background: #f4f0ea;
color: #625b52;
font-size: 24rpx;
font-weight: 700;
}
.artist-chip.active {
background: #e5eee9;
color: #4e7165;
}
.chip-dot {
width: 14rpx;
height: 14rpx;
margin-right: 8rpx;
border-radius: 50%;
}
.chip-count {
margin-left: 8rpx;
color: #9a9288;
}
.day-summary {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12rpx;
}
.summary-item {
padding: 16rpx;
}
.summary-value {
display: block;
color: #26231f;
font-size: 34rpx;
font-weight: 800;
}
.summary-label {
display: block;
margin-top: 8rpx;
color: #938c82;
font-size: 22rpx;
}
.day-board {
height: 820rpx;
margin-top: 18rpx;
overflow: hidden;
}
.timeline-wrap {
position: relative;
min-height: 720rpx;
}
.time-axis {
position: absolute;
top: 0;
left: 0;
z-index: 4;
width: 92rpx;
height: 100%;
border-right: 1rpx solid #eee8df;
background: #fffdf8;
}
.time-label {
position: absolute;
right: 12rpx;
color: #9a9288;
font-size: 20rpx;
line-height: 1;
white-space: nowrap;
transform: translateY(-50%);
}
.lane-scroll {
position: absolute;
top: 0;
right: 0;
left: 104rpx;
height: 100%;
}
.lanes {
display: flex;
}
.artist-lane {
position: relative;
flex-shrink: 0;
border-right: 1rpx solid #eee8df;
background-image: linear-gradient(to bottom, rgba(214, 207, 197, 0.35) 1rpx, transparent 1rpx);
background-size: 100% 60rpx;
}
.lane-head {
position: sticky;
top: 0;
z-index: 2;
display: flex;
align-items: center;
height: 54rpx;
padding: 0 14rpx;
background: rgba(255, 253, 248, 0.92);
color: #4d473f;
font-size: 22rpx;
font-weight: 700;
}
.appointment-block {
position: absolute;
right: 12rpx;
left: 12rpx;
display: flex;
flex-direction: column;
gap: 4rpx;
overflow: hidden;
padding: 12rpx 12rpx;
border-left: 8rpx solid #7ba7c7;
border-radius: 10px;
background: #fff7ee;
box-shadow: 0 8rpx 16rpx rgba(58, 48, 34, 0.08);
}
.appointment-block.pending {
background: #fff3f6;
}
.block-title {
color: #2c2823;
font-size: 24rpx;
font-weight: 800;
}
.block-meta,
.block-status {
color: #7e756b;
font-size: 20rpx;
line-height: 1.25;
}
.lane-empty {
position: absolute;
top: 76rpx;
right: 18rpx;
left: 18rpx;
padding: 16rpx 0;
border: 1rpx dashed #d8d1c8;
border-radius: 10px;
color: #aaa198;
text-align: center;
font-size: 22rpx;
}
.week-strip {
width: 100%;
white-space: nowrap;
}
.week-day-card {
display: inline-flex;
flex-direction: column;
width: 148rpx;
min-height: 164rpx;
margin-right: 12rpx;
padding: 16rpx;
}
.week-day-card.active {
outline: 3rpx solid #8fb89a;
}
.week-name,
.week-total {
color: #8f877e;
font-size: 22rpx;
}
.week-date {
margin: 8rpx 0;
color: #211e1a;
font-size: 38rpx;
font-weight: 800;
}
.week-bars {
display: flex;
flex-direction: column;
gap: 6rpx;
margin-top: 12rpx;
}
.week-bar {
height: 8rpx;
border-radius: 999rpx;
}
.week-grid {
margin-top: 18rpx;
padding: 20rpx;
}
.week-grid-head,
.week-line {
display: flex;
align-items: center;
justify-content: space-between;
}
.week-grid-head {
margin-bottom: 14rpx;
font-weight: 800;
}
.week-line {
min-height: 70rpx;
border-top: 1rpx solid #eee8df;
}
.week-line-date {
width: 132rpx;
color: #6f675f;
font-size: 24rpx;
}
.week-line-bars {
flex: 1;
display: flex;
flex-direction: column;
gap: 6rpx;
}
.week-count-bar {
display: flex;
align-items: center;
min-width: 58rpx;
height: 28rpx;
padding-left: 10rpx;
border-radius: 7rpx;
color: #fff;
font-size: 18rpx;
font-weight: 700;
}
.month-card {
overflow: hidden;
}
.month-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8rpx;
margin-bottom: 14rpx;
padding: 0 4rpx;
}
.month-toolbar-title {
color: #615a51;
font-size: 24rpx;
font-weight: 800;
}
.month-mode-switch {
display: inline-flex;
gap: 6rpx;
padding: 6rpx;
border-radius: 999rpx;
background: #eee8df;
}
.month-mode {
display: flex;
align-items: center;
justify-content: center;
min-width: 68rpx;
height: 44rpx;
padding: 0 12rpx;
border-radius: 999rpx;
color: #766e65;
font-size: 22rpx;
font-weight: 800;
}
.month-mode.active {
background: #fffdf8;
color: #2f6f62;
box-shadow: 0 4rpx 12rpx rgba(58, 48, 34, 0.07);
}
.row-name-switch {
display: inline-flex;
align-items: center;
gap: 8rpx;
height: 44rpx;
padding: 0 10rpx;
border-radius: 999rpx;
background: #f0ece5;
color: #766e65;
font-size: 21rpx;
font-weight: 800;
}
.row-name-switch.active {
color: #2f6f62;
background: #e5eee9;
}
.switch-track {
position: relative;
width: 44rpx;
height: 24rpx;
border-radius: 999rpx;
background: #d6d0c7;
}
.switch-thumb {
position: absolute;
top: 3rpx;
left: 3rpx;
width: 18rpx;
height: 18rpx;
border-radius: 50%;
background: #fffdf8;
box-shadow: 0 2rpx 6rpx rgba(58, 48, 34, 0.16);
}
.row-name-switch.active .switch-track {
background: #6f8f83;
}
.row-name-switch.active .switch-thumb {
transform: translateX(20rpx);
}
.month-week-head {
display: grid;
grid-template-columns: repeat(7, 1fr);
height: 58rpx;
align-items: center;
border-bottom: 1rpx solid #ebe5dc;
color: #726b62;
font-size: 24rpx;
font-weight: 800;
text-align: center;
}
.month-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
}
.month-cell {
min-height: 168rpx;
padding: 8rpx 5rpx;
border-right: 1rpx solid #eee8df;
border-bottom: 1rpx solid #eee8df;
background: #fffdf8;
}
.month-cell:nth-child(7n) {
border-right: 0;
}
.month-cell.out-month {
background: #f7f3ed;
}
.month-cell.selected {
background: #eef5f1;
}
.month-cell-head {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 32rpx;
}
.month-day {
color: #2c2824;
font-size: 26rpx;
font-weight: 800;
}
.out-month .month-day {
color: #aba39a;
}
.day-mark {
font-size: 18rpx;
font-weight: 800;
}
.day-mark.full {
color: #d98d8d;
}
.day-mark.rest {
color: #8aaeca;
}
.month-bars {
display: flex;
flex-direction: column;
gap: 5rpx;
margin-top: 7rpx;
}
.month-artist-bar {
display: flex;
align-items: center;
justify-content: center;
height: 24rpx;
min-width: 0;
overflow: hidden;
border-radius: 6rpx;
color: #fff;
font-size: 17rpx;
font-weight: 800;
line-height: 1;
white-space: nowrap;
}
.month-blocks {
display: flex;
flex-wrap: wrap;
align-content: flex-start;
gap: 5rpx;
margin-top: 8rpx;
}
.month-order-block {
width: 22rpx;
height: 12rpx;
border-radius: 999rpx;
box-shadow: inset 0 0 0 1rpx rgba(255, 255, 255, 0.24);
}
.month-row-block {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 12rpx;
overflow: hidden;
border-radius: 999rpx;
color: #fff;
font-size: 13rpx;
font-weight: 900;
line-height: 1;
white-space: nowrap;
text-shadow: 0 1rpx 3rpx rgba(37, 31, 24, 0.22);
box-shadow: inset 0 0 0 1rpx rgba(255, 255, 255, 0.24);
}
.month-row-block.named {
height: 20rpx;
}
.month-blocks .month-empty {
width: 100%;
}
.month-empty {
margin-top: 10rpx;
color: #b5ada4;
font-size: 20rpx;
text-align: center;
}
@@ -1,24 +0,0 @@
Page({
data: {
shopName: 'Yumi Nail',
phone: '店长端',
menus: [
{ title: '店铺设置', url: '/pages/shop-settings/index' },
{ title: '数据导出', url: '/pages/export/index' },
{ title: '修改密码', url: '/pages/password/index' },
{ title: '关于系统', url: '/pages/about/index' }
]
},
onShow() {
const app = getApp()
this.setData({
shopName: app.globalData.shopName || '指尖管理师',
phone: (app.globalData.userInfo && (app.globalData.userInfo.phone || app.globalData.userInfo.account)) || '店长端'
})
},
go(event) {
wx.navigateTo({ url: event.currentTarget.dataset.url })
}
})
@@ -1,16 +0,0 @@
<view class="page">
<view class="card profile-card">
<view class="shop-logo">指</view>
<view>
<text class="shop-name">{{shopName}}</text>
<text class="phone">{{phone}}</text>
</view>
</view>
<view class="section menu-list card">
<view wx:for="{{menus}}" wx:key="url" class="menu-row" data-url="{{item.url}}" bindtap="go">
<text>{{item.title}}</text>
<text class="arrow">›</text>
</view>
</view>
</view>
@@ -1,60 +0,0 @@
.profile-card {
display: flex;
align-items: center;
gap: 20rpx;
padding: 28rpx;
}
.shop-logo {
display: flex;
align-items: center;
justify-content: center;
width: 96rpx;
height: 96rpx;
border-radius: 24rpx;
background: #6f8f83;
color: #fff;
font-size: 40rpx;
font-weight: 900;
}
.shop-name,
.phone {
display: block;
}
.shop-name {
font-size: 34rpx;
font-weight: 800;
}
.phone {
margin-top: 8rpx;
color: #91897f;
font-size: 24rpx;
}
.menu-list {
overflow: hidden;
}
.menu-row {
display: flex;
align-items: center;
justify-content: space-between;
min-height: 104rpx;
padding: 0 26rpx;
border-bottom: 1rpx solid #eee8df;
color: #302c27;
font-size: 28rpx;
font-weight: 700;
}
.menu-row:last-child {
border-bottom: 0;
}
.arrow {
color: #b0a79e;
font-size: 44rpx;
}
@@ -1,93 +0,0 @@
const authApi = require('../../api/auth')
Page({
data: {
form: {
phone: '',
code: '',
password: '',
confirmPassword: '',
shopName: ''
},
loading: false,
codeLoading: false,
countdown: 0,
countdownTimer: null
},
onInput(event) {
this.setData({
[`form.${event.currentTarget.dataset.field}`]: event.detail.value
})
},
back() {
wx.navigateBack()
},
async sendCode() {
const phone = this.data.form.phone
if (!phone) {
wx.showToast({ title: '请输入手机号', icon: 'none' })
return
}
if (this.data.codeLoading || this.data.countdown > 0) {
return
}
this.setData({ codeLoading: true })
try {
await authApi.sendCode(phone)
wx.showToast({ title: '验证码已发送' })
this.startCountdown()
} catch (error) {
wx.showToast({ title: error.message || '发送失败', icon: 'none' })
} finally {
this.setData({ codeLoading: false })
}
},
startCountdown() {
if (this.data.countdownTimer) {
clearInterval(this.data.countdownTimer)
}
this.setData({ countdown: 60 })
const timer = setInterval(() => {
const next = this.data.countdown - 1
if (next <= 0) {
clearInterval(timer)
this.setData({ countdown: 0, countdownTimer: null })
return
}
this.setData({ countdown: next })
}, 1000)
this.setData({ countdownTimer: timer })
},
onUnload() {
if (this.data.countdownTimer) {
clearInterval(this.data.countdownTimer)
}
},
async submit() {
const form = this.data.form
if (!form.phone || !form.code || !form.password || !form.shopName) {
wx.showToast({ title: '请补全注册信息', icon: 'none' })
return
}
if (form.password !== form.confirmPassword) {
wx.showToast({ title: '两次密码不一致', icon: 'none' })
return
}
this.setData({ loading: true })
try {
await authApi.register(form)
wx.showToast({ title: '注册成功' })
setTimeout(() => wx.navigateBack(), 500)
} catch (error) {
wx.showToast({ title: error.message || '注册失败', icon: 'none' })
} finally {
this.setData({ loading: false })
}
}
})
@@ -1,3 +0,0 @@
{
"navigationBarTitleText": "注册"
}
@@ -1,31 +0,0 @@
<view class="page no-tab">
<view class="card form-card">
<view class="field">
<text class="field-label">手机号</text>
<input value="{{form.phone}}" data-field="phone" bindinput="onInput" placeholder="请输入手机号" />
</view>
<view class="field">
<text class="field-label">验证码</text>
<input value="{{form.code}}" data-field="code" bindinput="onInput" placeholder="请输入验证码" />
<button class="code-btn" loading="{{codeLoading}}" disabled="{{codeLoading || countdown > 0}}" bindtap="sendCode">
{{countdown > 0 ? countdown + 's' : '获取验证码'}}
</button>
</view>
<view class="field">
<text class="field-label">密码</text>
<input value="{{form.password}}" data-field="password" bindinput="onInput" password placeholder="设置登录密码" />
</view>
<view class="field">
<text class="field-label">确认密码</text>
<input value="{{form.confirmPassword}}" data-field="confirmPassword" bindinput="onInput" password placeholder="再次输入密码" />
</view>
<view class="field">
<text class="field-label">店铺名称</text>
<input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" placeholder="例如:Yumi Nail" />
</view>
</view>
<view class="fixed-bottom">
<button class="primary-btn" loading="{{loading}}" bindtap="submit">注册</button>
</view>
</view>
@@ -1,11 +0,0 @@
.code-btn {
width: 148rpx;
min-width: 148rpx;
max-width: 148rpx;
height: 56rpx;
padding: 0;
color: #6f8f83;
font-size: 24rpx;
font-weight: 700;
text-align: right;
}
@@ -1,13 +0,0 @@
const dateUtil = require('../../utils/date')
Page({
data: {
form: { workDate: dateUtil.formatDate(new Date()), startTime: '10:00', endTime: '22:00', capacity: 1 }
},
onInput(event) { this.setData({ [`form.${event.currentTarget.dataset.field}`]: event.detail.value }) },
onDateChange(event) { this.setData({ 'form.workDate': event.detail.value }) },
onStartChange(event) { this.setData({ 'form.startTime': event.detail.value }) },
onEndChange(event) { this.setData({ 'form.endTime': event.detail.value }) },
save() { wx.showToast({ title: '已保存' }) },
back() { wx.navigateBack() }
})
@@ -1,34 +0,0 @@
<view class="page no-tab">
<view class="card form-card">
<view class="field">
<view class="field-label-wrap">
<text class="field-label">日期</text>
<text class="field-hint">点击可编辑</text>
</view>
<picker mode="date" value="{{form.workDate}}" bindchange="onDateChange"><view class="field-value">{{form.workDate}}</view></picker>
</view>
<view class="field">
<view class="field-label-wrap">
<text class="field-label">开始时间</text>
<text class="field-hint">点击可编辑</text>
</view>
<picker mode="time" value="{{form.startTime}}" bindchange="onStartChange"><view class="field-value">{{form.startTime}}</view></picker>
</view>
<view class="field">
<view class="field-label-wrap">
<text class="field-label">结束时间</text>
<text class="field-hint">点击可编辑</text>
</view>
<picker mode="time" value="{{form.endTime}}" bindchange="onEndChange"><view class="field-value">{{form.endTime}}</view></picker>
</view>
<view class="field capacity-field">
<view class="field-label-wrap">
<text class="field-label">容量</text>
<text class="field-desc">同一时间段最多可同时接待的预约数</text>
<text class="field-hint">点击可编辑</text>
</view>
<input type="number" value="{{form.capacity}}" data-field="capacity" bindinput="onInput" />
</view>
</view>
<view class="fixed-bottom"><button class="primary-btn" bindtap="save">保存排班</button></view>
</view>
@@ -1,34 +0,0 @@
.field-label-wrap {
display: flex;
flex-direction: column;
justify-content: center;
width: 260rpx;
flex-shrink: 0;
gap: 6rpx;
}
.field-label-wrap .field-label {
width: auto;
}
.field-hint {
color: #a39b91;
font-size: 20rpx;
font-weight: 500;
}
.field-desc {
max-width: 240rpx;
color: #7f786f;
font-size: 20rpx;
line-height: 1.25;
}
.capacity-field {
min-height: 136rpx;
}
.field input,
.field-value {
text-align: right;
}
@@ -1,10 +0,0 @@
Page({
data: {
form: { shopName: 'Yumi Nail', startTime: '10:00', endTime: '22:00', defaultDuration: 60, rule: '必须选择已有作品作为项目来源' }
},
onInput(event) { this.setData({ [`form.${event.currentTarget.dataset.field}`]: event.detail.value }) },
onStartChange(event) { this.setData({ 'form.startTime': event.detail.value }) },
onEndChange(event) { this.setData({ 'form.endTime': event.detail.value }) },
save() { wx.showToast({ title: '已保存' }) },
back() { wx.navigateBack() }
})
@@ -1,10 +0,0 @@
<view class="page no-tab">
<view class="card form-card">
<view class="field"><text class="field-label">店铺名称</text><input value="{{form.shopName}}" data-field="shopName" bindinput="onInput" /></view>
<view class="field"><text class="field-label">营业开始</text><picker mode="time" value="{{form.startTime}}" bindchange="onStartChange"><view class="field-value">{{form.startTime}}</view></picker></view>
<view class="field"><text class="field-label">营业结束</text><picker mode="time" value="{{form.endTime}}" bindchange="onEndChange"><view class="field-value">{{form.endTime}}</view></picker></view>
<view class="field"><text class="field-label">默认时长</text><input type="number" value="{{form.defaultDuration}}" data-field="defaultDuration" bindinput="onInput" /><text class="muted">分钟</text></view>
<view class="field"><text class="field-label">预约规则</text><input value="{{form.rule}}" data-field="rule" bindinput="onInput" /></view>
</view>
<view class="fixed-bottom"><button class="primary-btn" bindtap="save">保存设置</button></view>
</view>
@@ -1 +0,0 @@
@@ -1,22 +0,0 @@
{
"libVersion": "3.15.2",
"condition": {},
"projectname": "指尖管理师",
"setting": {
"urlCheck": false,
"coverView": false,
"lazyloadPlaceholderEnable": false,
"skylineRenderEnable": false,
"preloadBackgroundData": false,
"autoAudits": false,
"useApiHook": true,
"showShadowRootInWxmlPanel": false,
"useStaticServer": false,
"useLanDebug": false,
"showES6CompileOption": false,
"compileHotReLoad": true,
"checkInvalidKey": true,
"ignoreDevUnusedFiles": true,
"bigPackageSizeSupport": false
}
}
-3
View File
@@ -1,3 +0,0 @@
{
"rules": []
}
-29
View File
@@ -1,29 +0,0 @@
const SESSION_KEY = 'fingertip_manager_session'
function getSession() {
try {
return wx.getStorageSync(SESSION_KEY) || {}
} catch (error) {
return {}
}
}
function setSession(session) {
wx.setStorageSync(SESSION_KEY, session || {})
}
function clearSession() {
wx.removeStorageSync(SESSION_KEY)
}
function getAccessToken() {
const session = getSession()
return session.accessToken || session.token || ''
}
module.exports = {
getSession,
setSession,
clearSession,
getAccessToken
}
-7
View File
@@ -1,7 +0,0 @@
const DEFAULT_DOMAIN = 'http://127.0.0.1:63341'
module.exports = {
API_DOMAIN: DEFAULT_DOMAIN,
ADMIN_API_BASE_URL: `${DEFAULT_DOMAIN}/admin`,
REQUEST_TIMEOUT: 10000
}
-87
View File
@@ -1,87 +0,0 @@
const date = require('./date')
const artists = [
{ id: 101, name: '小王', shortName: '王', color: '#7BA7C7', status: 1, statusText: '可预约', rangeCount: 0 },
{ id: 102, name: '小李', shortName: '李', color: '#8FB89A', status: 1, statusText: '可预约', rangeCount: 0 },
{ id: 103, name: '小张', shortName: '张', color: '#A894C7', status: 1, statusText: '可预约', rangeCount: 0 }
]
function countFor(day, index) {
const seed = day.getDate() + index * 2 + day.getMonth()
if (seed % 7 === 0) return 0
return (seed % 4) + 1
}
function buildCalendar(currentDate) {
const start = date.startOfMonth(currentDate)
const end = date.endOfMonth(currentDate)
const daySummaries = []
const appointments = []
let cursor = new Date(start.getTime())
let orderItemId = 1
while (cursor <= end) {
const dateText = date.formatDate(cursor)
const artistCounts = artists.map((artist, index) => {
const count = countFor(cursor, index)
return {
artistId: artist.id,
artistName: artist.name,
shortName: artist.shortName,
color: artist.color,
count,
status: count >= 4 ? 'full' : count > 0 ? 'working' : 'free'
}
})
const totalCount = artistCounts.reduce((sum, item) => sum + item.count, 0)
daySummaries.push({
date: dateText,
totalCount,
artistCounts,
dayStatus: totalCount >= 8 ? 'full' : totalCount > 0 ? 'working' : 'free'
})
artistCounts.forEach((count, artistIndex) => {
for (let i = 0; i < Math.min(count.count, 3); i += 1) {
const startMinute = 10 * 60 + ((artistIndex * 90 + i * 110 + cursor.getDate() * 5) % 620)
const duration = i % 2 === 0 ? 90 : 60
const artist = artists[artistIndex]
appointments.push({
orderId: 9000 + orderItemId,
orderItemId,
customerName: ['王女士', '陈女士', '林女士', '赵女士'][i % 4],
customerPhone: '138****' + String(1000 + orderItemId).slice(-4),
productTitle: ['纯色美甲', '猫眼延长', '手部护理', '法式款'][i % 4],
artistId: artist.id,
artistName: artist.name,
artistColor: artist.color,
date: dateText,
startTime: `${dateText} ${date.timeFromMinutes(startMinute)}:00`,
endTime: `${dateText} ${date.timeFromMinutes(startMinute + duration)}:00`,
startMinute,
durationMinutes: duration,
status: i === 2 ? 0 : 1,
statusText: i === 2 ? '待确认' : '已确认',
remark: ''
})
orderItemId += 1
}
})
cursor = date.addDays(cursor, 1)
}
artists.forEach(artist => {
artist.rangeCount = appointments.filter(item => item.artistId === artist.id).length
})
return {
businessStartTime: '10:00',
businessEndTime: '22:00',
slotMinutes: 30,
artists,
schedules: [],
appointments,
daySummaries
}
}
module.exports = {
artists,
buildCalendar
}
-66
View File
@@ -1,66 +0,0 @@
const { ADMIN_API_BASE_URL, REQUEST_TIMEOUT } = require('./config')
const auth = require('./auth')
function buildUrl(url, params) {
const query = Object.keys(params || {})
.filter(key => params[key] !== undefined && params[key] !== null && params[key] !== '')
.map(key => `${encodeURIComponent(key)}=${encodeURIComponent(params[key])}`)
.join('&')
const baseUrl = params && params.__baseUrl ? params.__baseUrl : ADMIN_API_BASE_URL
if (params && params.__baseUrl) {
delete params.__baseUrl
}
const target = `${baseUrl}${url}`
return query ? `${target}${target.includes('?') ? '&' : '?'}${query}` : target
}
function normalizeError(message, raw) {
const error = new Error(message || '请求失败')
error.raw = raw
return error
}
function request(options) {
const method = String(options.method || 'GET').toUpperCase()
const token = auth.getAccessToken()
return new Promise((resolve, reject) => {
wx.request({
url: buildUrl(options.url, options.params),
method,
timeout: options.timeout || REQUEST_TIMEOUT,
data: method === 'GET' ? undefined : options.data,
header: {
'Content-Type': 'application/json',
...(token ? { Authorization: `Bearer ${token}` } : {}),
...(options.header || {})
},
success(response) {
if (response.statusCode === 401) {
auth.clearSession()
wx.reLaunch({ url: '/pages/login/index' })
reject(normalizeError('登录已失效,请重新登录', response))
return
}
if (response.statusCode >= 400) {
reject(normalizeError((response.data && response.data.message) || '网络请求失败', response))
return
}
const payload = response.data
if (payload && typeof payload === 'object' && Object.prototype.hasOwnProperty.call(payload, 'code')) {
if (payload.code === 200) {
resolve(payload.data)
return
}
reject(normalizeError(payload.message || '请求失败', payload))
return
}
resolve(payload)
},
fail(error) {
reject(normalizeError(error.errMsg || '网络异常', error))
}
})
})
}
module.exports = request

Some files were not shown because too many files have changed in this diff Show More