新闻详情
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
|
||||
<script>
|
||||
import {mapState} from 'vuex'
|
||||
import {addArticle, addVideo, newsDetail, newsList, videoDetail, detail} from './components'
|
||||
import {addArticle, addVideo, newsDetail, newsList, videoDetail} from './components'
|
||||
|
||||
export default {
|
||||
name: 'AppNewsCenter',
|
||||
@@ -30,8 +30,7 @@ export default {
|
||||
addVideo,
|
||||
addArticle,
|
||||
newsDetail,
|
||||
videoDetail,
|
||||
detail
|
||||
videoDetail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -52,7 +51,6 @@ export default {
|
||||
addArticle: addArticle,
|
||||
newsDetail: newsDetail,
|
||||
videoDetail: videoDetail,
|
||||
detail: detail,
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
<template>
|
||||
<ai-detail class="detail">
|
||||
<template slot="title">
|
||||
<ai-title title="详情" :isShowBack="true" :isShowBottomBorder="true" @onBackClick="$emit('goBack')"></ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
<!-- <div v-html=""></div> -->
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'detail',
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
permissions: Function,
|
||||
detail: Object,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.id = this.$route.query.id
|
||||
this.id && this.instance.post(``, null, {
|
||||
params: {id: this.id}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -9,14 +9,14 @@
|
||||
<h2>{{ detail.title }}</h2>
|
||||
<p class="subTitle">类型:{{ dict.getLabel('appNewsCategory', +detail.category) }}</p>
|
||||
</template>
|
||||
<template slot="right">
|
||||
<!-- <template slot="right">
|
||||
<el-button type="text" size="small" icon="iconfont iconEdit" @click="handleEdit">修改</el-button>
|
||||
</template>
|
||||
</template> -->
|
||||
<template #content>
|
||||
<ai-article :value="detail.content"></ai-article>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="封面信息">
|
||||
<ai-card title="封面信息" v-show="detail.thumbUrl">
|
||||
<template #content>
|
||||
<div class="content">
|
||||
<div class="img">
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<el-button type="text" title="取消发布" v-if="row.status=='1' && permissions('app_appnews_status')" @click="changeStatus(row)">取消发布</el-button>
|
||||
<el-button type="text" v-if="row.status=='0' && permissions('app_appnews_status')" title="发布" @click="changeStatus(row)">发布</el-button>
|
||||
<el-button type="text" @click="handleEdit(row)" v-if="permissions('app_appnews_edit')">编辑</el-button>
|
||||
<el-button type="text" @click="handleDetail(row.id)" v-if="permissions('app_appnews_detail')">详情</el-button>
|
||||
<el-button type="text" @click="handleDetail(row)" v-if="permissions('app_appnews_view')">详情</el-button>
|
||||
<el-button type="text" @click="handleDelete(row)" v-if="permissions('app_appnews_del')">删除</el-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -150,9 +150,15 @@ export default {
|
||||
this.$confirm(msg).then(() => this.changeInfo(row));
|
||||
},
|
||||
|
||||
handleDetail(id) {
|
||||
this.$emit("goPage", {key: "detail", id});
|
||||
handleDetail(row) {
|
||||
if(row.type == 0) {
|
||||
this.$emit("goPage", {key: "newsDetail", row});
|
||||
} else if(row.type == 1) {
|
||||
this.$emit("goPage", {key: "videoDetail", row});
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 删除新闻
|
||||
* */
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
</template>
|
||||
<template slot="content">
|
||||
<ai-card title="视频信息">
|
||||
<template slot="right">
|
||||
<!-- <template slot="right">
|
||||
<el-button type="text" icon="iconfont iconEdit" @click="handleEdit">修改</el-button>
|
||||
</template>
|
||||
</template> -->
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
:columnsNumber="1">
|
||||
|
||||
Reference in New Issue
Block a user