Commit b1aba396 by Lyan

z资讯中心bug

parent ff3dfe77
...@@ -45,7 +45,6 @@ export default { ...@@ -45,7 +45,6 @@ export default {
const params = { const params = {
page: page, page: page,
limit: this.tableResult.pageSize, limit: this.tableResult.pageSize,
classId:9
}; };
const listRes = const listRes =
await this.$api.news.sdztList(params); await this.$api.news.sdztList(params);
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-lg-8"> <div class="col-lg-8">
<img src="../../assets/image/news/sdzt-tp1.png" alt="" /> <img src="../../assets/image/news/sdzt-tp1.png" alt="" @click="goDepth" />
</div> </div>
<div class="col-lg-4"> <div class="col-lg-4">
<ul v-if="depthList.length > 0"> <ul v-if="depthList.length > 0">
...@@ -96,14 +96,14 @@ ...@@ -96,14 +96,14 @@
<div class="row"> <div class="row">
<div class="col-lg-4"> <div class="col-lg-4">
<ul v-if="videoList.length > 0"> <ul v-if="videoList.length > 0">
<li v-for="(tmp, i) in videoList" :key="i" @click="goInfo(tmp.id)"> <li v-for="(tmp, i) in videoList" :key="i" @click="getVideoInfo(tmp.id)">
<span></span><span>{{tmp.title}}</span> <span></span><span>{{tmp.title}}</span>
</li> </li>
</ul> </ul>
<span v-else>暂无数据</span> <span v-else>暂无数据</span>
</div> </div>
<div class="col-lg-8"> <div class="col-lg-8">
<img src="../../assets/image/news/jcsp-tp1.png" alt="" /> <img src="../../assets/image/news/jcsp-tp1.png" alt="" @click="goVideo" />
</div> </div>
</div> </div>
</div> </div>
...@@ -137,6 +137,7 @@ ...@@ -137,6 +137,7 @@
</div> </div>
</template> </template>
<script> <script>
import { mapMutations } from "vuex";
export default { export default {
data() { data() {
return { return {
...@@ -288,21 +289,20 @@ export default { ...@@ -288,21 +289,20 @@ export default {
that.centerList = result that.centerList = result
}) })
// 精彩视频 // 精彩视频
this.initListFn(7,10).then(function(result) { this.videoListFn()
that.videoList = result
})
//地方动态 //地方动态
this.initListFn(6,7).then(function(result) { this.initListFn(6,7).then(function(result) {
that.localList = result that.localList = result
}) })
//深度专题 //深度专题
this.initListFn(7,9).then(function(result) { this.depthListFn();
that.depthList = result
})
//top //top
this.newsTop10() this.newsTop10()
}, },
methods:{ methods:{
...mapMutations({
setMatche: "setMatche",
}),
goNewPic(){ goNewPic(){
this.$router.push({ this.$router.push({
path: '/News/PicNews', path: '/News/PicNews',
...@@ -351,6 +351,32 @@ export default { ...@@ -351,6 +351,32 @@ export default {
} }
}, },
async depthListFn() {
const params = {
page: 1,
limit: 7,
};
const listRes =
await this.$api.news.sdztList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.depthList = data.list
}
},
async videoListFn() {
const params = {
page: 1,
limit: 7,
};
const listRes =
await this.$api.news.jcspList(params);
const { returnCode, data } = listRes;
if (returnCode === "0") {
this.videoList = data.list
}
},
// 详情 // 详情
goInfo(id){ goInfo(id){
console.log(id,'id') console.log(id,'id')
...@@ -359,6 +385,7 @@ export default { ...@@ -359,6 +385,7 @@ export default {
}); });
window.open(link.href,'_blank') window.open(link.href,'_blank')
}, },
// top列表 // top列表
async newsTop10() { async newsTop10() {
const policyListRes = const policyListRes =
...@@ -370,6 +397,24 @@ export default { ...@@ -370,6 +397,24 @@ export default {
} }
}, },
getVideoInfo(id,directpath){
if(directpath&&directpath!==''&& directpath.length>0){
window.open(directpath,'_blank');
}else{
const matche = [
{
name: "精彩视频",
path: "/News/Video",
}
];
this.setMatche(matche);
let link = this.$router.resolve({
path: `/News/msgVideo?id=${id}`,
});
window.open(link.href,'_blank')
}
}
} }
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment