diff --git a/src/assets/images/wuya.mp4 b/src/assets/images/wuya.mp4 deleted file mode 100644 index 23fae5a..0000000 Binary files a/src/assets/images/wuya.mp4 and /dev/null differ diff --git a/src/pages/NewsView/NewsView1.vue b/src/pages/NewsView/NewsView1.vue index a6d6dc4..00b42eb 100644 --- a/src/pages/NewsView/NewsView1.vue +++ b/src/pages/NewsView/NewsView1.vue @@ -1,20 +1,23 @@ @@ -76,6 +81,8 @@ import Header from '@/common/components/Header' import Footer from '@/common/components/Footer' import common from '@/common/components/common.js' import Nav from '../../component/Nav' +import Loading from '../../component/Loading' +import { goDetail } from './NewsViewUtil' import axios from 'axios' export default { @@ -83,9 +90,10 @@ export default { components: { Header, Footer, - Nav + Nav, + Loading }, - data () { + data() { let navTitle = this.$route.query.navTitle; return { navTitle, @@ -117,10 +125,10 @@ export default { } }, computed: { - showJumpBtn () { + showJumpBtn() { return this.page.totalPage > 1 }, - hasData () { + hasData() { return this.requestList.length > 0 } }, @@ -158,32 +166,8 @@ export default { this.changePage = page this.getNews() }, - goDetail: function (item, newsContentId, newsContentType) { - // 文章 - if(item.newsContentType === '1') { - this.$router.push(`/newsViewDetailText/${item.newsContentId}?navTitle=${this.navTitle}&navPath=${this.$route.fullPath}`) - return; - } - // 图片 - if(item.newsContentType === '2') { - return; - } - // 音频 - if(item.newsContentType === '3') { - return; - } - // 视频 - if(item.newsContentType === '4') { - return; - } - // PDF - if(item.newsContentType === '5') { - return; - } - // 链接 - if(item.newsContentType === '6') { - return; - } + goDetail: function (item) { + goDetail(item, this.navTitle, this.$route.fullPath, this.$router) }, getTypeList: function () { var self = this @@ -219,7 +203,7 @@ export default { }) } }, - mounted () { + mounted() { this.getTypeList() this.getAreaList() } @@ -435,13 +419,4 @@ export default { color #fff font-size 14px -.loading - position fixed - top 50% - left 50% - transform translate(-50%, -50%) - background rgba(255, 255, 255, 0.6) - padding 30px - border-radius 10px - box-shadow 0 0 17px #DEDEDE diff --git a/src/pages/NewsView/NewsView2.vue b/src/pages/NewsView/NewsView2.vue index 66e8f85..e85b162 100644 --- a/src/pages/NewsView/NewsView2.vue +++ b/src/pages/NewsView/NewsView2.vue @@ -1,13 +1,7 @@ @@ -64,17 +56,28 @@ import Header from '@/common/components/Header' import Footer from '@/common/components/Footer' import common from '@/common/components/common.js' +import Nav from '../../component/Nav' +import Loading from '../../component/Loading' +import { goDetail } from './NewsViewUtil' import axios from 'axios' export default { name: 'NewsView2', components: { Header, - Footer + Footer, + Nav, + Loading }, data () { + let navTitle = this.$route.query.navTitle; return { - navTitle: this.$route.query.navTitle, + navTitle, + navs: [ + { + name: navTitle + }, + ], newsDirectoriesId: this.$route.query.newsDirectoriesId, classList: [], recommend: [], @@ -125,12 +128,8 @@ export default { self.$set(item, 'innerList', res.data.rows) }) }, - goDetail: function (link, url) { - if (link) { - window.open(link) - } else { - window.location.href = this.publishUrl + url - } + goDetail: function (item) { + goDetail(item, this.navTitle, this.$route.fullPath, this.$router) }, changeArea: function (code) { if (this.isLoading) { @@ -349,13 +348,4 @@ export default { text-overflow ellipsis font-family '宋体' -.loading - position fixed - top 50% - left 50% - transform translate(-50%, -50%) - background rgba(255, 255, 255, 0.6) - padding 30px - border-radius 10px - box-shadow 0 0 17px #DEDEDE diff --git a/src/pages/NewsView/NewsView3.vue b/src/pages/NewsView/NewsView3.vue index fc8c1b3..cd6b7de 100644 --- a/src/pages/NewsView/NewsView3.vue +++ b/src/pages/NewsView/NewsView3.vue @@ -1,13 +1,7 @@ @@ -79,17 +71,28 @@ import Header from '@/common/components/Header' import Footer from '@/common/components/Footer' import common from '@/common/components/common.js' +import Nav from '../../component/Nav' +import Loading from '../../component/Loading' +import { goDetail } from './NewsViewUtil' import axios from 'axios' export default { name: 'NewsView3', components: { Header, - Footer + Footer, + Nav, + Loading }, data () { + let navTitle = this.$route.query.navTitle; return { - navTitle: this.$route.query.navTitle, + navTitle, + navs: [ + { + name: navTitle + }, + ], newsDirectoriesId: this.$route.query.newsDirectoriesId, areaList: [], changePage: 1, @@ -119,8 +122,8 @@ export default { } }, methods: { - goDetail: function (url) { - window.location.href = this.publishUrl + url + goDetail: function (item) { + goDetail(item, this.navTitle, this.$route.fullPath, this.$router) }, doJumpPage: function () { this.page.page = this.changePage @@ -199,26 +202,6 @@ export default { \ No newline at end of file diff --git a/src/pages/NewsViewDetail/NewsViewDetailImage.vue b/src/pages/NewsViewDetail/NewsViewDetailImage.vue new file mode 100644 index 0000000..8ebfbaf --- /dev/null +++ b/src/pages/NewsViewDetail/NewsViewDetailImage.vue @@ -0,0 +1,170 @@ + + + + + \ No newline at end of file diff --git a/src/pages/NewsViewDetail/NewsViewDetailVideo.vue b/src/pages/NewsViewDetail/NewsViewDetailVideo.vue new file mode 100644 index 0000000..8f97718 --- /dev/null +++ b/src/pages/NewsViewDetail/NewsViewDetailVideo.vue @@ -0,0 +1,173 @@ + + + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index ef0de00..ff0acdc 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -29,6 +29,10 @@ import NewsView2 from '../pages/NewsView/NewsView2' import NewsView3 from '../pages/NewsView/NewsView3' import NewsView3Sub from '../pages/NewsView/NewsView3Sub' import NewsViewDetailText from '../pages/NewsViewDetail/NewsViewDetailText' +import NewsViewDetailVideo from '../pages/NewsViewDetail/NewsViewDetailVideo' +import NewsViewDetailAudio from '../pages/NewsViewDetail/NewsViewDetailAudio' +import NewsViewDetailImage from '../pages/NewsViewDetail/NewsViewDetailImage' + Vue.use(Router) export default new Router({ @@ -285,6 +289,36 @@ export default new Router({ title: `${common.area.areaName}公共文化数字云平台`, keepAlive: false } + }, + { + path: '/newsViewDetailVideo/:newsContentId', + name: 'newsViewDetailVideo', + component: NewsViewDetailVideo, + props: true, + meta: { + title: `${common.area.areaName}公共文化数字云平台`, + keepAlive: false + } + }, + { + path: '/newsViewDetailAudio/:newsContentId', + name: 'newsViewDetailAudio', + component: NewsViewDetailAudio, + props: true, + meta: { + title: `${common.area.areaName}公共文化数字云平台`, + keepAlive: false + } + }, + { + path: '/newsViewDetailImage/:newsContentId', + name: 'newsViewDetailImage', + component: NewsViewDetailImage, + props: true, + meta: { + title: `${common.area.areaName}公共文化数字云平台`, + keepAlive: false + } } ] })