diff --git a/.env.development b/.env.development index 269e196..600aee7 100644 --- a/.env.development +++ b/.env.development @@ -1,5 +1,5 @@ # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = '无糖运营平台' -# VITE_APP_BASE_API = 'http://127.0.0.1:8008' -VITE_APP_BASE_API = 'http://39.106.16.162:8080' +VITE_APP_BASE_API = 'http://127.0.0.1:8080' +# VITE_APP_BASE_API = 'http://39.106.16.162:8080' diff --git a/src/api/courseChaptersApi.ts b/src/api/courseChaptersApi.ts index 8f4f708..666b7ca 100644 --- a/src/api/courseChaptersApi.ts +++ b/src/api/courseChaptersApi.ts @@ -96,20 +96,7 @@ export const deleteCourse = (params: any) => { // 获取详情 export const getCourseInfo = (params: any) => { return request({ - // <<<<<<< HEAD - url: '/objective_contents/' + params.id, - method: 'get', - // // params - // ======= - // <<<<<<< HEAD - // url: '/api/objective_contents/' + params.id, - // method: 'get', - // params, - // ======= - // url: '/objective_contents/' + params.id, - // method: "get", - // // params - // >>>>>>> 1a620e19de970965f426e07348b1dbc4be900eaf - // >>>>>>> 991fa5ab08c56c84c5a276226f8fbc2ec78f859a + url: '/api/objective_contents/' + params.id, + // method: 'get', }) } diff --git a/src/utils/request.ts b/src/utils/request.ts index 33c5882..214b86b 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -21,28 +21,28 @@ request.interceptors.response.use( }, (error) => { //处理网络错误 - let msg = '' - const status = error.response.status - switch (status) { - case 401: - msg = 'token过期' - break - case 403: - msg = '无权访问' - break - case 404: - msg = '请求地址错误' - break - case 500: - msg = '服务器出现问题' - break - default: - msg = '无网络' - } - ElMessage({ - type: 'error', - message: msg, - }) + // let msg = '' + // const status = error.response.status + // switch (status) { + // case 401: + // msg = 'token过期' + // break + // case 403: + // msg = '无权访问' + // break + // case 404: + // msg = '请求地址错误' + // break + // case 500: + // msg = '服务器出现问题' + // break + // default: + // msg = '出错了' + // } + // ElMessage({ + // type: 'error', + // message: msg, + // }) return Promise.reject(error) }, ) diff --git a/src/views/course/CourseObjectives.vue b/src/views/course/CourseObjectives.vue index 7d831a3..b463672 100644 --- a/src/views/course/CourseObjectives.vue +++ b/src/views/course/CourseObjectives.vue @@ -46,8 +46,9 @@ const addBook = (id) => { flog.value = false // updateDisabledStatus() } -const text = ref('我是后台获取的值') +const text = ref('') const textChange = (val) => { + text.value = val console.log(text.value) } // 弹窗 @@ -161,7 +162,7 @@ const data = ref({}) const courseId = ref(0) onMounted(async () => { if (!Object.keys(route.query).length) { - return router.push('/curriculumCenter/CourseObjectives') + return router.push('/curriculumCenter/basicCourseInformation') } courseId.value = route.query.id console.log(courseId.value) @@ -333,13 +334,13 @@ onMounted(async () => {