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/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/router/routers copy.ts b/src/router/routers copy.ts index a515fc0..907db17 100644 --- a/src/router/routers copy.ts +++ b/src/router/routers copy.ts @@ -268,7 +268,7 @@ export const constantRoute: any = [ }, { path: '/messageContentList', - component: () => import('@/views/message/components/indexContentList.vue'), + component: () => import('@/views/message/components/receiveContentList.vue'), name: 'MessageContentList', meta: { title: '收到信息详情', diff --git a/src/router/routers.ts b/src/router/routers.ts index 440c369..e2f6987 100644 --- a/src/router/routers.ts +++ b/src/router/routers.ts @@ -1,4 +1,3 @@ - export const constantRoute: any = [ { path: '/', @@ -127,14 +126,14 @@ export const constantRoute: any = [ name: 'SendMessage', meta: { title: '个人发出', - hidden: false, + hidden: true, icon: '', }, }, { path: '/messageContentList', component: () => - import('@/views/message/components/indexContentList.vue'), + import('@/views/message/components/receiveContentList.vue'), name: 'MessageContentList', meta: { title: '收到信息详情', @@ -145,7 +144,7 @@ export const constantRoute: any = [ { path: '/sendMessageList', component: () => - import('@/views/message/components/sendMessageList.vue'), + import('@/views/message/components/sendMessageList.vue'), name: 'SendMessageList', meta: { title: '发送信息详情', @@ -153,11 +152,10 @@ export const constantRoute: any = [ icon: '', }, }, - { path: '/messageContent', component: () => - import('@/views/message/components/messageContent.vue'), + import('@/views/message/components/messageContent.vue'), name: 'MessageContent', meta: { title: '写栈内信函', @@ -170,7 +168,7 @@ export const constantRoute: any = [ component: () => import('@/views/news/index.vue'), name: 'NewsContent', meta: { - title: '资讯管理', + title: '资讯', hidden: false, icon: 'BellFilled', }, @@ -178,11 +176,11 @@ export const constantRoute: any = [ { path: '/news/newsContentDetails', component: () => - import('@/views/news/components/newsContentDetails.vue'), + import('@/views/news/components/newsContentDetails.vue'), name: 'NewsContentDetails', meta: { title: '栏目添加新闻信息', - hidden: true, + hidden: false, icon: 'Promotion', }, }, @@ -199,7 +197,7 @@ export const constantRoute: any = [ { path: '/myCourseStudyManagement/learningProcess1', component: () => - import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'), + import('@/views/MyCourseStudy/knowledgeLearningProcess.vue'), name: 'LearningProcess1', meta: { title: '知识点学习记录', @@ -249,80 +247,4 @@ export const constantRoute: any = [ }, ], }, - - - - // { - // path: '/portal', - // component: () => import('@/views/portal/view.vue'), - // name: 'Portal', - // meta: { - // title: '门户', - // hidden: false, - // icon: 'HomeFilled', // 菜单图标 - // }, - // children: [ - // { - // path: '/portal/webHome', - // component: () => import('@/views/portal/index.vue'), - // name: 'WebHome', - // meta: { - // title: '网站首页', - // hidden: false, - // icon: 'Reading', - // }, - // }, - // { - // path: '/portal/courseHome', - // component: () => import('@/views/portal/courseHomepage.vue'), - // name: 'CourseHome', - // meta: { - // title: '课程首页', - // hidden: false, - // icon: 'Reading', - // }, - // }, - // { - // path: '/portal/LearningPathRecommendations', - // component: () => - // import('@/views/portal/LearningPathRecommendations.vue'), - // name: 'LearningPathRecommendations', - // meta: { - // title: '学习路径推荐', - // hidden: false, - // icon: 'Reading', - // }, - // }, - // { - // path: '/portal/knowledgePointLearning', - // component: () => import('@/views/portal/knowledgePointLearning.vue'), - // name: 'KnowledgePointLearning', - // meta: { - // title: '知识点学习', - // hidden: false, - // icon: 'Reading', - // }, - // }, - // { - // path: '/portal/courseReports', - // component: () => import('@/views/portal/courseReports.vue'), - // name: 'CourseReports', - // meta: { - // title: '课程报告', - // hidden: false, - // icon: 'Reading', - // }, - // }, - // ], - // }, - // { - // path: '/curriculumCenter/largeScreen', - // component: () => import('@/views/course/largeScreen.vue'), - // name: 'LargeScreen', // name 要与权限一致 - // meta: { - // title: '课程图谱', - // hidden: true, - // icon: 'Notebook', - // }, - // }, -] +] \ No newline at end of file diff --git a/src/views/message/components/messageContent.vue b/src/views/message/components/messageContent.vue index 18c565f..785a661 100644 --- a/src/views/message/components/messageContent.vue +++ b/src/views/message/components/messageContent.vue @@ -18,8 +18,9 @@ \ No newline at end of file diff --git a/src/views/news/index.vue b/src/views/news/index.vue index d006122..02bdb8b 100644 --- a/src/views/news/index.vue +++ b/src/views/news/index.vue @@ -2,37 +2,78 @@
资讯
-
- -
+
+ + +
+ 栏目管理 +
+
+
  • - - {{ item.categoryName }} + +
    + {{ item.categoryName }} +
    +
-
- 栏目管理 -
+
- + +
+ + +
+
+ +
+ {{nowTimeNewsData.title}} +
+
+ +
+

发布人:{{ nowTimeNewsData.userId }}

+

阅读数量:{{ nowTimeNewsData.readingNumber }}

+

发布日期:{{ nowTimeNewsData.publishTime }}

+

更新时间:{{nowTimeNewsData.updateTime}}

+
+
+
+
+ + {{ nowTimeNewsData.content }} + + +
+ + 关于我们 + +
+
+
@@ -60,7 +101,7 @@ - + @@ -90,82 +131,6 @@
- - - -
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -173,7 +138,13 @@ - + + @@ -205,7 +176,7 @@