mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 02:46:44 +08:00
消息
This commit is contained in:
@@ -67,14 +67,15 @@
|
||||
<span style="padding-right: 10px;"><el-checkbox v-model="item.checked" @change="setCheckAll(item)"></el-checkbox></span>
|
||||
<span v-if="!item.isRead" style="font-size:12px;padding:5px 7px; border-radius: 2px;background: #FF6562;color: #fff;margin-right: 5px">未读</span>
|
||||
<span v-else style="font-size:14px;padding:5px 7px; background: #eee; border-radius: 2px; color: #666666;margin-right: 5px">已读</span>
|
||||
<a :href="returnRouter(item)"><span>{{ item.title }}</span></a>
|
||||
<!-- <a :href="returnRouter(item)"> -->
|
||||
<span @click="returnRouter(item)">{{ item.title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="msg-body">
|
||||
<a :href="returnRouter(item)">
|
||||
<div class="msg-body-content" v-if="item.content">{{item.tip}}-{{ item.content }}</div>
|
||||
<div class="msg-body-content" v-else>{{item.tip}}</div>
|
||||
</a>
|
||||
<!-- <a :href="returnRouter(item)"> -->
|
||||
<div @click="returnRouter(item)" class="msg-body-content" v-if="item.content">{{item.tip}}-{{ item.content }}</div>
|
||||
<div @click="returnRouter(item)" class="msg-body-content" v-else>{{item.tip}}</div>
|
||||
<!-- </a> -->
|
||||
<div class="msg-body-but">
|
||||
<el-button type="danger" plain @click="delItem(item)">删除</el-button>
|
||||
</div>
|
||||
@@ -314,18 +315,28 @@ export default {
|
||||
|
||||
// 跳转详情事件11
|
||||
returnRouter(item) {
|
||||
apiMessage.updateIsRead([item.id]).then(res => {
|
||||
if (res.status == 200) {
|
||||
this.$store.dispatch('refrashMsg');
|
||||
// this.queryMessage(true)
|
||||
item.isRead = true;
|
||||
}
|
||||
});
|
||||
if(item.pageUrl && item.pageUrl.length>10){
|
||||
return item.pageUrl;
|
||||
location.href = item.pageUrl;
|
||||
}else{
|
||||
if (item.refType == 2) {
|
||||
return this.webBaseUrl + '/article/detail?id=' + item.refId;
|
||||
// return this.webBaseUrl + '/article/detail?id=' + item.refId;
|
||||
this.$router.push('/article/detail?id='+ item.refId);
|
||||
} else if (item.refType == 4||item.refType == 5) {
|
||||
return this.webBaseUrl + '/qa/answer?id=' + item.refId;
|
||||
// return this.webBaseUrl + '/qa/answer?id=' + item.refId;
|
||||
this.$router.push('/qa/answer?id='+ item.refId);
|
||||
} else {
|
||||
// if (item.conType == 10) {
|
||||
// return this.webBaseUrl + '/course/micro?id=' + item.refId;
|
||||
// } else if (item.conType == 20) {
|
||||
return this.webBaseUrl + '/course/detail?id=' + item.refId;
|
||||
// return this.webBaseUrl + '/course/detail?id=' + item.refId;
|
||||
this.$router.push('/course/detail?id='+ item.refId);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user