提交 f4c60e36 authored 作者: lihuihui's avatar lihuihui

修改新闻相关内容

上级 334a4135
......@@ -2,10 +2,9 @@
<div class="new-box">
<tap class="child-tabs" :menu="data" @changeChildTab="changeChildTab"></tap>
<div class="new-items" v-if="data[dataIndex]">
<div v-html="data[dataIndex].content"></div>
<template v-if="data.type != 'list'">
<template v-if="data[0].type != 'list'">
<div class="no-data" v-if="data[dataIndex].content == ''">暂无数据</div>
</template>
<div v-html="data[dataIndex].content"></div>
<div class="right-img">
<div class="img-box">
<img :src="data[dataIndex].image" alt="" class="photo">
......@@ -13,6 +12,10 @@
</div>
<slot name="imgBtn"></slot>
</div>
</template>
<template v-else>
<slot name="list"></slot>
</template>
</div>
</div>
</template>
......@@ -41,6 +44,7 @@ export default {
},
methods: {
changeChildTab(index) {
this.$emit('changeIndex', index)
this.dataIndex = index
this.$forceUpdate()
}
......
<template>
<div>
<div class="top-nav">
<img :src="data.imgUrl" alt="">
<div class="min-height-img" :style="getImg(data.imgUrl)">
</div>
<div class="center97">
<ul class="menu">
<template v-for="(item, index) in data.menu">
......@@ -31,6 +32,13 @@ export default {
activeIndex: 0
}
},
computed: {
getImg() {
return (url) => {
return `background:url(${url});background-size: cover;`
}
}
},
methods: {
tab(index, title) {
if(this.$route.path === '/presence' && title === '学生风采') {
......@@ -47,6 +55,10 @@ export default {
width: 970px;
margin: 0 auto;
}
.min-height-img{
height: 190px;
background-size: cover;
}
.top-nav{
.center97{
position: relative;
......
......@@ -11,14 +11,6 @@
</div>
</li>
</template>
<!-- <li>
<img src="https://zws-imgs-pub.ezijing.com/static/public/3b55607dda946e2ba0aad1b15ec1ac0a.png" alt="">
<div class="info">
<div class="name">孙春明</div>
<div class="p">清华五道口金融学院经济学博士</div>
<div class="p">香港致富证券首席经济学家</div>
</div>
</li> -->
</ul>
</div>
</template>
......@@ -35,7 +27,7 @@
},
type: {
type: Number,
default: {}
default: 0
}
}
}
......
<template>
<div>
<ul class="child-tab">
<template v-for="(item, index) in menu">
<li
:key="index"
:class="activeIndex == index ? 'active' : ''"
@click="tab(index)"
>{{ item }}</li>
</template>
</ul>
</div>
</template>
<script>
export default {
props: {
menu: {
type: Array,
default: {}
}
},
data() {
return {
activeIndex: 0
}
},
methods: {
tab(index) {
this.activeIndex = index
this.$emit('changeChildTab', this.activeIndex)
}
},
mounted() {
this.$route.query.type && (this.activeIndex = this.$route.query.type)
}
}
</script>
<style lang="scss" scoped>
.center97{
width: 970px;
margin: 0 auto;
}
.child-tab{
display: flex;
justify-content: flex-end;
// width: 670px;
border-bottom: 1px solid #979797;
li{
cursor: pointer;
position: relative;
line-height: 42px;
padding: 0 22px;
font-size: 14px;
color: #222;
&.active{
border: 1px solid #979797;
border-bottom: none;
border-top: 2px solid #BF0927;
&::after{
content: '';
width: 100%;
height: 3px;
background: #fff;
position: absolute;
bottom: -1px;
left: 0;
}
}
}
}
</style>
......@@ -30,27 +30,17 @@
</ul>
<img src="../../assets/img/recruitInfo/alumni-m1-i1.png" alt="" class="exh">
</div>
<div class="module" v-if="activeIndex == 3">
<div class="child-tab">
<child-tab
:menu="tabMenu"
@changeChildTab="changeChildTab"
></child-tab>
</div>
</div>
</div>
</div>
</template>
<script>
import cAction from '@action'
import bannerTab from '../../components/tab/bannerTab.vue'
import list from '../../components/tab/newsList.vue'
import childTab from '../../components/tab/childTab.vue'
import bannerTab from '@/components/news/tab/bannerTab.vue'
import list from '@/components/news/newsList.vue'
export default {
components: {
bannerTab,
list,
childTab
list
},
data() {
return {
......
......@@ -18,7 +18,7 @@
</template>
<script>
import cAction from '@action'
import bannerTab from '../../components/tab/bannerTab.vue'
import bannerTab from '@/components/news/tab/bannerTab.vue'
export default {
components: {
bannerTab
......
......@@ -14,8 +14,8 @@
</template>
<script>
import cAction from '@action'
import bannerTab from '../../components/tab/bannerTab.vue'
import list from '../../components/tab/newsList.vue'
import bannerTab from '@/components/news/tab/bannerTab.vue'
import list from '@/components/news/newsList.vue'
export default {
components: {
bannerTab,
......
......@@ -121,14 +121,12 @@ export default {
},
request(item, index) {
cAction.reportAction.getContent(item.name).then(json => {
if (json !== null) {
this.newsData.push({
id: index,
title: item.name,
content: json === null ? '' : json[0].content,
image: item.image
})
}
this.newsData = this.newsData.sort((a, b) => a.id - b.id)
}).catch(e => { this.$message.error(e.message) }).finally(() => {})
}
......
<template>
<div>
<div class="center97 apply-mian">
<div class="apply-left">
<child-tab
:menu="tabMenu"
@changeChildTab="changeChildTab"
></child-tab>
<div class="tab-item" v-if="tabShowItem == 0" v-html="data.module0"></div>
<div class="tab-item" v-if="tabShowItem == 1" v-html="data.module1"></div>
<div class="tab-item" v-if="tabShowItem == 2" v-html="data.module2"></div>
</div>
<div class="apply-right">
<div class="img-box">
<div class="line"></div>
<img v-if="tabShowItem == 0" src="../../assets/img/recruitInfo/m1-c1-img1.png" alt="">
<img v-if="tabShowItem == 1" src="../../assets/img/recruitInfo/m1-c1-img2.png" alt="">
<img v-if="tabShowItem == 2" src="../../assets/img/recruitInfo/m1-c1-img3.png" alt="">
</div>
<div class="apply-btn">
<div class="icon"></div>
<div class="txt" @click="goPage">项目申请</div>
</div>
</div>
</div>
</div>
</template>
<script>
import childTab from '../../components/tab/childTab.vue'
export default {
components: {
childTab
},
props: {
data: {
type: Object,
default: {}
}
},
data() {
return {
tabMenu: ['申请条件', '申请流程', '常见问题'],
tabShowItem: 0
}
},
mounted() {
},
methods: {
goPage() {
this.$router.push({
path: '/my'
})
},
changeChildTab(index) {
this.tabShowItem = index
}
},
mounted() {
this.$route.query.type && (this.tabShowItem = this.$route.query.type)
}
}
</script>
<style lang="scss" scoped>
.center97{
width: 970px;
margin: 0 auto;
}
.apply-mian{
padding-top: 30px;
padding-bottom: 60px;
display: flex;
.apply-left{
width: 670px;
.tab-item{
width: 100%;
margin-top: 40px;
}
}
.apply-right{
margin-left: auto;
.img-box{
width: 235px;
position: relative;
margin-left: 13px;
img{
position: relative;
z-index: 9;
display: block;
width: 100%;
height: 300px;
}
.line{
position: absolute;
top: 35px;
right: 35px;
width: 213px;
height: 280px;
border: 1px solid #979797;
}
}
.apply-btn{
width: 248px;
height: 48px;
background: #BF0927;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
margin-top: 55px;
cursor: pointer;
.icon{
width: 31px;
height: 31px;
background: url(../../assets/img/recruitInfo/m1-c1-icon1.png);
background-size: 100% 100%;
}
.txt{
font-size: 18px;
color: #fff;
margin-left: 20px;
}
}
}
}
</style>
......@@ -57,7 +57,6 @@ export default {
})
},
request(item, index) {
console.log(this.newsData, '====123456')
cAction.reportAction.getContent(item.name).then(json => {
if (json !== null) {
this.newsData.push({
......
......@@ -4,13 +4,13 @@
:data="bannerTabData"
@changeTab="changeTab"
></banner-tab>
<apply v-if="activeIndex == 0" :data="content"></apply>
<support v-if="activeIndex == 1" :data="content"></support>
<apply v-show="activeIndex == 0" :data="content"></apply>
<support v-show="activeIndex == 1" :data="content"></support>
</div>
</template>
<script>
import cAction from '@action'
import bannerTab from '@/components/tab/bannerTab.vue'
import bannerTab from '@/components/news/tab/bannerTab.vue'
import apply from './components/apply.vue'
import support from './components/support.vue'
export default {
......
......@@ -6,10 +6,6 @@
<div class="p">中国未来金融领袖计划(China Future Financial Leadership Program)</div>
<div class="p">旨在为中国金融走向世界培养具有国际化、产业化、科技化的复合型金融人才和领袖。</div>
</div>
<!-- <div class="m2">
<div class="title">学分要求</div>
<div class="p">培养环节包括课程学习、专业实操与职业发展课程、国际前沿视野开拓、金融领导力、金融机构实习与就业以及毕业报告。中国未来金融领袖计划学生在校期间,须修满总学分不少于33学分的课程。</div>
</div> -->
</div>
<div class="cont-center">
<div class="title">课程设置</div>
......@@ -137,7 +133,7 @@
.m2{
width: 308px;
height: 292px;
background: url(../../assets/img/recruitInfo/setcou-m1-bg.png);
background: url(@/assets/img/recruitInfo/setcou-m1-bg.png);
background-size: 100% 100%;
margin-top: 10px;
.title{
......
......@@ -5,37 +5,36 @@
@changeTab="changeTab"
></banner-tab>
<div class="cont-mian center97">
<set-course v-if="activeIndex == 0"></set-course>
<div class="module" v-if="activeIndex == 1">
<set-course v-show="activeIndex == 0"></set-course>
<div class="module" v-show="activeIndex == 1">
<div class="left-txt">
<child-tab
:menu="tabMenu"
@changeChildTab="changeChildTab"
></child-tab>
<teaching-list v-if="childActiveIndex == 0" :data="this.allList.m1Data" :type="1"></teaching-list>
<teaching-list v-if="childActiveIndex == 1" :data="this.allList.m2Data"></teaching-list>
<teaching-list v-if="childActiveIndex == 2" :data="this.allList.m3Data"></teaching-list>
<news :data="newsData" @changeIndex="changeIndex">
<div slot="list">
</div>
</news>
<div class="tea-mian">
<div class="list-box">
<teaching-list v-show="teachingListIndex == 0" :data="this.allList[55]" :type="1"></teaching-list>
<teaching-list v-show="teachingListIndex == 1" :data="this.allList[56]"></teaching-list>
<teaching-list v-show="teachingListIndex == 2" :data="this.allList[57]"></teaching-list>
</div>
<img src="https://zws-imgs-pub.ezijing.com/static/build/learn-mba/resources/m2-r-img.b002ecd2.png" alt="">
</div>
</div>
<img src="../../assets/img/teaching/m2-r-img.png" alt="">
</div>
</div>
<!-- <el-pagination
background
layout="prev, pager, next"
:total="1000">
</el-pagination> -->
</div>
</template>
<script>
import cAction from '@action'
import bannerTab from '../../components/tab/bannerTab.vue'
import childTab from '../../components/tab/childTab.vue'
import teachingList from '../../components/tab/teachingList.vue'
import setCourse from './setCourse.vue'
import bannerTab from '@/components/news/tab/bannerTab.vue'
import news from '@/components/news/news.vue'
import teachingList from '@/components/news/teachingList.vue'
import setCourse from './components/setCourse.vue'
export default {
components: {
bannerTab,
childTab,
news,
setCourse,
teachingList
},
......@@ -46,8 +45,7 @@ export default {
imgUrl: 'https://zws-imgs-pub.ezijing.com/static/public/03036d9b2460f3b182c929e4b3af0eb2.png'
},
activeIndex: 0,
tabMenu: ['Kelley商学院金融硕士学术导师', '学界导师', '业界导师'],
childActiveIndex: 0,
teachingListIndex: 0,
requestParam: {
page: 1,
per_page: 100,
......@@ -55,44 +53,60 @@ export default {
project_id: 1007
},
allList: {
m1Data: [],
m2Data: [],
m3Data: []
}
55: [],
56: [],
57: []
},
newsData: []
}
},
mounted() {
this.getData()
},
methods: {
changeTab(index) {
if (index === 1) {
this.request(55)
}
this.activeIndex = index
changeIndex(index) {
this.teachingListIndex = index
},
changeChildTab(index) {
let n = 55;
index === 1 && (n = 56)
index === 2 && (n = 57)
this.request(n)
this.childActiveIndex = index
getData() {
const requestType = [
{
type: 55,
name: 'Kelley商学院金融硕士学术导师',
image: 'https://zws-imgs-pub.ezijing.com/static/build/learn-mba/resources/m2-r-img.b002ecd2.png'
},
request(n) {
this.requestParam.type = n
// console.log(this.requestParam.exclude_type, n)
cAction.reportAction.getNews(this.requestParam).then(json => {
switch(n) {
case 55:
this.allList.m1Data = json
break;
case 56:
this.allList.m2Data = json
break;
default:
this.allList.m3Data = json
break;
{
type: 56,
name: '学界导师',
image: 'https://zws-imgs-pub.ezijing.com/static/build/learn-mba/resources/m2-r-img.b002ecd2.png'
},
{
type: 57,
name: '业界导师',
image: 'https://zws-imgs-pub.ezijing.com/static/build/learn-mba/resources/m2-r-img.b002ecd2.png'
}
]
requestType.map((item, index) => {
this.request(item, index)
})
},
request(item, index) {
this.requestParam.type = item.type
cAction.reportAction.getNews(this.requestParam).then(json => {
this.newsData.push({
type: 'list',
id: index,
title: item.name,
content: '',
image: item.image
})
this.teachingListSetData(item.type, json)
}).catch(e => { this.$message.error(e.message) }).finally(() => {})
},
changeTab(index) {
this.activeIndex = index
},
teachingListSetData(type, item) {
this.allList[type] = item
}
},
}
......@@ -104,7 +118,7 @@ export default {
padding-bottom: 60px;
display: flex;
.left-txt{
width: 670px;
width: 100%;
}
img{
margin-left: auto;
......@@ -147,4 +161,12 @@ export default {
}
}
}
.tea-mian{
display: flex;
img{
margin-left: auto;
width: 235px;
height: 300px;
}
}
</style>
......@@ -16,7 +16,7 @@
</template>
<script>
import news from '@/components/news/news.vue'
import bannerTab from '../../components/tab/bannerTab.vue'
import bannerTab from '@/components/news/tab/bannerTab.vue'
import cAction from '@action'
export default {
components: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论