提交 2a6e9963 authored 作者: 王鹏飞's avatar 王鹏飞

校友寄语\公开课\校友故事修改

上级 9b227cf7
...@@ -25,6 +25,8 @@ export default { ...@@ -25,6 +25,8 @@ export default {
{ name: this.$t('menu.aboutChild.about'), path: '/about/introduce' }, { name: this.$t('menu.aboutChild.about'), path: '/about/introduce' },
{ name: this.$t('menu.aboutChild.culture'), path: '/about/culture' }, { name: this.$t('menu.aboutChild.culture'), path: '/about/culture' },
{ name: this.$t('menu.aboutChild.news'), path: '/about/news' }, { name: this.$t('menu.aboutChild.news'), path: '/about/news' },
{ name: this.$t('menu.aboutChild.msg'), path: '/about/message' },
{ name: this.$t('menu.aboutChild.openLesson'), path: '/about/lesson' },
{ name: this.$t('menu.aboutChild.contact'), path: '/about/contact' } { name: this.$t('menu.aboutChild.contact'), path: '/about/contact' }
] ]
}, },
...@@ -93,8 +95,8 @@ export default { ...@@ -93,8 +95,8 @@ export default {
{ {
name: this.$t('menu.alumni'), name: this.$t('menu.alumni'),
children: [ children: [
{ name: this.$t('menu.alumniChild.alumni'), path: '/alumnus' } { name: this.$t('menu.alumniChild.alumni'), path: '/alumnus' },
// { name: '校友风采', path: '/alumnus/style' } { name: this.$t('menu.alumniChild.alumniStory'), path: '/alumnus/story' }
] ]
}, },
{ {
......
<template> <template>
<div class="news-item"> <div class="news-item">
<new-link :item="{ news: { data: item, path: '/about/news' } }"> <new-link :item="{ news: { data: item, path } }">
<img :src="item.mobile_terminal_img_uri" class="news-item-pic" v-if="item.mobile_terminal_img_uri" /> <img :src="item.mobile_terminal_img_uri" class="news-item-pic" v-if="item.mobile_terminal_img_uri" />
<div class="news-item-content"> <div class="news-item-content">
<div class="news-item-content__date">{{ formatDate(item.start_time) }}</div> <div class="news-item-content__date">{{ formatDate(item.start_time) }}</div>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
import NewLink from '@/components/NewLink' import NewLink from '@/components/NewLink'
export default { export default {
components: { NewLink }, components: { NewLink },
props: { item: { type: Object } }, props: { item: { type: Object }, path: { type: String, default: '/about/news' } },
methods: { methods: {
formatDate(value) { formatDate(value) {
const date = new Date(value * 1000) const date = new Date(value * 1000)
......
...@@ -12,6 +12,8 @@ export default { ...@@ -12,6 +12,8 @@ export default {
{ name: this.$t('menu.aboutChild.about'), path: '/about/introduce', value: '1' }, { name: this.$t('menu.aboutChild.about'), path: '/about/introduce', value: '1' },
{ name: this.$t('menu.aboutChild.culture'), path: '/about/culture', value: '2' }, { name: this.$t('menu.aboutChild.culture'), path: '/about/culture', value: '2' },
{ name: this.$t('menu.aboutChild.news'), path: '/about/news', value: '3' }, { name: this.$t('menu.aboutChild.news'), path: '/about/news', value: '3' },
{ name: this.$t('menu.aboutChild.msg'), path: '/about/message', value: '6' },
{ name: this.$t('menu.aboutChild.openLesson'), path: '/about/lesson', value: '5' },
{ name: this.$t('menu.aboutChild.contact'), path: '/about/contact', value: '4' } { name: this.$t('menu.aboutChild.contact'), path: '/about/contact', value: '4' }
] ]
} }
...@@ -19,5 +21,4 @@ export default { ...@@ -19,5 +21,4 @@ export default {
} }
</script> </script>
<style> <style></style>
</style>
<template> <template>
<div class="news-item"> <div class="news-item">
<nuxt-link :to="`/alumnus/${item.id}`"> <new-link :item="{ news: { data: item, path } }">
<img :src="item.photo_uri" class="news-item-pic" v-if="item.photo_uri" /> <img :src="item.mobile_terminal_img_uri" class="news-item-pic" v-if="item.mobile_terminal_img_uri" />
<div class="news-item-content"> <div class="news-item-content">
<div class="news-item-content__date">{{ formatDate(item.created_time) }}</div> <div class="news-item-content__date">{{ formatDate(item.start_time) }}</div>
<div class="news-item-content__title">{{ item.title }}</div> <div class="news-item-content__title">{{ item.title }}</div>
<div class="news-item-content__text" v-if="item.summary">{{ item.summary }}</div> <div class="news-item-content__text" v-if="item.abstract">{{ item.abstract }}</div>
</div> </div>
</nuxt-link> </new-link>
</div> </div>
</template> </template>
<script> <script>
import NewLink from '@/components/NewLink'
export default { export default {
props: { item: { type: Object } }, components: { NewLink },
props: { item: { type: Object }, path: { type: String, default: '/alumnus/story' } },
methods: { methods: {
formatDate(value) { formatDate(value) {
const date = new Date(value.replace(/\-/g, '/')) const date = new Date(value * 1000)
return date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate() return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
} }
} }
} }
......
...@@ -9,13 +9,12 @@ export default { ...@@ -9,13 +9,12 @@ export default {
data() { data() {
return { return {
list: [ list: [
{ name: this.$t('alumni.title'), path: '/alumnus', value: '1' } { name: this.$t('alumni.title'), path: '/alumnus', value: '1' },
// { name: '校友风采', path: '/alumnus/style', value: '2' } { name: this.$t('menu.alumniChild.alumniStory'), path: '/alumnus/story', value: '2' }
] ]
} }
} }
} }
</script> </script>
<style> <style></style>
</style>
<template> <template>
<card :title="$t('home.openLesson.title')"> <card :title="$t('home.openLesson.title')">
<template #header-aside><nuxt-link to="/about/news?type=article_publish_class">{{ $t('viewMore') }}</nuxt-link></template> <template #header-aside><nuxt-link to="/about/lesson">{{ $t('viewMore') }}</nuxt-link></template>
<new-link :item="{ news: { data: list.first, path: '/about/news' } }"> <new-link :item="{ news: { data: list.first, path: '/about/lesson' } }">
<img :src="list.first.web_img_uri" class="class-banner" /> <img :src="list.first.web_img_uri" class="class-banner" />
</new-link> </new-link>
<div class="list"> <div class="list">
<div class="list-item" v-for="(item, index) in list.list" :key="index"> <div class="list-item" v-for="(item, index) in list.list" :key="index">
<new-link :item="{ news: { data: item, path: '/about/news' } }"> <new-link :item="{ news: { data: item, path: '/about/lesson' } }">
<div class="list-item-hd"> <div class="list-item-hd">
<h3 class="list-item__title">{{ item.title }}</h3> <h3 class="list-item__title">{{ item.title }}</h3>
</div> </div>
......
<template> <template>
<card :title="$t('home.msg.title')"> <card :title="$t('home.msg.title')">
<template #header-aside><nuxt-link to="/about/news?type=img_text_school">{{ $t('viewMore') }}</nuxt-link></template> <template #header-aside><nuxt-link to="/about/message">{{ $t('viewMore') }}</nuxt-link></template>
<van-swipe class="my-swipe" :autoplay="5000" :vertical="true" indicator-color="white"> <van-swipe class="my-swipe" :autoplay="5000" :vertical="true" indicator-color="white">
<template v-for="(item, index) in list"> <template v-for="(item, index) in list">
<van-swipe-item :key="index"> <van-swipe-item :key="index">
<new-link :item="{ news: { data: item, path: '/about/news' } }"> <new-link :item="{ news: { data: item, path: '/about/message' } }">
<img :src="item.web_img_uri" class="banner-img" /> <img :src="item.web_img_uri" class="banner-img" />
</new-link> </new-link>
</van-swipe-item> </van-swipe-item>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<swiper ref="mySwiper" :options="swiperOptions" class="my-swiper"> <swiper ref="mySwiper" :options="swiperOptions" class="my-swiper">
<template v-for="(item, index) in list"> <template v-for="(item, index) in list">
<swiper-slide :key="index"> <swiper-slide :key="index">
<new-link :item="{ news: { data: item, path: '/about/news' } }"> <new-link :item="{ news: { data: item, path: '/alumnus/story' } }">
<img :src="item.web_img_uri" class="banner-img" /> <img :src="item.web_img_uri" class="banner-img" />
<p class="banner-title">{{ item.title }}</p> <p class="banner-title">{{ item.title }}</p>
</new-link> </new-link>
......
...@@ -9,6 +9,8 @@ export default { ...@@ -9,6 +9,8 @@ export default {
about: 'ZIJING PROFILE', about: 'ZIJING PROFILE',
culture: 'CULTURAL PHILOSOPHY', culture: 'CULTURAL PHILOSOPHY',
news: 'NEWS', news: 'NEWS',
msg: 'President’s Message',
openLesson: 'Open Lesson',
contact: 'CONTACT US' contact: 'CONTACT US'
}, },
servicesChild: { servicesChild: {
...@@ -53,7 +55,8 @@ export default { ...@@ -53,7 +55,8 @@ export default {
} }
}, },
alumniChild: { alumniChild: {
alumni: 'ALUMNI' alumni: 'ALUMNI',
alumniStory: 'Alumni Spotlight'
} }
}, },
home: { home: {
......
...@@ -9,6 +9,8 @@ export default { ...@@ -9,6 +9,8 @@ export default {
about: '紫荆简介', about: '紫荆简介',
culture: '文化理念', culture: '文化理念',
news: '新闻中心', news: '新闻中心',
msg: '校长寄语',
openLesson: '公开课',
contact: '联系我们' contact: '联系我们'
}, },
servicesChild: { servicesChild: {
...@@ -50,10 +52,11 @@ export default { ...@@ -50,10 +52,11 @@ export default {
doctorChild: { doctorChild: {
dba: '心理学博士DBA(即将推出)', dba: '心理学博士DBA(即将推出)',
edd: '工商管理学博士EDD(即将推出)' edd: '工商管理学博士EDD(即将推出)'
}, }
}, },
alumniChild: { alumniChild: {
alumni: '校友会' alumni: '校友会',
alumniStory: '校友故事'
} }
}, },
home: { home: {
...@@ -135,7 +138,8 @@ export default { ...@@ -135,7 +138,8 @@ export default {
about: { about: {
project: { project: {
title: '紫荆简介', title: '紫荆简介',
text: '紫荆教育全称是清控紫荆(北京)教育科技股份有限公司,由清华控股有限公司于2015年以清华大学五道口金融学院相关知识产权创设而成。“紫荆”二字取自清华大学校花“紫荆花”,寓意“自强不息,向美而行”。<br />紫荆教育以教育为本、以科技赋能、以专业化为基础、以国际化为目标,通过研发和应用领先的教育科技,链接全球先进、前沿教育资源,提供高端国际学位教育、职业教育和在线教育解决方案,为我国培养具有国际化视野和全球化思维的复合型和产业型高质量人才。<br />紫荆教育与美国印第安纳大学、加州整合大学、康博斯维尔大学、玛丽伍德大学、索菲亚大学和瑞士高等教育集团等全球知名大学开展深度合作,推出在线MBA、金融学、组织领导力、应用心理学、儿童教育、服务业管理等硕士学位,培养了一大批具有国际先进管理和教育理念的杰出精英。<br />在产教融合方面,依托紫荆教育技术与产业资源优势,以国家教育政策为导向,以企业岗位人才需求为目标,协助院校应对行业变革、政策要求和办学新挑战,为院校提供产业化、国际化、数字化专业提升建设支持,优化人才培养方案,提升师资力量,共同开发精品课程资源,促进教学发展,整体提升专业建设水平,助力院校打造专业特色和优势。', text:
'紫荆教育全称是清控紫荆(北京)教育科技股份有限公司,由清华控股有限公司于2015年以清华大学五道口金融学院相关知识产权创设而成。“紫荆”二字取自清华大学校花“紫荆花”,寓意“自强不息,向美而行”。<br />紫荆教育以教育为本、以科技赋能、以专业化为基础、以国际化为目标,通过研发和应用领先的教育科技,链接全球先进、前沿教育资源,提供高端国际学位教育、职业教育和在线教育解决方案,为我国培养具有国际化视野和全球化思维的复合型和产业型高质量人才。<br />紫荆教育与美国印第安纳大学、加州整合大学、康博斯维尔大学、玛丽伍德大学、索菲亚大学和瑞士高等教育集团等全球知名大学开展深度合作,推出在线MBA、金融学、组织领导力、应用心理学、儿童教育、服务业管理等硕士学位,培养了一大批具有国际先进管理和教育理念的杰出精英。<br />在产教融合方面,依托紫荆教育技术与产业资源优势,以国家教育政策为导向,以企业岗位人才需求为目标,协助院校应对行业变革、政策要求和办学新挑战,为院校提供产业化、国际化、数字化专业提升建设支持,优化人才培养方案,提升师资力量,共同开发精品课程资源,促进教学发展,整体提升专业建设水平,助力院校打造专业特色和优势。',
itemText1: '国际合作院校', itemText1: '国际合作院校',
itemText2: '线上课程', itemText2: '线上课程',
itemText3: '金融机构/协会/政府/学校', itemText3: '金融机构/协会/政府/学校',
...@@ -146,7 +150,7 @@ export default { ...@@ -146,7 +150,7 @@ export default {
itemText8: '人次学习', itemText8: '人次学习',
unit1: '所', unit1: '所',
unit2: '门', unit2: '门',
unit3Text:'500', unit3Text: '500',
unit3: '万', unit3: '万',
tabBtn1Tit: '专业化', tabBtn1Tit: '专业化',
tabBtn2Tit: '科技化', tabBtn2Tit: '科技化',
...@@ -206,9 +210,12 @@ export default { ...@@ -206,9 +210,12 @@ export default {
alumni: { alumni: {
title: '校友会', title: '校友会',
contentTit: '校友会简介', contentTit: '校友会简介',
contentP1: '紫荆教育拥有阵容强大、组织活跃、遍布全球的校友网络。截至2020年12月,紫荆校友人数已经超过5000位,校友们通过地区分会、行业协会/俱乐部、班级这个三维立体网络与紫荆紧密相连。同时,通过“i紫荆”在线信息平台,促进校友间的相互学习和交流。', contentP1:
contentP2: '至今,在广大校友的热情支持下,紫荆校友会已经先后成立了北京、上海、深圳等地校友分会,并将陆续成立其他省份和海外等多地校友分会。紫荆各地校友分会的成立将有效整合跨界资源的精英网络,为紫荆校友蓄势未来、取得更大成功奠定坚实的基础。', '紫荆教育拥有阵容强大、组织活跃、遍布全球的校友网络。截至2020年12月,紫荆校友人数已经超过5000位,校友们通过地区分会、行业协会/俱乐部、班级这个三维立体网络与紫荆紧密相连。同时,通过“i紫荆”在线信息平台,促进校友间的相互学习和交流。',
contentP3: '紫荆校友会不是简单意义上的校友联谊机构,她是紫荆教学活动的延续,是培养新生代企业家的一个重要环节。紫荆校友会秉持“紫荆花开,向美而行”的美好愿景,倡导培养终身学习的习惯,积极奉献爱心、回馈社会,并保持“健康可持续”的生活方式。在紫荆大家庭里,校友们生活上彼此关心、事业上相互支持、精神上相互激励,结交真心朋友、分享精彩人生。', contentP2:
'至今,在广大校友的热情支持下,紫荆校友会已经先后成立了北京、上海、深圳等地校友分会,并将陆续成立其他省份和海外等多地校友分会。紫荆各地校友分会的成立将有效整合跨界资源的精英网络,为紫荆校友蓄势未来、取得更大成功奠定坚实的基础。',
contentP3:
'紫荆校友会不是简单意义上的校友联谊机构,她是紫荆教学活动的延续,是培养新生代企业家的一个重要环节。紫荆校友会秉持“紫荆花开,向美而行”的美好愿景,倡导培养终身学习的习惯,积极奉献爱心、回馈社会,并保持“健康可持续”的生活方式。在紫荆大家庭里,校友们生活上彼此关心、事业上相互支持、精神上相互激励,结交真心朋友、分享精彩人生。',
fbTit: '校友分布', fbTit: '校友分布',
fbDes: '国内学员已百分百覆盖中国34个省级行政区、380+城市及全球多个国家和地区', fbDes: '国内学员已百分百覆盖中国34个省级行政区、380+城市及全球多个国家和地区',
time: '数据截止2020年6月', time: '数据截止2020年6月',
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "nuxt", "dev": "nuxt --open",
"build": "nuxt build", "build": "nuxt build",
"start": "nuxt start", "start": "nuxt start",
"generate": "nuxt generate" "generate": "nuxt generate"
......
<template>
<div>
<tab-nav active="5"></tab-nav>
<div class="main-content news-detail">
<div class="back" @click="back">&lt;返回</div>
<!-- <div class="date">{{ formatDate(data.created_at) }}</div> -->
<div class="date">{{ data.created_at }}</div>
<h1 class="title">{{ data.title }}</h1>
<div v-html="data.content"></div>
</div>
<div class="related">
<h2 class="title">相关推荐</h2>
<news-item v-for="item in list" :item="item" path="/about/lesson" :key="item.id"></news-item>
<div class="more"><nuxt-link to="/about/lesson">查看更多</nuxt-link></div>
</div>
</div>
</template>
<script>
import TabNav from '@/components/about/TabNav'
import NewsItem from '@/components/about/NewsItem'
export default {
components: { TabNav, NewsItem },
data() {
return {
data: {},
list: []
}
},
computed: {
pid() {
return this.$route.params.id
}
},
async fetch() {
// 新闻详情
this.data = await this.$axios.get(`/api/cms/api/v1/article/${this.$route.params.id}/detail`).then(res => res.data)
// 相关推荐
const params = { project_id: process.env.projectId, type_tag: 'article_publish_class', page: 1, limit: 3 }
this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
},
methods: {
formatDate(value) {
const date = new Date(value.replace(/\-/g, '/'))
return date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate()
},
back() {
this.$router.back()
}
}
}
</script>
<style lang="scss">
.news-detail {
padding: 0.2rem 0.15rem;
background-color: #fff;
border-top: 1px solid #e6e6e6;
.back {
font-size: 0.1rem;
cursor: pointer;
}
.date {
margin-top: 0.15rem;
font-size: 0.1rem;
color: #9b9b9b;
}
.title {
margin: 0.1rem 0;
padding: 0 0 0.1rem;
border-bottom: 1px solid #e6e6e6;
}
img {
display: block;
max-width: 100%;
height: auto !important;
margin: 0 auto;
}
}
.related {
margin: 0 0.15rem;
.title {
padding: 0.2rem 0;
font-size: 0.14rem;
color: #333;
}
.more {
margin: 0.1rem auto 0.2rem;
width: 0.82rem;
height: 0.2rem;
font-size: 0.1rem;
line-height: 0.2rem;
text-align: center;
border: 1px solid #d3d3d3;
border-radius: 0.04rem;
}
}
</style>
<template>
<div>
<tab-nav active="5"></tab-nav>
<img src="https://webapp-pub.ezijing.com/www/h5/images/about_banner_03.png" class="main-banner" />
<div class="news-list">
<news-item v-for="item in list" :item="item" path="/about/lesson" :key="item.id"></news-item>
</div>
</div>
</template>
<script>
import TabNav from '@/components/about/TabNav'
import NewsItem from '@/components/about/NewsItem'
export default {
props: { acitve: String },
components: { TabNav, NewsItem },
data() {
return {
list: []
}
},
async fetch() {
const params = {
project_id: process.env.projectId,
type_tag: this.$route.query.type || 'article_publish_class'
}
this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
}
}
</script>
<style lang="scss">
.news-list {
margin: 0.2rem 0.15rem;
}
</style>
<template>
<div>
<tab-nav active="6"></tab-nav>
<div class="main-content news-detail">
<div class="back" @click="back">&lt;返回</div>
<!-- <div class="date">{{ formatDate(data.created_at) }}</div> -->
<div class="date">{{ data.created_at }}</div>
<h1 class="title">{{ data.title }}</h1>
<div v-html="data.content"></div>
</div>
<div class="related">
<h2 class="title">相关推荐</h2>
<news-item v-for="item in list" :item="item" path="/about/message" :key="item.id"></news-item>
<div class="more"><nuxt-link to="/about/message">查看更多</nuxt-link></div>
</div>
</div>
</template>
<script>
import TabNav from '@/components/about/TabNav'
import NewsItem from '@/components/about/NewsItem'
export default {
components: { TabNav, NewsItem },
data() {
return {
data: {},
list: []
}
},
computed: {
pid() {
return this.$route.params.id
}
},
async fetch() {
// 新闻详情
this.data = await this.$axios.get(`/api/cms/api/v1/article/${this.$route.params.id}/detail`).then(res => res.data)
// 相关推荐
const params = { project_id: process.env.projectId, type_tag: 'img_text_school', page: 1, limit: 3 }
this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
},
methods: {
formatDate(value) {
const date = new Date(value.replace(/\-/g, '/'))
return date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate()
},
back() {
this.$router.back()
}
}
}
</script>
<style lang="scss">
.news-detail {
padding: 0.2rem 0.15rem;
background-color: #fff;
border-top: 1px solid #e6e6e6;
.back {
font-size: 0.1rem;
cursor: pointer;
}
.date {
margin-top: 0.15rem;
font-size: 0.1rem;
color: #9b9b9b;
}
.title {
margin: 0.1rem 0;
padding: 0 0 0.1rem;
border-bottom: 1px solid #e6e6e6;
}
img {
display: block;
max-width: 100%;
height: auto !important;
margin: 0 auto;
}
}
.related {
margin: 0 0.15rem;
.title {
padding: 0.2rem 0;
font-size: 0.14rem;
color: #333;
}
.more {
margin: 0.1rem auto 0.2rem;
width: 0.82rem;
height: 0.2rem;
font-size: 0.1rem;
line-height: 0.2rem;
text-align: center;
border: 1px solid #d3d3d3;
border-radius: 0.04rem;
}
}
</style>
<template>
<div>
<tab-nav active="6"></tab-nav>
<img src="https://webapp-pub.ezijing.com/www/h5/images/about_banner_03.png" class="main-banner" />
<div class="news-list">
<news-item v-for="item in list" :item="item" path="/about/message" :key="item.id"></news-item>
</div>
</div>
</template>
<script>
import TabNav from '@/components/about/TabNav'
import NewsItem from '@/components/about/NewsItem'
export default {
props: { acitve: String },
components: { TabNav, NewsItem },
data() {
return {
list: []
}
},
async fetch() {
const params = {
project_id: process.env.projectId,
type_tag: this.$route.query.type || 'img_text_school'
}
this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
}
}
</script>
<style lang="scss">
.news-list {
margin: 0.2rem 0.15rem;
}
</style>
<template>
<div>
<tab-nav active="2"></tab-nav>
<div class="main-content news-detail">
<div class="back" @click="back">&lt;返回</div>
<!-- <div class="date">{{ formatDate(data.created_at) }}</div> -->
<div class="date">{{ data.created_at }}</div>
<h1 class="title">{{ data.title }}</h1>
<div v-html="data.content"></div>
</div>
<div class="related">
<h2 class="title">相关推荐</h2>
<news-item v-for="item in list" :item="item" path="/alumnus/story" :key="item.id"></news-item>
<div class="more"><nuxt-link to="/alumnus/story">查看更多</nuxt-link></div>
</div>
</div>
</template>
<script>
import TabNav from '@/components/alumnus/TabNav'
import NewsItem from '@/components/alumnus/NewsItem'
export default {
components: { TabNav, NewsItem },
data() {
return {
data: {},
list: []
}
},
computed: {
pid() {
return this.$route.params.id
}
},
async fetch() {
// 新闻详情
this.data = await this.$axios.get(`/api/cms/api/v1/article/${this.$route.params.id}/detail`).then(res => res.data)
// 相关推荐
const params = { project_id: process.env.projectId, type_tag: 'article_alumni', page:1, limit: 3 }
this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
},
methods: {
formatDate(value) {
const date = new Date(value.replace(/\-/g, '/'))
return date.getFullYear() + '/' + (date.getMonth() + 1) + '/' + date.getDate()
},
back() {
this.$router.back()
}
}
}
</script>
<style lang="scss">
.news-detail {
padding: 0.2rem 0.15rem;
background-color: #fff;
border-top: 1px solid #e6e6e6;
.back {
font-size: 0.1rem;
cursor: pointer;
}
.date {
margin-top: 0.15rem;
font-size: 0.1rem;
color: #9b9b9b;
}
.title {
margin: 0.1rem 0;
padding: 0 0 0.1rem;
border-bottom: 1px solid #e6e6e6;
}
img {
display: block;
max-width: 100%;
height: auto !important;
margin: 0 auto;
}
}
.related {
margin: 0 0.15rem;
.title {
padding: 0.2rem 0;
font-size: 0.14rem;
color: #333;
}
.more {
margin: 0.1rem auto 0.2rem;
width: 0.82rem;
height: 0.2rem;
font-size: 0.1rem;
line-height: 0.2rem;
text-align: center;
border: 1px solid #d3d3d3;
border-radius: 0.04rem;
}
}
</style>
<template>
<div>
<tab-nav active="2"></tab-nav>
<img src="https://webapp-pub.ezijing.com/www/h5/images/alumnus_banner_02.png" class="main-banner" />
<div class="news-list">
<news-item v-for="item in list" :item="item" path="/alumnus/story" :key="item.id"></news-item>
</div>
</div>
</template>
<script>
import TabNav from '@/components/alumnus/TabNav'
import NewsItem from '@/components/alumnus/NewsItem'
export default {
props: { acitve: String },
components: { TabNav, NewsItem },
data() {
return {
list: []
}
},
async fetch() {
const params = {
project_id: process.env.projectId,
type_tag: this.$route.query.type || 'article_alumni'
}
this.list = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => res.data.data)
}
}
</script>
<style lang="scss">
.news-list {
margin: 0.2rem 0.15rem;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论