1 changed files with 163 additions and 264 deletions
@ -1,266 +1,165 @@ |
|||
<h1 style="text-align: center">websoft-uniapp 网宿软件uniapp端</h1> |
|||
# 项目技术栈文档 |
|||
|
|||
## 项目概述 |
|||
**项目名称**: 云·企业官网 |
|||
**版本**: 1.10.1 |
|||
**项目类型**: Vue 3 + TypeScript 前端管理框架 |
|||
**构建工具**: Vite 3.x |
|||
|
|||
## 核心技术栈 |
|||
|
|||
### 前端框架 |
|||
- **Vue 3.5.3** - 渐进式 JavaScript 框架 |
|||
- **TypeScript 4.8.2** - JavaScript 的超集,提供静态类型检查 |
|||
- **Vite 3.0.9** - 下一代前端构建工具 |
|||
|
|||
### UI 组件库 |
|||
- **Ant Design Vue 3.2.11** - 企业级 UI 设计语言和组件库 |
|||
- **@ant-design/icons-vue 6.1.0** - Ant Design 图标库 |
|||
- **@ant-design/colors 6.0.0** - Ant Design 色彩系统 |
|||
|
|||
### 状态管理与路由 |
|||
- **Pinia 2.0.21** - Vue 3 官方推荐的状态管理库 |
|||
- **Vue Router 4.1.5** - Vue.js 官方路由管理器 |
|||
|
|||
### 样式处理 |
|||
- **Less 4.1.3** - CSS 预处理器 |
|||
- **TailwindCSS 3.4.6** - 实用优先的 CSS 框架 |
|||
- **PostCSS 8.4.39** - CSS 后处理器 |
|||
- **Autoprefixer 10.4.19** - CSS 自动添加浏览器前缀 |
|||
|
|||
### 国际化 |
|||
- **Vue I18n 9.2.2** - Vue.js 国际化插件 |
|||
|
|||
### 数据可视化 |
|||
- **ECharts 5.3.3** - 百度开源的数据可视化库 |
|||
- **Vue-ECharts 6.2.3** - ECharts 的 Vue 3 组件 |
|||
- **echarts-wordcloud 2.0.0** - ECharts 词云插件 |
|||
- **@antv/g2 5.1.22** - 蚂蚁金服数据可视化语法 |
|||
|
|||
### 富文本编辑器s |
|||
- **TinyMCE 5.10.5** - 富文本编辑器 |
|||
- **ByteMD 1.17.2** - Markdown 编辑器 |
|||
- **md-editor-v3 5.2.3** - Vue 3 Markdown 编辑器 |
|||
|
|||
### 工具库 |
|||
- **Axios 0.27.2** - HTTP 客户端 |
|||
- **Lodash-es 4.17.21** - JavaScript 实用工具库 |
|||
- **Day.js 1.11.5** - 轻量级日期处理库 |
|||
- **Crypto-js 4.2.0** - 加密库 |
|||
- **js-cookie 3.0.5** - Cookie 操作库 |
|||
- **js-md5 0.7.3** - MD5 加密库 |
|||
- **mitt 3.0.1** - 事件总线 |
|||
- **nprogress 0.2.0** - 页面加载进度条 |
|||
|
|||
### 文件处理 |
|||
- **ExcelJS 4.3.0** - Excel 文件处理 |
|||
- **XLSX 0.18.5** - 电子表格文件处理 |
|||
- **ali-oss 6.18.0** - 阿里云对象存储 |
|||
|
|||
### 交互增强 |
|||
- **SortableJS 1.15.0** - 拖拽排序库 |
|||
- **vuedraggable 4.1.0** - Vue 拖拽组件 |
|||
- **CropperJS 1.5.12** - 图片裁剪库 |
|||
- **CountUp.js 2.3.2** - 数字动画库 |
|||
- **JSBarcode 3.11.5** - 条形码生成库 |
|||
|
|||
### 地图服务 |
|||
- **@amap/amap-jsapi-loader 1.0.1** - 高德地图 JS API 加载器 |
|||
|
|||
### 实时通信 |
|||
- **socket.io-client 4.7.1** - WebSocket 客户端 |
|||
|
|||
### 视频播放 |
|||
- **xgplayer 2.31.7** - 西瓜视频播放器 |
|||
|
|||
### 企业微信 |
|||
- **@wecom/jssdk 1.3.1** - 企业微信 JS SDK |
|||
|
|||
## 开发工具配置 |
|||
|
|||
### 代码质量 |
|||
- **ESLint 8.23.0** - JavaScript/TypeScript 代码检查工具 |
|||
- **Prettier 2.7.1** - 代码格式化工具 |
|||
- **@typescript-eslint/eslint-plugin 5.36.1** - TypeScript ESLint 插件 |
|||
- **eslint-plugin-vue 9.4.0** - Vue ESLint 插件 |
|||
|
|||
### 构建优化 |
|||
- **@vitejs/plugin-vue 3.0.3** - Vite Vue 插件 |
|||
- **@vitejs/plugin-legacy 2.0.1** - 传统浏览器兼容性插件 |
|||
- **vite-plugin-compression 0.5.1** - Gzip 压缩插件 |
|||
- **unplugin-vue-components 0.22.4** - 组件自动导入插件 |
|||
- **terser 5.15.0** - JavaScript 压缩工具 |
|||
|
|||
### 类型支持 |
|||
- **@types/node 18.7.14** - Node.js 类型定义 |
|||
- **@types/lodash-es 4.17.6** - Lodash 类型定义 |
|||
- **@types/nprogress 0.2.0** - NProgress 类型定义 |
|||
- **@types/sortablejs 1.13.0** - SortableJS 类型定义 |
|||
|
|||
## 项目结构 |
|||
|
|||
``` |
|||
src/ |
|||
├── components/ # 公共组件 |
|||
├── config/ # 配置文件 |
|||
├── layout/ # 布局组件 |
|||
├── styles/ # 样式文件 |
|||
├── utils/ # 工具函数 |
|||
├── App.vue # 根组件 |
|||
└── main.ts # 入口文件 |
|||
``` |
|||
|
|||
## 构建配置 |
|||
|
|||
### Vite 配置特性 |
|||
- 路径别名配置 (`@/` 指向 `src/`) |
|||
- 组件按需导入 |
|||
- Gzip 压缩 |
|||
- Less 预处理器支持 |
|||
- 动态主题支持 |
|||
- 构建优化配置 |
|||
|
|||
### TypeScript 配置 |
|||
- 严格模式启用 |
|||
- ES Next 目标 |
|||
- 路径映射支持 |
|||
- 装饰器支持 |
|||
|
|||
## 开发命令 |
|||
|
|||
```bash |
|||
# 开发环境启动 |
|||
npm run dev |
|||
|
|||
# 生产环境构建 |
|||
npm run build |
|||
|
|||
# 代码检查 |
|||
npm run lint:eslint |
|||
|
|||
# 清理缓存 |
|||
npm run clean:cache |
|||
|
|||
# 清理依赖 |
|||
npm run clean:lib |
|||
|
|||
# 构建 CSS |
|||
npm run build-css |
|||
``` |
|||
|
|||
## 浏览器兼容性 |
|||
- 目标浏览器: Chrome 63+ |
|||
- 支持现代浏览器特性 |
|||
- 通过 Vite Legacy 插件支持旧版浏览器 |
|||
|
|||
#### 项目简介 |
|||
websoft基于Spring、SpringBoot、SpringMVC、SpringSecurity、jjwt、MyBatis、Druid等搭建,前后端分离模式,适用于快递开发和打包为微信小程序、H5、安卓apk、苹果ios、抖音小程序、支付宝小程序等应用 |
|||
## 特色功能 |
|||
1. **组件按需导入** - 减少打包体积 |
|||
2. **动态主题** - 支持主题切换 |
|||
3. **国际化支持** - 多语言切换 |
|||
4. **丰富的数据可视化** - 多种图表组件 |
|||
5. **完整的文件处理** - 支持 Excel、图片等文件操作 |
|||
6. **企业级功能** - 权限管理、工作流等 |
|||
|
|||
|
|||
|
|||
# 官网体验地址(里面有演示地址与文档) |
|||
| 官网文档地址 | https://www.gxwebsoft.com | |
|||
|---|--------------------------------------------------------------------------------------------------------------------------------------| |
|||
| 管理后台演示地址: | http://10093.admin.gxwebsoft.com | |
|||
| 关注公众号点体验小程序与H5 |  | |
|||
|
|||
|
|||
|
|||
#### 核心依赖 |
|||
|
|||
| 依赖 | 版本 | |
|||
|-----------------|--------| |
|||
| Spring Boot | 2.7.x | |
|||
| weixin-java | 4.4.0 | |
|||
| Spring Security | 2.7.10 | |
|||
| Mybatis Plus | 3.5.2 | |
|||
| hutool | 5.8.16 | |
|||
| swagger | 3.0.0 | |
|||
|
|||
# 本地安装 |
|||
### 基本环境(必备) |
|||
- 1、JDK:8+ |
|||
- 2、Redis 3.0+ |
|||
- 3、Maven 3.0+ |
|||
- 4、MYSQL 5.7+ |
|||
- 5、Node v8+ |
|||
### 开发工具 |
|||
Idea、webstorm、vscode |
|||
|
|||
### 前端系统工程(UNIAPP端) |
|||
|
|||
1、下载代码 |
|||
``` |
|||
git clone https://gitee.com/gxwebsoft/websoft-uniapp.git |
|||
``` |
|||
2、使用HBuiderX导入项目: |
|||
|
|||
3、安装依赖: |
|||
|
|||
``` |
|||
npm install luch-request -S |
|||
``` |
|||
|
|||
### 后台前端工程(JAVA端) |
|||
1、请确保redis已经安装启动 |
|||
|
|||
2、下载代码 |
|||
``` |
|||
git clone https://gitee.com/gxwebsoft/websoft-java.git |
|||
``` |
|||
3、使用HBuiderX导入项目: |
|||
|
|||
4、安装依赖: |
|||
|
|||
``` |
|||
npm install luch-request -S |
|||
``` |
|||
|
|||
### 后台前端工程(VUE端) |
|||
1、请确保本地已经安装node,建议node8或者node10 |
|||
|
|||
2、下载代码 |
|||
``` |
|||
git clone https://gitee.com/gxwebsoft/websoft-vue.git |
|||
``` |
|||
3、cnpm install或者yarn install,当前所有命令必须当前工程目录下进行: |
|||
|
|||
 |
