This commit is contained in:
clay
2022-01-21 17:44:37 +08:00
parent d6374440d2
commit 2c4b597942
26 changed files with 777 additions and 138 deletions

View File

@@ -52,7 +52,7 @@
<el-col :xs="22" :sm="20" :md="20" :lg="18" :xl="14">
<div class="slideshow">
<el-carousel trigger="click" height="23.3vw">
<el-carousel-item v-for="(item,index) in bannerDate" :key="index">
<el-carousel-item v-for="(item,index) in bannerDate" :key="index" @click="clickTo(item.link)">
<div>
<img :src="item.imgurl" alt="">
<div class="bottom_title">
@@ -96,7 +96,7 @@
<div class="grid-content"></div>
</el-col>
<el-col class="headline" :xs="22" :sm="20" :md="16" :lg="12" :xl="12">
<div class="more">
<div class="more" @click="lookMore(newsDate[0])">
{{ $t('message.more') }}
</div>
<div class="more_img">
@@ -125,6 +125,29 @@ export default {
this.getBanner()
},
methods: {
clickTo(link){
//console.log(link)
window.location.href=link;//当前标签页
},
lookMore(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
getList() {
getArticleList({
type: "XC7D8m5gkr35BX1b4Otiln4",
@@ -152,6 +175,11 @@ export default {
},
}
</script>
<style>
.el-carousel__indicators{
display: none;
}
</style>
<style scoped lang="scss">
@import '../css/comment.css';
@@ -178,7 +206,7 @@ export default {
bottom: 0;
line-height: 3.6vw;
font-size: 2rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #FFFFFF;
}
@@ -212,7 +240,7 @@ export default {
.news_context_text {
font-size: 1.6rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #262626;
margin: 1rem auto;

View File

@@ -115,7 +115,8 @@
<script>
import SlideshowCard from './slideshow_card'
import {getArticleList} from "@/api";
import {getArticleList, info} from "@/api";
import {getParentNode} from "@/utils/sist";
export default {
name: "party_building_activities",
@@ -131,6 +132,26 @@ export default {
this.getListData()
},
methods:{
lookMore(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
getListData(){
getArticleList({
type: "LlBbF5OM6ILqxX69TIg7ipg",
@@ -217,6 +238,10 @@ export default {
display:-webkit-box; //作为弹性伸缩盒子模型显示。
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:3; //显示的行
//color: inherit !important;
span{
color: #565656 !important;
}
}
}

View File

@@ -138,7 +138,7 @@
<div class="grid-content"></div>
</el-col>
<el-col class="headline" :xs="22" :sm="20" :md="16" :lg="12" :xl="12">
<div style="background: #FFFFFF;color: #1956BC;" class="more"@click="lookMore(academiaData[0])">
<div style="background: #FFFFFF;color: #1956BC;" class="more" @click="lookMore(academiaData[0])">
{{ $t('message.more') }}
</div>
<div class="more_img">
@@ -173,12 +173,19 @@ export default {
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
@@ -279,8 +286,9 @@ export default {
.time {
text-align: center;
font-size: 1.2rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
padding: .2rem .5rem;
width: 7.2rem;
height: 2.2rem;
line-height: 2.2rem;
@@ -331,7 +339,7 @@ export default {
.time {
font-size: 1.2rem;
font-family: PingFangSC-Regular, PingFang SC;
font-family: "微软雅黑";
font-weight: 400;
color: #1956BC;
line-height: 2.4rem;

View File

@@ -1,7 +1,7 @@
<template>
<div class="banner-card">
<ul class="ul">
<li v-for="(item,index) in bannerDate" :key="index">
<li v-for="(item,index) in bannerDate" :key="index" @click="clickTo(item.link)">
<div class="card_img">
<img
:src="item.imgurl"
@@ -53,6 +53,10 @@ export default {
created() {
},
methods: {
clickTo(link){
//console.log(link)
window.location.href=link;//当前标签页
},
constructor() {
this.bannerWrap = document.getElementsByClassName("banner-card")[0];
let lis = this.bannerWrap.getElementsByTagName("li");

View File

@@ -28,7 +28,7 @@
<div class="grid-content"></div>
</el-col>
<el-col :xs="22" :sm="20" :md="20" :lg="18" :xl="14" class="phe">
<div class="tw" v-for="(item,index) in listData" :key="index">
<div class="tw" v-for="(item,index) in listData" :key="index" @click="getArticle(item)">
<el-row>
<el-col :xs="5" :sm="5" :md="5" :lg="3" :xl="3">
<div class="tw_time">
@@ -45,7 +45,7 @@
<div class="tw_context_title">
{{item.title}}
</div>
<div class="tw_context_text" v-html="item.content"></div>
<div class="tw_context_text" style="color:#757575 !important;" v-html="item.content"></div>
</div>
</el-col>
<el-col v-show="width" :md="3" :lg="3" :xl="3">
@@ -64,7 +64,7 @@
<div class="grid-content"></div>
</el-col>
<el-col class="headline" :xs="22" :sm="20" :md="16" :lg="12" :xl="12">
<div class="more">
<div class="more" @click="lookMore(listData[0])">
{{ $t('message.more') }}
</div>
<div class="more_img">
@@ -76,7 +76,8 @@
</template>
<script>
import {getArticleList} from "@/api";
import {getArticleList, info} from "@/api";
import {getParentNode} from "@/utils/sist";
export default {
name: "teaching_student",
@@ -90,6 +91,27 @@ export default {
this.getListData()
},
methods:{
lookMore(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(res)
if (info.three ==null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
}
}
})
},
getListData(){
getArticleList({
type: "--AMgi-Z8eHpj9W0a_fbhpk",
@@ -102,6 +124,26 @@ export default {
getDay(time){
return new Date(time).getDate()
},
getArticle(news){
info(news.id).then(res=>{
let info = getParentNode(res.data.encodeId)
console.log(info)
if (info.three == null){
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
}
}else {
if (this.width){
this.$router.push("/pc/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
}else {
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
}
}
})
},
getTime(time){
let date = new Date(time);
return date.getFullYear() +"-" + date.getMonth()+1
@@ -119,7 +161,7 @@ export default {
margin-top: 4rem;
.tw_time {
border-right: .1rem solid #D5D5D5;
border-right: .3rem solid #D5D5D5;
height: 10rem;
width: 10rem;
color: #1956BC;
@@ -160,6 +202,7 @@ export default {
font-size: 1.6rem;
font-weight: 400;
overflow: hidden;
color: #757575 !important;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示。
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列