|
|
@@ -0,0 +1,79 @@
|
|
|
+# 乡源小程序
|
|
|
+
|
|
|
+本项目为乡源小程序项目源代码。
|
|
|
+
|
|
|
+## 技术栈
|
|
|
+
|
|
|
+### 前端核心技术
|
|
|
+
|
|
|
+- **框架**: Uniapp+Vue 3
|
|
|
+- **状态管理**: Pinia 3.0
|
|
|
+- **语言**: TypeScript
|
|
|
+- **样式预处理器**: Sass
|
|
|
+
|
|
|
+## 项目结构
|
|
|
+
|
|
|
+### 核心依赖
|
|
|
+
|
|
|
+- `pinia`: 状态管理库
|
|
|
+- `naeasy-ui-uniapp`: [NaEasy UI 组件库](./src/components/README.md)
|
|
|
+- `async-validator`: 表单验证
|
|
|
+- `sp-editor`: 富文本编辑器
|
|
|
+- `@imengyu/js-request-transform`: API请求转换工具
|
|
|
+
|
|
|
+### 目录组织
|
|
|
+
|
|
|
+```
|
|
|
+src/
|
|
|
+├── api/ # API请求模块
|
|
|
+│ ├── auth/ # 登录/用户相关API
|
|
|
+│ ├── inhert/ # 村落相关API
|
|
|
+│ ├── map/ # 地图相关API
|
|
|
+│ ├── BaseAppServerRequestModule.ts # 基础请求配置模块
|
|
|
+│ ├── RequestModules.ts # 请求核心模块
|
|
|
+│ ├── CommonContent.ts # 通用内容模块
|
|
|
+├── common/ # 通用功能
|
|
|
+│ ├── components/ # 通用组件
|
|
|
+│ │ ├── parts/ # 页面模块组件拆分
|
|
|
+│ ├── composeabe/ # 组合式函数
|
|
|
+│ ├── config/ # 配置文件
|
|
|
+│ ├── scss/ # 全局样式定义
|
|
|
+├── components/ # NaEasy UI 组件库
|
|
|
+├── pages/ # 页面
|
|
|
+│ ├── article/ # 文章相关页面
|
|
|
+│ ├── dig/ # 挖掘相关页面
|
|
|
+│ ├── editor/ # 编辑相关页面
|
|
|
+│ ├── home/ # 首页相关页面
|
|
|
+│ ├── user/ # 用户相关页面,登录,个人信息
|
|
|
+├── store/ # 状态管理模块
|
|
|
+│ ├── auth/ # 登录状态管理
|
|
|
+├── App.vue # 应用入口
|
|
|
+├── main.ts # 主入口文件
|
|
|
+├── manifest.json # 应用配置
|
|
|
+├── pages.json # 页面配置
|
|
|
+```
|
|
|
+
|
|
|
+## 开发与构建
|
|
|
+
|
|
|
+### 开发命令
|
|
|
+
|
|
|
+```bash
|
|
|
+# 启动H5开发服务器
|
|
|
+npm run dev:h5
|
|
|
+# 启动微信小程序开发服务器
|
|
|
+npm run dev:mp-weixin
|
|
|
+```
|
|
|
+
|
|
|
+### 构建命令
|
|
|
+
|
|
|
+```bash
|
|
|
+# 构建微信小程序版本
|
|
|
+npm run build:mp-weixin
|
|
|
+```
|
|
|
+
|
|
|
+### 类型检查
|
|
|
+
|
|
|
+```bash
|
|
|
+# 执行TypeScript类型检查
|
|
|
+npm run type-check
|
|
|
+```
|