school_website/ruoyi-ui/src/views/officialWebsite/details.vue
2024-08-01 19:19:11 +08:00

549 lines
11 KiB
Vue

<template>
<div class="container">
<div class="top-box">
<headers></headers>
<div class="ny-banner">
<img src="../../assets/gw/ny-banner.jpg" alt="">
</div>
</div>
<!-- new -->
<div class="content-box" >
<div class="title_">{{info.contentTitle}}</div>
<div class="size_" v-if="info.contentType == 0" v-html="info.contentDetail" ></div>
<div v-if="info.contentType == 1" style="display: flex;flex-wrap: wrap">
<div class="" v-for="(item,index) in info.imageUrl" :key="index">
<img :src="imgurl + item" alt="" >
</div>
</div>
<div v-if="info.contentType == 2" style="display: flex;">
<div class="" v-for="(item,index) in info.videoUrl" :key="index">
<video :src="imgurl + item"></video>
</div>
</div>
</div>
<footers></footers>
</div>
</template>
<script>
import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.min.css";
import { getContent, getPageColumn } from "@/api/officialWebsite/getPageData";
import headers from '@/views/officialWebsite/Components/header.vue'
import footers from '@/views/officialWebsite/Components/footer.vue'
// import {useRoute, useRouter} from "vue-router";
// const route = useRoute();
// const router = useRouter();
export default {
components: {
Swiper,
SwiperSlide,
headers,
footers
},
name: 'HelloWorld',
props: {
msg: String
},
data() {
return {
info:null,
imgurl:process.env.VUE_APP_BASE_API,
pageContextList: [],
nav: [],
currentActive: 2,
isMounted: false,
orgList: "",
postList: [],
content: "",
leaderList: "",
}
},
computed: {
},
mounted() {
// 页面加载完毕调用
debugger;
this.initPageData();
},
methods: {
// 触发导航
getCurrentActive(value) {
if (this.currentActive == value) {
return
}
this.currentActive = value
},
initPageData() {
console.log("文章", this.$route.query.id);
let id = this.$route.query.id
getContent(id).then(response => {
console.log(response)
this.info = response.data;
if(response.data.contentType == 0){
console.log('文章')
}
if(response.data.contentType == 1){
console.log('图片')
}
if(response.data.contentType == 2){
console.log('视频')
}
});
// let introduction_center_param = {
// "categoryId": "1813827591224823808",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(introduction_center_param).then(response => {
// response.data.list.forEach(element => {
// this.content += element.contentDetail;
// });
// });
// let organizational_structure_param = {
// "categoryId": "1813827750121836544",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(organizational_structure_param).then(response => {
// response.data.list.forEach(element => {
// // this.orgList.push(element);
// this.orgList += element.contentDetail;
// });
// });
// let current_leader_param = {
// "categoryId": "1813827861774209024",
// "pageNum": 1,
// "pageSize": 1000
// };
// getPageData(current_leader_param).then(response => {
// response.data.list.forEach(element => {
// this.leaderList += element.contentDetail;
// });
// });
},
}
}
</script>
<style scoped>
/* .container {
background: #F5F5F5;
} */
.bj {
background: #F5F5F5;
}
.top-box {
width: 100%;
/* height: 1000px; */
/* background: url(''); */
/* background-size: cover; */
/* 背景图片铺满盒子 */
/* background-repeat: no-repeat; */
/* 禁止背景图片重复 */
position: relative;
}
.tab-box {
width: 100%;
box-sizing: border-box;
padding: 20px 2%;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
background-color: #005375;
font-weight: bold;
font-size: 18px;
color: #FFFFFF;
/* position: absolute; */
z-index: 3;
}
.d-s {
display: flex;
align-items: center;
}
.logo-box {
width: 50px;
height: 50px;
background: #fff;
}
.logo-size {
font-weight: 800;
font-size: 24px;
color: #FFFFFF;
margin-left: 20px;
}
.x-x {
margin-right: 20px;
cursor: pointer;
}
.ny-banner {
width: 100%;
}
.ny-banner img {
width: 100%;
}
.navigation {
width: 100%;
height: 60px;
background: #FFFFFF;
border-radius: 0px 0px 0px 0px;
border-bottom: 1px solid #EEEEEE;
}
.navigation .content {
width: 80%;
margin: 0 auto;
height: 60px;
display: flex;
justify-content: space-between;
align-items: center
}
.navigation .content .left {
width: 30%;
display: flex;
align-items: center
}
.navigation img {
width: 15px;
margin-right: 10px;
}
.navigation p {
/* margin-top: 5px; */
color: #999;
}
.navigation span {
color: #999;
}
.navigation span:last-child {
font-weight: 700;
color: #005375;
}
.navigation .content .right {
width: 70%;
display: flex;
justify-content: flex-end;
align-items: center
}
.navigation .content .right .nav-item {
width: 200px;
display: flex;
height: 60px;
justify-content: center;
align-items: center;
font-size: 20px;
cursor: pointer;
font-weight: 500;
border-bottom: 3px solid transparent;
}
.navigation .content .right .active {
border-bottom: 3px solid #005375;
color: #005375;
font-weight: bold;
}
.about-conts {
padding: 40px 0;
}
.about-conts .about-conts-item1 {
padding: 30px 2%;
width: 76%;
margin: 0 auto;
background-color: #fff;
}
.about-conts .about-conts-item2 {
/* padding: 30px; */
width: 80%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
/* background-color: #fff; */
}
.about-conts .about-conts-item2 .div {
width: 31%;
display: flex;
justify-content: center;
align-items: center;
height: 80px;
position: relative;
margin-right: 2%;
margin-bottom: 30px;
font-size: 20px;
font-weight: 500;
}
.about-conts .about-conts-item2 .div:nth-child(3n) {
margin-right: 0;
}
.about-conts .about-conts-item2 .div::after {
content: "";
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
border: 1px solid #EEEEEE;
}
.about-conts .about-conts-item3 {
padding: 30px 2%;
width: 76%;
margin: 0 auto;
margin-top: -40px;
margin-bottom: -40px;
background: linear-gradient(180deg, #E8FCFF 0%, rgba(255, 255, 255, 0) 100%);
/* background-color: #fff; */
}
.about-conts .about-conts-item3 .about-conts-item3-div {
width: 100%;
padding: 30px;
border-bottom: 1px solid #EEEEEE;
margin-bottom: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
.about-conts .about-conts-item3 .about-conts-item3-div:last-child {
margin-bottom: 0;
border-bottom: 1px solid transparent;
}
.about-conts .about-conts-item3 .about-conts-item3-div .left {
width: 20%;
/* background-color: #f0f; */
display: flex;
justify-content: center;
align-items: center;
font-weight: bold;
font-size: 20px;
color: #005375;
}
.about-conts .about-conts-item3 .about-conts-item3-div .right {
width: 80%;
overflow: hidden;
display: flex;
flex-wrap: wrap;
}
.about-conts .about-conts-item3 .about-conts-item3-div .right .divs {
width: 120px;
margin: 30px;
border-radius: 0px 0px 0px 0px;
}
.about-conts .about-conts-item3 .about-conts-item3-div .right .divs .img {
width: 120px;
height: 150px;
background: #D9D9D9;
overflow: hidden;
display: flex;
justify-content: center;
align-items: center;
border-radius: 0px 0px 0px 0px;
}
.about-conts .about-conts-item3 .about-conts-item3-div .right .divs .img img {
width: 100%;
object-fit: cover;
}
.about-conts .about-conts-item3 .about-conts-item3-div .right .divs .tt {
text-align: center;
margin-top: 20px;
font-weight: 500;
font-size: 20px;
color: #333333;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
.index-footer {
background: #383838;
padding-top: 30px;
}
.index-footer .footer {
width: 80%;
margin: 0 auto;
}
.index-footer .footer .logo {
display: flex;
justify-content: space-between;
/* align-items: center; */
}
.index-footer .footer .logo .footer-contact {}
.index-footer .footer .logo .footer-contact .p {
display: inline-block;
display: flex;
float: left;
margin-left: 50px;
align-items: center;
color: rgba(255, 255, 255, 0.7);
font-size: 16px;
/* justify-content: flex-end; */
}
.index-footer .footer .logo .footer-contact .p img {
margin-right: 10px;
}
.index-footer .footer .logo .footer-contact .p:nth-child(3) {
width: 100%;
clear: both;
margin-top: 20px;
}
.index-footer .footer .footer-nav {
display: flex;
margin-top: 20px;
padding-top: 30px;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.index-footer .footer .footer-nav .footer-nav-item {
width: 9%;
margin-right: 1%;
}
.index-footer .footer .footer-nav .footer-nav-item:last-child {
margin-right: 0;
}
.index-footer .footer .footer-nav .footer-nav-item .tt {
font-weight: 500;
font-size: 18px;
color: rgba(255, 255, 255, 0.7);
line-height: 18px;
position: relative;
padding-bottom: 20px;
margin-bottom: 20px;
}
.index-footer .footer .footer-nav .footer-nav-item .tt::after {
content: "";
width: 20px;
height: 2px;
background: #005375;
border-radius: 0px 0px 0px 0px;
position: absolute;
bottom: 0;
left: 0;
}
.index-footer .footer .footer-nav .footer-nav-item a {
text-decoration: none;
font-weight: 500;
font-size: 16px;
color: rgba(255, 255, 255, 0.4);
line-height: 16px;
display: block;
margin-bottom: 15px;
}
.index-footer .footer .footer-nav .footer-nav-item a:last-child {
margin-bottom: 0;
}
.index-footer .footer .web_icp {
display: flex;
margin-top: 50px;
height: 80px;
align-items: center;
justify-content: space-between;
border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.index-footer .footer .web_icp a {
text-decoration: none;
font-weight: 500;
font-size: 16px;
color: rgba(255, 255, 255, 0.4);
line-height: 16px;
margin-right: 30px;
}
.index-footer .footer .web_icp .right {
display: flex;
align-items: center;
justify-content: flex-end
}
.index-footer .footer .web_icp .right div {
margin-right: 25px;
font-weight: 500;
font-size: 18px;
color: rgba(255, 255, 255, 0.7);
line-height: 18px;
}
.title_{
font-weight: bold;
font-size: 28px;
color: #333333;
text-align: center;
}
.content-box{
width: 80%;
margin: 25px auto;
min-height:400px;
}
</style>