粒子研究院前台前端

237 lines
7.1 KiB

2 years ago
<template>
1 year ago
<div class="footer">
<div class="info">
<div class="left">
<img class="logo"
src="@/assets/images/logo3.png"
alt="">
<div class="texts">
<div class="line">
<img class="icon"
src="@/assets/images/address.png"
2 years ago
alt="">
1 year ago
深圳市光明区新湖街道圳圆路268号3号楼
2 years ago
</div>
1 year ago
<div class="line">
<img class="icon"
src="@/assets/images/tel.png"
alt="">
0755-21096000
</div>
<div class="line">
<img class="icon"
src="@/assets/images/mail.png"
alt="">
gad@mail.iasf.ac.cn
2 years ago
</div>
2 years ago
</div>
</div>
1 year ago
<div class="qrcodes">
<div class="item">
<img class="qrcode"
src="@/assets/images/qrcode.png"
2 years ago
alt="">
1 year ago
<p class="text">官方公众号</p>
2 years ago
</div>
1 year ago
<div class="item">
<img class="qrcode"
src="@/assets/images/qrcode.png"
2 years ago
alt="">
1 year ago
<p class="text">官方微信</p>
2 years ago
</div>
</div>
</div>
1 year ago
<div class="copyright">Copyright ©深圳综合粒子设施研究院 粤ICP备2020131940号 粤公安网34565432456765432号</div>
2 years ago
</div>
2 years ago
</template>
<script>
2 years ago
import mixins from '@/mixins/article'
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, {
siteId: this.$route.query.siteId || this.$store.state.content.site,
2 years ago
columnName: '',
templateId: '',
2 years ago
typeId: '',
isSort: 1
2 years ago
}).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']}?columnId=${this.$route.query.id}`).then(({ data }) => {
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}?id=${link.articleId}`)
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}?id=${link.otherArticleId}`)
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}?id=${this.id}`).then(({ data }) => {
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 {
z-index: 2;
2 years ago
background-color: #091733;
1 year ago
border-top: 10px solid #2870ff;
.logo {
width: 180px;
}
2 years ago
.info {
display: flex;
1 year ago
justify-content: space-between;
align-items: center;
width: 1200px;
padding: 20px 0;
2 years ago
margin: 0 auto;
1 year ago
color: #fff;
2 years ago
}
1 year ago
.left {
display: inline-flex;
2 years ago
align-items: center;
2 years ago
}
1 year ago
.texts {
padding: 30px;
margin-left: 20px;
border-left: 2px solid #ccc;
2 years ago
.line {
display: flex;
align-items: center;
1 year ago
margin-bottom: 10px;
font-size: 14px;
2 years ago
color: #fff;
1 year ago
&:last-child {
margin-bottom: 0;
}
2 years ago
img {
margin-right: 8px;
}
}
2 years ago
}
1 year ago
.qrcodes {
display: flex;
justify-content: center;
2 years ago
text-align: center;
1 year ago
font-size: 12px;
.item {
margin-right: 15px;
}
.qrcode {
width: 100px;
height: 100px;
margin-bottom: 10px;
2 years ago
}
}
1 year ago
.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%);
}
2 years ago
}
2 years ago
</style>