File tree Expand file tree Collapse file tree 3 files changed +144
-48
lines changed
Expand file tree Collapse file tree 3 files changed +144
-48
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # 源码编译运行
2+
3+ !!! Abstract ""
4+
5+ 请使用 v1.3.0 等已发布分支的代码运行 CordysCRM。请勿使用 main 分支,main 分支代码均处于开发或测试阶段,可能存在较明显功能缺陷。
6+
7+ !!! Abstract ""
8+
9+ 目前支持的源码运行环境有: Windows (x86)、Linux(x86 & arm64)、MacOS(x86 & arm64)。
10+
11+ ## 1 项目结构
12+
13+ !!! Abstract ""
14+
15+ ```
16+ ├── backend # 后端项目
17+ │ ├── app # 应用程序模块
18+ │ ├── crm # CRM 核心模块
19+ │ └── framework # 通用框架模块
20+ ├── frontend # 前端项目
21+ │ ├── packages # 前端包管理
22+ │ │ ├── lib-shared # 公共库模块
23+ │ │ │ ├── api # API 封装
24+ │ │ │ ├── assets # 静态资源
25+ │ │ │ ├── enums # 枚举
26+ │ │ │ ├── hooks # 钩子函数
27+ │ │ │ ├── locale # 国际化封装
28+ │ │ │ ├── method # 工具函数
29+ │ │ │ ├── model # 数据模型
30+ │ │ │ ├── types # 全局类型声明
31+ │ │ ├── mobile # 移动端项目
32+ │ │ ├── web # WEB端项目
33+ ├── installer # 安装脚本
34+ ├── conf # 配置文件
35+ │ ├── mysql # MySQL 配置
36+ │ └── redis # Redis 配置
37+ └── shells # 脚本
38+ ```
39+
40+
41+ ## 2 安装基础 POM
42+
43+ !!! Abstract ""
44+
45+ 该命令会将 `parent pom` 安装到本地 Maven 仓库,使其他外部子工程可以获取最新的 `<properties>` 配置。
46+
47+ ```bash
48+ ./mvnw install -N
49+ ```
50+
51+
52+ ## 3 后端构建
53+
54+ !!! Abstract ""
55+
56+ 📌 提示:确保已正确安装 JDK 21 及以上版本和 Maven 环境。
57+
58+ 执行以下命令构建后端模块(如 `framework`、`crm`、`app` 等)并安装到本地仓库:
59+
60+ ```bash
61+ ./mvnw clean install -DskipTests -DskipAntRunForJenkins --file backend/pom.xml
62+ ```
63+
64+ !!! Abstract ""
65+
66+ 参数说明:
67+
68+ * `-DskipTests`: 跳过测试用例执行。
69+ * `-DskipAntRunForJenkins`: 跳过 Jenkins 使用的 Ant 任务。
70+
71+ ## 4 前端构建
72+
73+ !!! Abstract ""
74+
75+ 📌 提示:确保已正确安装 Node.js 和依赖环境。
76+
77+ ### 工程初始化&运行
78+
79+ 在`/packages`目录下运行依赖安装命令:
80+
81+ ```node
82+ pnpm i -w
83+ ```
84+
85+ 统一构建工程:
86+
87+ ```node
88+ npm run build
89+ ```
90+
91+ ### mobile 移动端工程包
92+
93+ 移动端工程由 Vite+Vue3+TS+Vant-UI 基础框架组成。
94+
95+ 运行移动端项目:
96+
97+ ```node
98+ cd package/mobile
99+
100+ npm run dev
101+ ```
102+
103+ 在`package/mobile`下单独构建移动端项目:
104+
105+ ```node
106+ npm run build
107+ ```
108+
109+ ### mobile 调试&开发
110+
111+ 为了方便移动端项目的开发调试,可以通过模拟登录态:
112+
113+ 1. 启动 `web` 项目并完成登录,登录后打开浏览器控制台,复制 `localStorage` 中的 `sessionId` 和 `csrfToken` 两个属性值。
114+ 2. 启动 `mobile` 项目,打开控制台,将第1步复制的 `localStorage` 属性值粘贴至控制台,刷新页面即可模拟登录。若登录过期,重新登录 `web` 项目并复制新的属性值替换即可。
115+ 3. 在手机端调试时,进入页面并完成授权登录后,快速点击 10 次用户名区域,切换到 `我的` 菜单,即可唤起 `Eruda` 调试工具。
116+
117+ ### WEB 端工程包
118+
119+ WEB 端工程由 Vite+Vue3+TS+Naive-UI 基础框架组成。
120+
121+ 运行 WEB 端项目:
122+
123+ ```node
124+ cd package/web
125+
126+ npm run dev
127+ ```
128+
129+ 在`package/web`下单独构建 WEB 端项目:
130+
131+ ```node
132+ npm run build
133+ ```
134+
135+ ## 5 整体打包
136+
137+ !!! Abstract ""
138+
139+ 使用以下命令进行完整的构建与打包:
140+
141+ ```bash
142+ ./mvnw clean package
143+ ```
Original file line number Diff line number Diff line change 4343 - 快速入门 : quick_start.md
4444 - 教学视频 : https://www.bilibili.com/video/BV1bAHczdESW/
4545 - 系统架构 : system_arch.md
46+ - 源码运行 : source_run.md
4647 - 安装部署 :
4748 - 1Panel 安装 : installation/1panel_installtion.md
4849 - 在线安装 : installation/online_installtion.md
You can’t perform that action at this time.
0 commit comments