diff --git a/.env.development b/.env.development
index 0c9a25a..f8cb47e 100644
--- a/.env.development
+++ b/.env.development
@@ -1,5 +1,5 @@
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV = 'development'
VITE_APP_TITLE = '教学一体化平台'
-VITE_APP_BASE_API = 'http://39.106.16.162:8080'
-# VITE_APP_BASE_API = 'http://127.0.0.1:8080'
\ No newline at end of file
+VITE_APP_BASE_API = 'http://127.0.0.1:8080'
+# VITE_APP_BASE_API = 'http://10.100.200.177:8080'
\ No newline at end of file
diff --git a/src/Layout/tabbar/index.vue b/src/Layout/tabbar/index.vue
index 83a5552..8e03b08 100644
--- a/src/Layout/tabbar/index.vue
+++ b/src/Layout/tabbar/index.vue
@@ -28,7 +28,7 @@
-
登录注册
+ 登录注册
@@ -82,7 +82,8 @@ userGetInfoService(userStore.token).then(res => {
}
})
function skip(url: string) {
- location.assign(url)
+ // location.replace(url)
+ window.open(url)
}
diff --git a/src/api/course.ts b/src/api/course.ts
index 9590c54..495af38 100644
--- a/src/api/course.ts
+++ b/src/api/course.ts
@@ -4,7 +4,7 @@ import { GetCourseObjectivesList} from './types/courseType'
export const getCourseList = (params: object) => {
return request({
- url: '/api/coursesteacher/page',
+ url: '/api/coursesteacher/index',
params,
})
}
@@ -16,14 +16,14 @@ export const getCourseAtlas = (params: object) => {
})
}
// 获取课程简介
-// export const getCourseDescription = (params:any) => {
-// return request({
-// url:''
-// })
-// }
+export const getCourseDescription = (params:any) => {
+ return request({
+ url:'/api/coursesteacher/' + params.id,
+ })
+}
export const getCourseChapter = (params: any) => {
return request({
- url: '/api/chapter2/chapter',
+ url: '/api/chapter/chapter2',
params,
})
}
@@ -31,7 +31,7 @@ export const getCourseChapter = (params: any) => {
// 获取所有课程资源
export const getCourseFiles = (params: any) => {
return request({
- url: '/api/resource/graph/queryByCourseId',
+ url: '/api/resource/queryByCourseId',
params,
})
}
diff --git a/src/router/module/constRouter/index.ts b/src/router/module/constRouter/index.ts
index 159c97e..5765151 100644
--- a/src/router/module/constRouter/index.ts
+++ b/src/router/module/constRouter/index.ts
@@ -42,16 +42,16 @@ export const constRouter: any = [
// hidden: false,
// },
// },
- {
- path: '/professionalListProfile', // 课程
- component: () => import('@/views/professionalListProfile/index.vue'),
- name: 'professionalListProfile',
- meta: {
- icon: '',
- title: '课程',
- hidden: false,
- },
- },
+ // {
+ // path: '/professionalListProfile', // 课程
+ // component: () => import('@/views/professionalListProfile/index.vue'),
+ // name: 'professionalListProfile',
+ // meta: {
+ // icon: '',
+ // title: '课程',
+ // hidden: false,
+ // },
+ // },
{
path: '/roadbedRecommendation',
component: () => import('@/views/roadbedRecommendation/index.vue'),
diff --git a/src/views/course/index.vue b/src/views/course/index.vue
index 061bb87..d2be878 100644
--- a/src/views/course/index.vue
+++ b/src/views/course/index.vue
@@ -20,7 +20,6 @@
-
-
+
- 《Vues 设计与实现》这本书的简介: 《Vues 设计与实现》是一本深入剖析
- Vues 框架核心原理的权威著作。
- 本书首先会为读者搭建起一个坚实的知识基础,详细介绍 Vues
- 的发展历程和其在前端开发领域的重要地位。接着,深入探讨 Vues
- 的设计理念,让读者理解其背后的创新思维和解决问题的独特视角。
- 在实现方面,书中通过大量的代码示例和详细的解释,逐步拆解 Vues
- 的内部机制,包括数据响应式系统、虚拟 DOM
- 算法、组件化架构等核心模块。读者能够清晰地了解到 Vues
- 是如何高效地处理数据更新、渲染页面以及优化性能的。
- 不仅如此,本书还会探讨 Vues
- 与其他前端技术的集成和协作,帮助读者在实际项目中更好地运用 Vues
- 来构建复杂而强大的应用程序。同时,书中也提供了丰富的实战案例和最佳实践,让读者能够将所学知识迅速应用到实际开发中。
- 无论是前端开发的新手,还是经验丰富的开发者,都能从《Vues
- 设计与实现》中获得宝贵的知识和技能,从而提升自己的开发水平,打造出更加出色的前端应用。它不仅是一本技术指南,更是一本启发思考、引领创新的宝典,为读者打开了深入理解和掌握
- Vues 框架的大门。
+ {{ cuorseInfo.description }}
学时:
-
9H
+
{{cuorseInfo.classhours}}H
学分:
-
9
+
{{ cuorseInfo.credit }}
-
先修:
-
Vue.js程序设计与实现
+
课程名称:
+
{{ cuorseInfo.name }}
-
后继:
-
前端工程化,模块化
+
老师:
+
{{ cuorseInfo.teacher}}
-
知识点:
-
webpack,vite
+
类型:
+
{{ cuorseInfo.nature}}
-
+
@@ -192,6 +177,7 @@ import {
getCourseChapter,
getCourseFiles,
getCourseObjectivesList,
+ getCourseDescription
} from '@/api/course'
import { ElLoading } from 'element-plus'
import { filterFilesType } from '@/utils/filters'
@@ -213,7 +199,7 @@ const getCourseChapterEvent = async () => {
})
const res = await getCourseChapter({
// courseId: Route.query.id,
- courseId: '2cd6b5b62c344fd0becff6010cba566e',
+ courseId: Route.query.id,
})
chapterList.value = res.data
console.log(res)
@@ -233,14 +219,23 @@ const courseFilesList = ref
({})
const getCourseFilesEvent = async () => {
isTabsLoading.value = true
const res: any = await getCourseFiles({
- courseId: '2cd6b5b62c344fd0becff6010cba566e',
+ courseId: courseId,
})
// console.log(filterFilesType(res));
courseFilesList.value = filterFilesType(res.data)
isTabsLoading.value = false
}
getCourseFilesEvent()
-
+// 获取课程详情
+const cuorseInfo = ref({})
+const getCourseDescriptionEvent = async () => {
+ const res = await getCourseDescription({
+ id:courseId,
+ })
+ cuorseInfo.value = res.data
+ console.log(res,'getCourseDescriptionEvent')
+}
+getCourseDescriptionEvent()
// 点击资源
const flag = ref(1)
const videoUrl = ref('')
@@ -262,7 +257,7 @@ const clickFile = async (file: any, index: number) => {
flag.value = index
tabLoading.value = false
} else if (index === 3) {
- pdfUrl.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}`
+ pdfUrl.value = file.url
const loadingTask = createLoadingTask(pdfUrl.value)
loadingTask.promise.then((pdf: any) => {
numOfPages.value = pdf.numPages
@@ -275,7 +270,7 @@ const clickFile = async (file: any, index: number) => {
// console.log(resoinse.blob())
// })
} else if (index === 4) {
- docx.value = `http://39.106.16.162:8080/api/resource/read?filename=${file.name}`
+ docx.value = file.url
flag.value = index
tabLoading.value = false
}
@@ -371,7 +366,7 @@ const getCourseObjectivesListEvent = async () => {
courseObjectivesTrees.value = res.data[0].courseObjectivesTrees
console.log(courseObjectivesTrees.value, '111212')
}
-getCourseObjectivesListEvent()
+// getCourseObjectivesListEvent()