更新代码

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=>{ imitationId(data.id).then(res=>{
console.log(res,'调用成功') console.log(res,'调用成功')
}) })
window.open(data.link, '_blank'); window.open(data.imitationLink, '_blank');
}, },
goDeatail(data){ goDeatail(data){
console.log(data) console.log(data)

View File

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

View File

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

View File

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

View File

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