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

Initial commit

上级
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
# Created by .ignore support plugin (hsz.mobi)
### Node template
# Logs
/logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
# parcel-bundler cache (https://parceljs.org/)
.cache
# next.js build output
.next
# nuxt.js build output
.nuxt
# Nuxt generate
dist
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless
# IDE / Editor
.idea
# Service worker
sw.*
# macOS
.DS_Store
# Vim swap files
*.swp
# ezijing-www
## Build Setup
```bash
# install dependencies
$ npm install
# serve with hot reload at localhost:3000
$ npm run dev
# build for production and launch server
$ npm run build
$ npm run start
# generate static project
$ npm run generate
```
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
// 获取新闻列表
export function getNews($axios, params) {
return $axios.get(`/zws/v1/cms/news`, { params })
}
// 获取新闻详情
export function getNew($axios, params) {
return $axios.get(`/zws/v1/cms/new`, { params })
}
<!DOCTYPE html>
<html {{ HTML_ATTRS }}>
<head>
{{ HEAD }}
<script>
;(function(win, doc) {
function resizeRoot() {
var wWidth =
screen.width > 0
? win.innerWidth >= screen.width || win.innerWidth == 0
? screen.width
: win.innerWidth
: win.innerWidth,
wFsize
wFsize = ((wWidth > 750 ? 750 : wWidth) / 375) * 100
doc.documentElement.style.fontSize = wFsize + 'px'
}
resizeRoot()
win.addEventListener('resize', resizeRoot, false)
})(window, document)
</script>
</head>
<body {{ BODY_ATTRS }}>
{{ APP }}
</body>
</html>
# ASSETS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your un-compiled assets such as LESS, SASS, or JavaScript.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked).
<template>
<div class="card">
<div class="card-hd">
<div class="card-hd__title">{{ title }}</div>
<div class="card-hd__aside"><slot name="header-aside"></slot></div>
</div>
<div class="card-bd"><slot /></div>
</div>
</template>
<script>
export default {
props: { title: String }
}
</script>
<style lang="scss">
.card {
margin: 0.2rem 0.15rem;
}
.card-hd {
display: flex;
align-items: center;
justify-content: space-between;
}
.card-hd__title {
flex: 1;
border-left: 0.03rem solid #aa1941;
padding-left: 0.05rem;
font-size: 0.17rem;
font-weight: bold;
line-height: 1;
color: #424242;
}
.card-hd__aside {
font-size: 0.1rem;
color: #9b9b9b;
}
.card-bd {
}
</style>
<template>
<footer class="main-footer">
<div class="top">
<div class="about">
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址:北京市海淀区中关村东路1号院清华科技园7号楼5层</p>
<p>联系电话:010-62793299</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱:service@ezijing.com</p>
</div>
<div class="link">
<template v-for="(item, index) in link">
<a :href="item.href" :key="index" target="_blank">{{ item.title }}</a>
</template>
</div>
<div class="friendlink">
友情链接:
<template v-for="(item, index) in link2">
<a :href="item.href" :key="index" target="_blank">{{ item.title }}</a>
</template>
</div>
</div>
<div class="copyright">
<p>Copyright @ 2017 Zijing Education. All rights reserved.</p>
<p>京ICP证150431号 <img src="~/assets/images/icon_jinghui.png" height="12" />京公网安备 11010802023681号</p>
<p>清控紫荆(北京)教育科技股份有限公司</p>
</div>
</footer>
</template>
<script>
export default {
data() {
return {
link: [
{ title: '教育部涉外监管网', href: 'http://www.pbc.gov.cn/' },
{ title: '五道口官网', href: 'http://www.pbc.gov.cn/' },
{ title: '合作大学官网', href: 'http://www.pbc.gov.cn/' }
],
link2: [
{ title: '中国人民银行', href: 'http://www.pbc.gov.cn/' },
{ title: '中国涉外监管网', href: 'http://jsj.moe.gov.cn/' },
{ title: '中国银行协会', href: 'https://www.china-cba.net/' },
{ title: '中国证券投资基金业协会', href: 'https://www.amac.org.cn/' }
]
}
}
}
</script>
<style lang="scss">
.main-footer {
.top {
color: #fff;
background-color: #aa1941;
padding: 0.24rem 0.15rem;
}
.about {
p {
font-size: 0.11rem;
}
p + p {
margin-top: 10px;
}
}
.link {
margin-top: 0.22rem;
a {
font-size: 0.14rem;
margin-right: 0.2rem;
}
}
.friendlink {
margin-top: 0.22rem;
a {
font-size: 0.11rem;
line-height: 0.18rem;
margin-right: 0.1rem;
white-space: nowrap;
}
}
.copyright {
padding: 0.15rem 0 0.24rem;
p {
font-size: 0.1rem;
color: #999;
text-align: center;
}
p + p {
margin-top: 0.15rem;
}
img {
margin: -4px 5px 0;
vertical-align: middle;
}
}
}
</style>
<template>
<header class="main-header">
<nuxt-link to="/" class="logo"></nuxt-link>
<div class="search"></div>
<div class="menu"></div>
</header>
</template>
<style lang="scss">
.main-header {
display: flex;
align-items: center;
padding: 0.16rem 0.15rem 0.2rem;
background-color: #fff;
border-top: 10px solid #aa1941;
.logo {
flex: 1;
background: url('~/assets/images/logo.png') no-repeat;
height: 0.26rem;
background-size: contain;
}
.search {
width: 0.18rem;
height: 0.18rem;
padding: 0 0.08rem;
background: url('~/assets/images/icom_search.png') no-repeat center;
background-size: 0.18rem 0.18rem;
}
.menu {
width: 0.18rem;
height: 0.18rem;
padding: 0 0.08rem;
background: url('~/assets/images/icom_menu.png') no-repeat center;
background-size: 0.18rem 0.18rem;
}
}
</style>
# COMPONENTS
**This directory is not required, you can delete it if you don't want to use it.**
The components directory contains your Vue.js Components.
_Nuxt.js doesn't supercharge these components._
<template>
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<template v-for="(item, index) in list">
<van-swipe-item :key="index"><img :src="item.src" class="banner-img" /></van-swipe-item>
</template>
</van-swipe>
</template>
<script>
export default {
data() {
return {
list: []
}
},
fetch() {
this.list = [
{ src: '/images/banner.png', href: '' },
{ src: '/images/banner.png', href: '' }
]
}
}
</script>
<style lang="scss">
.banner-img {
display: block;
height: 1.51rem;
}
</style>
<template>
<card title="教育服务案例"></card>
</template>
<script>
import Card from '@/components/Card'
export default {
components: { Card }
}
</script>
<template>
<card title="公开课">
<template #header-aside><nuxt-link to="">查看更多+</nuxt-link></template>
</card>
</template>
<script>
import Card from '@/components/Card'
export default {
components: { Card }
}
</script>
<template>
<div class="degree">
<div class="degree-hd">学位教育</div>
<div class="degree-bd">
<ul class="tab-left">
<li
:class="indexActive === index && 'active'"
v-for="(item, index) in data"
@click="changeIndex(index)"
:key="index"
>
{{ item.name }}
</li>
</ul>
<template v-for="(item, index) in data">
<ul class="tab-right" :key="index" v-if="indexActive === index">
<li :key="cIndex + 'c'" v-for="(cItem, cIndex) in item.content">
<img :src="cItem.icon" class="icon" />
<div class="text" v-html="cItem.text"></div>
</li>
</ul>
</template>
</div>
</div>
</template>
<script>
export default {
data() {
return {
indexActive: 0,
data: [
{
name: '本科',
content: [
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/e624ed7af7b49a9e04e7ac2ec95db7e1.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/8b32a69e26a4d20eaddc8bb3d6f4ccc5.png',
text: '海外留学<br />SHMS',
path: ''
}
]
},
{
name: '硕士',
content: [
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/69fc809f95bd7985e13827a6dcd4dcd1.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/ac6cde3fb04de4c3478d02e7572fe9c9.png',
text: '金融硕士<br />MSF',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/ac66fee3cad3cca2b4b38ef3cceed9dc.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/8fe0f6c8995847dee420e70a21da4d3f.png',
text: '教育学硕士<br />MED',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/aa2c06a74a470cbee1443e66bb6bc981.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/db8ca58d8032f32a77a7a9deea9b417b.png',
text: '应用心理学<br />硕士MAP',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/70748b8e679e7b3f40310635d9f3bae7.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/49f4eb2509433e42555754f74a4dcae2.png',
text: '未来金融<br />领袖计划',
path: ''
}
]
},
{
name: 'MBA',
content: [
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/17ef11bc534aadf1d8e3b94fd6d4350f.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/0d2ea39ee5d40200a6f513db2e9b88de.png',
text: '通用MBA',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/a23695e5428a3d5e0a2f47f7d36ebb14.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/a2c4b8a1f799b35f04ed618f7b47b9c1.png',
text: '金融MBA',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/709ab2dd245369c16631a8d9ebe67006.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/29917e1f3d47ca9381b5e0c397e1f082.png',
text: '酒店与旅游工<br/>商管理MBA',
path: ''
}
]
},
{
name: '博士',
content: [
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/841ff657ca26c0f26da3e24d799ae2a5.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/5785a4d37264a8293b956a3f065f11cf.png',
text: '心理学博士<br/>(即将推出)',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/aebf1f65a324cff54eb9466bf2fd0b66.png',
iconActive: 'https://zws-imgs-pub.ezijing.com/static/public/526bebd1d9279c19895c5c4f1a3cfcce.png',
text: '工商管理学博士<br/>(即将推出)',
path: ''
}
]
}
]
}
},
methods: {
changeIndex(n) {
this.indexActive = n
}
}
}
</script>
<style lang="scss">
.degree {
margin: 0.2rem 0.16rem;
}
.degree-hd {
padding-bottom: 0.1rem;
font-size: 0.12rem;
font-weight: bold;
line-height: 1;
color: #424242;
}
.degree-bd {
display: flex;
.tab-left {
flex: 0 0 0.78rem;
li {
height: 0.25rem;
background: #fff;
text-align: center;
line-height: 0.25rem;
color: #666;
font-size: 0.11rem;
font-weight: 500;
cursor: pointer;
&.active {
background: #aa1941;
color: #fff;
}
}
li + li {
margin-top: 0.04rem;
}
}
.tab-right {
flex: 1;
display: flex;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
li {
min-width: 0.78rem;
height: 1.1rem;
margin-left: 0.1rem;
background: #fff;
cursor: pointer;
img {
display: block;
width: 0.45rem;
height: 0.45rem;
margin: 0.17rem auto 0;
}
.text {
margin-top: 0.09rem;
font-size: 0.1rem;
color: #666;
text-align: center;
}
}
}
}
</style>
<template>
<card title="项目公告">
<template #header-aside><nuxt-link to="">查看更多+</nuxt-link></template>
<div class="future">
<div class="future-left">即将开始的<br />课程日期</div>
<div class="future-right">
<div class="future-item" v-for="(item, index) in futureList" :key="index">
<div class="future-item__title">{{ item.title }}</div>
<div class="future-item__date">{{ formatDate(item.created_time) }}</div>
</div>
</div>
</div>
<div class="list">
<div class="list-item" v-for="(item, index) in futureList" :key="index">
<div class="list-item__date">
<p>{{ formatMD(item.created_time) }}</p>
<p>{{ formatYY(item.created_time) }}</p>
</div>
<div class="list-item__title">{{ item.title }}</div>
</div>
</div>
</card>
</template>
<script>
import Card from '@/components/Card'
export default {
components: { Card },
data() {
return {
futureList: [
{ title: 'KELLEY商学院金融硕士(MSF)开学典礼', created_time: '2020-01-22 14:41:08' },
{ title: '酒店管理HMBA报名截止日', created_time: '2020-01-22 14:41:08' }
],
list: [
{ title: '清华、交大等名校本硕博齐聚,全美第一在线金融硕士盛大开学!', created_time: '2020-01-22 14:41:08' },
{ title: '紫荆·国际金融人才论坛重磅发布“中国未来金融领袖计划”', created_time: '2020-01-22 14:41:08' }
]
}
},
methods: {
// 2月14日
formatDate(value) {
const date = new Date(value)
return date.getMonth() + 1 + '月' + date.getDate() + '日'
},
// 2021
formatYY(value) {
const date = new Date(value)
return date.getMonth() + 1 + '月' + date.getDate() + '日'
},
// 2/14
formatMD(value) {
const date = new Date(value)
return date.getMonth() + 1 + '/' + date.getDate()
}
},
fetch() {}
}
</script>
<template>
<card title="校长寄语">
<template #header-aside><nuxt-link to="">查看更多+</nuxt-link></template>
<!-- <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
<template v-for="(item, index) in list">
<van-swipe-item :key="index"><img :src="item.src" class="banner-img" /></van-swipe-item>
</template>
</van-swipe> -->
</card>
</template>
<script>
import Card from '@/components/Card'
export default {
components: { Card }
}
</script>
<template>
<div class="service">
<div class="service-hd">教育服务</div>
<ul class="service-bd">
<li v-for="(item, index) in data" :key="index">
<img :src="item.icon" class="icon" />
<div class="text" v-html="item.text"></div>
</li>
</ul>
</div>
</template>
<script>
export default {
data() {
return {
data: [
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/e624ed7af7b49a9e04e7ac2ec95db7e1.png',
text: '1+X',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/e624ed7af7b49a9e04e7ac2ec95db7e1.png',
text: '专业共建',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/e624ed7af7b49a9e04e7ac2ec95db7e1.png',
text: '校企合作',
path: ''
},
{
icon: 'https://zws-imgs-pub.ezijing.com/static/public/e624ed7af7b49a9e04e7ac2ec95db7e1.png',
text: '产业学院',
path: ''
}
]
}
}
}
</script>
<style lang="scss">
.service {
margin: 0.2rem 0.16rem;
}
.service-hd {
padding-bottom: 0.1rem;
font-size: 0.12rem;
font-weight: bold;
line-height: 1;
color: #424242;
}
.service-bd {
display: flex;
li {
width: 0.78rem;
height: 1.1rem;
background: #fff;
cursor: pointer;
img {
display: block;
width: 0.45rem;
height: 0.45rem;
margin: 0.17rem auto 0;
}
.text {
margin-top: 0.07rem;
font-size: 0.1rem;
color: #666;
text-align: center;
}
}
li + li {
margin-left: 0.1rem;
}
}
</style>
<template>
<card title="校友故事">
<template #header-aside><nuxt-link to="">查看更多+</nuxt-link></template>
</card>
</template>
<script>
import Card from '@/components/Card'
export default {
components: { Card }
}
</script>
# LAYOUTS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Application Layouts.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts).
<template>
<div class="main-layout">
<app-header />
<Nuxt />
<app-footer />
</div>
</template>
<script>
import AppHeader from '@/components/Header'
import AppFooter from '@/components/Footer'
export default {
components: { AppHeader, AppFooter }
}
</script>
<style>
* {
margin: 0;
padding: 0;
}
body {
font-size: 14px;
background-color: #f9f8f8;
}
.main-layout {
max-width: 750px;
margin: 0 auto;
}
a {
color: currentColor;
text-decoration: none;
}
</style>
# MIDDLEWARE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your application middleware.
Middleware let you define custom functions that can be run before rendering either a page or a group of pages.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing#middleware).
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: '紫荆教育-在线MBA课程-MBA在线课程-专业金融在线教育品牌',
htmlAttrs: {
lang: 'en'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: '' },
{
name: 'keywords',
content:
'理财规划师,企业理财顾问师,投资理财顾问,金融理财师,理财培训,企业融资,国家理财规划师,财富管理,资产管理,个人财富管理,证券投资,信托投资,房地产投资'
},
{
name: 'description',
content:
'紫荆教育依托清华大学和五道口金融学院丰富的教育资源,秉承其严谨务实的教学理念,紧密结合宏观经济转型过程中,企业和个人知识结构升级的需求,融理论大家、实践专家、顶尖专业机构集体智慧于一体,构建以金融为核心的商业实战知识体系,努力为中国社会商业素质提高贡献一己之力.课程分类:企业理财顾问(CFC),理财规划师,财富资产管理,金融创业投资项目.'
}
],
link: [
{
rel: 'icon',
type: 'image/x-icon',
href: 'https://zws-imgs-pub.ezijing.com/static/public/f56441ae1441902080226712d4d650aa.ico'
}
]
},
// Global CSS: https://go.nuxtjs.dev/config-css
css: ['vant/lib/index.css'],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: ['@/plugins/vant'],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
// Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
buildModules: [],
// Modules: https://go.nuxtjs.dev/config-modules
modules: ['@nuxtjs/axios'],
// Build Configuration: https://go.nuxtjs.dev/config-build
build: {}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "ezijing-www",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "nuxt",
"build": "nuxt build",
"start": "nuxt start",
"generate": "nuxt generate"
},
"dependencies": {
"@nuxtjs/axios": "^5.13.1",
"core-js": "^3.9.1",
"nuxt": "^2.15.3",
"vant": "^2.12.10"
},
"devDependencies": {
"fibers": "^5.0.0",
"sass": "^1.32.11",
"sass-loader": "^10.1.1"
}
}
# PAGES
This directory contains your Application Views and Routes.
The framework reads all the `*.vue` files inside this directory and creates the router of your application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing).
<template>
<div>
<banner />
<degree />
<service />
<post />
<publish />
<story />
<class />
<case />
</div>
</template>
<script>
// components
import Banner from '@/components/home/Banner'
import Degree from '@/components/home/Degree'
import Service from '@/components/home/Service'
import Post from '@/components/home/Post'
import Publish from '@/components/home/Publish'
import Story from '@/components/home/Story'
import Class from '@/components/home/Class'
import Case from '@/components/home/Case'
// api
import * as api from '@/api'
export default {
layout: 'default',
components: { Banner, Degree, Service, Post, Publish, Story, Class, Case },
data() {
return {}
}
}
</script>
<style>
</style>
<template>
<div>Sorry!</div>
</template>
# PLUGINS
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains Javascript plugins that you want to run before mounting the root Vue.js application.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins).
export default function({ $axios, redirect }) {
$axios.onError(error => {
if (error.response.status === 500) {
redirect('/sorry')
}
})
}
import Vue from 'vue'
import Vant from 'vant'
Vue.use(Vant)
# STATIC
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your static files.
Each file inside this directory is mapped to `/`.
Thus you'd want to delete this README.md before deploying to production.
Example: `/static/robots.txt` is mapped as `/robots.txt`.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#static).
# STORE
**This directory is not required, you can delete it if you don't want to use it.**
This directory contains your Vuex Store files.
Vuex Store option is implemented in the Nuxt.js framework.
Creating a file in this directory automatically activates the option in the framework.
More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/vuex-store).
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论