|||
|
|||
4、安装依赖失败 |
|||
``` |
|||
yarn |
|||
``` |
|||
5、在控制台输入命令:npm run dev,控制台打印出如下画面,恭喜表示本项目启动成功拉。 |
|||
|
|||
5、打开浏览器输入地址如图: |
|||
|
|||
默认超管账户密码:admin/123456 |
|||
|
|||
|
|||
# nginx线上部署 |
|||
|
|||
### 后台系统(Java端) |
|||
|
|||
1、mvn install 或者直接idea打成jar包 |
|||
|
|||
2、配置nginx 反向代理如下: |
|||
``` |
|||
server{ |
|||
listen 443 ssl; |
|||
server_name api.gxwebsoft.com; |
|||
#listen [::]:81 default_server ipv6only=on; |
|||
#ssl on; |
|||
ssl_certificate httpssl/gxwebsoft.cn.pem; |
|||
ssl_certificate_key httpssl/api.gxwebsoft.cn.key; |
|||
ssl_session_timeout 5m; |
|||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; |
|||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
|||
ssl_prefer_server_ciphers on; |
|||
|
|||
|
|||
#error_page 404 /404.html; |
|||
#include enable-php.conf; |
|||
|
|||
location / { |
|||
proxy_pass http://127.0.0.1:9090; |
|||
proxy_set_header X-Forwarded-Proto $scheme; |
|||
proxy_set_header X-Forwarded-Port $server_port; |
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|||
proxy_set_header Upgrade $http_upgrade; |
|||
proxy_set_header Connection "upgrade"; |
|||
} |
|||
|
|||
|
|||
access_log /home/wwwlogs/websoftapi.log; |
|||
|
|||
} |
|||
``` |
|||
|
|||
我配置的了ssl证书,如果不需要证书配置如下即可: |
|||
|
|||
``` |
|||
server{ |
|||
listen 80; |
|||
server_name api.gxwebsoft.com; |
|||
#listen [::]:81 default_server ipv6only=on; |
|||
|
|||
#error_page 404 /404.html; |
|||
#include enable-php.conf; |
|||
|
|||
location / { |
|||
proxy_pass http://127.0.0.1:8000; |
|||
proxy_set_header X-Forwarded-Proto $scheme; |
|||
proxy_set_header X-Forwarded-Port $server_port; |
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|||
proxy_set_header Upgrade $http_upgrade; |
|||
proxy_set_header Connection "upgrade"; |
|||
} |
|||
|
|||
access_log /home/wwwlogs/websoftapi.log; |
|||
|
|||
} |
|||
``` |
|||
|
|||
|
|||
|
|||
### 后台前端工程(VUE端) |
|||
1、输入命令:npm run build:prod 编译打包 |
|||
|
|||
2、把打包后的dist目录代码上传到服务器 |
|||
|
|||
3、配置nginx如下: |
|||
``` |
|||
server |
|||
{ |
|||
listen 443 ssl; |
|||
#listen [::]:81 default_server ipv6only=on; |
|||
server_name www.gxwesboft.com; |
|||
#ssl on; |
|||
ssl_certificate httpssl/www.gxwebsoft.com.pem; |
|||
ssl_certificate_key httpssl/www.gxwebsoft.com.key; |
|||
ssl_session_timeout 5m; |
|||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; |
|||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
|||
ssl_prefer_server_ciphers on; |
|||
index index.html; |
|||
root /home/wwwroot/system/websoft; |
|||
|
|||
|
|||
location / { |
|||
try_files $uri $uri/ @router; |
|||
index index.html; |
|||
· } |
|||
location @router { |
|||
rewrite ^.*$ /index.html last; |
|||
} |
|||
|
|||
|
|||
location ~* \.(eot|ttf|woff)$ { |
|||
# add_header Access-Control-Allow-Origin *; |
|||
} |
|||
|
|||
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ |
|||
{ |
|||
expires 30d; |
|||
} |
|||
|
|||
location ~ .*\.(js|css)?$ |
|||
{ |
|||
expires 12h; |
|||
} |
|||
|
|||
|
|||
access_log /home/wwwlogs/websoftapi.log; |
|||
|
|||
} |
|||
|
|||
``` |
|||
|
|||
不需要证书如上面Java端配置一样去掉相关证书配置 改监听端口80即可 |
|||
|
|||
|
|||
### 功能模块 |
|||
|
|||
* 一:商品模块:商品添加、规格设置,商品上下架等 |
|||
* 二:订单模块:下单、购物车、支付,发货、收货、评价、退款等 |
|||
* 三:营销模块:积分、优惠券、分销、砍价、拼团、秒杀、多门店等 |
|||
* 四:微信模块:自定义菜单、自动回复、微信授权、图文管理、模板消息推送 |
|||
* 五:配置模块:各种配置 |
|||
* 六:用户模块:登陆、注册、会员卡、充值等 |
|||
* 七:其他模块:场地预定模块、办公协同模块等 |
|||
|
|||
|
|||
#### 项目结构 |
|||
项目采用分模块开发方式 |
|||
- gxwebsoft-common 公共模块 |
|||
- gxwebsoft-cms 预定模块 |
|||
- gxwebsoft-shop 商城模块 |
|||
- gxwebsoft-booking 预定模块 |
|||
- gxwebsoft-oa oa模块 |
|||
- gxwebsoft-weixin 微信相关模块 |
|||
- gxwebsoft-generator 代码生成模块 |
|||
|
|||
|
|||
### 技术选型 |
|||
* 1 后端使用技术 |
|||
* 1.1 SpringBoot2 |
|||
* 1.2 mybatis、MyBatis-Plus |
|||
* 1.3 SpringSecurity |
|||
* 1.5 Druid |
|||
* 1.6 Slf4j |
|||
* 1.7 Fastjson |
|||
* 1.8 JWT |
|||
* 1.9 Redis |
|||
* 1.10 eleadmin |
|||
* 1.11 Mysql |
|||
* 1.12 swagger |
|||
* 1.13 WxJava |
|||
* 1.14 Lombok |
|||
* 1.15 Hutool |
|||
|
|||
* 前端使用技术 |
|||
* 2.1 Vue 全家桶 |
|||
* 2.2 Antdv |
|||
* 2.3 uniapp |
|||
|
|||
|
|||
|
|||
|
|||
#### 反馈交流 |
|||
- 喜欢这个系统的小伙伴留下你的小星星啦,star,star哦! |
|||
|
|||
#### 特别鸣谢 |
|||
- mybaitsplus:https://github.com/baomidou/mybatis-plus |
|||
- hutool:https://github.com/looly/hutool |
|||
- eleadmin:https://eleadmin.com/ |
|||
- wxjava:https://github.com/Wechat-Group/WxJava |
|||
- vue:https://github.com/vuejs/vue |
|||
- antdv:https://3x.antdv.com/components/overview-cn |
|||
--- |
|||
*文档生成时间: 2024年* |
|||
|
Loading…
Reference in new issue