From 8e709572b3830b092acc47aa17e682b60b7640d5 Mon Sep 17 00:00:00 2001 From: Net Date: Fri, 16 May 2025 16:16:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E9=80=89=E8=AF=BE=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/base/server.ts | 31 +- src/api/system/dic/index.ts | 32 +- src/api/system/login/index.ts | 61 +- .../BasicForm/components/BasicDataPicker.vue | 153 ++- .../BasicForm/components/BasicDateTimes.vue | 2 +- .../BasicForm/components/BasicTree.vue | 141 +++ .../BasicForm/src/BasicComponent.vue | 1 + src/components/BasicForm/type/useForm.d.ts | 1 + src/components/BasicSign/Sign.vue | 2 +- src/config.ts | 11 +- src/manifest.json | 6 +- src/pages.json | 27 +- .../base/course-selection/club-selection.vue | 1060 +++++++++++++---- src/pages/base/course-selection/detail.vue | 240 ++-- src/pages/base/course-selection/enrolled.vue | 428 +++++++ src/pages/base/course-selection/index.vue | 976 ++++++++++++--- src/pages/base/course-selection/notice.vue | 60 + src/pages/base/course-selection/notopen.vue | 171 +++ src/pages/base/parentRegister/index.vue | 403 ------- src/pages/system/launchPage/launchPage.vue | 64 +- src/pages/system/login/login.vue | 612 ++++++---- src/store/modules/data.ts | 57 +- src/store/modules/user.ts | 2 +- 23 files changed, 3274 insertions(+), 1267 deletions(-) create mode 100644 src/components/BasicForm/components/BasicTree.vue create mode 100644 src/pages/base/course-selection/enrolled.vue create mode 100644 src/pages/base/course-selection/notice.vue create mode 100644 src/pages/base/course-selection/notopen.vue delete mode 100644 src/pages/base/parentRegister/index.vue diff --git a/src/api/base/server.ts b/src/api/base/server.ts index 328a54e..4ea7670 100644 --- a/src/api/base/server.ts +++ b/src/api/base/server.ts @@ -1,26 +1,21 @@ // 参数接口 // 响应接口 -import {get, post} from "@/utils/request"; +import { get, post } from "@/utils/request"; - -/** - * 获取服务器时间 - */ -export const serverTimeApi = async () => { - return await get('/api/server/serverTime') -} -export const standardWordsRandomApi = async () => { - return await get('/api/standardWords/findRandom') -} -export const cmsArticleFindPageApi = async (params: any) => { - return await get("/api/cmsArticle/findPage", params); +export const loginRegisterJzApi = async (params: any) => { + return await post("/open/login/registerJz", params); +}; +export const xkAddXkqdApi = async (params: any) => { + return await post("/mobile/xk/addXkqd", params); }; -export const agencyAgencyListApi = async () => { - return await get("/api/agency/agencyList"); +export const xkListApi = async (params: any) => { + return await get("/mobile/xk/list", params); }; - -export const serverCheckInRangeTimeApi = async () => { - return await get("/api/server/checkInRangeTime"); +export const xkXkqdApi = async (params: any) => { + return await get("/mobile/xk/xkqd", params); +}; +export const kcjhFindKcjhByKcIdApi = async (params: any) => { + return await get("/api/kcjh/findKcjhByKcId", params); }; diff --git a/src/api/system/dic/index.ts b/src/api/system/dic/index.ts index 80b6e7d..c91f4e1 100644 --- a/src/api/system/dic/index.ts +++ b/src/api/system/dic/index.ts @@ -1,22 +1,40 @@ -import {get, post} from "@/utils/request"; +import { get, post } from "@/utils/request"; //字典接口 export const dicApi = async (param: { pid: number }) => { - return await get("/api/dic/findByPid", param); + return await get("/api/dic/findByPid", param); +}; +//字典接口 +export const findDicTreeByPidApi = async (param: { pid: number }) => { + return await get("/api/dic/findDicTreeByPid", param); }; //根据id查询部门 export const deptFindAllDeptsByPidApi = async (param: { pid: number }) => { - return await get("/api/dept/findAllDeptsByPid", param); + return await get("/api/dept/findAllDeptsByPid", param); }; //刷新token export const refreshTokenApi = async (param: { refresh_token: string }) => { - return await post("/userlogin/refresh-token?refresh_token=" + param.refresh_token, param); + return await post( + "/userlogin/refresh-token?refresh_token=" + param.refresh_token, + param + ); }; //修改用户部门 -export const userSaveApi = async (param: { id: string, deptId: string, deptName: string }) => { - return await post("/api/user/save?deptId=" + param.deptId + '&deptName=' + param.deptName + '&id=' + param.id, param); +export const userSaveApi = async (param: { + id: string; + deptId: string; + deptName: string; +}) => { + return await post( + "/api/user/save?deptId=" + + param.deptId + + "&deptName=" + + param.deptName + + "&id=" + + param.id, + param + ); }; - diff --git a/src/api/system/login/index.ts b/src/api/system/login/index.ts index 94b0687..704e17c 100644 --- a/src/api/system/login/index.ts +++ b/src/api/system/login/index.ts @@ -1,49 +1,68 @@ //登录接口 -import {get, post} from "@/utils/request"; +import { get, post } from "@/utils/request"; //密码登录接口 -export const loginPass = async (param: { username: string, password: string, openId: number | string }) => { - return await post("/userlogin/check?username=" + param.username + '&password=' + param.password + '&openId=' + param.openId, param - ) - ; +export const loginPass = async (param: { + username: string; + password: string; + openId: number | string; +}) => { + return await post( + "/userlogin/check?username=" + + param.username + + "&password=" + + param.password + + "&openId=" + + param.openId, + param + ); }; //验证码登录接口 -export const loginCode = async (param: { phone: string | number, code: string | number, openId: number | string }) => { - return await post("/open/sms/checkCode", param); +export const loginCode = async (param: { + phone: string | number; + code: string | number; + openId: number | string; +}) => { + return await post("/open/sms/checkCode", param); }; //验证码登录接口 export const loginCheckCode = async (param: any) => { - return await post("/open/sms/checkCode", param); + return await post("/open/sms/checkCode", param); }; //获取验证码接口 -export const sendCodeApi = async (param:any) => { - return await get("/open/sms/sendCode", param); +export const sendCodeApi = async (param: any) => { + return await get("/open/sms/sendCode", param); }; //获取验证码接口 export const sendToUserApi = async (param: string) => { - return await post("/open/sms/sendToUser", param); + return await post("/open/sms/sendToUser", param); }; //微信获取手机号登录接口 export const weChatLogin = async (param: any) => { - return await get("/userlogin/weloginByCode", param); + return await get("/userlogin/weloginByCode", param); }; //获取用户按钮权限 export const authenticationApi = async (param: { userId: string }) => { - return await get("/api/authentication/find-by-user", param); -}; - -// 汇兴小程序登录 -export const huiXingLoginApi = async (param: { token: string }) => { - return await post("/userlogin/appCheck?token=" + param.token, param); + return await get("/api/authentication/find-by-user", param); }; //获取公众号票据 export const wxConfigApi = async (param: any) => { - return await post("/userlogin/wxConfig", param); + return await post("/userlogin/wxConfig", param); }; -export const checkOpenId = async (param: { openId: string | number, appCode: string }) => { - return await post("/open/sms/checkOpenId", param); + +export const checkOpenId = async (param: { + openId: string | number; + appCode: string; +}) => { + return await post("/open/login/jz/checkUser", param); +}; +export const updateUserApi = async (param: any) => { + return await post("/open/login/js/updateUser", param); +}; +export const findJsByPhoneApi = async (param: any) => { + return await get("/api/js/findJsByPhone", param); }; diff --git a/src/components/BasicForm/components/BasicDataPicker.vue b/src/components/BasicForm/components/BasicDataPicker.vue index effaa9c..222557a 100644 --- a/src/components/BasicForm/components/BasicDataPicker.vue +++ b/src/components/BasicForm/components/BasicDataPicker.vue @@ -1,73 +1,128 @@ \ No newline at end of file + diff --git a/src/components/BasicForm/components/BasicDateTimes.vue b/src/components/BasicForm/components/BasicDateTimes.vue index 8dcaab0..ad8ad73 100644 --- a/src/components/BasicForm/components/BasicDateTimes.vue +++ b/src/components/BasicForm/components/BasicDateTimes.vue @@ -37,10 +37,10 @@ const newValue = computed({ const attrs: any = useAttrs() function change(e: string) { + newValue.value = e if (attrs.componentProps.change && isFunction(attrs.componentProps.change)) { attrs.componentProps.change(e) } - newValue.value = e } diff --git a/src/components/BasicForm/components/BasicTree.vue b/src/components/BasicForm/components/BasicTree.vue new file mode 100644 index 0000000..a7ebf80 --- /dev/null +++ b/src/components/BasicForm/components/BasicTree.vue @@ -0,0 +1,141 @@ + + + + \ No newline at end of file diff --git a/src/components/BasicForm/src/BasicComponent.vue b/src/components/BasicForm/src/BasicComponent.vue index d436b92..30dfa2c 100644 --- a/src/components/BasicForm/src/BasicComponent.vue +++ b/src/components/BasicForm/src/BasicComponent.vue @@ -14,6 +14,7 @@ + diff --git a/src/components/BasicForm/type/useForm.d.ts b/src/components/BasicForm/type/useForm.d.ts index 322e14c..851f2af 100644 --- a/src/components/BasicForm/type/useForm.d.ts +++ b/src/components/BasicForm/type/useForm.d.ts @@ -26,6 +26,7 @@ type Component = | 'BasicDataPicker' | 'BasicSearchList' | 'BasicDateTimes' + | 'BasicTree' interface FormsSchema { field?: string, diff --git a/src/components/BasicSign/Sign.vue b/src/components/BasicSign/Sign.vue index f5f9187..ef42b32 100644 --- a/src/components/BasicSign/Sign.vue +++ b/src/components/BasicSign/Sign.vue @@ -407,7 +407,7 @@ export default { background: #FFF; margin: 10px 0; width: 90vw; - height: 90vh; + height: 88vh; align-self: center; // pointer-events:none; } diff --git a/src/config.ts b/src/config.ts index 423df1c..203695b 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,15 +1,16 @@ -const ip: string = "dj.zhongjingzh.com"; +const ip: string = "119.29.194.155:8893"; +const fwqip: string = "yufangzc.com"; //打包服务器接口代理标识 -const SERVERAGENT: string = "/"; +const SERVERAGENT: string = "/jzd-api"; //本地代理url地址,配置了就启动代理,没配置就不启动代理 export const HOMEAGENT: string = ""; // 接口地址 export const BASE_URL: string = - process.env.NODE_ENV == "development" ? `http://${ip}/yqdj` : SERVERAGENT; + process.env.NODE_ENV == "development" ? `http://${ip}/zhxy` : SERVERAGENT; // WebSocket地址 export const BASE_WS_URL: string = `wss://${ip}`; //图片地址 -export const BASE_IMAGE_URL: string = `http://${ip}`; +export const BASE_IMAGE_URL: string = process.env.NODE_ENV == "development" ? `http://${ip}` : `https://${fwqip}`; //存token的key export const AUTH_KEY: string = "satoken"; //token过期返回状态码 @@ -17,7 +18,7 @@ export const RESULT_CODE_NOT_LOGIN: number = 10; //是否打印接口日志 export const ISREQUESTLOG: boolean = false; //是否打开登录页面拦截 -export const ISROUTERINTERCEPT: boolean = false; +export const ISROUTERINTERCEPT: boolean = true; //配置路由白名单 export const WHITELIST: WhiteList = []; //主题颜色 diff --git a/src/manifest.json b/src/manifest.json index 6e889d7..148f6ef 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,5 +1,5 @@ { - "name": "模版", + "name": "智慧校园", "appid": "__UNI__27C6F45", "description": "", "versionName": "1.0.0", @@ -207,9 +207,9 @@ "uniStatistics": { "enable": false }, - "publicPath": "/", + "publicPath": "/zhxy-jzd", "router": { - "base": "/", + "base": "/zhxy-jzd/", "mode": "hash" }, "sdkConfigs": { diff --git a/src/pages.json b/src/pages.json index 279fbef..6a8587a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -91,13 +91,6 @@ } } }, - { - "path": "pages/base/parentRegister/index", - "style": { - "navigationBarTitleText": "家长注册", - "enablePullDownRefresh": false - } - }, { "path": "pages/base/class-schedule/index", "style": { @@ -195,6 +188,26 @@ "navigationBarTitleText": "俱乐部选课", "enablePullDownRefresh": false } + }, + { + "path": "pages/base/course-selection/notice", + "style": { + "navigationBarTitleText": "告知书", + "enablePullDownRefresh": false + } + }, + { + "path": "pages/base/course-selection/enrolled", + "style": { + "navigationBarTitleText": "已报名", + "enablePullDownRefresh": false + } + } , { + "path": "pages/base/course-selection/notopen", + "style": { + "navigationBarTitleText": "未开放", + "enablePullDownRefresh": false + } } ], "globalStyle": { diff --git a/src/pages/base/course-selection/club-selection.vue b/src/pages/base/course-selection/club-selection.vue index 9f8519a..92b16f6 100644 --- a/src/pages/base/course-selection/club-selection.vue +++ b/src/pages/base/course-selection/club-selection.vue @@ -1,248 +1,661 @@ diff --git a/src/pages/base/course-selection/detail.vue b/src/pages/base/course-selection/detail.vue index 6ab6b61..5895df4 100644 --- a/src/pages/base/course-selection/detail.vue +++ b/src/pages/base/course-selection/detail.vue @@ -9,7 +9,7 @@ @@ -21,11 +21,12 @@ 上课地点:{{ courseDetail.location }} - 金额:¥{{ courseDetail.price }}上课时间:{{ courseDetail.studyTime }} + + 金额:¥{{ courseDetail.price }} + @@ -36,14 +37,25 @@ - + + + + + {{ teacherInfo.name }} + 课程教师 + + - - {{ teacherInfo.introduction }} + + + 教师简介 + + {{ teacherInfo.introduction }} + @@ -64,13 +76,21 @@ - - {{ phase }} - + + @@ -90,57 +110,81 @@ diff --git a/src/pages/base/course-selection/index.vue b/src/pages/base/course-selection/index.vue index da59a4e..5133122 100644 --- a/src/pages/base/course-selection/index.vue +++ b/src/pages/base/course-selection/index.vue @@ -1,192 +1,555 @@ diff --git a/src/pages/base/course-selection/notice.vue b/src/pages/base/course-selection/notice.vue new file mode 100644 index 0000000..c635be3 --- /dev/null +++ b/src/pages/base/course-selection/notice.vue @@ -0,0 +1,60 @@ + + + + + diff --git a/src/pages/base/course-selection/notopen.vue b/src/pages/base/course-selection/notopen.vue new file mode 100644 index 0000000..77fa91a --- /dev/null +++ b/src/pages/base/course-selection/notopen.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/src/pages/base/parentRegister/index.vue b/src/pages/base/parentRegister/index.vue deleted file mode 100644 index 1c0627f..0000000 --- a/src/pages/base/parentRegister/index.vue +++ /dev/null @@ -1,403 +0,0 @@ - - - - - diff --git a/src/pages/system/launchPage/launchPage.vue b/src/pages/system/launchPage/launchPage.vue index 2a14e3f..9444a10 100644 --- a/src/pages/system/launchPage/launchPage.vue +++ b/src/pages/system/launchPage/launchPage.vue @@ -1,24 +1,62 @@ diff --git a/src/pages/system/login/login.vue b/src/pages/system/login/login.vue index 468619b..7f7b01b 100644 --- a/src/pages/system/login/login.vue +++ b/src/pages/system/login/login.vue @@ -1,306 +1,442 @@ - diff --git a/src/store/modules/data.ts b/src/store/modules/data.ts index 7f7fb6e..b7b49b9 100644 --- a/src/store/modules/data.ts +++ b/src/store/modules/data.ts @@ -1,23 +1,44 @@ -import {defineStore} from "pinia"; +import { defineStore } from "pinia"; export const useDataStore = defineStore({ - id: 'data', - state: () => ({ - data: {} - }), - getters: { - getData(): any { - return this.data - } + id: "data", + state: () => ({ + data: {}, + kcData: {}, + global: {}, + file: {}, + }), + getters: { + getData(): any { + return this.data; }, - actions: { - setData(data: any) { - this.data = data - } + getGlobal(): any { + return this.global; }, - persist: { - enabled: true, - detached: true, - H5Storage: localStorage + getFile(): any { + return this.file; }, -}) \ No newline at end of file + getKcData(): any { + return this.kcData; + }, + }, + actions: { + setData(data: any) { + this.data = data; + }, + setGlobal(data: any) { + this.global = data; + }, + setFile(data: any) { + this.file = data; + }, + setKcData(data: any) { + this.kcData = data; + }, + }, + persist: { + enabled: true, + detached: true, + H5Storage: localStorage, + }, +}); diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index 2339755..4e3b369 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -80,7 +80,7 @@ export const useUserStore = defineStore({ if (value[AUTH_KEY]) { this.setToken(value[AUTH_KEY]) } - authenticationApi({userId: value.userid}).then(({result}) => { + authenticationApi({userId: value.userId}).then(({result}) => { if (result) { this.setAuth(result) }