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