粒子研究院前台前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.5 KiB

2 years ago
<template>
2 years ago
<div class="footer">
<div class="inner">
<div class="info">
<div style="margin-right: 100px">
<img class="m-b-20" src="@/assets/images/iasf.png" alt="">
<p class="meta">Copyright ©2002- 2021</p>
<p class="meta">Institute of Advanced Science Facilities, ShenzhenIASF</p>
<p class="meta">Tel400-0010-998</p>
2 years ago
</div>
2 years ago
<div v-for="(item, i) in columns" :key="i" class="column">
<h6 @click="jump(item)">{{ item.columnName }}</h6>
2 years ago
<ul v-if="item.children.length" class="children">
<li v-for="(column, j) in item.children" :key="j" @click="jump(item)">{{ column.columnName }}</li>
2 years ago
</ul>
</div>
</div>
<a class="copyright">粤ICP备2020131940号 粤公安网34565432456765432号</a>
2 years ago
</div>
2 years ago
</div>
2 years ago
</template>
<script>
2 years ago
import Setting from '@/setting'
2 years ago
export default {
2 years ago
data() {
return {
site: this.$store.state.content.site,
2 years ago
columns: [],
2 years ago
isIndex: this.$route.path !== '/login' && Setting.whiteList.some(e => e === this.$route.path) // 官网3个页面才能显示邮箱和版权号
};
},
mounted(){
2 years ago
this.getColumn()
2 years ago
},
methods: {
2 years ago
// 资讯
getColumn() {
this.$post(this.api.listWithTreeMenuVisible, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
2 years ago
columnName: '',
templateId: '',
typeId : '',
isSort: 1
2 years ago
}).then(({ data }) => {
this.columns = data.slice(0, 8)
2 years ago
}).catch(err => {})
},
// 跳转
jump(to) {
const { id } = to
this.active = to.id
const { typeId } = to
// 跳转链接
if (typeId === 2) {
let href = to.linkAddress
const cType = to.connectionType
if (cType !== 2) { // 非站外链接
const ids = href.split('-') // 栏目文章是用-分割的,栏目是必选,文章不是必选。选择了文章则跳转到文章页,否则跳转到栏目页
// 站点id:站内链接取当前站点,其他站点链接取siteSelection
const site = cType === 1 ?
(this.$route.query.siteId || this.site) :
to.siteSelection
if (ids[1]) { // 文章
href = '/article?id=' + ids[1]
} else { // 栏目
const columnIds = ids[0].split(',')
href = '/column?id=' + columnIds[columnIds.length - 1]
}
href = this.$router.resolve(href + '&siteId=' + site).href
}
// 是否新窗口打开
if (to.isOpen) {
window.open(href)
} else {
location.href = href
}
} else if (typeId !== 4 || (typeId === 4 && !to.children.length)) {
// 常规栏目跳转到column页,长页栏目直接获取path
this.$router.push(`/${typeId === 3 ? row.path : 'column'}?id=${id}`).catch(err => {})
}
2 years ago
}
2 years ago
},
2 years ago
};
</script>
<style lang="scss" scoped>
2 years ago
.footer{
padding: 64px 0 25px;
color: #fff;
background-color: #091733;
.inner {
width: 1500px;
margin: 0 auto;
}
.info {
display: flex;
margin-bottom: 100px;
}
.meta {
margin-bottom: 10px;
font-size: 14px;
}
.column {
2 years ago
margin: 0 20px;
2 years ago
h6 {
margin-bottom: 20px;
font-size: 16px;
2 years ago
white-space: nowrap;
2 years ago
}
}
.children {
li {
margin: 12px 0;
font-size: 14px;
color: #6D7384;
2 years ago
white-space: nowrap;
2 years ago
cursor: pointer;
2 years ago
}
2 years ago
}
.copyright {
font-size: 14px;
color: #6D7384;
}
}
2 years ago
</style>