clay commit : 解决有三级菜单时跳转出现问题

This commit is contained in:
clay
2022-10-07 17:40:08 +08:00
parent 549ecbe309
commit 8950f87955
3 changed files with 4 additions and 3 deletions

View File

@@ -105,10 +105,11 @@ export function toArticle(news, width) {
vm.$router.push("/mobile/" + info.second.encodeId + "?id=" + news.id + "&type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
}
} else {
console.log(info.three,"toArticle,info.three")
if (width) {
vm.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "&id=" + news.id + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
vm.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
} else {
vm.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "&id=" + news.id + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
vm.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
}
}
})

View File

@@ -22,7 +22,6 @@
<el-col :span="6" v-for="(item,index) in newsData" :key="index">
<div class="news_context" @click="getArticle(item)">
<div class="news_context_img">
<img v-if="!item.imgurl" src="../../../assets/index/news_center/t4.png" alt="">
<img v-if="item.imgurl" :src="item.imgurl" alt="">
</div>
<div class="news_context_text" style="border-right: 1px solid #CCCCCC;">

View File

@@ -72,6 +72,7 @@ export default {
window.location.href = link;//当前标签页
},
getArticle(news) {
console.log(news)
toArticle(news, this.width);
},
lookMore(str) {