更新前端相关
This commit is contained in:
parent
fed2bd63c7
commit
e9a051520e
@ -10,4 +10,10 @@ export const getHeadMenu = async () => {
|
|||||||
export const getOnePageByPath = async (path: string) => {
|
export const getOnePageByPath = async (path: string) => {
|
||||||
const response = await service.get(`index/onepage/${encodeURIComponent(path)}`)
|
const response = await service.get(`index/onepage/${encodeURIComponent(path)}`)
|
||||||
return response.data
|
return response.data
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取前端底部数据
|
||||||
|
export const getFooterData = async () => {
|
||||||
|
const response = await service.get('index/footerdata')
|
||||||
|
return response.data
|
||||||
}
|
}
|
||||||
BIN
src/assets/images/logo-w.png
Normal file
BIN
src/assets/images/logo-w.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 6.2 KiB |
@ -7,62 +7,55 @@
|
|||||||
<div class="footer-main">
|
<div class="footer-main">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="footer-column">
|
<div class="footer-column">
|
||||||
<div class="title">关于美天</div>
|
<div class="title">YUNZER</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>企业概况</li>
|
<li>关于我们</li>
|
||||||
<li>公司证件</li>
|
|
||||||
<li>站点资讯</li>
|
<li>站点资讯</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer-column">
|
||||||
|
<div class="title">资源</div>
|
||||||
|
<ul>
|
||||||
|
<li>办公资源</li>
|
||||||
|
<li>游戏下载</li>
|
||||||
|
<li>程序下载</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="footer-column">
|
||||||
|
<div class="title">联系我们</div>
|
||||||
|
<ul>
|
||||||
<li>加入我们</li>
|
<li>加入我们</li>
|
||||||
<li>联系我们</li>
|
<li>联系我们</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-column">
|
<div class="footer-column">
|
||||||
<div class="title">产品中心</div>
|
<div class="title">法律信息</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>金蝶·云星空</li>
|
<li>隐私</li>
|
||||||
<li>金蝶·KIS Cloud</li>
|
<li>条款</li>
|
||||||
<li>金蝶·EAS Cloud</li>
|
<li>Cookie</li>
|
||||||
<li>警务保障系统</li>
|
|
||||||
<li>义警联盟平台</li>
|
|
||||||
<li>商超进销存系统</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer-column">
|
|
||||||
<div class="title">解决方案</div>
|
|
||||||
<ul>
|
|
||||||
<li>财务云</li>
|
|
||||||
<li>供应链云</li>
|
|
||||||
<li>全渠道云</li>
|
|
||||||
<li>制造云</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer-column">
|
|
||||||
<div class="title">服务支持</div>
|
|
||||||
<ul>
|
|
||||||
<li>常见问题</li>
|
|
||||||
<li>软件下载</li>
|
|
||||||
<li>投诉与建议</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer-column">
|
|
||||||
<div class="title">商务合作</div>
|
|
||||||
<ul>
|
|
||||||
<li>商务合作</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
|
<div class="logo-w">
|
||||||
|
<img
|
||||||
|
v-if="footerData && footerData.logow"
|
||||||
|
:src="getenvurl(footerData.logow)"
|
||||||
|
alt="logo"
|
||||||
|
>
|
||||||
|
</div>
|
||||||
<div class="footer-column">
|
<div class="footer-column">
|
||||||
<div class="title">订阅我们</div>
|
<div class="title">订阅我们</div>
|
||||||
<div>第一时间了解我们的最新信息</div>
|
<div>第一时间了解我们的最新信息</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-bottom">
|
<div class="footer-bottom" v-if="footerData" >
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<span>美天,为您用心多一点</span>
|
<span class="mr-3">{{ footerData.description }}</span>
|
||||||
<span>江苏美天智能科技有限公司·所有版权©2019-2026</span>
|
<span class="mr-3">{{ footerData.companyname }} {{ footerData.copyright }}</span>
|
||||||
<span>备案号:苏ICP备2020053493号</span>
|
<span class="mr-3"><a href="https://beian.miit.gov.cn/" target="_blank">{{ footerData.icp }}</a></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
<span>法律声明 | 隐私条款</span>
|
<span>法律声明 | 隐私条款</span>
|
||||||
@ -74,8 +67,23 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onUnmounted } from 'vue'
|
import { ref, onMounted, onUnmounted } from 'vue'
|
||||||
|
import { getFooterData } from '@/api/index'
|
||||||
|
|
||||||
const showGototop = ref(false)
|
const showGototop = ref(false)
|
||||||
|
const footerData = ref<any | null>(null)
|
||||||
|
|
||||||
|
// 拼接接口地址(用于 logo 等静态资源)
|
||||||
|
const getenvurl = (url: string) => {
|
||||||
|
if (!url) return ''
|
||||||
|
// 已经是完整 http/https 地址,直接返回
|
||||||
|
if (/^https?:\/\//.test(url)) {
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
const base = import.meta.env.VITE_API_BASE_URL || ''
|
||||||
|
const normalizedBase = base.replace(/\/+$/, '')
|
||||||
|
const normalizedUrl = String(url).replace(/^\/+/, '')
|
||||||
|
return `${normalizedBase}/${normalizedUrl}`
|
||||||
|
}
|
||||||
|
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
showGototop.value = window.scrollY > 300
|
showGototop.value = window.scrollY > 300
|
||||||
@ -88,7 +96,26 @@ const goToTop = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取底部数据,并将数组结构转换为对象结构
|
||||||
|
const fetchFooterData = async () => {
|
||||||
|
const res = await getFooterData()
|
||||||
|
if (res.code === 200 && Array.isArray(res.data)) {
|
||||||
|
const map: Record<string, string> = {}
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
if (item && item.label) {
|
||||||
|
map[item.label] = item.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 用接口里的 sitename 当标题
|
||||||
|
if (map.sitename) {
|
||||||
|
document.title = map.sitename
|
||||||
|
}
|
||||||
|
footerData.value = map
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
fetchFooterData()
|
||||||
window.addEventListener('scroll', handleScroll)
|
window.addEventListener('scroll', handleScroll)
|
||||||
handleScroll()
|
handleScroll()
|
||||||
})
|
})
|
||||||
@ -101,7 +128,7 @@ onUnmounted(() => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.footer {
|
.footer {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: var(--tw-bg-opacity);
|
background-color: #161616;
|
||||||
color: var(--footer-color);
|
color: var(--footer-color);
|
||||||
font-size: var(--footer-size);
|
font-size: var(--footer-size);
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
@ -139,7 +166,8 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.footer-main {
|
.footer-main {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 40px 0;
|
margin: 0 auto;
|
||||||
|
padding: 2rem 0 5rem 0;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
@ -148,11 +176,23 @@ onUnmounted(() => {
|
|||||||
.footer-column {
|
.footer-column {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
|
|
||||||
|
li{
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
|
|
||||||
|
.logo-w{
|
||||||
|
margin-bottom: 20px;
|
||||||
|
img{
|
||||||
|
height: 45px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,12 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="maincontent">
|
<div class="maincontent">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="@/assets/images/logo.png" alt="Logo" />
|
<!-- <img src="@/assets/images/logo.png" alt="Logo" /> -->
|
||||||
|
<img
|
||||||
|
v-if="footerData && footerData.logo"
|
||||||
|
:src="getenvurl(footerData.logo)"
|
||||||
|
alt="logo"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<ul @mouseleave="handleMenuLeave">
|
<ul @mouseleave="handleMenuLeave">
|
||||||
@ -357,9 +362,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, onUnmounted } from 'vue'
|
import { ref, onMounted, onUnmounted } from 'vue'
|
||||||
import { getHeadMenu } from '@/api/index'
|
import { getHeadMenu,getFooterData } from '@/api/index'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 菜单数据
|
// 菜单数据
|
||||||
const menuItems = ref([])
|
const menuItems = ref([])
|
||||||
@ -393,6 +400,19 @@ const loadMenu = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 拼接接口地址(用于 logo 等静态资源)
|
||||||
|
const getenvurl = (url: string) => {
|
||||||
|
if (!url) return ''
|
||||||
|
// 已经是完整 http/https 地址,直接返回
|
||||||
|
if (/^https?:\/\//.test(url)) {
|
||||||
|
return url
|
||||||
|
}
|
||||||
|
const base = import.meta.env.VITE_API_BASE_URL || ''
|
||||||
|
const normalizedBase = base.replace(/\/+$/, '')
|
||||||
|
const normalizedUrl = String(url).replace(/^\/+/, '')
|
||||||
|
return `${normalizedBase}/${normalizedUrl}`
|
||||||
|
}
|
||||||
|
|
||||||
const activeMenu = ref(null)
|
const activeMenu = ref(null)
|
||||||
const activeCategory = ref(0)
|
const activeCategory = ref(0)
|
||||||
const showSearch = ref(false)
|
const showSearch = ref(false)
|
||||||
@ -400,6 +420,7 @@ const showLanguage = ref(false)
|
|||||||
const searchQuery = ref('')
|
const searchQuery = ref('')
|
||||||
const currentLanguage = ref('zh')
|
const currentLanguage = ref('zh')
|
||||||
const isScrolled = ref(false)
|
const isScrolled = ref(false)
|
||||||
|
const footerData = ref<any | null>(null)
|
||||||
let closeTimer = null
|
let closeTimer = null
|
||||||
|
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
@ -449,7 +470,22 @@ const handleExternalLink = (url) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取底部数据,并将数组结构转换为对象结构
|
||||||
|
const fetchFooterData = async () => {
|
||||||
|
const res = await getFooterData()
|
||||||
|
if (res.code === 200 && Array.isArray(res.data)) {
|
||||||
|
const map: Record<string, string> = {}
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
if (item && item.label) {
|
||||||
|
map[item.label] = item.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
footerData.value = map
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
fetchFooterData()
|
||||||
window.addEventListener('scroll', handleScroll)
|
window.addEventListener('scroll', handleScroll)
|
||||||
loadMenu() // 加载菜单数据
|
loadMenu() // 加载菜单数据
|
||||||
})
|
})
|
||||||
@ -504,7 +540,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.logo {
|
.logo {
|
||||||
img {
|
img {
|
||||||
max-width: 300px;
|
height: 45px;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user