refactor(*): 改造为前端 Monorepo 模板工程
包命名通用化,移植小程序模板与公共代码,补齐 Claude Code 配置。 包结构: - qqqf-admin → admin(Vue3 SPA 后台) - official-site-web → site(Nuxt 3 官网) - qqqf-mp → mini(UniApp 小程序) - 新增 web(Vue3 SPA H5/客户端),删除空目录 qqqf-web 公共代码: - @common/utils 补齐 common/date-time/mask/money/regex 纯工具函数 - @common/vue-kit 新增平台无关的 useLoading - @common/sdk 去业务化:ClientId/Product 枚举改为 string 类型,移除硬编码的 passport/wx-distributer 域名与监控上报地址凭证,改由 SdkConfig 与 webMonitor.setupEndpoint() 注入;根入口不再导出小程序模块, 避免 Web 项目引入 uni.* 类型 mini 包以 uniapp-mp-template 为准重建,SDK 接 @common/sdk:新增 stores/services/api-auth/composables/page-layout/utils-sdk(懒加载单例) 去业务化:所有 .env.* 清空为占位符(原含真实域名与 client secret), config 中业务值改为 TODO 占位 Claude Code 配置: - .claude/settings.json(权限白名单 + Figma MCP) - .claude/skills 移植 4 个 skill 并适配 monorepo, api-diff-sync 的文档根目录由硬编码改为可配置 - 新增 CLAUDE.md,重写 ARCHITECTURE.md 顺带修复: - 登录不持久化 Token:services/auth-service 补齐 saveToken2Storage + sdk.core.loginByToken + store 三步 - 跨端崩溃:token-manager/web-monitor 的 window 访问加 typeof 守卫 - dev:project/build:project 对 Vue/Nuxt 项目忽略 --env, 现按 dev:<env>/build:<env> 脚本执行 - .env.* 中的 NODE_ENV=production 导致 dev server 报警告,已移除 - unocss 0.58/0.64 与 Nuxt 3.21 的 Vite 7 不兼容,升级至 66.x - App.vue 的 @import 改为 @use(Dart Sass 3.0 将移除 @import) - 修复 pnpm-workspace.yaml 的 BOM 与 build-changed.ts 的 lint 报错 校验:pnpm lint 全绿,4 个包 type-check 通过, 4 个包 dev 与 build(含 build:project --env)全部通过 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Showing
with
2603 additions
and
448 deletions
.claude/settings.json
0 → 100644
.claude/skills/api-diff-sync/SKILL.md
0 → 100644
.claude/skills/figma-restore/SKILL.md
0 → 100644
This diff is collapsed.
Click to expand it.
.claude/skills/req-diff/SKILL.md
0 → 100644
.claude/skills/update-ui/SKILL.md
0 → 100644
This diff is collapsed.
Click to expand it.
CLAUDE.md
0 → 100644
| ... | ... | @@ -2,8 +2,11 @@ |
| "name": "@common/sdk", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "description": "统一业务平台 SDK 封装(uniplat-sdk + HTTP 适配 + Token 管理)", | ||
| "exports": { | ||
| ".": "./src/index.ts", | ||
| "./adapters": "./src/adapters/index.ts", | ||
| "./core": "./src/core/index.ts", | ||
| "./mini-program": "./src/mini-program/index.ts", | ||
| "./services/login-service": "./src/services/login-service.ts", | ||
| "./services/verify-service": "./src/services/verify-service.ts" | ||
| ... | ... | @@ -11,10 +14,6 @@ |
| "main": "src/index.ts", | ||
| "dependencies": { | ||
| "axios": "^0.27.2", | ||
| "lodash": "^4.17.21", | ||
| "uniplat-sdk": "^0.1.734-private" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/lodash": "^4.17.24" | ||
| } | ||
| } |
common/utils/src/common.ts
0 → 100644
common/utils/src/date-time.ts
0 → 100644
common/utils/src/mask.ts
0 → 100644
common/utils/src/money.ts
0 → 100644
common/utils/src/regex.ts
0 → 100644
packages/admin/.env.development
0 → 100644
packages/admin/.env.production
0 → 100644
packages/admin/.env.staging
0 → 100644
packages/admin/.env.test
0 → 100644
| { | ||
| "name": "qqqf-admin", | ||
| "name": "admin", | ||
| "type": "module", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "description": "管理后台模板(Vue 3 + Vite SPA)", | ||
| "scripts": { | ||
| "dev": "vite", | ||
| "build": "vue-tsc && vite build", | ||
| "preview": "vite preview" | ||
| "dev:test": "vite --mode test", | ||
| "dev:staging": "vite --mode staging", | ||
| "dev:production": "vite --mode production", | ||
| "build": "vue-tsc --noEmit && vite build", | ||
| "build:test": "vue-tsc --noEmit && vite build --mode test", | ||
| "build:staging": "vue-tsc --noEmit && vite build --mode staging", | ||
| "build:production": "vue-tsc --noEmit && vite build --mode production", | ||
| "preview": "vite preview", | ||
| "type-check": "vue-tsc --noEmit" | ||
| }, | ||
| "dependencies": { | ||
| "@common/sdk": "workspace:*", | ||
| "@common/utils": "workspace:*", | ||
| "@common/vue-kit": "workspace:*", | ||
| "ant-design-vue": "^4.2.6", | ||
| "axios": "^1.7.9", | ||
| "pinia": "^2.1.7", | ||
| "vue": "^3.4.0", | ||
| "vue-router": "^4.3.0" | ||
| ... | ... | @@ -18,7 +28,6 @@ |
| "devDependencies": { | ||
| "@vitejs/plugin-vue": "^5.1.0", | ||
| "typescript": "^5.6.3", | ||
| "unocss": "^0.58.0", | ||
| "vite": "^5.4.0", | ||
| "vue-tsc": "^2.1.0" | ||
| } | ||
| ... | ... |
packages/admin/src/api/index.ts
0 → 100644
packages/admin/src/composables/index.ts
0 → 100644
packages/admin/src/config/index.ts
0 → 100644
packages/admin/src/services/auth-service.ts
0 → 100644
packages/admin/src/services/index.ts
0 → 100644
packages/admin/src/stores/index.ts
0 → 100644
packages/admin/src/types/index.ts
0 → 100644
packages/admin/src/utils/index.ts
0 → 100644
packages/mini/.env.development
0 → 100644
packages/mini/.env.production
0 → 100644
packages/mini/.env.staging
0 → 100644
packages/mini/.env.test
0 → 100644
| { | ||
| "name": "qqqf-mp", | ||
| "version": "0.0.0", | ||
| "name": "mini", | ||
| "version": "1.0.0", | ||
| "private": true, | ||
| "description": "小程序模板(UniApp + Vue 3 + TypeScript)", | ||
| "scripts": { | ||
| "dev": "uni -p mp-weixin", | ||
| "dev:h5": "uni", | ||
| ... | ... | @@ -24,6 +25,7 @@ |
| "dependencies": { | ||
| "@common/sdk": "workspace:*", | ||
| "@common/utils": "workspace:*", | ||
| "@common/vue-kit": "workspace:*", | ||
| "@dcloudio/uni-app": "3.0.0-4070520250711001", | ||
| "@dcloudio/uni-components": "3.0.0-4070520250711001", | ||
| "@dcloudio/uni-h5": "3.0.0-4070520250711001", | ||
| ... | ... |
packages/mini/src/api/home.ts
0 → 100644
packages/mini/src/api/index.ts
0 → 100644
File moved
File moved
packages/mini/src/components/index.ts
0 → 100644
packages/mini/src/composables/index.ts
0 → 100644
packages/mini/src/composables/useToast.ts
0 → 100644
packages/mini/src/config/index.ts
0 → 100644
packages/mini/src/env.d.ts
0 → 100644
packages/mini/src/services/auth-service.ts
0 → 100644
packages/mini/src/services/index.ts
0 → 100644
packages/mini/src/stores/useUserInfo.ts
0 → 100644
packages/mini/src/utils/index.ts
0 → 100644
packages/official-site-web/.env.test
deleted
100644 → 0
packages/qqqf-admin/.env.development
deleted
100644 → 0
packages/qqqf-admin/.env.production
deleted
100644 → 0
packages/qqqf-admin/.env.staging
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/qqqf-admin/.env.test
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/qqqf-admin/src/api/index.ts
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/.env.development
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/.env.production
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/.env.staging
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/.env.test
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/src/api/home.ts
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/src/config/index.ts
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/src/env.d.ts
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
packages/qqqf-mp/src/utils/index.ts
deleted
100644 → 0
This diff is collapsed.
Click to expand it.
packages/site/.env.development
0 → 100644
This diff is collapsed.
Click to expand it.
packages/site/.env.production
0 → 100644
This diff is collapsed.
Click to expand it.
packages/site/.env.staging
0 → 100644
This diff is collapsed.
Click to expand it.
packages/site/.env.test
0 → 100644
This diff is collapsed.
Click to expand it.
packages/site/api/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
packages/site/config/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
packages/site/pages/index.vue
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
packages/web/.env.development
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/.env.production
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/.env.staging
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/.env.test
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/env.d.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/index.html
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/package.json
0 → 100644
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
packages/web/src/api/auth.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/api/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/api/request.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/assets/styles/index.scss
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/composables/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/config/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/main.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/pages/index.vue
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/pages/login/index.vue
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/router/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/services/auth-service.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/services/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/stores/auth.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/stores/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/types/auth.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/types/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/utils/index.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/src/utils/toast.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/tsconfig.json
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/uno.config.ts
0 → 100644
This diff is collapsed.
Click to expand it.
packages/web/vite.config.ts
0 → 100644
This diff is collapsed.
Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment