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

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

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

@ -1,19 +1,12 @@
<template>
<div>
<el-menu :class="['nav', {home: isHome, estate: isEstate,changing: !showMenu}]"
ref="elMenu"
:key="menuRefresh"
:mode="$store.getters.getModelType ? 'horizontal' : 'vertical' "
:background-color="bgColor"
:text-color="textColor"
:active-text-color="activeTextColor"
@open="jump"
@select="jump"
<el-menu :class="['nav', { home: isHome, estate: isEstate, changing: !showMenu }]" ref="elMenu" :key="menuRefresh"
:mode="$store.getters.getModelType ? 'horizontal' : 'vertical'" :background-color="bgColor"
:text-color="textColor" :active-text-color="activeTextColor" @open="jump" @select="jump"
:default-active="String(active)">
<menuTree :menuList="menus" />
<el-submenu :popper-class="$store.getters.getModelType ? 'iasf-menu-popup' : isHome ? 'home-menu-popup' : ''"
v-show="showMoreBtns"
index="522222">
v-show="showMoreBtns" index="522222">
<template slot="title">
<div class="moreBtns">{{ $t('column.more') }}</div>
</template>
@ -168,14 +161,17 @@ export default {
<style lang="scss" scoped>
$height: 90px;
.moreBtns {
font-size: 1rem;
font-weight: bold;
padding-top: 0.2rem;
}
.changing {
opacity: 0;
}
/deep/.nav.el-menu--horizontal {
display: flex;
// position: absolute;
@ -184,60 +180,75 @@ $height: 90px;
// transform: translateX(-50%);
border: 0;
outline: none;
.el-menu-item,
.el-submenu__title {
height: $height;
line-height: $height;
span {
font-size: 1rem;
font-weight: 600;
}
&:hover {
background-color: transparent !important;
span {
color: #1583ff;
}
}
}
.el-submenu__title {
display: inline-flex;
justify-content: center;
align-items: center;
}
.menu-child {
display: flex;
}
.el-submenu__icon-arrow {
position: static;
margin: 0 0 0 5px;
color: inherit;
}
.is-active {
color: #333 !important;
}
.active,
.active .el-submenu__title {
color: #1583ff !important;
}
&.home {
.el-menu-item,
.el-submenu__title {
&:hover {
background-color: transparent !important;
span {
color: #fff;
}
}
}
.is-active {
color: #f9f9f9 !important;
}
.active,
.active .el-submenu__title {
color: #fff !important;
}
}
}
@media (max-width: 1200px) {
/deep/.nav {
.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 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";
@ -46,8 +46,8 @@ router.beforeEach((to, from, next) => {
const i18n = new VueI18n({
locale: Util.getLang(),
messages: {
'en':Object.assign(messages.en,enLocale),//将我们项目中的语言包与Element的语言包进行合并
'zh':Object.assign(messages.zh,zhLocale),
'en': Object.assign(messages.en, enLocale),//将我们项目中的语言包与Element的语言包进行合并
'zh': Object.assign(messages.zh, zhLocale),
}
});
const vue = new Vue({

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

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

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

Loading…
Cancel
Save