diff --git a/.env.development b/.env.development index 289450f..c8c89d1 100644 --- a/.env.development +++ b/.env.development @@ -1,15 +1,5 @@ # 变量必须以 VITE_ 为前缀才能暴露给外部读取 NODE_ENV = 'development' VITE_APP_TITLE = '无糖运营平台' -<<<<<<< HEAD # VITE_APP_BASE_API = 'http://127.0.0.1:8080' VITE_APP_BASE_API = 'http://39.106.16.162:8080' -<<<<<<< HEAD -======= -http://localhost:5173/#/courseResourcesManagement/courseResources ->>>>>>> b0c11f6676b1ee245db7ea30ff02485e14c91a32 -======= -# VITE_APP_BASE_API = 'http://127.0.0.1:8080' -VITE_APP_BASE_API = 'http://39.106.16.162:8080' -http://localhost:5173/#/courseResourcesManagement/courseResources ->>>>>>> 72be77b12b37cb07a7dd807572ca24163c368ce0 diff --git a/generated/core/OpenAPI.ts b/generated/core/OpenAPI.ts index 685abe2..ea14d7e 100644 --- a/generated/core/OpenAPI.ts +++ b/generated/core/OpenAPI.ts @@ -22,7 +22,8 @@ export type OpenAPIConfig = { export const OpenAPI: OpenAPIConfig = { //BASE: 'http://39.106.16.162:8080', - BASE: 'http://127.0.0.1:8080', + // BASE: 'http://127.0.0.1:8080', + BASE: import.meta.env.VITE_APP_BASE_API, VERSION: '1.0.0', WITH_CREDENTIALS: false, CREDENTIALS: 'include', diff --git a/src/api/user/chapter.js b/src/api/user/chapter.js index 7405f75..af516ec 100644 --- a/src/api/user/chapter.js +++ b/src/api/user/chapter.js @@ -1,11 +1,11 @@ import request from '@/utils/request' // 获取课程章节列表 export const getChaptersListApi = (params) => { - return request.get(`/chapter2/chapter?courseId=${params.id}`) + return request.get(`api/chapter2/chapter?courseId=${params.id}`) } // 添加课程章节 -export const addChaptersApi = (params) => request.post('/chapter2/add', params) +export const addChaptersApi = (params) => request.post('api/chapter2/add', params) // 删除课程章节 export const delChaptersApi = (id) => { - return request.delete(`/chapter2/delete/${id}`) + return request.delete(`api/chapter2/delete/${id}`) } diff --git a/src/api/user/messag.js b/src/api/user/messag.js index efae69e..6decfdb 100644 --- a/src/api/user/messag.js +++ b/src/api/user/messag.js @@ -17,9 +17,22 @@ export const deleteSendMessageApi = (params) => { params, }) } +//一键已读 +function parseParams(params){ + let str = '?' + try{ + for (const paramsKey in params) { + str+=`${paramsKey}=${params[paramsKey]}&` + } + return str.slice(0,-1) + }catch (e) { + return '' + } +} +export const readMessagesBatch = (params) => { + return request.put(`/user-inbox/readmessagesbatch${parseParams(params)}`) +} //发送邮件 -export const SendMessageApi = (params) => { - return request.post('/messages/addmessage', { - params, - }) +export const SendMessageApi = (data) => { + return request.post(`/messages/addmessage`,data) } diff --git a/src/api/user/object.js b/src/api/user/object.js index 80d6fa5..d8e55d1 100644 --- a/src/api/user/object.js +++ b/src/api/user/object.js @@ -1,6 +1,8 @@ import request from '@/utils/request' -// 获取目标类型 -export const getObjectType = () => request.get(`/api/objectives_type/list`) +// 添加显示目标类型 +export const getObjectType = (id) => { + return request.get(`/api/course_objectives/objectiveslist/${id}`) +} // 修改目标内容 export const updateContents = (params) => { return request.put(`/api/objective_contents/update`, params) diff --git a/src/api/user/send.js b/src/api/user/send.js index ac5e76f..ee6b399 100644 --- a/src/api/user/send.js +++ b/src/api/user/send.js @@ -4,4 +4,8 @@ export const sendMessagesApi = (params) => { return request.post('/messages/addmessage', { params, }) +} +//获取课程学生列表 +export function getUserInfByCourse(userId) { + return request.get(`/api/coursesteacher/page/courseusers?userId=${userId}`); } \ No newline at end of file diff --git a/src/layout/menu/index.vue b/src/layout/menu/index.vue index 035e971..6cc0894 100644 --- a/src/layout/menu/index.vue +++ b/src/layout/menu/index.vue @@ -1,10 +1,6 @@ @@ -320,6 +294,7 @@ const CloseCouresNameChangeEvent = () => { } .course { + // display: flex; // flex: 0 0 25%; // justify-content: space-between; @@ -399,6 +374,12 @@ const CloseCouresNameChangeEvent = () => { margin-left: 180px; margin-top: -29px; } + + .object1 { + position: absolute; + margin-left: 250px; + margin-top: -29px; + } } .plus { diff --git a/src/views/course/components/course-brief.vue b/src/views/course/components/course-brief.vue index 53b487e..2c97fb5 100644 --- a/src/views/course/components/course-brief.vue +++ b/src/views/course/components/course-brief.vue @@ -26,20 +26,23 @@ onMounted(() => { - - - -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + + @@ -205,13 +171,13 @@ - +