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

update

上级 1e08f1c4
...@@ -14,8 +14,11 @@ a { ...@@ -14,8 +14,11 @@ a {
} }
.main-layout { .main-layout {
max-width: 750px; max-width: 750px;
min-height: 100vh;
margin: 0 auto; margin: 0 auto;
overflow: hidden; overflow: hidden;
background-color: #f9f8f8;
box-shadow: 0 1px 20px rgba(0, 0, 0, 0.04);
} }
.main-container { .main-container {
margin: 0 0.15rem 0.3rem; margin: 0 0.15rem 0.3rem;
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
name: '校友会', name: '校友会',
children: [ children: [
{ name: '校友会', path: '/alumnus' }, { name: '校友会', path: '/alumnus' },
{ name: '校友风采', path: '/alumnus' } { name: '校友风采', path: '/alumnus/style' }
] ]
}, },
{ name: '我要报名' } { name: '我要报名' }
......
<template>
<div class="news-item">
<nuxt-link :to="`/alumnus/${item.id}`">
<img :src="item.photo_uri" class="news-item-pic" v-if="item.photo_uri" />
<div class="news-item-content">
<div class="news-item-content__date">{{ formatDate(item.created_time) }}</div>
<div class="news-item-content__title">{{ item.title }}</div>
<div class="news-item-content__text">{{ item.summary }}</div>
</div>
</nuxt-link>
</div>
</template>
<script>
export default {
props: { item: { type: Object } },
methods: {
formatDate(value) {
const date = new Date(value)
return date.getFullYear() + '/' + date.getMonth() + 1 + '/' + date.getDate()
}
}
}
</script>
<style lang="scss">
.news-item {
margin-bottom: 0.1rem;
background-color: #fff;
}
.news-item-pic {
display: block;
width: 100%;
// height: 2.99rem;
object-fit: cover;
}
.news-item-content {
padding: 0.18rem;
}
.news-item-content__date {
font-size: 0.1rem;
color: #aa1941;
line-height: 0.16rem;
}
.news-item-content__title {
margin-top: 0.1rem;
font-size: 0.14rem;
font-weight: 500;
color: #333;
line-height: 0.24rem;
}
.news-item-content__text {
margin-top: 0.2rem;
font-size: 0.1rem;
color: #424242;
line-height: 0.2rem;
}
</style>
<template>
<tab-nav :list="list" v-bind="$attrs"></tab-nav>
</template>
<script>
import TabNav from '@/components/TabNav'
export default {
components: { TabNav },
data() {
return {
list: [
{ name: '校友会', path: '/alumnus', value: '1' },
{ name: '校友风采', path: '/alumnus/style', value: '2' }
]
}
}
}
</script>
<style>
</style>
<template> <template>
<card title="教育服务案例"> <card title="教育服务案例">
<div class="case"> <van-swipe class="my-swipe" :loop="false" :show-indicators="false">
<img src="/images/home_case_banner.png" class="case-pic" /> <template v-for="(item, index) in list">
<p class="case-title">“数字化实训系统新实践”—走进深职院智慧教室现场</p> <van-swipe-item :key="index">
</div> <div class="case">
<img :src="item.photo_uri" class="case-pic" />
<p class="case-title">{{ item.title }}</p>
</div>
</van-swipe-item>
</template>
</van-swipe>
</card> </card>
</template> </template>
<script> <script>
import Card from '@/components/Card' import Card from '@/components/Card'
export default { export default {
components: { Card } components: { Card },
data() {
return { list: [] }
},
async fetch() {
const params = { page: 1, per_page: 100, type: 73, project_id: 1013 }
this.list = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => res)
}
} }
</script> </script>
......
...@@ -4,17 +4,19 @@ ...@@ -4,17 +4,19 @@
<img src="/images/home_class_banner.png" class="class-banner" /> <img src="/images/home_class_banner.png" class="class-banner" />
<div class="list"> <div class="list">
<div class="list-item" v-for="(item, index) in list" :key="index"> <div class="list-item" v-for="(item, index) in list" :key="index">
<div class="list-item-hd"> <nuxt-link :to="`/about/news/${item.id}`">
<h3 class="list-item__title">{{ item.title }}</h3> <div class="list-item-hd">
</div> <h3 class="list-item__title">{{ item.title }}</h3>
<div class="list-item-bd"> </div>
<p class="list-item__content">{{ item.descriptio }}</p> <div class="list-item-bd">
</div> <p class="list-item__content">{{ item.summary }}</p>
<div class="list-item-ft"> </div>
<span class="list-item__date">{{ formatDate(item.created_time) }}</span> <div class="list-item-ft">
<span class="list-item__view">{{ item.count }}</span> <span class="list-item__date">{{ formatDate(item.created_time) }}</span>
<span class="list-item__btn">免费学习</span> <span class="list-item__view">{{ item.count || 36023 }}</span>
</div> <span class="list-item__btn">免费学习</span>
</div>
</nuxt-link>
</div> </div>
</div> </div>
</card> </card>
...@@ -30,20 +32,11 @@ export default { ...@@ -30,20 +32,11 @@ export default {
} }
}, },
fetch() { fetch() {
this.list = [ this.list = []
{ },
title: '发现注意力的秘密—儿童心理发展系列课第一课', async fetch() {
descriptio: '孩子为什么那么粗心? 为什么玩游戏就聚精会神? 为什么学习却三心二意? 孩子为什么那么粗心?......', const params = { page: 1, per_page: 100, type: 72, project_id: 1013 }
created_time: '2020-01-22 14:41:08', this.list = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => res)
count: 36023
},
{
title: '发现注意力的秘密—儿童心理发展系列课第一课',
descriptio: '孩子为什么那么粗心? 为什么玩游戏就聚精会神? 为什么学习却三心二意? 孩子为什么那么粗心?......',
created_time: '2020-01-22 14:41:08',
count: 36023
}
]
}, },
methods: { methods: {
// 2020-01-22 // 2020-01-22
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template #header-aside><nuxt-link to="">查看更多+</nuxt-link></template> <template #header-aside><nuxt-link to="">查看更多+</nuxt-link></template>
<van-swipe class="my-swipe" :autoplay="3000" :vertical="true" indicator-color="white"> <van-swipe class="my-swipe" :autoplay="3000" :vertical="true" indicator-color="white">
<template v-for="(item, index) in list"> <template v-for="(item, index) in list">
<van-swipe-item :key="index"><img :src="item.src" class="banner-img" /></van-swipe-item> <van-swipe-item :key="index"><img :src="item.photo_uri" class="banner-img" /></van-swipe-item>
</template> </template>
</van-swipe> </van-swipe>
</card> </card>
...@@ -14,15 +14,11 @@ import Card from '@/components/Card' ...@@ -14,15 +14,11 @@ import Card from '@/components/Card'
export default { export default {
components: { Card }, components: { Card },
data() { data() {
return { return { list: [] }
list: []
}
}, },
fetch() { async fetch() {
this.list = [ const params = { page: 1, per_page: 100, type: 70, project_id: 1013 }
{ src: '/images/home_publish_banner.png', href: '' }, this.list = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => res)
{ src: '/images/home_publish_banner.png', href: '' }
]
} }
} }
</script> </script>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<p class="tips">You are What you together, 结识5000+ 同样优秀的人!</p> <p class="tips">You are What you together, 结识5000+ 同样优秀的人!</p>
<van-swipe class="my-swipe" :loop="false" :show-indicators="false"> <van-swipe class="my-swipe" :loop="false" :show-indicators="false">
<template v-for="(item, index) in list"> <template v-for="(item, index) in list">
<van-swipe-item :key="index"><img :src="item.src" class="banner-img" /></van-swipe-item> <van-swipe-item :key="index"><img :src="item.photo_uri" class="banner-img" /></van-swipe-item>
</template> </template>
</van-swipe> </van-swipe>
</card> </card>
...@@ -15,15 +15,11 @@ import Card from '@/components/Card' ...@@ -15,15 +15,11 @@ import Card from '@/components/Card'
export default { export default {
components: { Card }, components: { Card },
data() { data() {
return { return { list: [] }
list: []
}
}, },
fetch() { async fetch() {
this.list = [ const params = { page: 1, per_page: 100, type: 71, project_id: 1013 }
{ src: '/images/banner.png', href: '' }, this.list = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => res)
{ src: '/images/banner.png', href: '' }
]
} }
} }
</script> </script>
......
<template> <template>
<div> <div>
<tab-nav active="4"></tab-nav> <tab-nav active="4"></tab-nav>
<div id="allmap"></div>
<div class="main-container"> <div class="main-container">
<div class="main-content"> <div class="main-content">
<h1 class="title">联系我们</h1> <h1 class="title">联系我们</h1>
...@@ -37,11 +38,35 @@ ...@@ -37,11 +38,35 @@
import TabNav from '@/components/about/TabNav' import TabNav from '@/components/about/TabNav'
export default { export default {
props: { acitve: String }, props: { acitve: String },
components: { TabNav } components: { TabNav },
mounted() {
if (process.browser) {
!(function (mapInit) {
var script = document.createElement('script')
script.type = 'text/javascript'
script.src = 'https://api.map.baidu.com/api?v=2.0&ak=Z9Km7UTGFI2fwRrpGp7Mji4ySDsvn30d&callback=mapinit'
window['mapinit'] = function () {
mapInit()
}
document.head.appendChild(script)
})(function () {
// 这里使用BMap
var map = new BMap.Map('allmap')
map.centerAndZoom(new BMap.Point(116.336323, 39.998848), 20)
map.enableScrollWheelZoom(true)
// 创建点标记
var marker1 = new BMap.Marker(new BMap.Point(116.336323, 39.998848))
map.addOverlay(marker1)
})
}
}
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
#allmap {
height: 1.2rem;
}
.follow { .follow {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
......
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
img { img {
display: block; display: block;
max-width: 100%; max-width: 100%;
height: auto; height: auto !important;
margin: 0 auto; margin: 0 auto;
} }
} }
......
<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_time) }}</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" :key="item.id"></news-item>
<div class="more"><nuxt-link to="/alumnus/style">查看更多</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 asyncData({ $axios, params }) {
// 新闻详情
const data = await $axios.$get(`/api/zws/v1/cms/news/${params.id}`).then(res => res)
// 相关推荐
const requestParams = { page: 1, per_page: 100, type: 71, project_id: 1013 }
const list = await $axios.$get('/api/zws/v1/cms/news', { params: requestParams }).then(res => res)
return { data, list }
},
methods: {
formatDate(value) {
const date = new Date(value)
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;
color: #424242;
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;
color: #424242;
line-height: 0.2rem;
text-align: center;
border: 1px solid #d3d3d3;
border-radius: 0.04rem;
}
}
</style>
<template>
<div>
<tab-nav active="1"></tab-nav>
<img
src="https://zws-imgs-pub.ezijing.com/static/public/54e010d17c5cf9a36ef3addd9e893a4f.png"
class="main-banner"
/>
<div class="main-container">
<div class="main-content">
<h1 class="title">校友会简介</h1>
<p>
紫荆教育拥有阵容强大、组织活跃、遍布全球的校友网络。截至2020年12月,紫荆校友人数已经超过5000位,校友们通过地区分会、行业协会/俱乐部、班级这个三维立体网络与紫荆紧密相连。同时,通过“i紫荆”在线信息平台,促进校友间的相互学习和交流。
</p>
<p>
至今,在广大校友的热情支持下,紫荆校友会已经先后成立了北京、上海、深圳等地校友分会,并将陆续成立其他省份和海外等多地校友分会。紫荆各地校友分会的成立将有效整合跨界资源的精英网络,为紫荆校友蓄势未来、取得更大成功奠定坚实的基础。
</p>
<p>
紫荆校友会不是简单意义上的校友联谊机构,她是紫荆教学活动的延续,是培养新生代企业家的一个重要环节。紫荆校友会秉持“紫荆花开,向美而行”的美好愿景,倡导培养终身学习的习惯,积极奉献爱心、回馈社会,并保持“健康可持续”的生活方式。在紫荆大家庭里,校友们生活上彼此关心、事业上相互支持、精神上相互激励,结交真心朋友、分享精彩人生。
</p>
<p>国内学员已百分百覆盖中国34个省级行政区、380+城市及全球多个国家和地区</p>
<img src="https://zws-imgs-pub.ezijing.com/static/public/8d402595ac1eb1c5142b548fa84be60d.png" />
<img src="https://zws-imgs-pub.ezijing.com/static/public/560f659bcb9896f6dde674beeac1fd15.png" />
<p style="text-align: right">数据截止2020年6月</p>
</div>
</div>
</div>
</template>
<script>
import TabNav from '@/components/alumnus/TabNav'
export default {
components: { TabNav }
}
</script>
<style lang="scss" scoped>
.main-content {
p {
margin-bottom: 0.3rem;
}
img {
width: 100%;
margin-bottom: 0.18rem;
}
}
</style>
<template>
<div>
<tab-nav active="2"></tab-nav>
<img
src="https://zws-imgs-pub.ezijing.com/static/public/a72ef577c9bae694c6bfc33e5bfc93af.png"
class="main-banner"
/>
<div class="news-list">
<news-item v-for="item in list" :item="item" :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 asyncData({ $axios }) {
const params = { page: 1, per_page: 100, type: 71, project_id: 1013 }
const list = await $axios.$get('/api/zws/v1/cms/news', { params }).then(res => res)
return { list }
}
}
</script>
<style lang="scss">
.news-list {
margin: 0.2rem 0.15rem;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论