diff --git a/.playwright-mcp/page-2026-04-08T13-11-44-166Z.yml b/.playwright-mcp/page-2026-04-08T13-11-44-166Z.yml new file mode 100644 index 0000000..48aced8 --- /dev/null +++ b/.playwright-mcp/page-2026-04-08T13-11-44-166Z.yml @@ -0,0 +1,39 @@ +- generic [ref=e3]: + - generic [ref=e5]: + - img [ref=e7] + - heading "社区非机动车管理系统" [level=1] [ref=e8] + - paragraph [ref=e9]: 智能化、高效、安全的非机动车管理解决方案 + - generic [ref=e10]: + - generic [ref=e11]: + - img [ref=e13] + - generic [ref=e15]: 实时监控 + - generic [ref=e16]: + - img [ref=e18] + - generic [ref=e21]: 安全可靠 + - generic [ref=e22]: + - img [ref=e24] + - generic [ref=e26]: 数据分析 + - generic [ref=e27]: + - generic [ref=e28]: + - generic [ref=e29]: + - heading "欢迎登录" [level=2] [ref=e30] + - paragraph [ref=e31]: 请输入您的账号信息 + - generic [ref=e32]: + - generic [ref=e36]: + - img [ref=e38] + - textbox "请输入账号" [ref=e39] + - generic [ref=e43]: + - img [ref=e45] + - textbox "请输入密码" [ref=e46] + - generic [ref=e49]: + - generic [ref=e51]: + - img [ref=e53] + - textbox "请输入验证码" [ref=e54] + - img [ref=e56] [cursor=pointer] + - generic [ref=e58] [cursor=pointer]: + - generic [ref=e59]: + - checkbox "记住密码" + - generic [ref=e61]: 记住密码 + - button "登 录" [ref=e64] [cursor=pointer]: + - generic [ref=e66]: 登 录 + - generic [ref=e67]: Copyright © 2018-2026 非机动车管理系统 \ No newline at end of file diff --git a/.playwright-mcp/page-2026-04-08T13-11-52-247Z.yml b/.playwright-mcp/page-2026-04-08T13-11-52-247Z.yml new file mode 100644 index 0000000..48aced8 --- /dev/null +++ b/.playwright-mcp/page-2026-04-08T13-11-52-247Z.yml @@ -0,0 +1,39 @@ +- generic [ref=e3]: + - generic [ref=e5]: + - img [ref=e7] + - heading "社区非机动车管理系统" [level=1] [ref=e8] + - paragraph [ref=e9]: 智能化、高效、安全的非机动车管理解决方案 + - generic [ref=e10]: + - generic [ref=e11]: + - img [ref=e13] + - generic [ref=e15]: 实时监控 + - generic [ref=e16]: + - img [ref=e18] + - generic [ref=e21]: 安全可靠 + - generic [ref=e22]: + - img [ref=e24] + - generic [ref=e26]: 数据分析 + - generic [ref=e27]: + - generic [ref=e28]: + - generic [ref=e29]: + - heading "欢迎登录" [level=2] [ref=e30] + - paragraph [ref=e31]: 请输入您的账号信息 + - generic [ref=e32]: + - generic [ref=e36]: + - img [ref=e38] + - textbox "请输入账号" [ref=e39] + - generic [ref=e43]: + - img [ref=e45] + - textbox "请输入密码" [ref=e46] + - generic [ref=e49]: + - generic [ref=e51]: + - img [ref=e53] + - textbox "请输入验证码" [ref=e54] + - img [ref=e56] [cursor=pointer] + - generic [ref=e58] [cursor=pointer]: + - generic [ref=e59]: + - checkbox "记住密码" + - generic [ref=e61]: 记住密码 + - button "登 录" [ref=e64] [cursor=pointer]: + - generic [ref=e66]: 登 录 + - generic [ref=e67]: Copyright © 2018-2026 非机动车管理系统 \ No newline at end of file diff --git a/conf/nginx-emotion-museum-fix.conf b/conf/nginx-emotion-museum-fix.conf deleted file mode 100644 index bc5afe6..0000000 --- a/conf/nginx-emotion-museum-fix.conf +++ /dev/null @@ -1,161 +0,0 @@ -# Emotion Museum 前端应用 Nginx 配置 -# 配置路径:/www/server/panel/vhost/nginx/emotion-museum.conf - -server { - listen 80; - server_name lifescript.happylifeos.com; - - # Let's Encrypt ACME 挑战位置(必须在其他 location 之前) - location ^~ /.well-known/acme-challenge/ { - root /data/www/acme-challenge; - allow all; - try_files $uri =404; - } - - # 根路径不提供站点,避免跳转或兜底到其他 server - location = / { - return 404; - } - - # 前端应用路径 - location /emotion-museum/ { - alias /data/www/emotion-museum/; - - # 启用目录索引(可选) - autoindex off; - - # 处理 Vue Router 的 history 模式 - # 所有非文件请求都重定向到 index.html - try_files $uri $uri/ /emotion-museum/index.html; - - # 设置缓存策略 - # HTML 文件不缓存 - location ~ \.html?$ { - add_header Cache-Control "no-cache, no-store, must-revalidate"; - add_header Pragma "no-cache"; - add_header Expires "0"; - } - - # 静态资源缓存 1 年 - location ~ \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { - add_header Cache-Control "public, max-age=31536000, immutable"; - expires 1y; - } - } - - # 处理不带末尾斜杠的 /emotion-museum 请求 - location = /emotion-museum { - rewrite ^(.*)$ $1/ permanent; - } - - # 管理后台应用路径 - location /emotion-museum-admin/ { - alias /data/www/emotion-museum-admin/; - - # 启用目录索引(可选) - autoindex off; - - # 处理 Vue Router 的 history 模式 - # 所有非文件请求都重定向到 index.html - try_files $uri $uri/ /emotion-museum-admin/index.html; - - # 设置缓存策略 - # HTML 文件不缓存 - location ~ \.html?$ { - add_header Cache-Control "no-cache, no-store, must-revalidate"; - add_header Pragma "no-cache"; - add_header Expires "0"; - } - - # 静态资源缓存 1 年 - location ~ \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { - add_header Cache-Control "public, max-age=31536000, immutable"; - expires 1y; - } - } - - # 处理不带末尾斜杠的 /emotion-museum-admin 请求 - location = /emotion-museum-admin { - rewrite ^(.*)$ $1/ permanent; - } - - # 体验前端应用路径 (course-web) - location /course-of-life/ { - alias /data/www/course-of-life/; - - # 启用目录索引(可选) - autoindex off; - - # 处理 SPA 的 history 模式 (React Router) - # 所有非文件请求都重定向到 index.html - try_files $uri $uri/ /course-of-life/index.html; - - # 设置缓存策略 - # HTML 文件不缓存 - location ~ \.html?$ { - add_header Cache-Control "no-cache, no-store, must-revalidate"; - add_header Pragma "no-cache"; - add_header Expires "0"; - } - - # 静态资源缓存 1 年 - location ~ \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { - add_header Cache-Control "public, max-age=31536000, immutable"; - expires 1y; - } - } - - # 处理不带末尾斜杠的 /course-of-life 请求 - location = /course-of-life { - # 不进行 301/302 外部跳转:内部改写到 /course-of-life/ 交给下方 SPA location 处理 - # 这样 URL 仍是 /course-of-life,但返回内容与 /course-of-life/ 完全一致(且不会触发"下载") - rewrite ^ /course-of-life/ last; - } - - # 后端 API 代理 - location /api { - proxy_pass http://127.0.0.1:19089; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - # 超时设置 - proxy_connect_timeout 60s; - proxy_send_timeout 60s; - proxy_read_timeout 60s; - } - - # WebSocket 代理 - location /ws { - proxy_pass http://127.0.0.1:19089; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - - # WebSocket 超时设置 - proxy_connect_timeout 7d; - proxy_send_timeout 7d; - proxy_read_timeout 7d; - } - - # 健康检查端点 - location /health { - access_log off; - return 200 "healthy\n"; - add_header Content-Type text/plain; - } - - # 禁止访问敏感文件 - location ~ /\. { - deny all; - access_log off; - log_not_found off; - } - - access_log /www/wwwlogs/access.log; -} diff --git a/conf/nginx-emotion-museum-ssl.conf b/conf/nginx-emotion-museum-ssl.conf deleted file mode 100644 index 4798464..0000000 --- a/conf/nginx-emotion-museum-ssl.conf +++ /dev/null @@ -1,126 +0,0 @@ -# Emotion Museum HTTPS Nginx 配置 -# 配置路径:/www/server/panel/vhost/nginx/emotion-museum.conf - -server { - listen 443 ssl; - http2 on; - server_name lifescript.happylifeos.com; - - ssl_certificate /etc/letsencrypt/live/lifescript.happylifeos.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/lifescript.happylifeos.com/privkey.pem; - ssl_protocols TLSv1.2 TLSv1.3; - ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384; - ssl_prefer_server_ciphers on; - ssl_session_cache shared:SSL:10m; - ssl_session_timeout 10m; - - location ^~ /.well-known/acme-challenge/ { - root /data/www/acme-challenge; - allow all; - try_files $uri =404; - } - - location = / { - return 404; - } - - location /emotion-museum/ { - alias /data/www/emotion-museum/; - autoindex off; - # 静态资源直接返回文件,不经过 try_files - location ~* ^/emotion-museum/(assets|static)/ { - add_header Cache-Control "public, max-age=31536000, immutable"; - expires 1y; - try_files $uri =404; - } - # SPA 路由兜底 - try_files $uri $uri/ /emotion-museum/index.html; - } - - location = /emotion-museum { - rewrite ^(.*)$ $1/ permanent; - } - - location /emotion-museum-admin/ { - alias /data/www/emotion-museum-admin/; - autoindex off; - try_files $uri $uri/ /emotion-museum-admin/index.html; - } - - location = /emotion-museum-admin { - rewrite ^(.*)$ $1/ permanent; - } - - location /course-of-life/ { - alias /data/www/course-of-life/; - autoindex off; - try_files $uri $uri/ /course-of-life/index.html; - } - - location = /course-of-life { - rewrite ^ /course-of-life/ last; - } - - # life-script React 应用 - location /life-script/ { - alias /data/www/life-script/; - autoindex off; - # 静态资源直接返回文件 - location ~* ^/life-script/(assets|static)/ { - add_header Cache-Control "public, max-age=31536000, immutable"; - expires 1y; - try_files $uri =404; - } - # SPA 路由兜底 - try_files $uri $uri/ /life-script/index.html; - } - - location = /life-script { - rewrite ^ /life-script/ last; - } - - location /api { - proxy_pass http://127.0.0.1:19089; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_connect_timeout 60s; - proxy_send_timeout 60s; - proxy_read_timeout 60s; - } - - location /ws { - proxy_pass http://127.0.0.1:19089; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_connect_timeout 7d; - proxy_send_timeout 7d; - proxy_read_timeout 7d; - } - - location /health { - access_log off; - return 200 "healthy\n"; - add_header Content-Type text/plain; - } - - location ~ /\. { - deny all; - access_log off; - log_not_found off; - } - - access_log /www/wwwlogs/ssl-access.log; -} - -server { - listen 80; - server_name lifescript.happylifeos.com; - return 301 https://$host$request_uri; -} diff --git a/docs/superpowers/specs/2026-04-07-mini-program-script-design.md b/docs/superpowers/specs/2026-04-07-mini-program-script-design.md new file mode 100644 index 0000000..c5777fc --- /dev/null +++ b/docs/superpowers/specs/2026-04-07-mini-program-script-design.md @@ -0,0 +1,167 @@ +--- +author: Claude +created_at: 2026-04-07 +purpose: 小程序创造未来页面样式优化设计规范 +--- + +# 小程序创造未来页面设计规格说明书 + +## 1. 概述 + +将小程序(mini-program)的"创造未来"页面(ScriptView.vue)的样式和布局优化至与原型(mini-program-prototype)完全一致。 + +## 2. 样式系统规范 + +### 2.1 玻璃态效果 + +| 元素类型 | 背景 | 边框 | 阴影 | +|---------|------|------|------| +| 主卡片(金色玻璃) | `linear-gradient(135deg, rgba(168,85,247,0.15), rgba(232,121,249,0.1))` | `1px solid rgba(168,85,247,0.3)` | `inset 0 0 30rpx rgba(168,85,247,0.08), 0 4rpx 20rpx rgba(168,85,247,0.1)` | +| 普通卡片 | `rgba(255,255,255,0.05)` | `1px solid rgba(255,255,255,0.1)` | 无 | +| AI 回复卡片 | `rgba(168,85,247,0.08)` | `1px solid rgba(168,85,247,0.25)` | `0 0 20rpx rgba(168,85,247,0.1)` | + +### 2.2 圆角规范 + +| 元素 | 圆角值 | +|------|--------| +| 大卡片/章节卡片 | `40rpx` | +| 输入框/选择器 | `32rpx` | +| 按钮 | `40rpx` | +| 小标签/NPC 标签 | `24rpx` | +| 参数选项 | `20rpx` | + +### 2.3 字体大小规范 + +| 元素 | 字体大小 | 颜色 | 字重 | +|------|----------|------|------| +| 页面标题 | `32rpx` | `rgba(255,255,255,0.9)` | `300` | +| 章节标题 | `20rpx` | `rgba(192,132,252,0.6)` | `600` | +| 输入框文字 | `28rpx` | `rgba(255,255,255,0.9)` | 正常 | +| 提示文字 | `15rpx` | `rgba(255,255,255,0.35)` | 斜体 | +| 参数子标签 | `17rpx` | `rgba(255,255,255,0.4)` | 正常 | +| 参数选项 | `20rpx` | `rgba(255,255,255,0.4)` | 正常 | + +### 2.4 尺寸规范 + +| 元素 | 高度 | 内边距 | +|------|------|--------| +| 输入框/选择器 | `88rpx` | `0 24rpx` | +| 主生成按钮 | `96rpx` | - | +| 卡片内边距 | - | `32rpx` | +| 参数选项 | - | `12rpx 20rpx` | + +### 2.5 间距规范 + +| 位置 | 间距值 | +|------|--------| +| 卡片之间 | `24rpx` | +| 输入组之间 | `24rpx` | +| 参数选项之间 | `10rpx` | +| NPC 标签之间 | `16rpx` | +| 章节标题底部 | `16rpx` | + +## 3. 组件结构 + +### 3.1 基础人设卡片 + +``` +┌─────────────────────────────────────┐ +│ 我的基础人设 可自由修改 │ +│ ┌──────────┐ ┌──────────┐ │ +│ │ 姓名输入 │ │ 星座选择 │ │ +│ └──────────┘ └──────────┘ │ +│ ┌──────────┐ ┌──────────┐ │ +│ │ MBTI 选择 │ │ 职业输入 │ │ +│ └──────────┘ └──────────┘ │ +└─────────────────────────────────────┘ +``` + +### 3.2 剧本配置卡片 + +``` +┌─────────────────────────────────────┐ +│ 1. 剧本主题 │ +│ ┌─────────────────────────────────┐ │ +│ │ 如:巅峰重现、治愈之旅... │ │ +│ └─────────────────────────────────┘ │ +│ │ +│ 2. 关键配角/新的人设 [+ 添加] │ +│ ┌──────────┐ ┌──────────┐ │ +│ │ 姓名 │ │ 角色选择 │ │ +│ └──────────┘ └──────────┘ │ +│ ┌─────────────────────────────────┐ │ +│ │ 人设描述 textarea │ │ +│ └─────────────────────────────────┘ │ +│ [标签 1] [标签 2] [标签 3] │ +│ │ +│ 3. 核心参数 │ +│ 叙事风格 故事篇幅 │ +│ [爽文][治愈] [短篇][中篇] │ +│ [热血][玄幻] [长篇][史诗] │ +│ [职场][赛博] │ +│ │ +│ ┌─────────────────────────────────┐ │ +│ │ 生成平行人生剧本 │ │ +│ └─────────────────────────────────┘ │ +└─────────────────────────────────────┘ +``` + +## 4. 动画效果 + +### 4.1 星芒加载动画 + +双环旋转动画,用于"命运编织中"状态: + +```css +.starlight-loader { + position: relative; + width: 80rpx; + height: 80rpx; +} +/* 外环:1.5s cubic-bezier */ +/* 内环:70% 大小,延迟 0.75s */ +``` + +### 4.2 按钮点击反馈 + +- `transform: scale(0.98)` +- 阴影减弱 + +### 4.3 参数选项激活态 + +- 背景:`rgba(168,85,247,0.25)` +- 边框:`#C084FC` +- 阴影:`0 0 15px rgba(168,85,247,0.4)` + +## 5. 响应式断点 + +| 断点 | 调整 | +|------|------| +| ≤375px | 参数容器改为单列 | +| ≤320px | 人设网格改为单列,输入框高度 80rpx | + +## 6. 新增功能:灵感气泡 + +为剧本主题输入添加提示词功能: + +提示词列表:`["觉醒时刻", "命运转折", "自我救赎", "巅峰重现", "治愈之旅", "星际穿越"]` + +展示形式:可点击的芯片按钮,点击后将词汇追加到输入框。 + +## 7. 实现检查清单 + +- [ ] 更新全局样式变量(玻璃态、渐变) +- [ ] 调整圆角为 40rpx 统一标准 +- [ ] 调整输入框高度为 88rpx +- [ ] 调整按钮高度为 96rpx +- [ ] 实现星芒加载动画 +- [ ] 添加灵感气泡功能 +- [ ] 优化参数选项激活态样式 +- [ ] 添加响应式断点适配 + +## 8. 验收标准 + +1. 视觉还原度 ≥95%(与原型对比) +2. 动画流畅,无明显卡顿 +3. 各尺寸屏幕正常显示 +4. 无控制台错误 diff --git a/mini-program-prototype/start-server.bat b/mini-program-prototype/start-server.bat new file mode 100644 index 0000000..e1a791b --- /dev/null +++ b/mini-program-prototype/start-server.bat @@ -0,0 +1,11 @@ +@echo off +chcp 65001 >nul +:: 启动 Life OS 原型预览服务器 + +echo 🚀 启动 Life OS 原型预览服务器... +echo 📱 访问地址:http://localhost:8080 +echo 💡 按 Ctrl+C 停止服务器 +echo "" + +cd /d "%~dp0" +python -m http.server 18181 diff --git a/mini-program-prototype/start-server.sh b/mini-program-prototype/start-server.sh index 017d6ac..65d9672 100755 --- a/mini-program-prototype/start-server.sh +++ b/mini-program-prototype/start-server.sh @@ -7,4 +7,4 @@ echo "💡 按 Ctrl+C 停止服务器" echo "" cd "$(dirname "$0")" -python3 -m http.server 8080 +python3 -m http.server 18181 diff --git a/mini-program/src/pages/login/index.vue b/mini-program/src/pages/login/index.vue index 4866b95..a5fca19 100644 --- a/mini-program/src/pages/login/index.vue +++ b/mini-program/src/pages/login/index.vue @@ -155,6 +155,12 @@ const handleLogin = async () => { min-height: 100vh; background: linear-gradient(180deg, #0F071A 0%, #1A0B2E 50%, #0F071A 100%); position: relative; + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; +} + +/* 标题字体 - Cinzel (原型标准) */ +.title.font-serif { + font-family: 'Cinzel', 'Inter', serif; } .status-bar { diff --git a/mini-program/src/pages/main/PathView.vue b/mini-program/src/pages/main/PathView.vue index ba3ab29..729533e 100644 --- a/mini-program/src/pages/main/PathView.vue +++ b/mini-program/src/pages/main/PathView.vue @@ -95,6 +95,7 @@ onMounted(() => { flex-direction: column; gap: 32rpx; min-height: 100%; + font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; } .page-title { @@ -103,6 +104,7 @@ onMounted(() => { color: rgba(255, 255, 255, 0.9); margin-bottom: 8rpx; letter-spacing: 4rpx; + font-family: 'Cinzel', 'Inter', serif; } .empty-state { diff --git a/mini-program/src/pages/main/RecordView.vue b/mini-program/src/pages/main/RecordView.vue index dfd67a1..3576ad4 100644 --- a/mini-program/src/pages/main/RecordView.vue +++ b/mini-program/src/pages/main/RecordView.vue @@ -111,9 +111,7 @@ const saveEvent = async () => { }, 1500) } -onMounted(() => { - store.fetchEvents() -}) +// 数据已在主页面预加载,无需重复加载