mirror of
https://github.com/yangjian102621/geekai.git
synced 2026-04-21 02:24:32 +08:00
92 lines
2.0 KiB
Vue
92 lines
2.0 KiB
Vue
<template>
|
|
<div class="foot-container">
|
|
<div class="footer">
|
|
<div>
|
|
<span>{{ copyRight }}</span>
|
|
</div>
|
|
<div v-if="!license?.de_copy">
|
|
<a :href="gitURL" target="_blank">
|
|
{{ title }} -
|
|
{{ version }}
|
|
</a>
|
|
</div>
|
|
<div v-if="icp">
|
|
<a href="https://beian.miit.gov.cn" target="_blank">{{ icp }}</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script setup>
|
|
import { getLicenseInfo, getSystemInfo } from '@/store/cache'
|
|
import { showMessageError } from '@/utils/dialog'
|
|
import { ref } from 'vue'
|
|
|
|
const title = ref('')
|
|
const version = ref(import.meta.env.VITE_VERSION)
|
|
const gitURL = ref(import.meta.env.VITE_GITHUB_URL)
|
|
const copyRight = ref('')
|
|
const icp = ref('')
|
|
const license = ref({})
|
|
const props = defineProps({
|
|
textColor: {
|
|
type: String,
|
|
default: '#ffffff',
|
|
},
|
|
})
|
|
|
|
// 获取系统配置
|
|
getSystemInfo()
|
|
.then((res) => {
|
|
title.value = res.data.title ?? import.meta.env.VITE_TITLE
|
|
copyRight.value =
|
|
(res.data.copyright ? res.data.copyright : '极客学长') +
|
|
' © 2023 - ' +
|
|
new Date().getFullYear() +
|
|
' All rights reserved'
|
|
icp.value = res.data.icp
|
|
})
|
|
.catch((e) => {
|
|
showMessageError('获取系统配置失败:' + e.message)
|
|
})
|
|
|
|
getLicenseInfo()
|
|
.then((res) => {
|
|
license.value = res.data
|
|
})
|
|
.catch((e) => {
|
|
showMessageError('获取 License 失败:' + e.message)
|
|
})
|
|
</script>
|
|
|
|
<style scoped lang="stylus">
|
|
.foot-container {
|
|
position: fixed;
|
|
left: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
display flex;
|
|
justify-content center
|
|
background: var(--theme-bg);
|
|
margin-top -4px
|
|
|
|
.footer {
|
|
max-width 400px;
|
|
text-align center;
|
|
font-size 14px;
|
|
padding 20px;
|
|
width 100%
|
|
|
|
a {
|
|
color:var(--text-color)
|
|
|
|
&:hover {
|
|
text-decoration underline
|
|
}
|
|
}
|
|
span{
|
|
color:var(--text-color)
|
|
}
|
|
}
|
|
}
|
|
</style>
|