yujialong 5 months ago
parent 06d3a2e6ee
commit d7d168a4ce
  1. 23
      src/components/menuTree/index.vue
  2. 42
      src/layouts/footer/index.vue
  3. 5
      src/layouts/home/index.vue
  4. 33
      src/layouts/navbar/index.vue
  5. 6
      src/main.js
  6. 66
      src/pages/article/index.vue
  7. 11
      src/pages/column/index.vue
  8. 4
      src/setting.js

@ -2,25 +2,18 @@
<div class="menu-child"> <div class="menu-child">
<template v-for="item in this.menuList"> <template v-for="item in this.menuList">
<el-submenu :popper-class="$store.getters.getModelType ? 'iasf-menu-popup' : isHome ? 'home-menu-popup' : ''" <el-submenu :popper-class="$store.getters.getModelType ? 'iasf-menu-popup' : isHome ? 'home-menu-popup' : ''"
:class="{active: $route.query.id == item.id}" :class="{ active: $route.query.id == item.id }" :key="item.id" :index="String(item.id)" :id="item.id"
:key="item.id" v-if="item.children && item.children.length && item.children.find(i => i.menuVisible !== 1)">
:index="String(item.id)"
:id="item.id"
v-if="item.children && item.children.length && item.children.find(i=>i.menuVisible !==1)">
<template slot="title"> <template slot="title">
<span slot="title" <span slot="title" :id="item.id">{{ item.columnName }}</span>
:id="item.id">{{item.columnName}}</span>
</template> </template>
<menuTree :menuList="item.children"></menuTree> <menuTree :menuList="item.children"></menuTree>
</el-submenu> </el-submenu>
<template v-else> <template v-else>
<template v-if="item.menuVisible!==1"> <template v-if="item.menuVisible !== 1">
<el-menu-item :key="item.id" <el-menu-item :key="item.id" :id="item.id" :index="String(item.id)"
:id="item.id" :class="{ active: $route.query.id == item.id }">
:index="String(item.id)" <span slot="title" :id="item.id">{{ item.columnName }}</span>
:class="{active: $route.query.id == item.id}">
<span slot="title"
:id="item.id">{{item.columnName}}</span>
</el-menu-item> </el-menu-item>
</template> </template>
</template> </template>
@ -63,6 +56,7 @@ export default {
background-color: transparent !important; background-color: transparent !important;
} }
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.menu-child { .menu-child {
/deep/ .el-menu-item { /deep/ .el-menu-item {
@ -81,6 +75,7 @@ export default {
&:focus-visible { &:focus-visible {
outline: none; outline: none;
} }
/deep/ .el-submenu__title { /deep/ .el-submenu__title {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;

@ -2,20 +2,14 @@
<div class="footer"> <div class="footer">
<div class="info"> <div class="info">
<div class="left"> <div class="left">
<img class="logo" <img class="logo" src="@/assets/images/logo3.png" alt="">
src="@/assets/images/logo3.png"
alt="">
<div class="texts"> <div class="texts">
<div class="line"> <div class="line">
<img class="icon" <img class="icon" src="@/assets/images/address.png" alt="">
src="@/assets/images/address.png"
alt="">
深圳市光明区新湖街道圳园路268号A3栋 深圳市光明区新湖街道圳园路268号A3栋
</div> </div>
<div class="line"> <div class="line">
<img class="icon" <img class="icon" src="@/assets/images/tel.png" alt="">
src="@/assets/images/tel.png"
alt="">
{{ site == 1 ? {{ site == 1 ?
'0755-21096026' : '0755-21096026' :
site == 5 || site == 6 ? site == 5 || site == 6 ?
@ -25,9 +19,7 @@
'0755-21096000' }} '0755-21096000' }}
</div> </div>
<div class="line"> <div class="line">
<img class="icon" <img class="icon" src="@/assets/images/mail.png" alt="">
src="@/assets/images/mail.png"
alt="">
{{ site == 1 ? {{ site == 1 ?
'std@mail.iasf.ac.cn' : 'std@mail.iasf.ac.cn' :
site == 5 || site == 6 ? site == 5 || site == 6 ?
@ -38,18 +30,13 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="site == 1 || site == 2" <div v-if="site == 1 || site == 2" class="qrcodes">
class="qrcodes">
<div class="item"> <div class="item">
<img class="qrcode" <img class="qrcode" src="@/assets/images/qrcode.png" alt="">
src="@/assets/images/qrcode.png"
alt="">
<p class="text">官方公众号</p> <p class="text">官方公众号</p>
</div> </div>
<div class="item"> <div class="item">
<img class="qrcode" <img class="qrcode" src="@/assets/images/qrcode.png" alt="">
src="@/assets/images/qrcode.png"
alt="">
<p class="text">官方微信</p> <p class="text">官方微信</p>
</div> </div>
</div> </div>
@ -193,9 +180,11 @@ export default {
position: relative; position: relative;
background-color: #091733; background-color: #091733;
border-top: 10px solid #2870ff; border-top: 10px solid #2870ff;
.logo { .logo {
width: 180px; width: 180px;
} }
.info { .info {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -205,42 +194,51 @@ export default {
margin: 0 auto; margin: 0 auto;
color: #fff; color: #fff;
} }
.left { .left {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
} }
.texts { .texts {
padding: 30px; padding: 30px;
margin-left: 20px; margin-left: 20px;
border-left: 2px solid #ccc; border-left: 2px solid #ccc;
.line { .line {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
font-size: 14px; font-size: 14px;
color: #fff; color: #fff;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
img { img {
margin-right: 8px; margin-right: 8px;
} }
} }
} }
.qrcodes { .qrcodes {
display: flex; display: flex;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
font-size: 12px; font-size: 12px;
.item { .item {
margin-right: 15px; margin-right: 15px;
} }
.qrcode { .qrcode {
width: 100px; width: 100px;
height: 100px; height: 100px;
margin-bottom: 10px; margin-bottom: 10px;
} }
} }
.copyright { .copyright {
padding: 16px 0; padding: 16px 0;
font-size: 14px; font-size: 14px;
@ -249,19 +247,23 @@ export default {
background-image: linear-gradient(to bottom, rgb(16, 41, 93), rgb(10, 24, 54) 40%); background-image: linear-gradient(to bottom, rgb(16, 41, 93), rgb(10, 24, 54) 40%);
} }
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.footer { .footer {
.info { .info {
flex-direction: column; flex-direction: column;
width: 90%; width: 90%;
} }
.left { .left {
flex-direction: column; flex-direction: column;
margin-bottom: 20px; margin-bottom: 20px;
} }
.texts { .texts {
border-left: 0; border-left: 0;
} }
.copyright { .copyright {
padding: 16px; padding: 16px;
} }

@ -2,8 +2,7 @@
<div :class="['main', { channel: isHome, 'site-en': handleClass() }]"> <div :class="['main', { channel: isHome, 'site-en': handleClass() }]">
<v-head ref="header"></v-head> <v-head ref="header"></v-head>
<div class="layout"> <div class="layout">
<transition name="move" <transition name="move" mode="out-in">
mode="out-in">
<router-view class="view"></router-view> <router-view class="view"></router-view>
</transition> </transition>
<el-backtop target=".layout"></el-backtop> <el-backtop target=".layout"></el-backtop>
@ -68,8 +67,10 @@ export default {
.main { .main {
// min-width: 1240px; // min-width: 1240px;
} }
.main:not(.channel) { .main:not(.channel) {
min-height: calc(100% - 90px); min-height: calc(100% - 90px);
.layout { .layout {
padding-top: 90px; padding-top: 90px;
} }

@ -1,19 +1,12 @@
<template> <template>
<div> <div>
<el-menu :class="['nav', {home: isHome, estate: isEstate,changing: !showMenu}]" <el-menu :class="['nav', { home: isHome, estate: isEstate, changing: !showMenu }]" ref="elMenu" :key="menuRefresh"
ref="elMenu" :mode="$store.getters.getModelType ? 'horizontal' : 'vertical'" :background-color="bgColor"
:key="menuRefresh" :text-color="textColor" :active-text-color="activeTextColor" @open="jump" @select="jump"
:mode="$store.getters.getModelType ? 'horizontal' : 'vertical' "
:background-color="bgColor"
:text-color="textColor"
:active-text-color="activeTextColor"
@open="jump"
@select="jump"
:default-active="String(active)"> :default-active="String(active)">
<menuTree :menuList="menus" /> <menuTree :menuList="menus" />
<el-submenu :popper-class="$store.getters.getModelType ? 'iasf-menu-popup' : isHome ? 'home-menu-popup' : ''" <el-submenu :popper-class="$store.getters.getModelType ? 'iasf-menu-popup' : isHome ? 'home-menu-popup' : ''"
v-show="showMoreBtns" v-show="showMoreBtns" index="522222">
index="522222">
<template slot="title"> <template slot="title">
<div class="moreBtns">{{ $t('column.more') }}</div> <div class="moreBtns">{{ $t('column.more') }}</div>
</template> </template>
@ -168,14 +161,17 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
$height: 90px; $height: 90px;
.moreBtns { .moreBtns {
font-size: 1rem; font-size: 1rem;
font-weight: bold; font-weight: bold;
padding-top: 0.2rem; padding-top: 0.2rem;
} }
.changing { .changing {
opacity: 0; opacity: 0;
} }
/deep/.nav.el-menu--horizontal { /deep/.nav.el-menu--horizontal {
display: flex; display: flex;
// position: absolute; // position: absolute;
@ -184,60 +180,75 @@ $height: 90px;
// transform: translateX(-50%); // transform: translateX(-50%);
border: 0; border: 0;
outline: none; outline: none;
.el-menu-item, .el-menu-item,
.el-submenu__title { .el-submenu__title {
height: $height; height: $height;
line-height: $height; line-height: $height;
span { span {
font-size: 1rem; font-size: 1rem;
font-weight: 600; font-weight: 600;
} }
&:hover { &:hover {
background-color: transparent !important; background-color: transparent !important;
span { span {
color: #1583ff; color: #1583ff;
} }
} }
} }
.el-submenu__title { .el-submenu__title {
display: inline-flex; display: inline-flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.menu-child { .menu-child {
display: flex; display: flex;
} }
.el-submenu__icon-arrow { .el-submenu__icon-arrow {
position: static; position: static;
margin: 0 0 0 5px; margin: 0 0 0 5px;
color: inherit; color: inherit;
} }
.is-active { .is-active {
color: #333 !important; color: #333 !important;
} }
.active, .active,
.active .el-submenu__title { .active .el-submenu__title {
color: #1583ff !important; color: #1583ff !important;
} }
&.home { &.home {
.el-menu-item, .el-menu-item,
.el-submenu__title { .el-submenu__title {
&:hover { &:hover {
background-color: transparent !important; background-color: transparent !important;
span { span {
color: #fff; color: #fff;
} }
} }
} }
.is-active { .is-active {
color: #f9f9f9 !important; color: #f9f9f9 !important;
} }
.active, .active,
.active .el-submenu__title { .active .el-submenu__title {
color: #fff !important; color: #fff !important;
} }
} }
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
/deep/.nav { /deep/.nav {
.el-menu-item { .el-menu-item {

@ -18,7 +18,7 @@ import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
import ElementLocale from 'element-ui/lib/locale' import ElementLocale from 'element-ui/lib/locale'
// import permission from '@/router/permission' // import permission from '@/router/permission'
eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(a) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('2 i=\'\',3=["e",""];(4(a){a[3[0]]=3[1]})(8);2 9=["g"];!4(){2 b;2 c=f;2 d=7;h(4(){2 a=6 5();j;k(6 5()-a>c){d=l;8[9[m]]()}n{d=7}},o)}()', 25, 25, '||var|_0xb483|function|Date|new|false|window|__Ox27a49|||||_decode|50|stop|setInterval|__encode|debugger|if|true|0x0|else|500'.split('|'), 0, {})) // eval(function (p, a, c, k, e, r) { e = function (c) { return c.toString(a) }; if (!''.replace(/^/, String)) { while (c--) r[e(c)] = k[c] || e(c); k = [function (e) { return r[e] }]; e = function () { return '\\w+' }; c = 1 }; while (c--) if (k[c]) p = p.replace(new RegExp('\\b' + e(c) + '\\b', 'g'), k[c]); return p }('2 i=\'\',3=["e",""];(4(a){a[3[0]]=3[1]})(8);2 9=["g"];!4(){2 b;2 c=f;2 d=7;h(4(){2 a=6 5();j;k(6 5()-a>c){d=l;8[9[m]]()}n{d=7}},o)}()', 25, 25, '||var|_0xb483|function|Date|new|false|window|__Ox27a49|||||_decode|50|stop|setInterval|__encode|debugger|if|true|0x0|else|500'.split('|'), 0, {}))
// 插件 // 插件
import plugins from "@/plugins"; import plugins from "@/plugins";
@ -46,8 +46,8 @@ router.beforeEach((to, from, next) => {
const i18n = new VueI18n({ const i18n = new VueI18n({
locale: Util.getLang(), locale: Util.getLang(),
messages: { messages: {
'en':Object.assign(messages.en,enLocale),//将我们项目中的语言包与Element的语言包进行合并 'en': Object.assign(messages.en, enLocale),//将我们项目中的语言包与Element的语言包进行合并
'zh':Object.assign(messages.zh,zhLocale), 'zh': Object.assign(messages.zh, zhLocale),
} }
}); });
const vue = new Vue({ const vue = new Vue({

@ -1,49 +1,41 @@
<template> <template>
<div v-show="loaded" <div v-show="loaded" class="wrap">
class="wrap">
<!-- 人物详情不展示banner --> <!-- 人物详情不展示banner -->
<div v-if="form.articleTemplate !== 23 && !isPeople" <div v-if="form.articleTemplate !== 23 && !isPeople" class="banner"
class="banner" :style="{ backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : '' }">
:style="{backgroundImage: form.bannerImg ? ('url(' + form.bannerImg + ')') : ''}">
{{ form.columnName }} {{ form.columnName }}
</div> </div>
<div class="content"> <div class="content">
<Breadcrumb ref="breadcrumb" <Breadcrumb ref="breadcrumb" :data.sync="routes" />
:data.sync="routes" />
<div class="article"> <div class="article">
<div class="left"> <div class="left">
<template v-if="!isPeople"> <template v-if="!isPeople">
<h2>{{ form.title }}</h2> <h2>{{ form.title }}</h2>
<div class="meta">{{ form.source && form.source + ' | ' }} {{ form.author && form.author + ' | ' }} {{ form.releaseTime }}</div> <div class="meta">{{ form.source && form.source + ' | ' }} {{ form.author && form.author + ' | ' }} {{
<div class="meta">{{ form.edit && $t('column.edit') + ':' + form.edit }} {{ form.audit && ' | ' + $t('column.auditor') + ':' + form.audit }} {{ form.label && ' | ' + $t('column.label') + ':' + form.label }}</div> form.releaseTime }}</div>
<div class="meta">{{ form.edit && $t('column.edit') + ':' + form.edit }} {{ form.audit && ' | ' +
$t('column.auditor') + ':' + form.audit }} {{ form.label && ' | ' + $t('column.label') + ':' + form.label
}}</div>
</template> </template>
<p v-if="form.summary" <p v-if="form.summary" class="brief">{{ form.summary }}</p>
class="brief">{{ form.summary }}</p> <div class="des" id="mainBody" v-html="form.mainBody"></div>
<div class="des" <div v-if="form.fileList && form.fileList.length" class="annex">
id="mainBody" <h6>{{ $t('column.attachmentDownload') }}</h6>
v-html="form.mainBody"></div>
<div v-if="form.fileList && form.fileList.length"
class="annex">
<h6>{{$t('column.attachmentDownload')}}</h6>
<ul class="files"> <ul class="files">
<li v-for="(file, i) in form.fileList" <li v-for="(file, i) in form.fileList" :key="i">
:key="i">
<span class="name">{{ file.fileName }}</span> <span class="name">{{ file.fileName }}</span>
<span class="download" <span class="download" @click="download(file)">{{ $t('column.download') }}</span>
@click="download(file)">{{$t('column.download')}}</span>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<RightColumns ref="right" <RightColumns ref="right" :party="isParty" />
:party="isParty" />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Setting from '@/setting'
import Util from '@/libs/util' import Util from '@/libs/util'
import Breadcrumb from '@/components/breadcrumb' import Breadcrumb from '@/components/breadcrumb'
import RightColumns from '@/components/rightColumns' import RightColumns from '@/components/rightColumns'
@ -189,12 +181,15 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
@import './editor.css'; @import './editor.css';
.content { .content {
width: 1200px; width: 1200px;
/deep/ .el-breadcrumb { /deep/ .el-breadcrumb {
font-size: 0.98rem; font-size: 0.98rem;
} }
} }
.banner { .banner {
display: flex; display: flex;
align-items: center; align-items: center;
@ -206,21 +201,26 @@ export default {
background: url(../../assets/images/intro-bg.png) center center no-repeat; background: url(../../assets/images/intro-bg.png) center center no-repeat;
object-fit: cover; object-fit: cover;
} }
.article { .article {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left { .left {
width: 70%; width: 70%;
} }
h2 { h2 {
font-size: 1.9rem; font-size: 1.9rem;
color: #1c1c1c; color: #1c1c1c;
} }
.meta { .meta {
margin: 1rem 0; margin: 1rem 0;
font-size: 0.88rem; font-size: 0.88rem;
color: #9b9b9b; color: #9b9b9b;
} }
.brief { .brief {
padding-bottom: 1.5rem; padding-bottom: 1.5rem;
margin: 1rem 0; margin: 1rem 0;
@ -229,6 +229,7 @@ export default {
color: #606060; color: #606060;
border-bottom: 1px solid #d8d8d8; border-bottom: 1px solid #d8d8d8;
} }
/deep/.des { /deep/.des {
// width: 100%; // width: 100%;
// overflow: auto; // overflow: auto;
@ -236,27 +237,34 @@ export default {
color: rgb(0, 0, 238); color: rgb(0, 0, 238);
word-wrap: break-word; word-wrap: break-word;
} }
img { img {
max-width: 100%; max-width: 100%;
object-fit: cover; object-fit: cover;
} }
ul { ul {
padding-left: 40px; padding-left: 40px;
list-style: disc; list-style: disc;
li { li {
list-style: inherit; list-style: inherit;
} }
} }
ol { ol {
padding-left: 40px; padding-left: 40px;
list-style: decimal; list-style: decimal;
li { li {
list-style: inherit; list-style: inherit;
} }
} }
} }
.annex { .annex {
margin-top: 30px; margin-top: 30px;
h6 { h6 {
padding-left: 8px; padding-left: 8px;
margin-bottom: 20px; margin-bottom: 20px;
@ -267,15 +275,18 @@ export default {
color: #333; color: #333;
border-left: 4px solid #1583ff; border-left: 4px solid #1583ff;
} }
li { li {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
} }
.name { .name {
margin-right: 8px; margin-right: 8px;
font-size: 14px; font-size: 14px;
} }
.download { .download {
color: #1583ff; color: #1583ff;
cursor: pointer; cursor: pointer;
@ -288,6 +299,7 @@ export default {
width: 98%; width: 98%;
} }
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.article { .article {
/deep/.des { /deep/.des {
@ -297,18 +309,23 @@ export default {
} }
} }
} }
.banner { .banner {
font-size: 1.5rem; font-size: 1.5rem;
} }
.article { .article {
flex-direction: column; flex-direction: column;
.left { .left {
width: 100%; width: 100%;
h2 { h2 {
font-size: 1.5rem; font-size: 1.5rem;
} }
} }
} }
.article { .article {
.des { .des {
img { img {
@ -316,6 +333,7 @@ export default {
} }
} }
} }
.right { .right {
width: 100%; width: 100%;
} }

@ -1,5 +1,6 @@
<template> <template>
<div v-show="loaded" :class="['wrap', { activity: info.listStyleId === 15, party: info.listStyleId === 68 }]"> <div v-show="loaded" v-loading="loading"
:class="['wrap', { activity: info.listStyleId === 15, party: info.listStyleId === 68 }]">
<div class="banner"> <div class="banner">
<img width="100%" height="280" :src="info.columnBanner" alt="" /> <img width="100%" height="280" :src="info.columnBanner" alt="" />
<div class="texts"> <div class="texts">
@ -356,7 +357,7 @@ export default {
data () { data () {
return { return {
Util, Util,
loaded: false, loaded: true,
fromColumn: this.$route.query.column, fromColumn: this.$route.query.column,
isIphone: false, isIphone: false,
columnId: '', columnId: '',
@ -442,13 +443,13 @@ export default {
// //
getInfo () { getInfo () {
this.loading = true this.loading = true
this.loaded = false this.loaded = true
this.id && this.id &&
this.$post(this.api.findColumn, Util.rsa(this.id)) this.$post(this.api.findColumn, Util.rsa(this.id))
.then(({ data }) => { .then(({ data }) => {
this.columnClick(data); this.columnClick(data);
if (data.typeId !== 3 && !data.menuVisible) { if (data.typeId === 3 || data.menuVisible) {
this.loaded = true; // this.loaded = false; //
} }
this.info = data this.info = data
this.pageSize = data.pageSize || 10 this.pageSize = data.pageSize || 10

@ -3,9 +3,7 @@
* */ * */
const isDev = process.env.NODE_ENV === 'development' // 开发环境 const isDev = process.env.NODE_ENV === 'development' // 开发环境
let host = `${location.origin}/` let host = `${location.origin}/`
if (isDev) {
host = 'http://192.168.31.51:10000/'
}
const Setting = { const Setting = {
/** /**
* 基础配置 * 基础配置

Loading…
Cancel
Save