From 29d5b9e8a8907e21b3ddb53f920bf9e70313e4d0 Mon Sep 17 00:00:00 2001 From: lijiaqi <1205620597@qq.com> Date: Wed, 19 Jun 2024 17:58:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E6=96=B0=E7=9A=84=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.ts | 2 +- src/views/course/basicCourseInformation.vue | 88 +++++++++++++-------- 2 files changed, 57 insertions(+), 33 deletions(-) diff --git a/src/utils/request.ts b/src/utils/request.ts index 7e76580..33c5882 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -11,7 +11,7 @@ const request = axios.create({ request.interceptors.request.use((config) => { const userStore = useUserStore() // 设置请求头设置token - config.headers.token = userStore.token + config.headers.Authorization = `Bearer ${userStore.token}` return config }) //响应拦截器 diff --git a/src/views/course/basicCourseInformation.vue b/src/views/course/basicCourseInformation.vue index e374323..367ca10 100644 --- a/src/views/course/basicCourseInformation.vue +++ b/src/views/course/basicCourseInformation.vue @@ -2,16 +2,15 @@ import { ref, onMounted } from 'vue' // import axios from 'axios' import courseEdit from './components/courseEdit.vue' -import { Plus, Search } from '@element-plus/icons-vue' +import { Plus } from '@element-plus/icons-vue' import { getCourseListApi, deleteCourseApi, - getCourseObjectApi, getTeacherListApi, } from '../../api/user/crouse' import { ElMessageBox, ElMessage } from 'element-plus' // import router from '@/router' -import { useRouter, useRoute } from 'vue-router' +import { useRouter } from 'vue-router' const router = useRouter() // const route = useRoute() // console.log(route) @@ -167,8 +166,12 @@ const CloseCouresNameChangeEvent = () => { - + @@ -199,14 +202,14 @@ const CloseCouresNameChangeEvent = () => {
    -
  • +
  • -

    {{ course_name }}

    +

    {{ course_name }}