mobile
yujialong 2 years ago
parent 7d1bf9814e
commit f4fbb304d3
  1. 35
      src/components/menuTree/index.vue
  2. 58
      src/layouts/footer/index.vue
  3. 9
      src/layouts/header/index.vue
  4. 4
      src/layouts/home/index.vue
  5. 69
      src/layouts/navbar/index.vue
  6. 2
      src/pages/about/index.vue
  7. 61
      src/pages/article/editor.css
  8. 3
      src/pages/article/index.vue
  9. 2
      src/pages/careers/index.vue
  10. 8
      src/pages/edu/index.vue
  11. 2
      src/pages/home/index.vue
  12. 29
      src/pages/news/index.vue
  13. 2
      src/pages/newsPress/index.vue

@ -0,0 +1,35 @@
<template>
<div class="menu-child">
<template v-for="item in this.menuList">
<el-submenu :key="item.id" :index="item.id" v-if="item.children && item.children.length">
<template slot="title">
<span slot="title">{{item.columnName}}</span>
</template>
<menuTree :menuList="item.children"></menuTree>
</el-submenu>
<el-menu-item :key="item.id" :index="item.id" v-else>
<span slot="title">{{item.columnName}}</span>
</el-menu-item>
</template>
</div>
</template>
<script>
export default {
name: 'menuTree',
props: {
menuList: {
type: Array,
default: []
}
},
data () {
return {}
},
mounted () {},
methods: {}
}
</script>
<style lang="scss" scoped>
</style>

@ -8,31 +8,10 @@
<p class="meta">Institute of Advanced Science Facilities, ShenzhenIASF</p> <p class="meta">Institute of Advanced Science Facilities, ShenzhenIASF</p>
<p class="meta">Tel400-0010-998</p> <p class="meta">Tel400-0010-998</p>
</div> </div>
<div class="column"> <div v-for="(item, i) in columns" :key="i" class="column">
<h6>关于IASF</h6> <h6>{{ item.columnName }}</h6>
<ul class="children"> <ul v-if="item.children.length" class="children">
<li>研究院概况</li> <li v-for="(column, j) in item.children" :key="j">{{ column.columnName }}</li>
<li>研究院概况</li>
<li>研究院概况</li>
<li>研究院概况</li>
</ul>
</div>
<div class="column">
<h6>关于IASF</h6>
<ul class="children">
<li>研究院概况</li>
<li>研究院概况</li>
<li>研究院概况</li>
<li>研究院概况</li>
</ul>
</div>
<div class="column">
<h6>关于IASF</h6>
<ul class="children">
<li>研究院概况</li>
<li>研究院概况</li>
<li>研究院概况</li>
<li>研究院概况</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -41,18 +20,36 @@
</div> </div>
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from '@/setting'
export default { export default {
data() { data() {
return { return {
columns: [],
isIndex: this.$route.path !== '/login' && Setting.whiteList.some(e => e === this.$route.path) // 3 isIndex: this.$route.path !== '/login' && Setting.whiteList.some(e => e === this.$route.path) // 3
}; };
}, },
mounted(){ mounted(){
this.getColumn()
}, },
methods: { methods: {
//
getColumn() {
this.$post(this.api.listWithTree, {
siteId: 1,
columnName: '',
templateId: '',
typeId : '',
isSort: 0
}).then(({ data }) => {
this.columns = data.filter(e => !e.menuVisible).slice(0, 8)
}).catch(err => {})
},
//
jump(item) {
const { id } = item
this.active = id
this.$router.push('channel?id=' + id).catch(err => {})
}
}, },
}; };
</script> </script>
@ -67,7 +64,6 @@ export default {
} }
.info { .info {
display: flex; display: flex;
// justify-content: center;
margin-bottom: 100px; margin-bottom: 100px;
} }
.meta { .meta {
@ -75,10 +71,11 @@ export default {
font-size: 14px; font-size: 14px;
} }
.column { .column {
margin: 0 50px; margin: 0 20px;
h6 { h6 {
margin-bottom: 20px; margin-bottom: 20px;
font-size: 16px; font-size: 16px;
white-space: nowrap;
} }
} }
.children { .children {
@ -86,6 +83,7 @@ export default {
margin: 12px 0; margin: 12px 0;
font-size: 14px; font-size: 14px;
color: #6D7384; color: #6D7384;
white-space: nowrap;
cursor: pointer; cursor: pointer;
} }
} }

