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 }}