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

对接接口

上级 42b8be78
......@@ -2,12 +2,11 @@ import { wrapFunctional } from './utils'
export { default as Foot } from '../../components/Foot.vue'
export { default as Head } from '../../components/Head.vue'
export { default as Link } from '../../components/Link.vue'
export { default as RightAside } from '../../components/RightAside.vue'
export { default as AboutContact } from '../../components/about/contact.vue'
export { default as AboutCulture } from '../../components/about/culture.vue'
export { default as AboutDetail } from '../../components/about/detail.vue'
export { default as AboutIntroduce } from '../../components/about/introduce.vue'
export { default as AboutNews } from '../../components/about/news.vue'
export { default as AboutTabNav } from '../../components/about/tabNav.vue'
export { default as AlumnusParty } from '../../components/alumnus/party.vue'
export { default as AlumnusTabNav } from '../../components/alumnus/tabNav.vue'
......@@ -23,12 +22,11 @@ export { default as ServicesTab } from '../../components/services/tab.vue'
export const LazyFoot = import('../../components/Foot.vue' /* webpackChunkName: "components/foot" */).then(c => wrapFunctional(c.default || c))
export const LazyHead = import('../../components/Head.vue' /* webpackChunkName: "components/head" */).then(c => wrapFunctional(c.default || c))
export const LazyLink = import('../../components/Link.vue' /* webpackChunkName: "components/link" */).then(c => wrapFunctional(c.default || c))
export const LazyRightAside = import('../../components/RightAside.vue' /* webpackChunkName: "components/right-aside" */).then(c => wrapFunctional(c.default || c))
export const LazyAboutContact = import('../../components/about/contact.vue' /* webpackChunkName: "components/about-contact" */).then(c => wrapFunctional(c.default || c))
export const LazyAboutCulture = import('../../components/about/culture.vue' /* webpackChunkName: "components/about-culture" */).then(c => wrapFunctional(c.default || c))
export const LazyAboutDetail = import('../../components/about/detail.vue' /* webpackChunkName: "components/about-detail" */).then(c => wrapFunctional(c.default || c))
export const LazyAboutIntroduce = import('../../components/about/introduce.vue' /* webpackChunkName: "components/about-introduce" */).then(c => wrapFunctional(c.default || c))
export const LazyAboutNews = import('../../components/about/news.vue' /* webpackChunkName: "components/about-news" */).then(c => wrapFunctional(c.default || c))
export const LazyAboutTabNav = import('../../components/about/tabNav.vue' /* webpackChunkName: "components/about-tab-nav" */).then(c => wrapFunctional(c.default || c))
export const LazyAlumnusParty = import('../../components/alumnus/party.vue' /* webpackChunkName: "components/alumnus-party" */).then(c => wrapFunctional(c.default || c))
export const LazyAlumnusTabNav = import('../../components/alumnus/tabNav.vue' /* webpackChunkName: "components/alumnus-tab-nav" */).then(c => wrapFunctional(c.default || c))
......
......@@ -4,12 +4,11 @@ import { wrapFunctional } from './utils'
const components = {
Foot: () => import('../../components/Foot.vue' /* webpackChunkName: "components/foot" */).then(c => wrapFunctional(c.default || c)),
Head: () => import('../../components/Head.vue' /* webpackChunkName: "components/head" */).then(c => wrapFunctional(c.default || c)),
Link: () => import('../../components/Link.vue' /* webpackChunkName: "components/link" */).then(c => wrapFunctional(c.default || c)),
RightAside: () => import('../../components/RightAside.vue' /* webpackChunkName: "components/right-aside" */).then(c => wrapFunctional(c.default || c)),
AboutContact: () => import('../../components/about/contact.vue' /* webpackChunkName: "components/about-contact" */).then(c => wrapFunctional(c.default || c)),
AboutCulture: () => import('../../components/about/culture.vue' /* webpackChunkName: "components/about-culture" */).then(c => wrapFunctional(c.default || c)),
AboutDetail: () => import('../../components/about/detail.vue' /* webpackChunkName: "components/about-detail" */).then(c => wrapFunctional(c.default || c)),
AboutIntroduce: () => import('../../components/about/introduce.vue' /* webpackChunkName: "components/about-introduce" */).then(c => wrapFunctional(c.default || c)),
AboutNews: () => import('../../components/about/news.vue' /* webpackChunkName: "components/about-news" */).then(c => wrapFunctional(c.default || c)),
AboutTabNav: () => import('../../components/about/tabNav.vue' /* webpackChunkName: "components/about-tab-nav" */).then(c => wrapFunctional(c.default || c)),
AlumnusParty: () => import('../../components/alumnus/party.vue' /* webpackChunkName: "components/alumnus-party" */).then(c => wrapFunctional(c.default || c)),
AlumnusTabNav: () => import('../../components/alumnus/tabNav.vue' /* webpackChunkName: "components/alumnus-tab-nav" */).then(c => wrapFunctional(c.default || c)),
......
......@@ -8,12 +8,11 @@ You can directly use them in pages and other components without the need to impo
- `<Foot>` | `<foot>` (components/Foot.vue)
- `<Head>` | `<head>` (components/Head.vue)
- `<Link>` | `<link>` (components/Link.vue)
- `<RightAside>` | `<right-aside>` (components/RightAside.vue)
- `<AboutContact>` | `<about-contact>` (components/about/contact.vue)
- `<AboutCulture>` | `<about-culture>` (components/about/culture.vue)
- `<AboutDetail>` | `<about-detail>` (components/about/detail.vue)
- `<AboutIntroduce>` | `<about-introduce>` (components/about/introduce.vue)
- `<AboutNews>` | `<about-news>` (components/about/news.vue)
- `<AboutTabNav>` | `<about-tab-nav>` (components/about/tabNav.vue)
- `<AlumnusParty>` | `<alumnus-party>` (components/alumnus/party.vue)
- `<AlumnusTabNav>` | `<alumnus-tab-nav>` (components/alumnus/tabNav.vue)
......
......@@ -8,12 +8,12 @@ const _2dc5f64c = () => interopDefault(import('../pages/alumnus/index.vue' /* we
const _44b59cfe = () => interopDefault(import('../pages/about/contact.vue' /* webpackChunkName: "pages/about/contact" */))
const _10a7578c = () => interopDefault(import('../pages/about/culture.vue' /* webpackChunkName: "pages/about/culture" */))
const _23d2f0fd = () => interopDefault(import('../pages/about/introduce.vue' /* webpackChunkName: "pages/about/introduce" */))
const _7f16db65 = () => interopDefault(import('../pages/about/news.vue' /* webpackChunkName: "pages/about/news" */))
const _249d262e = () => interopDefault(import('../pages/about/news-detail.vue' /* webpackChunkName: "pages/about/news-detail" */))
const _3de88228 = () => interopDefault(import('../pages/about/news/index.vue' /* webpackChunkName: "pages/about/news/index" */))
const _12856c94 = () => interopDefault(import('../pages/services/college.vue' /* webpackChunkName: "pages/services/college" */))
const _3cf993c6 = () => interopDefault(import('../pages/services/employment.vue' /* webpackChunkName: "pages/services/employment" */))
const _5bfd9c5c = () => interopDefault(import('../pages/services/job.vue' /* webpackChunkName: "pages/services/job" */))
const _77495298 = () => interopDefault(import('../pages/services/major.vue' /* webpackChunkName: "pages/services/major" */))
const _aafe22e0 = () => interopDefault(import('../pages/about/news/_id.vue' /* webpackChunkName: "pages/about/news/_id" */))
const _4d95ac32 = () => interopDefault(import('../pages/index.vue' /* webpackChunkName: "pages/index" */))
const emptyFn = () => {}
......@@ -45,12 +45,8 @@ export const routerOptions = {
name: "about-introduce"
}, {
path: "/about/news",
component: _7f16db65,
component: _3de88228,
name: "about-news"
}, {
path: "/about/news-detail",
component: _249d262e,
name: "about-news-detail"
}, {
path: "/services/college",
component: _12856c94,
......@@ -67,6 +63,10 @@ export const routerOptions = {
path: "/services/major",
component: _77495298,
name: "services-major"
}, {
path: "/about/news/:id",
component: _aafe22e0,
name: "about-news-id"
}, {
path: "/",
component: _4d95ac32,
......
......@@ -30,16 +30,9 @@
{
"name": "about-news",
"path": "/about/news",
"component": "/Users/lihui/Desktop/H/ezijing/guangwangAndXiangmuzhan/ezijing-www-pc/pages/about/news.vue",
"chunkName": "pages/about/news",
"_name": "_7f16db65"
},
{
"name": "about-news-detail",
"path": "/about/news-detail",
"component": "/Users/lihui/Desktop/H/ezijing/guangwangAndXiangmuzhan/ezijing-www-pc/pages/about/news-detail.vue",
"chunkName": "pages/about/news-detail",
"_name": "_249d262e"
"component": "/Users/lihui/Desktop/H/ezijing/guangwangAndXiangmuzhan/ezijing-www-pc/pages/about/news/index.vue",
"chunkName": "pages/about/news/index",
"_name": "_3de88228"
},
{
"name": "services-college",
......@@ -69,6 +62,13 @@
"chunkName": "pages/services/major",
"_name": "_77495298"
},
{
"name": "about-news-id",
"path": "/about/news/:id",
"component": "/Users/lihui/Desktop/H/ezijing/guangwangAndXiangmuzhan/ezijing-www-pc/pages/about/news/_id.vue",
"chunkName": "pages/about/news/_id",
"_name": "_aafe22e0"
},
{
"name": "index",
"path": "/",
......
......@@ -5,6 +5,9 @@
"Head": {
"description": "Auto imported from components/Head.vue"
},
"Link": {
"description": "Auto imported from components/Link.vue"
},
"RightAside": {
"description": "Auto imported from components/RightAside.vue"
},
......@@ -14,15 +17,9 @@
"AboutCulture": {
"description": "Auto imported from components/about/culture.vue"
},
"AboutDetail": {
"description": "Auto imported from components/about/detail.vue"
},
"AboutIntroduce": {
"description": "Auto imported from components/about/introduce.vue"
},
"AboutNews": {
"description": "Auto imported from components/about/news.vue"
},
"AboutTabNav": {
"description": "Auto imported from components/about/tabNav.vue"
},
......
<template>
<div>
<template v-if="item.news">
<a
:target="item.news.data.uri !== '' ? '_blank' : '_self'"
:href="item.news.data.uri !== '' ? item.news.data.uri : `${item.news.path}/${item.news.data.id}`">
<slot />
</a>
</template>
<template v-else>
<nuxt-link
:to="item.path">
<slot />
</nuxt-link>
</template>
</div>
</template>
<script>
export default {
props: { item: { type: Object } }
}
</script>
......@@ -10,9 +10,16 @@
<div class="swiper-content" @mouseenter="swiperStop" @mouseleave="swiperStart">
<div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<img :src="item.photo_uri">
<div class="text">{{ item.title }}</div>
<div class="swiper-slide" v-for="(item, index) in listData" :key="index">
<app-link :item="{
news: {
data: item,
path: '/about/news'
}
}">
<img :src="item.web_img_uri">
<div class="text">{{ item.title }}</div>
</app-link>
</div>
</div>
</div>
......@@ -20,13 +27,16 @@
</div>
</template>
<script>
import appLink from '@/components/Link'
export default {
components: {
appLink
},
data () {
const _this = this
return {
isScale: false,
listData: [],
// 轮播图配置信息, 更多请参考 swiper.js 中文网,上面很详细。
swiperOption: {
observer: true,
observeParents: true,
......@@ -47,13 +57,11 @@ export default {
},
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 71,
project_id: 1013
project_id: process.env.projectId,
type_tag: 'article_alumni'
}
this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
return res
this.listData = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => {
return res.data.data
})
},
computed: {
......@@ -61,13 +69,6 @@ export default {
return this.$refs.mySwiper.swiper;
}
},
created() {
},
mounted() {
if (document.documentElement.clientWidth < 1400) {
// this.isScale = true
}
},
methods: {
swiperStop() {
this.swiper.autoplay.stop()
......
......@@ -3,10 +3,16 @@
<div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index">
<img :src="item.photo_uri" @click="goPage(item)">
<template v-if="item.uri">
<a :href="item.uri" target="_blank">
<img :src="item.web_img_uri" @click="goPage(item)">
</a>
</template>
<template v-else>
<img :src="item.web_img_uri">
</template>
</div>
</div>
<!-- <div class="swiper-pagination swiper-pagination-bullets"></div> -->
</div>
<div class="prev-button"></div>
<div class="next-button"></div>
......@@ -18,7 +24,6 @@
data () {
return {
listData: [],
// 轮播图配置信息, 更多请参考 swiper.js 中文网,上面很详细。
swiperOption: {
speed: 400,
autoplay: true,
......@@ -33,26 +38,13 @@
}
}
},
// async fetch() {
// const params = {
// terminal_type: 'WWW',
// ad_position_uri: 'www.ezijing.com'
// }
// this.bannerData = await this.$axios.$get('/api/zws/v1/marketing/advertisements', { params }).then(res => {
// return res.filter((item, index) => {
// return index < 4
// })
// })
// },
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 69,
project_id: 1013
project_id: process.env.projectId,
type_tag: 'ad_banner'
}
this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
return res
this.listData = await this.$axios.get('/api/cms/api/v1/advertisements', { params }).then(res => {
return res.data.data
})
},
computed: {
......@@ -63,9 +55,6 @@
mounted() {
},
methods: {
// openPage(path) {
// path !== '' && window.open(path)
// }
swiperStop() {
this.swiper.autoplay.stop()
},
......@@ -97,7 +86,6 @@
display: flex;
.swiper-slide{
width: 100%;
// float: left;
img{
width: 100%;
display: block;
......
......@@ -5,15 +5,22 @@
<div class="line"></div>
<div class="text">校长寄语</div>
</div>
<div class="right-text" @click="$router.push({ path: '/about/news', query: { type: 70 } })">
<div class="right-text" @click="$router.push({ path: '/about/news', query: { type: 'img_text_school' } })">
查看更多+
</div>
</div>
<div class="swiper-content" @mouseenter="swiperStop" @mouseleave="swiperStart">
<div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<img :src="item.photo_uri">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index">
<app-link :item="{
news: {
data: item,
path: '/about/news'
}
}">
<img :src="item.web_img_uri">
</app-link>
</div>
</div>
<div class="swiper-pagination swiper-pagination-bullets"></div>
......@@ -22,7 +29,11 @@
</div>
</template>
<script>
import appLink from '@/components/Link'
export default {
components: {
appLink
},
data() {
return {
listData: [],
......@@ -43,14 +54,11 @@ export default {
},
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 70,
project_id: 1013
project_id: process.env.projectId,
type_tag: 'img_text_school'
}
this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
console.log(params)
return res
this.listData = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => {
return res.data.data
})
},
computed: {
......@@ -66,19 +74,6 @@ export default {
},
swiperStart() {
this.swiper.autoplay.start()
},
goPage(item) {
console.log(1123)
if (item.source === '') {
this.$router.push({
path: '/about/news-detail',
query: {
id: item.id
}
})
} else {
window.open(item.source)
}
}
}
}
......
......@@ -5,24 +5,38 @@
<div class="line"></div>
<div class="text">公开课</div>
</div>
<div class="right-text" @click="$router.push({ path: '/about/news', query: { type: 72 } })">
<div class="right-text" @click="$router.push({ path: '/about/news', query: { type: 'article_publish_class' } })">
查看更多+
</div>
</div>
<div class="content-box">
<img src="https://zws-imgs-pub.ezijing.com/static/public/c04caada9ed0f473c786e21eff83c4b9.png" alt="" class="banner">
<app-link :item="{
news: {
data: listData.first,
path: '/about/news'
}
}">
<img :src="listData.first.web_img_uri" alt="" class="banner">
</app-link>
<ul>
<li v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<div class="title">{{ item.title }}</div>
<div class="con-txt">{{ item.summary }}</div>
<div class="info-box">
<div class="time">{{ item.updated_time.slice(0, item.updated_time.indexOf(' ')) }}</div>
<div class="look-num">
<div class="icon"></div>
<div class="num">36023</div>
<li v-for="(item, index) in listData.list" :key="index">
<app-link :item="{
news: {
data: item,
path: '/about/news'
}
}">
<div class="title">{{ item.title }}</div>
<div class="con-txt">{{ item.abstract }}</div>
<div class="info-box">
<div class="time">{{ item.updated_at.slice(0, item.updated_at.indexOf(' ')) }}</div>
<div class="look-num">
<div class="icon"></div>
<div class="num">{{ item.remarks }}</div>
</div>
<div class="btn">免费学习</div>
</div>
<div class="btn">免费学习</div>
</div>
</app-link>
</li>
<li>
<img src="https://zws-imgs-pub.ezijing.com/static/public/5a92e49bf43a7c7a7fb75cd1415ffc2b.png" alt="" class="logo">
......@@ -35,38 +49,33 @@
</div>
</template>
<script>
import appLink from '@/components/Link'
export default {
components: {
appLink
},
data() {
return {
listData: []
data: []
}
},
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 72,
project_id: 1013
project_id: process.env.projectId,
type_tag: 'article_publish_class'
}
this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
return res.filter((item, index) => {
return index < 3
})
await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => {
this.data = res.data.data || []
})
},
computed: {
// s
listData() {
const [first = {}, ...list] = this.data
return { first, list: list || [] }
}
},
methods: {
goPage(item) {
if (item.source === '') {
this.$router.push({
path: '/about/news-detail',
query: {
id: item.id
}
})
} else {
window.open(item.source)
}
},
showEnroll() {
const dom = document.getElementById('show-enroll')
const dom2 = document.getElementById('show-enroll-content')
......
......@@ -5,7 +5,7 @@
<div class="line"></div>
<div class="text">项目公告</div>
</div>
<div class="right-text" @click="$router.push({ path: '/about/news', query: { type: 75 } })">
<div class="right-text" @click="$router.push({ path: '/about/news' })">
查看更多+
</div>
</div>
......@@ -25,20 +25,33 @@
</div>
<div class="right-content">
<ul>
<li v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<div class="time-block">
<div class="m-time">{{ item.dateMonth }}</div>
<div class="t-time">{{ item.dateYear }}</div>
</div>
<div class="text">{{ item.title }}</div>
</li>
<template v-for="(item, index) in listData">
<app-link :key="index" :item="{
news: {
data: item,
path: '/about/news'
}
}">
<li>
<div class="time-block">
<div class="m-time">{{ item.dateMonth }}</div>
<div class="t-time">{{ item.dateYear }}</div>
</div>
<div class="text">{{ item.title }}</div>
</li>
</app-link>
</template>
</ul>
</div>
</div>
</div>
</template>
<script>
import appLink from '@/components/Link'
export default {
components: {
appLink
},
data() {
return {
listData: []
......@@ -46,38 +59,21 @@ export default {
},
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 75,
project_id: 1013
project_id: process.env.projectId,
type_tag: 'article_news'
}
this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
this.listData = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => {
const data = []
console.log(res)
res.map((item, index) => {
res.data.data.map((item, index) => {
if (index < 3) {
item.dateYear = item.created_time.slice(0, 4)
item.dateMonth = item.created_time.slice(5, 10).replace('-', '/')
item.dateYear = item.created_at.slice(0, 4)
item.dateMonth = item.created_at.slice(5, 10).replace('-', '/')
data.push(item)
}
})
return data
})
},
methods: {
goPage(item) {
if (item.source === '') {
this.$router.push({
path: '/about/news-detail',
query: {
id: item.id
}
})
} else {
window.open(item.source)
}
}
}
}
</script>
......
......@@ -5,19 +5,25 @@
<div class="line"></div>
<div class="text">教育服务案例</div>
</div>
<div class="right-text" @click="$router.push({ path: '/about/news', query: { type: 73 } })">
<div class="right-text" @click="$router.push({ path: '/about/news', query: { type: 'service_case' } })">
查看更多+
</div>
</div>
<div class="swiper-content" @mouseenter="swiperStop" @mouseleave="swiperStart">
<div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<img :src="item.photo_uri">
<div class="pop-txt-box">{{ item.title }}</div>
<div class="swiper-slide" v-for="(item, index) in listData" :key="index">
<app-link :item="{
news: {
data: item,
path: '/about/news'
}
}">
<img :src="item.web_img_uri">
<div class="pop-txt-box">{{ item.title }}</div>
</app-link>
</div>
</div>
<!-- <div class="swiper-pagination swiper-pagination-bullets"></div> -->
</div>
<div class="prev-button"></div>
<div class="next-button"></div>
......@@ -25,7 +31,11 @@
</div>
</template>
<script>
import appLink from '@/components/Link'
export default {
components: {
appLink
},
data () {
return {
listData: [],
......@@ -46,13 +56,11 @@ export default {
},
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 73,
project_id: 1013
project_id: process.env.projectId,
type_tag: 'service_case'
}
this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
return res
this.listData = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => {
return res.data.data
})
},
computed: {
......@@ -65,19 +73,7 @@ export default {
this.swiper.autoplay.stop()
},
swiperStart() {
// this.swiper.autoplay.start()
},
goPage(item) {
if (item.source === '') {
this.$router.push({
path: '/about/news-detail',
query: {
id: item.id
}
})
} else {
window.open(item.source)
}
this.swiper.autoplay.start()
}
}
}
......
<template>
<div class="news-content">
<tab />
<detail-content />
</div>
</template>
<script>
import tab from '../../components/about/tabNav'
import detailContent from '../../components/about/detail'
export default {
components: {
tab,
detailContent
}
}
</script>
<style lang="scss" scoped>
.news-content{
width: 1200px;
margin: 0 auto;
padding-top: 63px;
display: flex;
justify-content: space-between;
}
</style>
<template>
<div class="news-content">
<tab />
<news-content />
</div>
</template>
<script>
import tab from '../../components/about/tabNav'
import newsContent from '../../components/about/news'
export default {
components: {
tab,
newsContent
}
}
</script>
<style lang="scss" scoped>
.news-content{
width: 1200px;
margin: 0 auto;
padding-top: 63px;
display: flex;
justify-content: space-between;
}
</style>
<template>
<div class="detail-content-box">
<div class="back-btn" @click="$router.go(-1)">
<div class="el-icon-arrow-left"></div>
<div class="text">返回</div>
</div>
<div class="times">{{ data.created_at }}</div>
<div class="titles">{{ data.title }}</div>
<div class="article-content" v-html="data.content"></div>
<div class="recommend-content">
<div class="titles">
<div class="line"></div>
<div class="text">相关推荐</div>
<div class="news-content">
<tab />
<div class="detail-content-box">
<div class="back-btn" @click="$router.go(-1)">
<div class="el-icon-arrow-left"></div>
<div class="text">返回</div>
</div>
<div class="times">{{ data.created_at }}</div>
<div class="titles">{{ data.title }}</div>
<div class="article-content" v-html="data.content"></div>
<div class="recommend-content">
<div class="titles">
<div class="line"></div>
<div class="text">相关推荐</div>
</div>
<ul class="list-box">
<li v-for="(item, index) in listData" :key="index">
<a
:target="item.uri !== '' ? '_blank' : '_self'"
:href="item.uri ? item.uri : `/about/news/${item.id}`"
>
<img :src="item.web_img_uri" alt="">
<div class="dec">{{ item.title }}</div>
</a>
</li>
</ul>
</div>
<ul class="list-box">
<li v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<img :src="item.web_img_uri" alt="">
<div class="dec">{{ item.title }}</div>
</li>
</ul>
<div class="more-btn" @click="$router.push({ path: '/about/news' })">查看更多</div>
</div>
<!-- 、、 -->
<div class="more-btn" @click="$router.push({ path: '/about/news' })">查看更多</div>
</div>
</template>
<script>
import tab from '@/components/about/tabNav'
export default {
components: {
tab
},
data () {
return {
data: {},
......@@ -32,7 +43,7 @@ export default {
}
},
async fetch() {
this.data = await this.$axios.get(`/api/cms/api/v1/article/${this.$route.query.id}/detail`).then(res => {
this.data = await this.$axios.get(`/api/cms/api/v1/article/${this.$route.params.id}/detail`).then(res => {
return res.data
})
const params = {
......@@ -66,6 +77,13 @@ export default {
}
</script>
<style lang="scss" scoped>
.news-content{
width: 1200px;
margin: 0 auto;
padding-top: 63px;
display: flex;
justify-content: space-between;
}
.detail-content-box{
width: 1000px;
background: #fff;
......
<template>
<div class="news-content-box">
<img src="https://zws-imgs-pub.ezijing.com/static/public/a72ef577c9bae694c6bfc33e5bfc93af.png" alt="" class="banner">
<ul class="list-content">
<template v-for="(item, index) in listData">
<li :key="index">
<a v-if="item.uri" :href="item.uri" target="_blank">
<img :src="item.web_img_uri" alt="">
<div class="right-con">
<div class="time">{{ item.created_at }}</div>
<div class="title">{{ item.title }}</div>
<div class="text">{{ item.abstract }}</div>
</div>
</a>
<a v-else :href="`/about/news-detail?id=${item.id}`">
<img :src="item.web_img_uri" alt="">
<div class="right-con">
<div class="time">{{ item.created_at }}</div>
<div class="title">{{ item.title }}</div>
<div class="text">{{ item.abstract }}</div>
</div>
</a>
</li>
</template>
</ul>
<div class="news-content">
<tab />
<div class="news-content-box">
<img src="https://zws-imgs-pub.ezijing.com/static/public/a72ef577c9bae694c6bfc33e5bfc93af.png" alt="" class="banner">
<ul class="list-content">
<template v-for="(item, index) in listData">
<li :key="index">
<app-link :item="{
news: {
data: item,
path: '/about/news'
}
}">
<img :src="item.web_img_uri" alt="">
<div class="right-con">
<div class="time">{{ item.created_at }}</div>
<div class="title">{{ item.title }}</div>
<div class="text">{{ item.abstract }}</div>
</div>
</app-link>
</li>
</template>
</ul>
</div>
</div>
</template>
<script>
import appLink from '@/components/Link'
import tab from '@/components/about/tabNav'
export default {
components: {
tab,
appLink
},
data() {
return {
listData: []
}
},
async fetch() {
// sss
const params = {
project_id: process.env.projectId,
type_tag: 'article_news'
type_tag: this.$route.query.type || 'article_news'
}
this.listData = await this.$axios.get('/api/cms/api/v1/articles', { params }).then(res => {
return res.data.data
......@@ -47,6 +52,13 @@ export default {
}
</script>
<style lang="scss" scoped>
.news-content{
width: 1200px;
margin: 0 auto;
padding-top: 63px;
display: flex;
justify-content: space-between;
}
.news-content-box{
width: 1000px;
padding-bottom: 100px;
......@@ -64,7 +76,7 @@ export default {
margin-bottom: 20px;
padding-bottom: 36px;
cursor: pointer;
a{
::v-deep a{
display: flex;
flex-wrap: wrap;
}
......
......@@ -3,19 +3,19 @@
<!-- 轮播图 -->
<banner />
<!-- 学位教育 -->
<degree-education :class="isScale && 'scale space1'"/>
<degree-education/>
<!-- 教育服务 -->
<education-services :class="isScale && 'scale space2'"/>
<education-services/>
<!-- 项目公告 -->
<project-notice :class="isScale && 'scale space3'"/>
<project-notice/>
<!-- 校长寄语 -->
<headmaster-msg :class="isScale && 'scale space4'"/>
<headmaster-msg/>
<!-- 校友故事 -->
<alumni-stories :class="isScale && 'space5'"/>
<alumni-stories/>
<!-- 公开课 -->
<open-class :class="isScale && 'scale space6'" />
<open-class/>
<!-- 教育服务案例 -->
<service-case :class="isScale && 'scale space7'"/>
<service-case/>
</div>
</template>
......@@ -57,28 +57,4 @@ export default {
.container{
padding-bottom: 100px;
}
.scale{
transform: scale(0.85);
}
.space1{
transform: translateY(-30px) scale(0.85);
}
.space2{
transform: translateY(-60px) scale(0.85);
}
.space3{
transform: translateY(-90px) scale(0.85);
}
.space4{
transform: translateY(-110px) scale(0.85);
}
.space5{
transform: translateY(-140px);
}
.space6{
transform: translateY(-170px) scale(0.85);
}
.space7{
transform: translateY(-230px) scale(0.85);
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论