feat:交接

This commit is contained in:
2025-11-04 19:25:16 +08:00
parent 4b8498203d
commit d45e556c20
20 changed files with 4441 additions and 677 deletions

55
README.md Normal file
View File

@@ -0,0 +1,55 @@
# 项目说明
本项目是基于 Uni-AppVue 3 + Vite的多端前端应用支持 H5 与多类小程序目标(如微信小程序)。项目采用 Pinia 管理状态,按“页面/组件/状态/工具”模块化组织,便于扩展与维护。
## 架构概览
- 技术栈Vue 3、Pinia、Vite 5、Uni-App 3.x、vue-i18n。
- 路由与页面:通过 `src/pages.json` 定义多端路由和 TabBar页面文件位于 `src/pages/**`
- 状态管理:`src/stores/` 按领域拆分 Store`useUserStore`)。
- 样式与资源:全局样式 `src/uni.scss`,通用样式在 `src/styles/`,静态资源在 `src/static/`
- 关键入口:`src/main.js`(应用创建)、`src/App.vue`(全局生命周期与壳层)。
- 构建配置:`vite.config.js`(插件/构建)、`manifest.json`(应用与平台配置)。
目录结构示例:
```
src/
pages/ ... # 业务页面splash, index, mine, chat, recharge 等)
components/ ... # 复用组件
stores/ ... # Pinia stores
utils/ ... # 工具函数
styles/ ... # 通用样式
App.vue, main.js, pages.json, uni.scss
```
## 主要功能
- 启动与协议:`pages/splash/splash``pages/agreement/agreement`
- 首页与我的:`pages/index/index``pages/mine/mine`
- 创作与脚本编辑:`pages/create/create``pages/script/editor`
- 语音与聊天:`pages/voice/clone``pages/chat/chat`
- 充值与记录:`pages/recharge/recharge``pages/recharge/history`
## 本地开发与构建
- 安装依赖:
```
npm install
```
- 开发调试H5
```
npm run dev:h5
```
- 开发调试(微信小程序):
```
npm run dev:mp-weixin
```
- 生产构建H5/微信小程序):
```
npm run build:h5
npm run build:mp-weixin
```
构建产物输出到 `dist/`
## 配置与环境
- 平台与路由:`src/pages.json`;应用配置:`src/manifest.json`
- 环境变量:使用 `import.meta.env`Vite避免提交敏感信息。
如需更详细的接口与需求,可参考仓库中的 `API接口文档.md``产品设计需求文档.md`