This commit is contained in:
daihh
2022-11-24 21:23:56 +08:00
2 changed files with 25 additions and 14 deletions

View File

@@ -48,14 +48,14 @@
</el-tooltip>
<span class="interact-bar-value"> {{data.shares}}</span>
</div>
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};margin-left:${data.views>1000? '40px':'20px'}`" class="interact-bar-btn" :class="{cursor:!readonly}">
<div v-if="views" style="cursor: default;" :style="`min-width: ${nodeWidth};margin-left:${data.views>1000? '20px':'20px'}`" class="interact-bar-btn ese-view" :class="{cursor:!readonly}">
<el-tooltip effect="light" content="浏览量" placement="top" :visible-arrow="false" popper-class="text-tooltip">
<svg-icon style="margin-right: 0; font-size:22px;" icon-class="eyes"></svg-icon>
</el-tooltip>
<div style="float:right;margin-left:8px">
<!-- <div style="float:right;margin-left:8px"> -->
<span class="interact-bar-value eyes-view" > {{ formatNum(data.views)}}</span>
</div>
<!-- </div> -->
</div>
</div>
<!-- <div v-if="courseExclusive" @click="addFavorite()" :style="`min-width: ${nodeWidth};`" class="interact-bar-btn" :class="{cursor:!readonly}">
@@ -667,11 +667,11 @@ export default {
</script>
<style lang="scss" scoped>
.eyes-view{
// .eyes-view{
// color: #000;
// position: fixed;
// line-height: 40px;
}
// }
::v-deep .g-dialog .el-dialog__header{
text-align: left !important;
}

View File

@@ -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);
// }
}
}