修改后台消息显示
This commit is contained in:
@@ -26,7 +26,10 @@
|
||||
:key="index"
|
||||
class="ele-notice-item"
|
||||
>
|
||||
<div class="ele-cell ele-notice-item-wrapper">
|
||||
<div
|
||||
class="ele-cell ele-notice-item-wrapper"
|
||||
@click="goDetail(item)"
|
||||
>
|
||||
<i :class="[item.icon, 'ele-notice-item-icon']"></i>
|
||||
<div class="ele-cell-content">
|
||||
<div class="ele-elip">{{ item.content }}</div>
|
||||
@@ -196,6 +199,38 @@
|
||||
.catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
},
|
||||
goDetail(row) {
|
||||
let btn = {
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
};
|
||||
if (row.url) {
|
||||
btn = {
|
||||
confirmButtonText: '查看详情',
|
||||
showCancelButton: false,
|
||||
type: 'warning'
|
||||
};
|
||||
}
|
||||
setRead({ ids: [row.id] })
|
||||
.then(() => {
|
||||
this.query();
|
||||
this.$confirm(row.content, '提示', btn)
|
||||
.then(() => {
|
||||
let path = row.url;
|
||||
if (path) {
|
||||
this.$router.push({
|
||||
path
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// 取消
|
||||
});
|
||||
})
|
||||
.catch((e) => {
|
||||
this.$message.error(e.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
Reference in New Issue
Block a user