前端补正
This commit is contained in:
parent
9b980f9507
commit
05b79aefb2
@ -1,5 +1,7 @@
|
||||
package com.ruoyi.cms.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.ruoyi.cms.domain.CmsContent;
|
||||
import com.ruoyi.cms.service.ICmsContentService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@ -34,4 +36,14 @@ public class CMSContentAPI extends BaseController {
|
||||
return success(contentService.searchContent(query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 二级栏目下的所有
|
||||
*/
|
||||
@GetMapping("/listById/{id}")
|
||||
public AjaxResult getListById(@PathVariable Long id){
|
||||
return success(contentService.list(new QueryWrapper<CmsContent>().and(item -> {
|
||||
item.eq("category_id", id).eq("del_flag", 0);
|
||||
})));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,3 +28,10 @@ export function getbaseInfo() {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
export function getListById(id){
|
||||
return request({
|
||||
url: "/api/content/listById/" + id,
|
||||
method: "get"
|
||||
})
|
||||
}
|
||||
|
@ -67,7 +67,7 @@
|
||||
<div class="new-list">
|
||||
<div class="list-box" v-for="(item, index) in this.newList[1]" :key="index" @click="goDeatail(item)" >
|
||||
<div class="list-bs">
|
||||
<img :src="item.contentImg" style="width: 125px; height: 70px ">
|
||||
<img :src="item.contentImg" style="">
|
||||
<div class="new-wb">{{ item.contentTitle }}</div>
|
||||
</div>
|
||||
<div class="list-bs" style="margin-top: 15px;">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="tab-box">
|
||||
<!-- left -->
|
||||
<div class="d-s">
|
||||
<div class="d-s" @click="toHome">
|
||||
<div class="logo-box">
|
||||
<img :src="baseInfo.webImg" />
|
||||
</div>
|
||||
@ -85,6 +85,9 @@ export default {
|
||||
this.baseInfo = res.data
|
||||
this.baseInfo.webImg = process.env.VUE_APP_BASE_API + this.baseInfo.webImg
|
||||
})
|
||||
},
|
||||
toHome(){
|
||||
this.$router.push("/virtually")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -109,6 +112,7 @@ export default {
|
||||
.d-s {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
.logo-box {
|
||||
width: 50px;
|
||||
|
@ -24,9 +24,16 @@
|
||||
<div class="about-conts" v-bind:class="[currentActive == 0 ? 'bj' : '']">
|
||||
<!-- main -->
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
<div class="about-conts-item1" v-if="currentActive == index">
|
||||
<div class="about-conts-item1" v-if="currentActive == index && currentActive !== 1">
|
||||
<div class="neirong" v-html="pageContextList[index]"></div>
|
||||
</div>
|
||||
<div class="about-conts-item1" v-if="currentActive == index && currentActive === 1">
|
||||
<div class="dataClass">
|
||||
<div v-for="(item, index) in dataList">
|
||||
{{item.contentTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 中心简介 -->
|
||||
@ -93,7 +100,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import { getPageData, getPageColumn, getListById } from "@/api/officialWebsite/getPageData";
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
|
||||
@ -114,6 +121,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
pageContextList: [],
|
||||
nav: [
|
||||
// { name: '中心简介' },
|
||||
@ -156,6 +164,14 @@ export default {
|
||||
return
|
||||
}
|
||||
this.currentActive = value
|
||||
if (value === 1){
|
||||
this.getContentByCategoryId(this.nav[value].id)
|
||||
}
|
||||
},
|
||||
getContentByCategoryId(id){
|
||||
getListById(id).then(res => {
|
||||
this.dataList = res.data
|
||||
})
|
||||
},
|
||||
initPageData() {
|
||||
console.log("123123", this.$route.query.id);
|
||||
@ -613,4 +629,16 @@ export default {
|
||||
line-height: 18px;
|
||||
|
||||
}
|
||||
.dataClass{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
.dataClass > div {
|
||||
border: 1px solid black;
|
||||
font-size: 18px;
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@ -24,9 +24,16 @@
|
||||
<div class="committee-cont">
|
||||
<!-- main -->
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
<div class="about-conts-item1" v-if="currentActive == index">
|
||||
<div class="about-conts-item1" v-if="currentActive == index && currentActive !== 1">
|
||||
<div class="neirong" v-html="pageContextList[index]"></div>
|
||||
</div>
|
||||
<div class="about-conts-item1" v-if="currentActive == index && currentActive === 1">
|
||||
<div class="dataClass">
|
||||
<div v-for="(item, index) in dataList">
|
||||
{{item.contentTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -38,7 +45,7 @@
|
||||
<script>
|
||||
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
|
||||
import "swiper/css/swiper.min.css";
|
||||
import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData";
|
||||
import {getPageData, getPageColumn, getListById} from "@/api/officialWebsite/getPageData";
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
export default {
|
||||
@ -54,13 +61,14 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
pageContextList: [],
|
||||
nav: [
|
||||
// { name: '工作动态' },
|
||||
// { name: '组织架构' },
|
||||
// { name: '成员信息' },
|
||||
],
|
||||
currentActive: 1,
|
||||
currentActive: 0,
|
||||
isMounted: false,
|
||||
input4: ""
|
||||
}
|
||||
@ -74,12 +82,20 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
getContentByCategoryId(id){
|
||||
getListById(id).then(res => {
|
||||
this.dataList = res.data
|
||||
})
|
||||
},
|
||||
// 触发导航
|
||||
getCurrentActive(value) {
|
||||
if (this.currentActive == value) {
|
||||
return
|
||||
}
|
||||
this.currentActive = value
|
||||
if (value === 1){
|
||||
this.getContentByCategoryId(this.nav[value].id)
|
||||
}
|
||||
},
|
||||
initPageData() {
|
||||
|
||||
@ -519,4 +535,16 @@ export default {
|
||||
line-height: 18px;
|
||||
|
||||
}
|
||||
.dataClass{
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 10px;
|
||||
}
|
||||
.dataClass > div {
|
||||
border: 1px solid black;
|
||||
font-size: 18px;
|
||||
margin: 10px;
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
|
@ -454,7 +454,6 @@ export default {
|
||||
this.nav[this.currentActive].children.list = data
|
||||
}
|
||||
if (this.currentActive === 5){
|
||||
console.log(data)
|
||||
this.noticeList = data
|
||||
}
|
||||
},
|
||||
|
@ -55,7 +55,7 @@ export default {
|
||||
return {
|
||||
total: 0,
|
||||
queryParams: {
|
||||
id:this.$route.query.id,
|
||||
categoryId:this.$route.query.id,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
@ -105,7 +105,8 @@ export default {
|
||||
this.currentActive = value
|
||||
},
|
||||
initPageData() {
|
||||
console.log("传参id", this.$route.query.id);
|
||||
// console.log("传参id", this.$route.query.id);
|
||||
console.log(this.queryParams)
|
||||
getPageData(this.queryParams).then(res => {
|
||||
console.log('列表',res)
|
||||
this.listinfo = res.data.list;
|
||||
|
@ -23,8 +23,8 @@
|
||||
</div>
|
||||
<div class="about-conts" v-bind:class="[currentActive == 1 ? 'bj' : '']">
|
||||
<!-- main -->
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
<div class="about-conts-item1" v-if="currentActive == index">
|
||||
<div v-for="(item, index) in nav " :key=index>
|
||||
<div class="about-conts-item1" v-show="currentActive == index">
|
||||
<div class="neirong" v-html="pageContextList[index]"></div>
|
||||
</div>
|
||||
</div>
|
||||
@ -80,6 +80,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
pageContextList: [],
|
||||
nav: [
|
||||
// { name: '专业平台介绍' },
|
||||
@ -108,7 +109,6 @@ export default {
|
||||
this.initPageData();
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -50,14 +50,13 @@
|
||||
<div class="team" v-if="currentActive == 0">
|
||||
<div class="tt">教学团队</div>
|
||||
<div class="team-list">
|
||||
<div class="item" v-for="(item, index) in teachingTeam" :key="index">
|
||||
<div class="img">
|
||||
<img :src="imgurl + item.contentImg" alt="" class="imgWO">
|
||||
<!-- <img src="../../assets/gw/Snipaste_2024-07-23_22-51-23.jpg" alt="" class="imgWO"> -->
|
||||
</div>
|
||||
<!-- <div class="tts">王尔特</div> -->
|
||||
<div class="tts">{{ item.contentTitle }}</div>
|
||||
</div>
|
||||
<div v-html="teachingTeam[0].contentDetail"></div>
|
||||
<!-- <div class="item" v-for="(item, index) in teachingTeam" :key="index">-->
|
||||
<!-- <div class="img">-->
|
||||
<!-- <img :src="imgurl + item.contentImg" alt="" class="imgWO">-->
|
||||
<!-- </div>-->
|
||||
<!-- <div class="tts">{{ item.contentTitle }}</div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user