feat(api): 优化订单模型并添加新字段
- 在 ThinkOrder 模型中添加 type、refundReason 和 isAdmin 字段 - 更新订单列表页面,增加退款原因显示 - 调整表格布局和样式,优化用户体验
This commit is contained in:
@@ -1,266 +1,186 @@
|
||||
<h1 style="text-align: center">websoft-uniapp 网宿软件uniapp端</h1>
|
||||
<div align="center">
|
||||
<h1>🌐 WebSoftAdmin</h1>
|
||||
<p><strong>基于 Vue 3 + Ant Design Vue 的企业级后台管理系统</strong></p>
|
||||
|
||||
#### 项目简介
|
||||
websoft基于Spring、SpringBoot、SpringMVC、SpringSecurity、jjwt、MyBatis、Druid等搭建,前后端分离模式,适用于快递开发和打包为微信小程序、H5、安卓apk、苹果ios、抖音小程序、支付宝小程序等应用
|
||||
<p>
|
||||
<img src="https://img.shields.io/badge/Vue-3.x-4FC08D" alt="Vue">
|
||||
<img src="https://img.shields.io/badge/Ant%20Design%20Vue-3.x-1890FF" alt="Ant Design Vue">
|
||||
<img src="https://img.shields.io/badge/TypeScript-4.x-3178C6" alt="TypeScript">
|
||||
<img src="https://img.shields.io/badge/Vite-4.x-646CFF" alt="Vite">
|
||||
<img src="https://img.shields.io/badge/License-MIT-blue" alt="License">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
## 📖 项目简介
|
||||
|
||||
WebSoftAdmin 是一个基于 **Vue 3 + Ant Design Vue** 构建的现代化企业级后台管理系统,采用最新的前端技术栈:
|
||||
|
||||
- **前端框架**:Vue 3 + TypeScript + Vite
|
||||
- **UI 组件库**:Ant Design Vue 3.x
|
||||
- **富文本编辑器**:TinyMCE(支持图片/视频上传、一键排版)
|
||||
- **图表库**:ECharts + G2
|
||||
- **工具库**:Lodash、Day.js、CryptoJS
|
||||
|
||||
|
||||
|
||||
# 官网体验地址(里面有演示地址与文档)
|
||||
| 官网文档地址 | https://www.gxwebsoft.com |
|
||||
|---|--------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 管理后台演示地址: | http://10093.admin.gxwebsoft.com |
|
||||
| 关注公众号点体验小程序与H5 |  |
|
||||
## 项目演示
|
||||
| 后台管理系统 | https://mp.websoft.top |
|
||||
|--------|-------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| 账号密码 | [立即注册](https://mp.websoft.top/register/?inviteCode=github) |
|
||||
| 关注公众号 |  |
|
||||
|
||||
|
||||
|
||||
#### 核心依赖
|
||||
|
||||
| 依赖 | 版本 |
|
||||
|-----------------|--------|
|
||||
| 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 |
|
||||
## 🛠️ 技术栈
|
||||
|
||||
### 核心技术
|
||||
| 技术 | 版本 | 说明 |
|
||||
|------|------|------|
|
||||
| Vue | 3.x | 渐进式 JavaScript 框架 |
|
||||
| TypeScript | 4.x | JavaScript 的超集 |
|
||||
| Vite | 4.x | 下一代前端构建工具 |
|
||||
| Ant Design Vue | 3.2.11 | 企业级 UI 设计语言 |
|
||||
| EleAdmin Pro | 1.10.1 | 企业级组件库 |
|
||||
|
||||
### 功能组件
|
||||
- **TinyMCE** - 富文本编辑器,支持图片/视频上传
|
||||
- **ECharts** - 数据可视化图表库
|
||||
- **CropperJS** - 图片裁剪组件
|
||||
- **ExcelJS** - Excel 文件处理
|
||||
- **Ali OSS** - 阿里云对象存储
|
||||
|
||||
## 📋 环境要求
|
||||
|
||||
### 基础环境
|
||||
- 🟢 **Node.js 16+**
|
||||
- 📦 **npm 8+ / yarn 1.22+**
|
||||
- 🌐 **现代浏览器**(Chrome 63+、Firefox、Safari、Edge)
|
||||
|
||||
# 本地安装
|
||||
### 基本环境(必备)
|
||||
- 1、JDK:8+
|
||||
- 2、Redis 3.0+
|
||||
- 3、Maven 3.0+
|
||||
- 4、MYSQL 5.7+
|
||||
- 5、Node v8+
|
||||
### 开发工具
|
||||
Idea、webstorm、vscode
|
||||
- **推荐**:VS Code / WebStorm
|
||||
- **插件**:Vetur / Volar(Vue 3 支持)
|
||||
|
||||
### 前端系统工程(UNIAPP端)
|
||||
## 🚀 快速开始
|
||||
|
||||
1、下载代码
|
||||
```
|
||||
git clone https://gitee.com/gxwebsoft/websoft-uniapp.git
|
||||
```
|
||||
2、使用HBuiderX导入项目:
|
||||
|
||||
3、安装依赖:
|
||||
|
||||
```
|
||||
npm install luch-request -S
|
||||
### 1. 克隆项目
|
||||
```bash
|
||||
git clone https://github.com/websoft-top/mp-vue.git
|
||||
cd mp-vue
|
||||
```
|
||||
|
||||
### 后台前端工程(JAVA端)
|
||||
1、请确保redis已经安装启动
|
||||
### 2. 安装依赖
|
||||
```bash
|
||||
# 使用 npm
|
||||
npm install
|
||||
|
||||
2、下载代码
|
||||
```
|
||||
git clone https://gitee.com/gxwebsoft/websoft-java.git
|
||||
```
|
||||
3、使用HBuiderX导入项目:
|
||||
|
||||
4、安装依赖:
|
||||
|
||||
```
|
||||
npm install luch-request -S
|
||||
# 或使用 yarn
|
||||
yarn install
|
||||
```
|
||||
|
||||
### 后台前端工程(VUE端)
|
||||
1、请确保本地已经安装node,建议node8或者node10
|
||||
### 3. 配置环境变量
|
||||
```bash
|
||||
# 复制环境变量示例文件
|
||||
cp .env.example .env
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
# 编辑 .env 文件,填入您的配置信息
|
||||
# 注意:请不要将 .env 文件提交到版本控制系统
|
||||
```
|
||||
|
||||
我配置的了ssl证书,如果不需要证书配置如下即可:
|
||||
### 4. 启动开发服务器
|
||||
```bash
|
||||
# 开发模式
|
||||
npm run dev
|
||||
|
||||
```
|
||||
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;
|
||||
|
||||
}
|
||||
# 或
|
||||
yarn dev
|
||||
```
|
||||
|
||||
访问 `http://localhost:3000` 即可看到管理后台。
|
||||
|
||||
### 5. 构建生产版本
|
||||
```bash
|
||||
# 生产构建
|
||||
npm run build
|
||||
|
||||
### 后台前端工程(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;
|
||||
|
||||
}
|
||||
|
||||
# 预览构建结果
|
||||
npm run serve
|
||||
```
|
||||
|
||||
不需要证书如上面Java端配置一样去掉相关证书配置 改监听端口80即可
|
||||
## ⚙️ 环境变量配置
|
||||
|
||||
项目使用环境变量来管理敏感信息和配置。请按照以下步骤配置:
|
||||
|
||||
### 功能模块
|
||||
### 必需配置
|
||||
```bash
|
||||
# API 配置
|
||||
VITE_API_URL=https://your-api.com/api # 后端 API 地址
|
||||
VITE_SERVER_API_URL=https://your-server.com/api # 服务端 API 地址
|
||||
VITE_FILE_SERVER=https://your-file-server.com # 文件服务器地址
|
||||
|
||||
* 一:商品模块:商品添加、规格设置,商品上下架等
|
||||
* 二:订单模块:下单、购物车、支付,发货、收货、评价、退款等
|
||||
* 三:营销模块:积分、优惠券、分销、砍价、拼团、秒杀、多门店等
|
||||
* 四:微信模块:自定义菜单、自动回复、微信授权、图文管理、模板消息推送
|
||||
* 五:配置模块:各种配置
|
||||
* 六:用户模块:登陆、注册、会员卡、充值等
|
||||
* 七:其他模块:场地预定模块、办公协同模块等
|
||||
# 应用配置
|
||||
VITE_APP_SECRET=your_app_secret # 应用密钥
|
||||
VITE_TENANT_ID=your_tenant_id # 租户 ID
|
||||
```
|
||||
|
||||
### 可选配置
|
||||
```bash
|
||||
# 高德地图 (如需使用地图功能)
|
||||
VITE_MAP_KEY=your_map_key # 高德地图 Key
|
||||
VITE_MAP_CODE=your_map_security_code # 高德地图安全密钥
|
||||
|
||||
#### 项目结构
|
||||
项目采用分模块开发方式
|
||||
- gxwebsoft-common 公共模块
|
||||
- gxwebsoft-cms 预定模块
|
||||
- gxwebsoft-shop 商城模块
|
||||
- gxwebsoft-booking 预定模块
|
||||
- gxwebsoft-oa oa模块
|
||||
- gxwebsoft-weixin 微信相关模块
|
||||
- gxwebsoft-generator 代码生成模块
|
||||
# WebSoftAdmin 授权 (商业版功能)
|
||||
VITE_LICENSE_CODE=your_license_code # 授权码
|
||||
```
|
||||
|
||||
### 获取配置信息
|
||||
- **高德地图密钥**:访问 [高德开放平台](https://lbs.amap.com/) 申请
|
||||
- **WebSoftAdmin 授权码**:联系 [官方网站](https://websoft.top/) 获取
|
||||
- **其他 API 配置**:根据您的后端服务配置
|
||||
|
||||
### 技术选型
|
||||
* 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
|
||||
### 📝 内容管理系统
|
||||
- **文章管理**:支持富文本编辑、图片/视频上传
|
||||
- **一键排版**:智能文章格式优化,包含10种专业排版样式
|
||||
- **媒体库**:图片/视频文件管理,支持分组和搜索
|
||||
- **首行缩进**:中文段落格式智能切换
|
||||
|
||||
### 🛒 商城管理
|
||||
- **商品管理**:商品信息编辑、规格设置
|
||||
- **订单管理**:订单流程跟踪
|
||||
- **库存管理**:商品库存监控
|
||||
|
||||
### 👥 用户权限
|
||||
- **用户管理**:用户信息维护
|
||||
- **角色权限**:基于角色的访问控制
|
||||
- **菜单管理**:动态菜单配置
|
||||
|
||||
## 🎨 富文本编辑器特色功能
|
||||
|
||||
#### 反馈交流
|
||||
- 喜欢这个系统的小伙伴留下你的小星星啦,star,star哦!
|
||||
### 📸 媒体上传
|
||||
- **图片上传**:支持拖拽、粘贴、文件选择
|
||||
- **视频上传**:支持多种视频格式
|
||||
- **媒体库**:统一的媒体文件管理
|
||||
- **OSS 存储**:阿里云对象存储集成
|
||||
|
||||
#### 特别鸣谢
|
||||
- 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
|
||||
### ✨ 智能排版
|
||||
- **一键排版**:10种专业排版优化
|
||||
- **首行缩进**:中文段落格式切换
|
||||
- **样式优化**:标题、段落、列表、表格等元素美化
|
||||
- **响应式**:适配不同屏幕尺寸
|
||||
|
||||
## 🏗️ 项目结构
|
||||
|
||||
```
|
||||
src/
|
||||
├── components/ # 公共组件
|
||||
├── views/ # 页面组件
|
||||
│ ├── cms/ # 内容管理
|
||||
│ ├── shop/ # 商城管理
|
||||
│ └── system/ # 系统管理
|
||||
├── router/ # 路由配置
|
||||
├── store/ # 状态管理
|
||||
├── utils/ # 工具函数
|
||||
└── assets/ # 静态资源
|
||||
```
|
||||
Reference in New Issue
Block a user