前端补正

This commit is contained in:
xvv 2024-07-29 16:15:31 +08:00
parent b5a4a41b99
commit 1c5c9b9811
5 changed files with 59 additions and 34 deletions

View File

@ -8,7 +8,7 @@ export function getTab(query) {
params: query
})
}
// 获取一级
export function getbanner(data) {
return request({
url: '/api/category',
@ -16,6 +16,14 @@ export function getbanner(data) {
data
})
}
// 获取二级内容
export function getinfo(data) {
return request({
url: '/api/category/content',
method: 'post',
data
})
}
export function getBaseInfo(){
return request({

View File

@ -339,7 +339,7 @@ export default {
}
},
mounted() {
console.log(this.$route.params.id)
console.log(this.$route.query.id)
//
this.tabLsit();
this.getWebBaseInfo()

View File

@ -61,10 +61,9 @@ export default {
methods:{
tabClick(url,id){
console.log(url,id)
this.$router.push({
name: url,
params:{ id: id }
query:{ id: id }
});
},

View File

@ -11,7 +11,7 @@
<div class="navigation">
<div class="content">
<div class="left"> <img src="../../assets/gw/home.png" alt="">
<p><span href="/">首页</span><i class="el-icon-arrow-right"></i> <span href="">中心简介</span></p>
<p><span href="/">首页</span><i class="el-icon-arrow-right"></i> <span href="">合作企业</span></p>
</div>
</div>
@ -41,6 +41,7 @@ import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css";
import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue'
import {getTab, getbanner, getinfo} from "@/api/gw/home";
export default {
components: {
Swiper,
@ -81,8 +82,25 @@ export default {
computed: {
},
mounted() {
console.log(this.$route.query.id)
this.getInfo()
},
methods: {
getInfo() {
let data = {
categoryId: this.$route.query.id,
pageNum:1,
pageSize:10
}
getbanner(data).then(res => {
console.log(res)
})
},
//
getCurrentActive(value) {
if (this.currentActive == value) {

View File

@ -2,42 +2,25 @@
<div class="container">
<div class="top-box">
<headers></headers>
<div class="ny-banner">
<img src="../../assets/gw/ny-banner.jpg" alt="">
</div>
</div>
<div class="navigation">
<div class="content">
<div class="left"> <img src="../../assets/gw/home.png" alt="">
<p><span href="/">首页</span><i class="el-icon-arrow-right"></i> <span href="">中心简介</span></p>
<p><span href="/">首页</span><i class="el-icon-arrow-right"></i> <span href="">联系我们</span></p>
</div>
</div>
</div>
<div class="contact">
<div class="info">
<div class="info-item">
<img src="../../assets/gw/Group780.png" alt="">
<div class="p">中心地址</div>
<div class="desc">黑龙江省哈尔滨市南岗区西大直街92号</div>
</div>
<div class="info-item">
<img src="../../assets/gw/Group783.png" alt="">
<div class="p">电话</div>
<div class="desc">0451-86686666</div>
</div>
<div class="info-item">
<img src="../../assets/gw/Group781.png" alt="">
<div class="p">邮箱</div>
<div class="desc">186841613@QQ.COM</div>
</div>
<div class="info-item">
<img src="../../assets/gw/Group782.png" alt="">
<div class="p">传真</div>
<div class="desc">0451-86686666</div>
<div class="info-item" v-for="(item,index) in fourlist" :key="index">
<img :src=" imgurl + item.contentImg " alt="">
<div class="p">{{item.contentTitle}}</div>
<div class="desc" v-html="item.contentDetail"></div>
</div>
</div>
<div class="map">
<img src="../../assets/gw/Snipaste_2024-07-24_22-28-43.jpg" alt="">
@ -48,6 +31,7 @@
</template>
<script>
import {getTab, getbanner, getinfo} from "@/api/gw/home";
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css";
import footers from '@/views/officialWebsite/Components/footer.vue'
@ -65,6 +49,7 @@ export default {
},
data() {
return {
imgurl:process.env.VUE_APP_BASE_API,
tablist: [
{ name: '首页' },
{ name: '中心概括' },
@ -79,21 +64,36 @@ export default {
{ name: '合作企业' },
{ name: '联系我们' },
],
nav: [
{ name: '教学团队' },
{ name: '教学成果' },
],
fourlist:[],
currentActive: 0,
isMounted: false,
}
},
computed: {
},
mounted() {
console.log(this.$route.query.id)
this.getInfo()
},
methods: {
getInfo() {
let data = {
categoryId: this.$route.query.id,
pageNum:1,
pageSize:10
}
getbanner(data).then(res => {
console.log(res.data[0].children.list)
this.fourlist = res.data[0].children.list
})
},
//
getCurrentActive(value) {
if (this.currentActive == value) {
@ -348,7 +348,7 @@ export default {
font-size: 14px;
color: #999999;
margin-top: 20px;
margin-bottom: 20px;
}
.contact .info .info-item .desc {