粒子研究院前台前端
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.

272 lines
7.5 KiB

2 years ago
<template>
1 year ago
<div class="footer">
<div class="info">
<div class="left">
9 months ago
<img class="logo" src="@/assets/images/logo3.png" alt="">
1 year ago
<div class="texts">
<div class="line">
9 months ago
<img class="icon" src="@/assets/images/address.png" alt="">
1 year ago
深圳市光明区新湖街道圳园路268号A3栋
2 years ago
</div>
1 year ago
<div class="line">
9 months ago
<img class="icon" src="@/assets/images/tel.png" alt="">
{{ site == 1 ?
9 months ago
'0755-21096026' :
site == 5 || site == 6 ?
'0755-21096067' :
site == 3 || site == 4 ?
'0755-21096052' :
'0755-21096000' }}
1 year ago
</div>
<div class="line">
9 months ago
<img class="icon" src="@/assets/images/mail.png" alt="">
{{ site == 1 ?
9 months ago
'std@mail.iasf.ac.cn' :
site == 5 || site == 6 ?
'srgcb@mail.iasf.ac.cn' :
site == 3 || site == 4 ?
'FEL@mail.iasf.ac.cn' :
'gad@mail.iasf.ac.cn' }}
2 years ago
</div>
2 years ago
</div>
</div>
9 months ago
<div v-if="site == 1 || site == 2" class="qrcodes">
1 year ago
<div class="item">
8 months ago
<img class="qrcode" src="@/assets/images/officialAccount.jpg" alt="">
1 year ago
<p class="text">官方公众号</p>
2 years ago
</div>
8 months ago
<!-- <div class="item">
9 months ago
<img class="qrcode" src="@/assets/images/qrcode.png" alt="">
1 year ago
<p class="text">官方微信</p>
8 months ago
</div> -->
2 years ago
</div>
</div>
6 months ago
<div class="copyright">Copyright ©深圳综合粒子设施研究院 粤ICP备2020131940号-1 粤公网安备44031102000586号</div>
2 years ago
</div>
2 years ago
</template>
<script>
2 years ago
import mixins from '@/mixins/article'
import Util from '@/libs/util'
2 years ago
export default {
2 years ago
mixins: [mixins],
2 years ago
data () {
2 years ago
return {
2 years ago
isIasf: false,
2 years ago
showDefaultPath: ['/home', '/iasf', '/estate/index'], // 展示默认页脚的页面
2 years ago
showContactPath: ['/news', '/sfel', '/talent', '/about', '/careers', '/edu', '/news'], // 展示联系我们页脚的页面
2 years ago
columns: [],
2 years ago
modules: []
2 years ago
};
},
computed: {
// 是否是sfel网站
2 years ago
isSfel () {
const id = this.$route.query.siteId || this.$store.state.content.site
return id == 3
}
},
2 years ago
watch: {
'$route': {
handler () {
if (this.$route.path === '/iasf') {
this.isIasf = true
this.getInfo()
}
},
deep: true,
immediate: true
},
},
2 years ago
mounted () {
2 years ago
this.getColumn()
2 years ago
},
methods: {
2 years ago
// 资讯
2 years ago
getColumn () {
this.$post(this.api.listWithTreeMenuVisible, Util.rsa({
siteId: this.$route.query.siteId || this.$store.state.content.site,
2 years ago
columnName: '',
templateId: '',
2 years ago
typeId: '',
isSort: 1
})).then(({ data }) => {
1 year ago
// this.columns = data.slice(0, 5)
this.columns = data
2 years ago
}).catch(err => { })
},
// 获取iasf中文首页应用模块数据
getInfo () {
// 预览/详情
this.$post(this.api[this.preview ? 'getRedisCache' : 'findPage'], Util.rsa(this.$route.query.id)).then(({ data }) => {
2 years ago
if (data.length) {
// state:已发布(1)则取theEditedJson,草稿(0)则取jsonBeforeEditing
const json = JSON.parse(this.preview ?
data :
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing'])
this.modules = json
}
2 years ago
}).catch(err => { })
2 years ago
},
2 years ago
// 判断是否有添加链接
isLink (linkName) {
return linkName !== '无' && linkName !== ''
},
// 打开链接
async openLink (item) {
const { link } = item
if (link.linkName === '无' || link.linkName === '') return false
let href = link.linkAddress
const type = link.connectionType
if (type === 1) { // 站内链接
if (link.articleId) { // 文章
// 查询文章详情。禁用的文章要提示
const data = await this.$post(this.api.findArticle, Util.rsa(link.articleId))
2 years ago
if (data.data.isDisable) {
return Util.errorMsg('该文章已禁用!')
} else {
href = '/article?articleId=' + link.articleId
}
} else { // 栏目
href = '/column?id=' + link.columnId[link.columnId.length - 1]
}
href += '&siteId=' + (this.site)
if (!link.articleId) href = this.$router.resolve(href).href
} else if (type === 3) { // 站外链接
if (link.otherArticleId) { // 文章
// 查询文章详情。禁用的文章要提示
const data = await this.$post(this.api.findArticle, Util.rsa(link.otherArticleId))
2 years ago
if (data.data.isDisable) {
return Util.errorMsg('该文章已禁用!')
} else {
href = '/article?articleId=' + link.otherArticleId
}
} else { // 栏目
href = '/column?id=' + link.otherColumnId[link.otherColumnId.length - 1]
}
href += '&siteId=' + link.site
if (!link.otherArticleId) href = this.$router.resolve(href).href
}
// 如果是站内/站外链接,并且选择的是文章,则要获取当前长页名称传到文章详情里,面包屑点返回的时候需要返回到当前长页
if ((type === 1 && link.articleId) || (type === 3 && link.otherArticleId)) {
this.$post(this.api.findColumn, Util.rsa(this.id)).then(({ data }) => {
2 years ago
href = this.$router.resolve(href + '&id=' + this.id + '&columnName=' + data.columnName + '&path=' + this.$route.path.replace('/', '')).href
this.toHref(link.isOpen, href)
}).catch(res => { })
} else {
this.toHref(link.isOpen, href)
}
},
// 跳转地址
toHref (isOpen, href) {
if (isOpen) {
var userAgent = navigator.userAgent;
var isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent);
if (isSafari) {
window.location.href = href
} else {
window.open(href)
}
} else {
window.location.href = href
}
},
2 years ago
},
2 years ago
};
</script>
<style lang="scss" scoped>
2 years ago
.footer {
9 months ago
z-index: 2;
position: relative;
background-color: #091733;
border-top: 10px solid #2870ff;
.logo {
width: 180px;
}
.info {
display: flex;
justify-content: space-between;
align-items: center;
width: 1200px;
padding: 20px 0;
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;
1 year ago
}
9 months ago
.qrcode {
width: 100px;
height: 100px;
margin-bottom: 10px;
}
}
.copyright {
padding: 16px 0;
font-size: 14px;
color: #c3c3c3;
text-align: center;
background-image: linear-gradient(to bottom, rgb(16, 41, 93), rgb(10, 24, 54) 40%);
}
}
@media (max-width: 1200px) {
.footer {
2 years ago
.info {
9 months ago
flex-direction: column;
width: 90%;
2 years ago
}
9 months ago
1 year ago
.left {
9 months ago
flex-direction: column;
margin-bottom: 20px;
2 years ago
}
9 months ago
1 year ago
.texts {
9 months ago
border-left: 0;
}
9 months ago
1 year ago
.copyright {
9 months ago
padding: 16px;
}
9 months ago
}
}
2 years ago
</style>