clay commit : 第一阶段完成

This commit is contained in:
clay
2022-09-25 16:49:23 +08:00
parent ff86578e8a
commit 62ba7e59c8
40 changed files with 75 additions and 52 deletions

View File

@@ -67,18 +67,28 @@ export function setLanguage() {
export function toArticle(news,width) {
console.log(width,"width")
info(news.id).then(res => {
let info = null
try {
info = getParentNode(res.data.encodeId)
console.log(info)
}catch (e){}
if (info == null){
return
}
if (width) {
vm.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
if (info.three == null) {
if (width) {
vm.$router.push("/pc/" + info.second.encodeId + "?id=" + news.id +"&type=" + info.second.type+ "&lang=" + sessionStorage.getItem("lang"));
} else {
vm.$router.push("/mobile/" + info.second.encodeId + "?id=" + news.id +"&type=" + info.second.type+ "&lang=" + sessionStorage.getItem("lang"));
}
} else {
vm.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
if (width) {
vm.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "&id=" + news.id +"?type=" + info.second.type+ "&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"));
}
}
})
}