修改细节
This commit is contained in:
@@ -93,8 +93,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {article, banner, getArticleList, info} from "@/api";
|
||||
import {getParentNode} from "@/utils/sist";
|
||||
import {banner, getArticleList} from "@/api";
|
||||
import {toArticle,lookMoreComment} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: "news_center",
|
||||
@@ -114,24 +114,11 @@ export default {
|
||||
//console.log(link)
|
||||
window.location.href = link;//当前标签页
|
||||
},
|
||||
getArticle(news){
|
||||
toArticle(news,this.width)
|
||||
},
|
||||
lookMore(news) {
|
||||
info(news.id).then(res => {
|
||||
let info = getParentNode(res.data.encodeId)
|
||||
console.log(res)
|
||||
if (info.three == null) {
|
||||
if (this.width) {
|
||||
this.$router.push("/pc/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
} else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
}
|
||||
} else {
|
||||
if (this.width) {
|
||||
this.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
} else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
})
|
||||
lookMoreComment(news,this.width)
|
||||
},
|
||||
getList() {
|
||||
getArticleList({
|
||||
@@ -142,16 +129,6 @@ export default {
|
||||
this.newsDate = res.rows
|
||||
})
|
||||
},
|
||||
getArticle(news) {
|
||||
info(news.id).then(res => {
|
||||
let info = getParentNode(res.data.encodeId)
|
||||
if (this.width) {
|
||||
this.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
|
||||
} else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
|
||||
}
|
||||
})
|
||||
},
|
||||
getBanner() {
|
||||
banner("NEd5n92EMIpyyBslaNqsRgE").then(res => {
|
||||
this.bannerDate = res.data
|
||||
|
||||
Reference in New Issue
Block a user