From b93195f3709ba22ebfb1e5275be0781db6fb4327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Fri, 14 Jun 2024 19:35:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9Amd=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 - README.md | 254 ++++++++++++++ src/api/booking/course/index.ts | 106 ++++++ src/api/booking/course/model/index.ts | 55 +++ src/api/booking/courseCategory/index.ts | 106 ++++++ src/api/booking/courseCategory/model/index.ts | 41 +++ .../booking/course/components/courseEdit.vue | 304 +++++++++++++++++ .../booking/course/components/search.vue | 42 +++ src/views/booking/course/index.vue | 317 ++++++++++++++++++ .../components/courseCategoryEdit.vue | 248 ++++++++++++++ .../courseCategory/components/search.vue | 42 +++ src/views/booking/courseCategory/index.vue | 275 +++++++++++++++ .../cms/mp-weixin/home/components/search.vue | 11 - src/views/help/deploy/index.vue | 146 ++++++++ src/views/help/docs/index.vue | 31 ++ src/views/help/index.vue | 191 ----------- .../oa/app/detail/components/app-url-edit.vue | 2 - 17 files changed, 1967 insertions(+), 208 deletions(-) create mode 100644 README.md create mode 100644 src/api/booking/course/index.ts create mode 100644 src/api/booking/course/model/index.ts create mode 100644 src/api/booking/courseCategory/index.ts create mode 100644 src/api/booking/courseCategory/model/index.ts create mode 100644 src/views/booking/course/components/courseEdit.vue create mode 100644 src/views/booking/course/components/search.vue create mode 100644 src/views/booking/course/index.vue create mode 100644 src/views/booking/courseCategory/components/courseCategoryEdit.vue create mode 100644 src/views/booking/courseCategory/components/search.vue create mode 100644 src/views/booking/courseCategory/index.vue create mode 100644 src/views/help/deploy/index.vue create mode 100644 src/views/help/docs/index.vue delete mode 100644 src/views/help/index.vue diff --git a/.env.development b/.env.development index 914ba38..52e5a07 100644 --- a/.env.development +++ b/.env.development @@ -4,7 +4,3 @@ VITE_SERVER_URL=https://server.gxwebsoft.com/api #VITE_API_URL=https://modules.gxwebsoft.com/api VITE_API_URL=http://127.0.0.1:9099/api -#VITE_SERVER_URL=http://127.0.0.1:9091/api -#VITE_SOCKET_URL=ws://localhost:9191 -#VITE_API_URL=https://server.gxwebsoft.com/api -#VITE_API_URL=http://103.233.255.195:9300/api diff --git a/README.md b/README.md new file mode 100644 index 0000000..3caf470 --- /dev/null +++ b/README.md @@ -0,0 +1,254 @@ +

websoft-uniapp 网宿软件uniapp端