@ -3,8 +3,9 @@
<a class="logo" @click="toIndex"> <a class="logo" @click="toIndex">
<img v-if="isChannel" src="@/assets/images/logo.png" alt=""> <img v-if="isChannel" src="@/assets/images/logo.png" alt="">
<template v-else> <template v-else>
<img src="@/assets/images/logo1.png" alt=""> <img src="@/assets/images/logo-black.png" alt="">
深圳中能高重复自由电子激光 <!-- <img src="@/assets/images/logo1.png" alt="">
深圳中能高重复自由电子激光 -->
</template> </template>
</a> </a>
<navbar ref="nav"></navbar> <navbar ref="nav"></navbar>
@ -22,7 +23,7 @@ import navbar from '../navbar'
export default { export default {
data() { data() {
return { return {
isChannel: this.$route.path === '/channel' isChannel: this.$route.path === '/home'
}; };
}, },
components: { components: {
@ -30,7 +31,7 @@ export default {
}, },
watch: { watch: {
'$route'() { '$route'() {
this.isChannel = this.$route.path === '/channel' this.isChannel = this.$route.path === '/home'
} }
}, },
mounted() { mounted() {

@ -19,7 +19,7 @@ import vFooter from "../footer";
export default { export default {
data() { data() {
return { return {
isChannel: this.$route.path === '/channel' isChannel: this.$route.path === '/home'
}; };
}, },
components: { components: {
@ -28,7 +28,7 @@ export default {
}, },
watch: { watch: {
'$route'() { '$route'() {
this.isChannel = this.$route.path === '/channel' this.isChannel = this.$route.path === '/home'
} }
}, },
mounted() { mounted() {

@ -1,29 +1,37 @@
<template> <template>
<div> <div>
<ul :class="['nav', { channel: isChannel }]"> <el-menu class="nav" ref="type" :key="menuRefresh" mode="horizontal" :background-color="bgColor" :text-color="textColor" :active-text-color="activeTextColor" @select="jump" :default-active="active">
<li v-for="(item, i) in menus" :key="i" :class="{active: active == item.id}" @click="jump(item)"> <menuTree :menuList="menus"/>
{{ item.columnName }} </el-menu>
</li>
</ul>
</div> </div>
</template> </template>
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
import menuTree from '@/components/menuTree'
export default { export default {
data() { data() {
return { return {
isChannel: this.$route.path === '/channel', isChannel: this.$route.path === '/home',
active: this.$route.query.id, active: this.$route.query.id,
menus: [] menus: [],
bgColor: '#fff',
textColor: '#333',
activeTextColor: '#1583FF',
menuRefresh: 1
}; };
}, },
components: {
menuTree
},
watch: { watch: {
'$route'() { '$route'() {
this.isChannel = this.$route.path === '/channel' this.isChannel = this.$route.path === '/home'
this.handleColor()
} }
}, },
mounted() { mounted() {
this.handleColor()
this.getColumn() this.getColumn()
}, },
methods: { methods: {
@ -36,10 +44,18 @@ export default {
typeId : '', typeId : '',
isSort: 0 isSort: 0
}).then(({ data }) => { }).then(({ data }) => {
this.menus = data this.menus = data.filter(e => !e.menuVisible)
if (!this.active && data.length) this.active = data[0].id if (!this.active && data.length) this.active = data[0].id
}).catch(err => {}) }).catch(err => {})
}, },
//
handleColor() {
if (this.isChannel) {
this.bgColor = 'transparent'
this.textColor = '#fff'
this.menuRefresh++
}
},
// //
jump(item) { jump(item) {
const { id } = item const { id } = item
@ -51,34 +67,29 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.nav{ $height: 90px;
/deep/.nav{
position: absolute; position: absolute;
top: 0; top: 0;
left: 50%; left: 50%;
display: flex;
transform: translateX(-50%); transform: translateX(-50%);
& > li{ }
position: relative; /deep/.nav.el-menu--horizontal {
padding: 0 15px; border: 0;
margin: 0 10px; &>.menu-child>li {
font-size: 20px; float: left;
line-height: 90px;
color: #333;
white-space: nowrap;
cursor: pointer;
&.active{
color: $main-color;
}
} }
&.channel { .el-menu-item, .el-submenu__title {
& > li { height: $height;
color: #fff; line-height: $height;
span {
font-size: 14px;
} }
} }
} }
@media (max-width: 1430px) { @media (max-width: 1430px) {
.nav { .nav {
left: 52%; left: 52%;
} }
} }
</style> </style>

@ -1,6 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-carousel height="480px" :interval="6000"> <el-carousel height="480px" :interval="6000" :arrow="(modules[0] && modules[0].list.length > 1) ? 'hover' : 'never'">
<template v-for="(item, i) in modules[0].list"> <template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i"> <el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="banner-item" @click="openLink(item)"> <div class="banner-item" @click="openLink(item)">

@ -0,0 +1,61 @@
.mce-content-body:not([dir=rtl]) blockquote {
padding: 8px 15px;
border-left: 0;
background-color: #ededed;
}
.tiny-wrap {
width: 900px;
margin: 0 auto;
}
.tiny-wrap blockquote p {
margin: 0;
font-style: italic;
}
.tiny-wrap .block {
margin-bottom: 20px;
overflow: hidden;
}
.tiny-wrap .block .fl {
float: left;
margin: 0 20px 0 0;
}
.tiny-wrap .block .fr {
float: right;
margin: 0 0 0 20px;
}
.tiny-wrap .block p {
margin: 0 0 10px;
font-size: 19px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #101010;
line-height: 32px;
}
.tiny-wrap .block .tiny-title {
margin: 10px 0;
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #101010;
line-height: 32px;
}
.tiny-wrap .quote {
padding: 15px;
font-size: 14px;
font-style: italic;
border: 1px solid #e3e3e3;
background-color: #f1f1f1;
}
.tiny-wrap .img-wrap {
text-align: center;
}
.tiny-wrap .img-wrap img {
max-width: 600px;
max-height: 600px;
}
.tiny-wrap .block .img-des {
margin: 10px 0 0;
font-size: 14px;
color: #8d8d8d;
text-align: center;
}

@ -20,7 +20,7 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<el-tree class="column" ref="column" :data="columns" highlight-current :expand-on-click-node="false" default-expand-all :props="defaultProps" node-key="id" ></el-tree> <el-tree class="column" ref="column" :data="columns" highlight-current :expand-on-click-node="false" :props="defaultProps" node-key="id" ></el-tree>
<p class="l-title">热点内容</p> <p class="l-title">热点内容</p>
<ul class="list"> <ul class="list">
@ -137,6 +137,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "./editor.css";
.banner { .banner {
height: 280px; height: 280px;
padding: 123px 0 0 243px; padding: 123px 0 0 243px;

@ -1,6 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-carousel height="480px" :interval="6000"> <el-carousel height="480px" :interval="6000" :arrow="(modules[0] && modules[0].list.length > 1) ? 'hover' : 'never'">
<template v-for="(item, i) in modules[0].list"> <template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i"> <el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="banner-item" @click="openLink(item)"> <div class="banner-item" @click="openLink(item)">

@ -1,6 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-carousel height="480px" :interval="6000"> <el-carousel height="480px" :interval="6000" :arrow="(modules[0] && modules[0].list.length > 1) ? 'hover' : 'never'">
<template v-for="(item, i) in modules[0].list"> <template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i"> <el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="banner-item" @click="openLink(item)"> <div class="banner-item" @click="openLink(item)">
@ -29,10 +29,10 @@
<div class="block gray"> <div class="block gray">
<div class="inner"> <div class="inner">
<h2 class="b-title">Engagement</h2> <h2 class="b-title">{{ modules[3].form.title }}</h2>
<p class="intro">Serving Community</p> <p class="intro">{{ modules[3].form.des }}</p>
<ul class="list"> <ul class="list">
<li v-for="(item, i) in modules[3].list" :key="i"> <li v-for="(item, i) in modules[4].list" :key="i">
<img class="pic" :src="item.pic" alt="" @click="openLink(item)"> <img class="pic" :src="item.pic" alt="" @click="openLink(item)">
<div class="texts"> <div class="texts">
<h6>{{ item.title }}</h6> <h6>{{ item.title }}</h6>

@ -1,6 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-carousel height="959px" :interval="6000"> <el-carousel height="959px" :interval="6000" :arrow="(modules[0] && modules[0].list.length > 1) ? 'hover' : 'never'">
<template v-for="(item, i) in modules[0].list"> <template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i"> <el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<img class="cursor-pointer" width="100%" height="959" :src="item.pic" alt="" @click="openLink(item)"> <img class="cursor-pointer" width="100%" height="959" :src="item.pic" alt="" @click="openLink(item)">

@ -1,6 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-carousel height="480px" :interval="6000"> <el-carousel height="480px" :interval="6000" :arrow="(modules[0] && modules[0].list.length > 1) ? 'hover' : 'never'">
<template v-for="(item, i) in modules[0].list"> <template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i"> <el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="banner-item" @click="openLink(item)"> <div class="banner-item" @click="openLink(item)">
@ -18,7 +18,7 @@
</ul> </ul>
<div class="block"> <div class="block">
<div class="inner"> <div class="inner" v-if="modules[1].list[this.curColumn].articles.length">
<div class="banner"> <div class="banner">
<img width="50%" height="480" :src="modules[1].list[this.curColumn].articles[0].titleImg" alt=""> <img width="50%" height="480" :src="modules[1].list[this.curColumn].articles[0].titleImg" alt="">
<div class="right"> <div class="right">
@ -47,7 +47,7 @@
<div class="inner lg"> <div class="inner lg">
<h2 class="b-title">{{ modules[2].form.title }}</h2> <h2 class="b-title">{{ modules[2].form.title }}</h2>
<p class="intro">{{ modules[2].form.des }}</p> <p class="intro">{{ modules[2].form.des }}</p>
<div class="shop-shows" v-if="articles"> <div class="shop-shows" v-if="articles.length">
<div class="left"> <div class="left">
<img width="100%" height="400" :src="articles[0].titleImg" alt=""> <img width="100%" height="400" :src="articles[0].titleImg" alt="">
<div class="texts"> <div class="texts">
@ -107,18 +107,18 @@
<img class="pic" :src="item.titleImg" alt=""> <img class="pic" :src="item.titleImg" alt="">
<div class="texts"> <div class="texts">
<h6>{{ item.title }}</h6> <h6>{{ item.title }}</h6>
<p class="text"> <p v-if="item.author" class="text">
<img class="icon" src="@/assets/images/address.png" alt=""> <i class="el-icon-user icon"></i>
Jiahang Shao {{ item.author }}
</p> </p>
<p class="text"> <p class="text">
<img class="icon" src="@/assets/images/address.png" alt=""> <i class="el-icon-alarm-clock icon"></i>
Time: 2022.8.13 14:30 Time: {{ item.createTime }}
</p> </p>
<p class="text"> <!-- <p class="text">
<img class="icon" src="@/assets/images/address.png" alt=""> <i class="el-icon-user icon"></i>
Address: Big conference room on the fourth floor of headquarters Address: Big conference room on the fourth floor of headquarters
</p> </p> -->
</div> </div>
</li> </li>
</template> </template>
@ -161,7 +161,7 @@ export default {
const { list } = json[1] const { list } = json[1]
if (list.length) { if (list.length) {
list.map(e => { list.map(e => {
if (e.site) { if (e.site && e.column.length) {
const id = e.column[e.column.length - 1] const id = e.column[e.column.length - 1]
e.id = id e.id = id
if (e.columnTitle === 2) e.columnName = e.columnTitleCustom if (e.columnTitle === 2) e.columnName = e.columnTitleCustom
@ -173,6 +173,8 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
this.$set(e, 'articles', data.records) this.$set(e, 'articles', data.records)
}).catch(err => {}) }).catch(err => {})
} else {
this.$set(e, 'articles', [])
} }
}) })
} }
@ -456,7 +458,8 @@ export default {
} }
.icon { .icon {
width: 15px; width: 15px;
margin-right: 12px; margin-right: 5px;
color: #1583FF;
} }
} }
} }

@ -1,6 +1,6 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-carousel height="480px" :interval="6000"> <el-carousel height="480px" :interval="6000" :arrow="(modules[0] && modules[0].list.length > 1) ? 'hover' : 'never'">
<template v-for="(item, i) in modules[0].list"> <template v-for="(item, i) in modules[0].list">
<el-carousel-item v-if="item.pic && item.isEnable" :key="i"> <el-carousel-item v-if="item.pic && item.isEnable" :key="i">
<div class="banner-item" @click="openLink(item)"> <div class="banner-item" @click="openLink(item)">

Loading…
Cancel
Save