This commit is contained in:
clay
2022-01-16 22:53:34 +08:00
parent b7897ba20e
commit fa8bc05879
4 changed files with 26 additions and 23 deletions

View File

@@ -71,22 +71,18 @@
<script>
import {getStatistic} from "@/api";
import {getConfig} from "@/api";
export default {
name: "bottom",
data(){
return{
form:{
sitetype:process.env.SITE_TYPE,
test:'test'
},
data:{}
}
},
created() {
getStatistic(this.form).then(res=>{
this.data = res.data
getConfig("statistic").then(res=>{
this.data = JSON.parse(res.data)
})
}
}

View File

@@ -4,7 +4,8 @@
<el-col class="bgc">
<!--首页图片-->
<div class="top">
<img src="@/assets/index/sy_bj1@2x.png" alt="">
<img v-if="imageUrl != null" :src="imageUrl" alt="">
<img v-if="imageUrl == null" src="@/assets/index/sy_bj1@2x.png" alt="">
</div>
<div class="next">
<img src="@/assets/index/sy_icon_xh.png" alt="">
@@ -46,6 +47,7 @@ import ResearchTrends from './components/scientific_research_trends.vue'
import SlideshowCard from './components/slideshow_card.vue'
import TeachingStudent from './components/teaching_student.vue'
import Bottom from './components/bottom.vue'
import {getConfig} from "@/api";
export default {
name: "index",
@@ -59,9 +61,15 @@ export default {
},
data() {
return {
width: document.documentElement.clientWidth
width: document.documentElement.clientWidth,
imageUrl:null,
}
},
created() {
getConfig("sist_bg").then(res=>{
this.imageUrl = res.data
})
}
}
</script>