+ +#### 项目简介 +websoft基于Spring、SpringBoot、SpringMVC、SpringSecurity、jjwt、MyBatis、Druid等搭建,前后端分离模式,适用于快递开发和打包为微信小程序、H5、安卓apk、苹果ios、抖音小程序、支付宝小程序等应用 + + + +# 官网体验地址(里面有演示地址与文档) +| 官网文档地址 | https://www.gxwebsoft.com | +|---|--------------------------------------------------------------------------------------------------------------------------------------| +| 管理后台演示地址: | http://10193.admin.gxwebsoft.com | +| 关注公众号点体验小程序与H5 | ![输入图片说明](https://oss.wsdns.cn/20240327/f1175cc5aae741d3af05484747270bd5.jpeg?x-oss-process=image/resize,m_fixed,w_300/quality,Q_90) | + + + +#### 核心依赖 + +| 依赖 | 版本 | +|-----------------|--------| +| 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 + +### 后台系统工程(JAVA端) + +1、请确保redis已经安装启动 + +2、下载代码 +``` +git clone https://gitee.com/gxwebsoft/websoft-uniapp.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,当前所有命令必须当前工程目录下进行: + +![输入图片说明](https://images.gitee.com/uploads/images/2021/0811/163159_895e12de_477893.png "test8.png") + +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 diff --git a/src/api/booking/course/index.ts b/src/api/booking/course/index.ts new file mode 100644 index 0000000..12f65e7 --- /dev/null +++ b/src/api/booking/course/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { Course, CourseParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询课程管理 + */ +export async function pageCourse(params: CourseParam) { + const res = await request.get>>( + MODULES_API_URL + '/booking/course/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询课程管理列表 + */ +export async function listCourse(params?: CourseParam) { + const res = await request.get>( + MODULES_API_URL + '/booking/course', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加课程管理 + */ +export async function addCourse(data: Course) { + const res = await request.post>( + MODULES_API_URL + '/booking/course', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改课程管理 + */ +export async function updateCourse(data: Course) { + const res = await request.put>( + MODULES_API_URL + '/booking/course', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除课程管理 + */ +export async function removeCourse(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/booking/course/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除课程管理 + */ +export async function removeBatchCourse(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/booking/course/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询课程管理 + */ +export async function getCourse(id: number) { + const res = await request.get>( + MODULES_API_URL + '/booking/course/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/booking/course/model/index.ts b/src/api/booking/course/model/index.ts new file mode 100644 index 0000000..a525146 --- /dev/null +++ b/src/api/booking/course/model/index.ts @@ -0,0 +1,55 @@ +import type { PageParam } from '@/api'; + +/** + * 课程管理 + */ +export interface Course { + // ID + lessonId?: number; + // 课程名称 + lessonName?: string; + // 封面图 + image?: string; + // 分类ID + categoryId?: number; + // 课程价格 + price?: string; + // 老师ID + teacherId?: number; + // 上课时间 + startTime?: string; + // 课时 + classPeriod?: number; + // 报名人数上限 + maxNumber?: number; + // 上课地点 + address?: string; + // 详细介绍 + content?: string; + // 课程相册 + files?: string; + // 年龄限制 + ageLimit?: string; + // 报名时间 + bmTime?: string; + // 备注 + comments?: string; + // 商户ID + merchantId?: number; + // 状态 + status?: number; + // 排序号 + sortNumber?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; +} + +/** + * 课程管理搜索条件 + */ +export interface CourseParam extends PageParam { + lessonId?: number; + keywords?: string; +} diff --git a/src/api/booking/courseCategory/index.ts b/src/api/booking/courseCategory/index.ts new file mode 100644 index 0000000..532dba2 --- /dev/null +++ b/src/api/booking/courseCategory/index.ts @@ -0,0 +1,106 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { CourseCategory, CourseCategoryParam } from './model'; +import { MODULES_API_URL } from '@/config/setting'; + +/** + * 分页查询课程分类 + */ +export async function pageCourseCategory(params: CourseCategoryParam) { + const res = await request.get>>( + MODULES_API_URL + '/booking/course-category/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询课程分类列表 + */ +export async function listCourseCategory(params?: CourseCategoryParam) { + const res = await request.get>( + MODULES_API_URL + '/booking/course-category', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加课程分类 + */ +export async function addCourseCategory(data: CourseCategory) { + const res = await request.post>( + MODULES_API_URL + '/booking/course-category', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改课程分类 + */ +export async function updateCourseCategory(data: CourseCategory) { + const res = await request.put>( + MODULES_API_URL + '/booking/course-category', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除课程分类 + */ +export async function removeCourseCategory(id?: number) { + const res = await request.delete>( + MODULES_API_URL + '/booking/course-category/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除课程分类 + */ +export async function removeBatchCourseCategory(data: (number | undefined)[]) { + const res = await request.delete>( + MODULES_API_URL + '/booking/course-category/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 根据id查询课程分类 + */ +export async function getCourseCategory(id: number) { + const res = await request.get>( + MODULES_API_URL + '/booking/course-category/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/booking/courseCategory/model/index.ts b/src/api/booking/courseCategory/model/index.ts new file mode 100644 index 0000000..eabf97d --- /dev/null +++ b/src/api/booking/courseCategory/model/index.ts @@ -0,0 +1,41 @@ +import type { PageParam } from '@/api'; + +/** + * 课程分类 + */ +export interface CourseCategory { + // 商品分类ID + id?: number; + // 分类名称 + name?: string; + // 分类标识 + code?: string; + // 分类图片 + image?: string; + // 上级分类ID + parentId?: number; + // 排序(数字越小越靠前) + sortNumber?: number; + // 备注 + comments?: string; + // 是否推荐 + recommend?: number; + // 状态, 0正常, 1禁用 + status?: number; + // 是否删除, 0否, 1是 + deleted?: number; + // 租户id + tenantId?: number; + // 创建时间 + createTime?: string; + // 修改时间 + updateTime?: string; +} + +/** + * 课程分类搜索条件 + */ +export interface CourseCategoryParam extends PageParam { + id?: number; + keywords?: string; +} diff --git a/src/views/booking/course/components/courseEdit.vue b/src/views/booking/course/components/courseEdit.vue new file mode 100644 index 0000000..47f3433 --- /dev/null +++ b/src/views/booking/course/components/courseEdit.vue @@ -0,0 +1,304 @@ + + + + diff --git a/src/views/booking/course/components/search.vue b/src/views/booking/course/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/booking/course/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/booking/course/index.vue b/src/views/booking/course/index.vue new file mode 100644 index 0000000..9346e0d --- /dev/null +++ b/src/views/booking/course/index.vue @@ -0,0 +1,317 @@ + + + + + + + diff --git a/src/views/booking/courseCategory/components/courseCategoryEdit.vue b/src/views/booking/courseCategory/components/courseCategoryEdit.vue new file mode 100644 index 0000000..0dcb86f --- /dev/null +++ b/src/views/booking/courseCategory/components/courseCategoryEdit.vue @@ -0,0 +1,248 @@ + + + + diff --git a/src/views/booking/courseCategory/components/search.vue b/src/views/booking/courseCategory/components/search.vue new file mode 100644 index 0000000..82fea9d --- /dev/null +++ b/src/views/booking/courseCategory/components/search.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/booking/courseCategory/index.vue b/src/views/booking/courseCategory/index.vue new file mode 100644 index 0000000..a1514b3 --- /dev/null +++ b/src/views/booking/courseCategory/index.vue @@ -0,0 +1,275 @@ + + + + + + + diff --git a/src/views/cms/mp-weixin/home/components/search.vue b/src/views/cms/mp-weixin/home/components/search.vue index a50b7f7..a981c79 100644 --- a/src/views/cms/mp-weixin/home/components/search.vue +++ b/src/views/cms/mp-weixin/home/components/search.vue @@ -7,17 +7,6 @@ 添加 - - 图片广告 - 幻灯片 - 视频广告 - - - - - - - diff --git a/src/views/help/deploy/index.vue b/src/views/help/deploy/index.vue new file mode 100644 index 0000000..55a6d17 --- /dev/null +++ b/src/views/help/deploy/index.vue @@ -0,0 +1,146 @@ + + + + + + + diff --git a/src/views/help/docs/index.vue b/src/views/help/docs/index.vue new file mode 100644 index 0000000..33d69d6 --- /dev/null +++ b/src/views/help/docs/index.vue @@ -0,0 +1,31 @@ + + + + + + + diff --git a/src/views/help/index.vue b/src/views/help/index.vue deleted file mode 100644 index 86f7a70..0000000 --- a/src/views/help/index.vue +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - diff --git a/src/views/oa/app/detail/components/app-url-edit.vue b/src/views/oa/app/detail/components/app-url-edit.vue index 7bde622..d6d9d2b 100644 --- a/src/views/oa/app/detail/components/app-url-edit.vue +++ b/src/views/oa/app/detail/components/app-url-edit.vue @@ -142,9 +142,7 @@ (visible) => { if (visible) { if (props.data) { - const comments = decrypt(props.data.comments); assignFields(props.data); - form.comments = comments; isUpdate.value = true; } else { isUpdate.value = false;