提交 07a5980a authored 作者: lihuihui's avatar lihuihui

update

上级 5e06ddc7
...@@ -3,14 +3,14 @@ import { wrapFunctional } from './utils' ...@@ -3,14 +3,14 @@ import { wrapFunctional } from './utils'
export { default as Foot } from '../../components/Foot.vue' export { default as Foot } from '../../components/Foot.vue'
export { default as Head } from '../../components/Head.vue' export { default as Head } from '../../components/Head.vue'
export { default as RightAside } from '../../components/rightAside.vue' export { default as RightAside } from '../../components/rightAside.vue'
export { default as AlumnusParty } from '../../components/alumnus/party.vue'
export { default as AlumnusTabNav } from '../../components/alumnus/tabNav.vue'
export { default as AboutContact } from '../../components/about/contact.vue' export { default as AboutContact } from '../../components/about/contact.vue'
export { default as AboutCulture } from '../../components/about/culture.vue' export { default as AboutCulture } from '../../components/about/culture.vue'
export { default as AboutDetail } from '../../components/about/detail.vue' export { default as AboutDetail } from '../../components/about/detail.vue'
export { default as AboutIntroduce } from '../../components/about/introduce.vue' export { default as AboutIntroduce } from '../../components/about/introduce.vue'
export { default as AboutNews } from '../../components/about/news.vue' export { default as AboutNews } from '../../components/about/news.vue'
export { default as AboutTabNav } from '../../components/about/tabNav.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'
export { default as HomeAlumniStories } from '../../components/home/alumniStories.vue' export { default as HomeAlumniStories } from '../../components/home/alumniStories.vue'
export { default as HomeBanner } from '../../components/home/banner.vue' export { default as HomeBanner } from '../../components/home/banner.vue'
export { default as HomeDegreeEducation } from '../../components/home/degreeEducation.vue' export { default as HomeDegreeEducation } from '../../components/home/degreeEducation.vue'
...@@ -23,14 +23,14 @@ export { default as HomeServiceCase } from '../../components/home/serviceCase.vu ...@@ -23,14 +23,14 @@ export { default as HomeServiceCase } from '../../components/home/serviceCase.vu
export const LazyFoot = import('../../components/Foot.vue' /* webpackChunkName: "components/foot" */).then(c => wrapFunctional(c.default || c)) 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 LazyHead = import('../../components/Head.vue' /* webpackChunkName: "components/head" */).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 LazyRightAside = import('../../components/rightAside.vue' /* webpackChunkName: "components/right-aside" */).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))
export const LazyAboutContact = import('../../components/about/contact.vue' /* webpackChunkName: "components/about-contact" */).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 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 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 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 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 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))
export const LazyHomeAlumniStories = import('../../components/home/alumniStories.vue' /* webpackChunkName: "components/home-alumni-stories" */).then(c => wrapFunctional(c.default || c)) export const LazyHomeAlumniStories = import('../../components/home/alumniStories.vue' /* webpackChunkName: "components/home-alumni-stories" */).then(c => wrapFunctional(c.default || c))
export const LazyHomeBanner = import('../../components/home/banner.vue' /* webpackChunkName: "components/home-banner" */).then(c => wrapFunctional(c.default || c)) export const LazyHomeBanner = import('../../components/home/banner.vue' /* webpackChunkName: "components/home-banner" */).then(c => wrapFunctional(c.default || c))
export const LazyHomeDegreeEducation = import('../../components/home/degreeEducation.vue' /* webpackChunkName: "components/home-degree-education" */).then(c => wrapFunctional(c.default || c)) export const LazyHomeDegreeEducation = import('../../components/home/degreeEducation.vue' /* webpackChunkName: "components/home-degree-education" */).then(c => wrapFunctional(c.default || c))
......
...@@ -5,14 +5,14 @@ const components = { ...@@ -5,14 +5,14 @@ const components = {
Foot: () => import('../../components/Foot.vue' /* webpackChunkName: "components/foot" */).then(c => wrapFunctional(c.default || c)), 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)), Head: () => import('../../components/Head.vue' /* webpackChunkName: "components/head" */).then(c => wrapFunctional(c.default || c)),
RightAside: () => import('../../components/rightAside.vue' /* webpackChunkName: "components/right-aside" */).then(c => wrapFunctional(c.default || c)), RightAside: () => import('../../components/rightAside.vue' /* webpackChunkName: "components/right-aside" */).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)),
AboutContact: () => import('../../components/about/contact.vue' /* webpackChunkName: "components/about-contact" */).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)), 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)), 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)), 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)), 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)), 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)),
HomeAlumniStories: () => import('../../components/home/alumniStories.vue' /* webpackChunkName: "components/home-alumni-stories" */).then(c => wrapFunctional(c.default || c)), HomeAlumniStories: () => import('../../components/home/alumniStories.vue' /* webpackChunkName: "components/home-alumni-stories" */).then(c => wrapFunctional(c.default || c)),
HomeBanner: () => import('../../components/home/banner.vue' /* webpackChunkName: "components/home-banner" */).then(c => wrapFunctional(c.default || c)), HomeBanner: () => import('../../components/home/banner.vue' /* webpackChunkName: "components/home-banner" */).then(c => wrapFunctional(c.default || c)),
HomeDegreeEducation: () => import('../../components/home/degreeEducation.vue' /* webpackChunkName: "components/home-degree-education" */).then(c => wrapFunctional(c.default || c)), HomeDegreeEducation: () => import('../../components/home/degreeEducation.vue' /* webpackChunkName: "components/home-degree-education" */).then(c => wrapFunctional(c.default || c)),
......
...@@ -9,14 +9,14 @@ You can directly use them in pages and other components without the need to impo ...@@ -9,14 +9,14 @@ You can directly use them in pages and other components without the need to impo
- `<Foot>` | `<foot>` (components/Foot.vue) - `<Foot>` | `<foot>` (components/Foot.vue)
- `<Head>` | `<head>` (components/Head.vue) - `<Head>` | `<head>` (components/Head.vue)
- `<RightAside>` | `<right-aside>` (components/rightAside.vue) - `<RightAside>` | `<right-aside>` (components/rightAside.vue)
- `<AlumnusParty>` | `<alumnus-party>` (components/alumnus/party.vue)
- `<AlumnusTabNav>` | `<alumnus-tab-nav>` (components/alumnus/tabNav.vue)
- `<AboutContact>` | `<about-contact>` (components/about/contact.vue) - `<AboutContact>` | `<about-contact>` (components/about/contact.vue)
- `<AboutCulture>` | `<about-culture>` (components/about/culture.vue) - `<AboutCulture>` | `<about-culture>` (components/about/culture.vue)
- `<AboutDetail>` | `<about-detail>` (components/about/detail.vue) - `<AboutDetail>` | `<about-detail>` (components/about/detail.vue)
- `<AboutIntroduce>` | `<about-introduce>` (components/about/introduce.vue) - `<AboutIntroduce>` | `<about-introduce>` (components/about/introduce.vue)
- `<AboutNews>` | `<about-news>` (components/about/news.vue) - `<AboutNews>` | `<about-news>` (components/about/news.vue)
- `<AboutTabNav>` | `<about-tab-nav>` (components/about/tabNav.vue) - `<AboutTabNav>` | `<about-tab-nav>` (components/about/tabNav.vue)
- `<AlumnusParty>` | `<alumnus-party>` (components/alumnus/party.vue)
- `<AlumnusTabNav>` | `<alumnus-tab-nav>` (components/alumnus/tabNav.vue)
- `<HomeAlumniStories>` | `<home-alumni-stories>` (components/home/alumniStories.vue) - `<HomeAlumniStories>` | `<home-alumni-stories>` (components/home/alumniStories.vue)
- `<HomeBanner>` | `<home-banner>` (components/home/banner.vue) - `<HomeBanner>` | `<home-banner>` (components/home/banner.vue)
- `<HomeDegreeEducation>` | `<home-degree-education>` (components/home/degreeEducation.vue) - `<HomeDegreeEducation>` | `<home-degree-education>` (components/home/degreeEducation.vue)
......
...@@ -8,12 +8,6 @@ ...@@ -8,12 +8,6 @@
"RightAside": { "RightAside": {
"description": "Auto imported from components/rightAside.vue" "description": "Auto imported from components/rightAside.vue"
}, },
"AlumnusParty": {
"description": "Auto imported from components/alumnus/party.vue"
},
"AlumnusTabNav": {
"description": "Auto imported from components/alumnus/tabNav.vue"
},
"AboutContact": { "AboutContact": {
"description": "Auto imported from components/about/contact.vue" "description": "Auto imported from components/about/contact.vue"
}, },
...@@ -32,6 +26,12 @@ ...@@ -32,6 +26,12 @@
"AboutTabNav": { "AboutTabNav": {
"description": "Auto imported from components/about/tabNav.vue" "description": "Auto imported from components/about/tabNav.vue"
}, },
"AlumnusParty": {
"description": "Auto imported from components/alumnus/party.vue"
},
"AlumnusTabNav": {
"description": "Auto imported from components/alumnus/tabNav.vue"
},
"HomeAlumniStories": { "HomeAlumniStories": {
"description": "Auto imported from components/home/alumniStories.vue" "description": "Auto imported from components/home/alumniStories.vue"
}, },
......
...@@ -34,8 +34,28 @@ ...@@ -34,8 +34,28 @@
</div> </div>
</template> </template>
<script> <script>
import map from "@/plugins/map.js"
export default { export default {
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>
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
</div> </div>
</div> </div>
<div class="small-tit max-width">You are What you together,结识5000+ 同样优秀的人!</div> <div class="small-tit max-width">You are What you together,结识5000+ 同样优秀的人!</div>
<div class="swiper-content"> <div class="swiper-content" v-if="isSwiper">
<div v-swiper:mySwiper="swiperOption" ref="mySwiper" v-if="isSwiper"> <div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)"> <div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<img :src="item.photo_uri"> <img :src="item.photo_uri">
...@@ -31,13 +31,10 @@ export default { ...@@ -31,13 +31,10 @@ export default {
speed: 400, speed: 400,
autoplay: true, autoplay: true,
delay: 3000, delay: 3000,
loop: true, // loop: true,
slidesPerView: 4, slidesPerView: 4,
centeredSlides: true, // centeredSlides: true,
spaceBetween: 20, spaceBetween: 20
autoHeight: true,
paginationClickable: true,
autoplayDisableOnInteraction: false
}, },
isSwiper: false isSwiper: false
} }
...@@ -58,9 +55,25 @@ export default { ...@@ -58,9 +55,25 @@ export default {
return this.$refs.mySwiper.swiper; return this.$refs.mySwiper.swiper;
} }
}, },
mounted() { created() {
// this.swiperOption = {
// observer: true,
// observeParents: true,
// speed: 400,
// autoplay: true,
// delay: 3000,
// // loop: true,
// slidesPerView: 4,
// // centeredSlides: true,
// spaceBetween: 20
// // autoHeight: true,
// // paginationClickable: true,
// // autoplayDisableOnInteraction: false
// }
this.isSwiper = true this.isSwiper = true
}, },
mounted() {
},
methods: { methods: {
goPage(item) { goPage(item) {
if (item.source === '') { if (item.source === '') {
......
<template> <template>
<div class="banner-content"> <div class="banner-content" @mouseenter="swiperStop" @mouseleave="swiperStart">
<div v-swiper:mySwiper="swiperOption"> <div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in bannerData" :key="index"> <div class="swiper-slide" v-for="(item, index) in listData" :key="index">
<img :src="item.image" @click="openPage(item.action)"> <img :src="item.photo_uri" @click="goPage(item)">
</div> </div>
</div> </div>
<!-- <div class="swiper-pagination swiper-pagination-bullets"></div> --> <!-- <div class="swiper-pagination swiper-pagination-bullets"></div> -->
...@@ -17,20 +17,20 @@ ...@@ -17,20 +17,20 @@
export default { export default {
data () { data () {
return { return {
bannerData: [], listData: [],
// 轮播图配置信息, 更多请参考 swiper.js 中文网,上面很详细。 // 轮播图配置信息, 更多请参考 swiper.js 中文网,上面很详细。
swiperOption: { swiperOption: {
speed: 400, speed: 400,
autoplay: true, autoplay: true,
delay: 3000, delay: 3000,
observer: true, // observer: true,
observerParent: true, // observerParent: true,
navigation: { navigation: {
nextEl: '.next-button', nextEl: '.next-button',
prevEl: '.prev-button' prevEl: '.prev-button'
}, },
loop: true, // loop: true,
autoplayDisableOnInteraction: false // autoplayDisableOnInteraction: false
// observeSlideChildren: true, // observeSlideChildren: true,
// direction: 'horizontal', // direction: 'horizontal',
// paginationClickable: true, // paginationClickable: true,
...@@ -42,20 +42,54 @@ ...@@ -42,20 +42,54 @@
} }
} }
}, },
// 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() { async fetch() {
const params = { const params = {
terminal_type: 'WWW', page: 1,
ad_position_uri: 'www.ezijing.com' per_page: 100,
type: 69,
project_id: 1013
} }
this.bannerData = await this.$axios.$get('/api/zws/v1/marketing/advertisements', { params }).then(res => { this.listData = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => {
return res.filter((item, index) => { return res
return index < 4
})
}) })
}, },
computed: {
swiper() {
return this.$refs.mySwiper.swiper;
}
},
methods: { methods: {
openPage(path) { // openPage(path) {
path !== '' && window.open(path) // path !== '' && window.open(path)
// }
swiperStop() {
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)
}
} }
} }
} }
......
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);
});
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论