Commit 63fec1e8 by xuebiao

bug

parent ebb9a65c
...@@ -111,6 +111,13 @@ export default { ...@@ -111,6 +111,13 @@ export default {
ProjectComment:{ ProjectComment:{
list:'/api/project/',//项目评论列表 +{projectId}/comments list:'/api/project/',//项目评论列表 +{projectId}/comments
}, },
News:{
message:'/api/message/',//消息详情+{messageId}
},
NewsList:{
message:'/api/my/messages'//我的消息列表
}
}, },
post:{ post:{
Post:{ Post:{
...@@ -241,6 +248,13 @@ export default { ...@@ -241,6 +248,13 @@ export default {
Project:{ Project:{
revise:'/api/project/',//修改项目 +{projectId} revise:'/api/project/',//修改项目 +{projectId}
}, },
read:{
message:'/api/message/',//标记信息为已读+{messageId}read
},
AllRead:{
message:'/api/messages/read',//标记所有信息为已读
}
}, },
}, },
......
...@@ -25,7 +25,17 @@ ...@@ -25,7 +25,17 @@
<script> <script>
import AlertsContent from './alertsContent'; import AlertsContent from './alertsContent';
import config from '../../../action/config'
export default { export default {
async asyncData({$axios}){
const newsList = await $axios.$get(config.api.get.NewsList.message,{
params:{
page:1,
size:7
}
});
return {newsList: newsList}
},
name: "alertsCard", name: "alertsCard",
components: { components: {
AlertsContent AlertsContent
...@@ -68,6 +78,16 @@ export default { ...@@ -68,6 +78,16 @@ export default {
flag: 0 flag: 0
} }
}, },
created(){
let message1 = [];
this.newsList.data.dataList.forEach(item => {
message1.push({
tag: item.mscContent,
tagId: item.msgType
})
});
},
computed: { computed: {
unread: function () { unread: function () {
let flag = this.flag; let flag = this.flag;
...@@ -101,6 +121,7 @@ export default { ...@@ -101,6 +121,7 @@ export default {
// 清空全部已读消息 // 清空全部已读消息
handleClick(){ handleClick(){
// 重置计数要删除的个数 // 重置计数要删除的个数
console.log(this.newsList);
this.flag = 0; this.flag = 0;
this.messageRead.clear(); this.messageRead.clear();
let i = 0; let i = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment