11
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
<el-col :xs="22" :sm="20" :md="20" :lg="18" :xl="14">
|
||||
<el-row class="news">
|
||||
<el-col v-for="(news,index) in newsDate" :key="index" :xs="12" :sm="12" :md="12" :lg="6" :xl="6" >
|
||||
<div class="news_context">
|
||||
<div class="news_context" @click="getArticle(news)">
|
||||
<div class="news_context_img">
|
||||
<img :src="news.imgurl" alt="">
|
||||
</div>
|
||||
@@ -86,14 +86,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {banner, getArticleList} from "@/api";
|
||||
import {article, banner, getArticleList, info} from "@/api";
|
||||
import {getParentNode} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: "news_center",
|
||||
data(){
|
||||
return{
|
||||
newsDate:[],
|
||||
bannerDate:[]
|
||||
bannerDate:[],
|
||||
width: document.documentElement.clientWidth>992,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -110,6 +112,16 @@ 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);
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
|
||||
}
|
||||
})
|
||||
},
|
||||
getBanner(){
|
||||
banner("NEd5n92EMIpyyBslaNqsRgE").then(res=>{
|
||||
this.bannerDate = res.data
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<el-col class="scientific_context" :xs="22" :sm="20" :md="20" :lg="18" :xl="14">
|
||||
<el-row>
|
||||
<el-col v-for="(item,index) in scientificData" :key="index" :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
||||
<div @click="getArticle(item)">
|
||||
<el-row class="scientific_context_text">
|
||||
<el-col :span="2" class="img">
|
||||
<img v-if="index == 0" src="@/assets/index/scientific_research_trends/sy_icon_bh1.png" alt="">
|
||||
@@ -54,6 +55,7 @@
|
||||
<hr v-if="index < 8" style="border: 0.1rem solid #E6E6E6;">
|
||||
<hr v-if="!width && index == 8" style="border: 0.1rem solid #E6E6E6;">
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -89,6 +91,7 @@
|
||||
<el-col class="academia_context" :xs="22" :sm="20" :md="20" :lg="18" :xl="14">
|
||||
<el-row>
|
||||
<el-col v-for="(item,index) in academiaData" :key="index" :xs="24" :sm="24" :md="24" :lg="12" :xl="12">
|
||||
<div @click="getArticle(item)">
|
||||
<el-row class="academia_context_text">
|
||||
<el-col :span="2" class="img"><img src="@/assets/index/scientific_research_trends/sy_icon_b1.png" alt="">
|
||||
</el-col>
|
||||
@@ -101,6 +104,7 @@
|
||||
<hr v-if="index < 4" style="border: 0.1rem solid #E6E6E6;">
|
||||
<hr v-if="!width && index == 4" style="border: 0.1rem solid #E6E6E6;">
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@@ -124,14 +128,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getArticleList} from "@/api";
|
||||
import {getArticleList, info} from "@/api";
|
||||
import {parseTime} from '@/utils/ebts'
|
||||
import {getParentNode} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: "scientific_research_trends",
|
||||
data() {
|
||||
return {
|
||||
width: document.documentElement.clientWidth>=992,
|
||||
width: document.documentElement.clientWidth>992,
|
||||
scientificData: [],
|
||||
academiaData: [],
|
||||
}
|
||||
@@ -150,6 +155,16 @@ export default {
|
||||
this.scientificData = 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);
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
|
||||
}
|
||||
})
|
||||
},
|
||||
getAcademiaList() {
|
||||
getArticleList({
|
||||
type: "KBwgShsEiDolV91qmaWdWJc",
|
||||
@@ -206,6 +221,7 @@ export default {
|
||||
}
|
||||
|
||||
.text {
|
||||
cursor: pointer;
|
||||
margin-left: 1rem;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 500;
|
||||
@@ -258,6 +274,7 @@ export default {
|
||||
}
|
||||
|
||||
.text {
|
||||
cursor: pointer;
|
||||
margin-left: 1rem;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 500;
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
name: "teaching_student",
|
||||
data(){
|
||||
return{
|
||||
width:document.documentElement.clientWidth>=992,
|
||||
width:document.documentElement.clientWidth>992,
|
||||
listData:[]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user