From 171ae0569866cbba90ec6df86dddb3beeea39920 Mon Sep 17 00:00:00 2001 From: significative <163999932+significative@users.noreply.github.com> Date: Thu, 12 Sep 2024 10:58:21 +0800 Subject: [PATCH 1/2] w --- .../.env.development | 4 +- .../.env.development | 3 +- .../src/api/configuration.ts | 10 +- .../src/store/module/user.ts | 4 +- .../src/views/course/index.vue | 142 +++++++------- .../src/views/home/index.vue | 175 ++++++++++-------- .../views/professionalListProfile/index.vue | 6 +- .../components/mountNode.vue | 41 ++-- .../src/views/roadbedRecommendation/index.vue | 80 ++++---- ....timestamp-1726102400305-7b45289bcf875.mjs | 64 +++++++ 10 files changed, 315 insertions(+), 214 deletions(-) create mode 100644 teaching_integration_platform_template/vite.config.ts.timestamp-1726102400305-7b45289bcf875.mjs diff --git a/teaching_integration_platform_admin_template/.env.development b/teaching_integration_platform_admin_template/.env.development index 98dfa78..9eff337 100644 --- a/teaching_integration_platform_admin_template/.env.development +++ b/teaching_integration_platform_admin_template/.env.development @@ -1,5 +1,5 @@ # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = '无糖运营平台' -# VITE_APP_BASE_API = 'http://127.0.0.1:8080' -VITE_APP_BASE_API = 'http://39.106.16.162:8080' \ No newline at end of file +VITE_APP_BASE_API = 'http://127.0.0.1:8080' +# VITE_APP_BASE_API = 'http://39.106.16.162:8080' \ No newline at end of file diff --git a/teaching_integration_platform_template/.env.development b/teaching_integration_platform_template/.env.development index fd75c90..817502a 100644 --- a/teaching_integration_platform_template/.env.development +++ b/teaching_integration_platform_template/.env.development @@ -1,4 +1,5 @@ # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = '教学一体化平台' -VITE_APP_BASE_API = 'http://39.106.16.162:8080' \ No newline at end of file +VITE_APP_BASE_API = 'http://127.0.0.1:8080' +# VITE_APP_BASE_API = 'http://39.106.16.162:8080' \ No newline at end of file diff --git a/teaching_integration_platform_template/src/api/configuration.ts b/teaching_integration_platform_template/src/api/configuration.ts index bfcdfab..4eb9fb6 100644 --- a/teaching_integration_platform_template/src/api/configuration.ts +++ b/teaching_integration_platform_template/src/api/configuration.ts @@ -8,22 +8,24 @@ enum Api { } // 提示批量处理 const initOptions = { text: '加载中', success: '成功', error: '失败' } -function proxrequest(request, options: any = initOptions) { +export function proxrequest(request, options: Partial = initOptions) { + return async (...arg) => { if (!options) return request(...arg) const loadingInstance = ElLoading.service({ text: options.text }) - + let result; try { - await request(...arg) + result = await request(...arg) ElMessage.success(options.success) } catch (error) { + result = error ElMessage.error(options.error) } finally { loadingInstance.close() } - return request + return result } } diff --git a/teaching_integration_platform_template/src/store/module/user.ts b/teaching_integration_platform_template/src/store/module/user.ts index a22d5a1..55aa1d9 100644 --- a/teaching_integration_platform_template/src/store/module/user.ts +++ b/teaching_integration_platform_template/src/store/module/user.ts @@ -5,6 +5,7 @@ const userStore = defineStore('userStore', () => { const userInfo = reactive({}) const isLogin = ref(false) const token = ref('') + const verifyToken = () => { } userGetInfoService(token.value).then(res => { // @ts-ignore @@ -16,7 +17,8 @@ const userStore = defineStore('userStore', () => { return { token, userInfo, - isLogin + isLogin, + verifyToken } }) export default userStore diff --git a/teaching_integration_platform_template/src/views/course/index.vue b/teaching_integration_platform_template/src/views/course/index.vue index a8baeb5..63a661e 100644 --- a/teaching_integration_platform_template/src/views/course/index.vue +++ b/teaching_integration_platform_template/src/views/course/index.vue @@ -2,17 +2,8 @@
- +
- +
- + + +
- + + +
-
+
二层 三层 @@ -65,32 +52,17 @@
- +
-
+
{{ item.name }}
-
+
{{ item.name }}
@@ -98,24 +70,14 @@ Role
-
+
{{ item.name }}
-
+
{{ item.name }}
@@ -130,7 +92,8 @@
- 《Vues 设计与实现》这本书的简介: 《Vues 设计与实现》是一本深入剖析 + {{ Route.query.name }}这个课程的简介:{{ learn.description }} +
@@ -184,7 +147,7 @@