更新代码

This commit is contained in:
xiao-fajia 2024-08-03 15:26:30 +08:00
parent f414bca291
commit af407925c4
5 changed files with 44 additions and 35 deletions

View File

@ -306,8 +306,7 @@ export default {
imitationId(data.id).then(res=>{
console.log(res,'调用成功')
})
window.open(data.link, '_blank');
window.open(data.imitationLink, '_blank');
},
goDeatail(data){
console.log(data)

View File

@ -10,7 +10,7 @@
<div class="navigation">
<div class="content">
<div class="left"> <img src="../../assets/gw/home.png" alt="">
<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>
</div>
<!-- <div class="nav-item" v-for="(item, index) in nav" v-bind:class="[index === currentActive ? 'active' : '']"
@ -49,7 +49,7 @@
</div> -->
<div class="item" v-for="(item, index) in teachingAchievements" :key="index">
<div class="img">
<img :src="imgurl + item.contentImg" alt="">
<img :src="imgurl + item.imageUrl" alt="">
</div>
<div class="tt">{{ item.contentTitle }}</div>
@ -57,8 +57,9 @@
</div>
<div class="page-box">
<el-pagination background layout="prev, pager, next" :total="1000" class="">
</el-pagination>
<!-- <el-pagination background layout="prev, pager, next" :total="1000" class="">-->
<!-- </el-pagination>-->
<!-- <page-util :category-id="categoryId" @event-message="handleDataFromPage" />-->
</div>
<footers></footers>
@ -66,18 +67,21 @@
</template>
<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import {Swiper, SwiperSlide} from "vue-awesome-swiper";
import "swiper/css/swiper.min.css";
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
import {getPageData, getPageColumn} from "@/api/officialWebsite/getPageData";
import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue'
import { getTab, getbanner, getinfo } from "@/api/gw/home";
import {getTab, getbanner, getinfo} from "@/api/gw/home";
import PageUtil from '@/views/officialWebsite/Components/page'
export default {
components: {
Swiper,
SwiperSlide,
headers,
footers
footers,
"page-util": PageUtil
},
name: 'HelloWorld',
props: {
@ -94,16 +98,14 @@ export default {
],
currentActive: 0,
isMounted: false,
categoryId: "",
}
},
created() {
//
this.initPageData();
},
computed: {
},
computed: {},
methods: {
//
@ -115,24 +117,29 @@ export default {
},
initPageData() {
let routeParam = {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
}
getPageColumn(routeParam).then(response => {
// this.categoryId = response.data[0].id
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
let routeParam = {
"categoryId": this.$route.query.id,
"pageNum": 1,
"pageSize": 10
}
getPageColumn(routeParam).then(response => {
response.data.forEach(cloumnItem => {
this.nav.push(cloumnItem);
cloumnItem.children.list.forEach(element => {
this.teachingAchievements.push(element);
cloumnItem.children.list.forEach(element => {
this.teachingAchievements.push(element);
});
// cloumnItem.categoryName
});
});
// cloumnItem.categoryName
});
});
},
},
handleDataFromPage(data){
// this.nav[this.currentActive].children.list = data
// console.log(data)
this.teachingAchievements = data
}
}
}
@ -175,8 +182,7 @@ getPageColumn(routeParam).then(response => {
/* 选中的页码按钮样式 */
::v-deep .el-pagination .el-pager .active {
background-color: #005375;
;
background-color: #005375;;
/* 背景颜色 */
color: #fff;
/* 文字颜色 */
@ -200,6 +206,7 @@ getPageColumn(routeParam).then(response => {
::v-deep .el-pagination .btn-prev .el-icon {
font-size: 18px;
}
.top-box {
width: 100%;
/* height: 1000px; */
@ -337,13 +344,12 @@ getPageColumn(routeParam).then(response => {
}
.list {
width: 80%;
margin: 30px auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
/*justify-content: space-between;*/
margin-top: 50px;
}
@ -352,6 +358,7 @@ getPageColumn(routeParam).then(response => {
width: 23%;
height: 220px;
margin-bottom: 30px;
margin-right: 2%;
position: relative;
background-color: #fff;
overflow: hidden;
@ -412,7 +419,8 @@ getPageColumn(routeParam).then(response => {
/* align-items: center; */
}
.index-footer .footer .logo .footer-contact {}
.index-footer .footer .logo .footer-contact {
}
.index-footer .footer .logo .footer-contact .p {
display: inline-block;

View File

@ -313,6 +313,7 @@ export default {
.page-box{
width: 82%;
margin: 10px auto;
text-align: center;
}
.news .news-item {

View File

@ -340,6 +340,7 @@ export default {
.page-box{
width: 82%;
margin: 10px auto;
text-align: center;
}
.teaching .teaching-list {

View File

@ -139,7 +139,7 @@ export default {
imitationId(data.id).then(res=>{
console.log(res,'调用成功')
})
window.open(data.link, '_blank');
window.open(data.imitationLink, '_blank');
},