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

feat: 新增校园一览

上级 6449b173
......@@ -23,7 +23,7 @@
<body {{ BODY_ATTRS }}>
{{ APP }}
<script src="https://res2.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="./wx.js"></script>
<script src="/wx.js"></script>
<script>
var _hmt = _hmt || []
;(function() {
......
......@@ -19,6 +19,10 @@ export default {
name: this.$t('menu.project'),
path: '/project'
},
{
name: '校园一览',
path: '/campusList/campusList'
},
{
name: '学习安排',
path: '/plan'
......@@ -35,7 +39,7 @@ export default {
children: [
{ name: '申请要求', path: '/guides/requirements' },
{ name: '申请流程', path: '/guides/process' },
{ name: '报名材料', path: '/guides/material' },
{ name: '报名材料', path: '/guides/material' }
// { name: '学费信息', path: '/guides/tuition' }
]
},
......
......@@ -51,6 +51,10 @@ export default {
name: this.$t('menu.project'),
path: '/project'
},
{
name: '校园一览',
path: '/campusList/campusList'
},
{
name: '学习安排',
path: '/plan'
......@@ -67,7 +71,7 @@ export default {
children: [
{ name: '申请要求', path: '/guides/requirements' },
{ name: '申请流程', path: '/guides/process' },
{ name: '报名材料', path: '/guides/material' },
{ name: '报名材料', path: '/guides/material' }
// { name: '学费信息', path: '/guides/tuition' }
]
},
......
......@@ -42,7 +42,19 @@ export default {
css: ['vant/lib/index.css', '@ezijing/vue-form/dist/vue-form.css', 'assets/theme/index.css', 'assets/css/base.css'],
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: ['@/plugins/vant', '@/plugins/i18n', '@/plugins/router', '@/plugins/axios', '@/plugins/element-ui'],
plugins: [
'@/plugins/vant',
'@/plugins/i18n',
'@/plugins/router',
'@/plugins/axios',
'@/plugins/element-ui',
{ src: '@/plugins/vue-lazyload.js', ssr: false },
{
// 引入一个插件,这里的 ssr 表示使用服务端渲染
src: 'plugins/vue-swiper.js',
ssr: false
}
],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
......
......@@ -23,12 +23,12 @@
"vant": "^2.12.21",
"viewerjs": "^1.9.0",
"vue-awesome-swiper": "^4.1.1",
"vue-i18n": "^8.24.4"
"vue-i18n": "^8.24.4",
"vue-lazyload": "^1.3.4"
},
"devDependencies": {
"sass": "^1.32.11",
"sass-loader": "^10.1.1",
"vue-lazyload": "^1.2.3"
"sass-loader": "^10.1.1"
}
},
"node_modules/@babel/code-frame": {
......@@ -11279,6 +11279,11 @@
"vue": ">= 2.6.0"
}
},
"node_modules/vant/node_modules/vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
},
"node_modules/vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
......@@ -11331,9 +11336,9 @@
"integrity": "sha512-RZE94WUAGxEiBAANxQ0pptbRwDkNKNSXl3fnJslpFOxVMF6UkUtMDSuYGuW2blDrVgweIXVpethOVkYoNNT9xw=="
},
"node_modules/vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
"version": "1.3.5",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.3.5.tgz",
"integrity": "sha512-SCO/LWgCCbjaregHO4wg2buzITBdPBZRlIS104vERGpT88uxXsK26veuzZpgGAXMR8WpkaR+JDqz80OedpaLiA=="
},
"node_modules/vue-loader": {
"version": "15.9.6",
......@@ -22304,6 +22309,13 @@
"@vant/popperjs": "^1.0.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
},
"dependencies": {
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
}
}
},
"vary": {
......@@ -22352,9 +22364,9 @@
"integrity": "sha512-RZE94WUAGxEiBAANxQ0pptbRwDkNKNSXl3fnJslpFOxVMF6UkUtMDSuYGuW2blDrVgweIXVpethOVkYoNNT9xw=="
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/vue-lazyload/-/vue-lazyload-1.2.3.tgz",
"integrity": "sha512-DC0ZwxanbRhx79tlA3zY5OYJkH8FYp3WBAnAJbrcuoS8eye1P73rcgAZhyxFSPUluJUTelMB+i/+VkNU/qVm7g=="
"version": "1.3.5",
"resolved": "https://registry.npmmirror.com/vue-lazyload/-/vue-lazyload-1.3.5.tgz",
"integrity": "sha512-SCO/LWgCCbjaregHO4wg2buzITBdPBZRlIS104vERGpT88uxXsK26veuzZpgGAXMR8WpkaR+JDqz80OedpaLiA=="
},
"vue-loader": {
"version": "15.9.6",
......
......@@ -25,11 +25,11 @@
"vant": "^2.12.21",
"viewerjs": "^1.9.0",
"vue-awesome-swiper": "^4.1.1",
"vue-i18n": "^8.24.4"
"vue-i18n": "^8.24.4",
"vue-lazyload": "^1.3.4"
},
"devDependencies": {
"sass": "^1.32.11",
"sass-loader": "^10.1.1",
"vue-lazyload": "^1.2.3"
"sass-loader": "^10.1.1"
}
}
差异被折叠。
<template>
<ul class="tab-content">
<li
v-for="(item, index) in items"
:key="index"
:class="activeIndex === index && 'active'"
@click="tabChange(index)"
>
{{ item }}
</li>
</ul>
</template>
<script>
export default {
data() {
return {
items: ['图书馆', '实验室', '餐厅&住宿', '运动场', '校园风光', '校园活动', '毕业典礼'],
activeIndex: 0
}
},
methods: {
tabChange(n) {
this.activeIndex = n
this.$emit('tabChange', n)
}
}
}
</script>
<style lang="scss" scoped>
.tab-content {
// padding-top: 0.2rem;
display: flex;
justify-content: center;
overflow-x: auto;
li {
min-width: 106px;
height: 38px;
text-align: center;
line-height: 38px;
font-size: 20px;
font-weight: bold;
color: #333333;
position: relative;
margin-left: 16px;
cursor: pointer;
&.active {
background: #aa1941;
border-radius: 8px 8px 8px 8px;
color: #ffffff;
cursor: pointer;
}
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论