|
@@ -1,24 +1,19 @@
|
|
|
<template>
|
|
|
- <div class="common-layout">
|
|
|
+ <div class="layout">
|
|
|
<div class="top">
|
|
|
<div class="w_1200">
|
|
|
<el-row :gutter="20" align="middle">
|
|
|
<el-col :span="12" class="top_1">
|
|
|
- <el-image
|
|
|
- class="image"
|
|
|
- v-if="configInfo && configInfo.logoUrl && configInfo.logoUrl.length > 0"
|
|
|
- :src="configInfo.logoUrl[0].url"
|
|
|
- fit="fill"
|
|
|
- />
|
|
|
- <el-image class="image" v-else :src="siteInfo.logoUrl" fit="fill" />
|
|
|
+ <!-- <el-image class="images" :src="logoUrl" fit="fill" /> -->
|
|
|
+ <el-image class="image" :src="siteInfo.logoUrl" fit="fill" />
|
|
|
<div class="content">
|
|
|
- <text class="title">{{ configInfo.zhTitle || siteInfo.zhTitle }}</text>
|
|
|
- <text class="english">{{ siteInfo.zhBrief }}</text>
|
|
|
+ <text class="title">{{ siteInfo.zhTitle }}</text>
|
|
|
+ <!-- <text class="english">{{ siteInfo.zhBrief }}</text> -->
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="12" v-if="user && user.id" class="top_2">
|
|
|
<el-dropdown>
|
|
|
- <el-button size="small" :icon="User" type="primary">
|
|
|
+ <el-button size="medium" :icon="User" type="primary">
|
|
|
{{ user.nick_name || '游客' }}
|
|
|
</el-button>
|
|
|
<template #dropdown>
|
|
@@ -31,32 +26,29 @@
|
|
|
</el-dropdown>
|
|
|
</el-col>
|
|
|
<el-col :span="12" v-else class="top_2">
|
|
|
- <el-button @click="toLogin(2)" type="primary" size="small">注册</el-button>
|
|
|
- <el-button @click="toLogin(1)" type="primary" size="small">登录</el-button>
|
|
|
+ <el-button @click="toLogin(2)" type="primary" size="medium">注册</el-button>
|
|
|
+ <el-button @click="toLogin(1)" type="primary" size="medium">登录</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="w_1200">
|
|
|
<el-col :span="24" class="top_3">
|
|
|
- <el-menu :default-active="current" mode="horizontal" @select="selectMenu">
|
|
|
- <template v-for="item in data" :key="item._id">
|
|
|
- <template v-if="item.type === '0'">
|
|
|
- <el-sub-menu :index="item._id" :class="[current == item.href ? 'current' : '']">
|
|
|
- <template #title>
|
|
|
- <span @click="selectMenu(item.href)">{{ item.title }}</span>
|
|
|
- </template>
|
|
|
- <el-menu-item v-for="tag in item.children" :key="tag._id" :index="tag.href">
|
|
|
- <template v-slot:default>
|
|
|
- {{ tag.title }}
|
|
|
- </template>
|
|
|
- </el-menu-item>
|
|
|
- </el-sub-menu>
|
|
|
- </template>
|
|
|
- <template v-else-if="item.type === '1'">
|
|
|
- <el-menu-item :index="item.href"> {{ item.title }}</el-menu-item>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </el-menu>
|
|
|
+ <el-col :span="24" class="list">
|
|
|
+ <span
|
|
|
+ class="text"
|
|
|
+ v-for="(item, index) in data"
|
|
|
+ :key="index"
|
|
|
+ @click="selectMenu(item.route)"
|
|
|
+ :style="{
|
|
|
+ backgroundColor: item.hover ? '#2374ff' : 'transparent',
|
|
|
+ color: item.hover ? '#ffffff' : ''
|
|
|
+ }"
|
|
|
+ @mouseover="handleMouseOver(index)"
|
|
|
+ @mouseleave="handleMouseLeave(index)"
|
|
|
+ >
|
|
|
+ {{ item.title }}
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -67,57 +59,42 @@
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
<div class="w_1200 footflex">
|
|
|
- <el-image
|
|
|
- class="image"
|
|
|
- v-if="foot && foot.Unit && foot.Unit.length > 0"
|
|
|
- :src="foot.Unit[0].url"
|
|
|
- fit="fill"
|
|
|
- />
|
|
|
- <el-image class="image" v-else :src="footInfo.Unit" fit="fill" />
|
|
|
- <el-col :span="12" class="foot_1">
|
|
|
- <div class="footTitle">
|
|
|
- <span>业务洽谈:{{ foot.Phone || footInfo.Phone }}</span>
|
|
|
-
|
|
|
- <span>企业邮箱:{{ foot.Email || footInfo.Email }}</span>
|
|
|
- </div>
|
|
|
- <div class="footTitle">地 址:{{ foot.Address || footInfo.Address }}</div>
|
|
|
- <div class="footTitle">版权所有:{{ foot.Copyright || footInfo.Copyright }}</div>
|
|
|
- <div class="footTitle">技术支持:{{ foot.Company || footInfo.Company }}</div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="3" class="foot_2">
|
|
|
- <div class="footTop">关于我们</div>
|
|
|
- <div class="footTitle footflex1">
|
|
|
- <span class="footSpan" @click="toHelp('1')">关于我们</span>
|
|
|
- <span class="footSpan" @click="toHelp('3')">联系我们</span>
|
|
|
- <!-- <span class="footSpan" @click="toHelp('2')">意见反馈</span> -->
|
|
|
- </div>
|
|
|
- <!-- <div class="footTitle footflex1">
|
|
|
- <span class="footSpan" @click="toHelp('3')">联系我们</span>
|
|
|
- <span class="footSpan" @click="toHelp('4')">法律条款</span>
|
|
|
- </div> -->
|
|
|
- </el-col>
|
|
|
- <el-col :span="4" class="foot_3 footflex">
|
|
|
- <el-image
|
|
|
- class="image"
|
|
|
- v-if="foot && foot.Code && foot.Code.length > 0"
|
|
|
- :src="foot.Code[0].url"
|
|
|
- fit="fill"
|
|
|
- />
|
|
|
- <el-image class="image" v-else :src="footInfo.Code" fit="fill" />
|
|
|
- <el-image
|
|
|
- class="image"
|
|
|
- v-if="foot && foot.Code && foot.Code.length > 0"
|
|
|
- :src="foot.Code[0].url"
|
|
|
- fit="fill"
|
|
|
- />
|
|
|
- <el-image class="image" v-else :src="footInfo.Code" fit="fill" />
|
|
|
- </el-col>
|
|
|
+ <!-- <el-row :span="24" class="footflex_1">
|
|
|
+ <el-col :span="2" class="left"> 友情链接</el-col>
|
|
|
+ <el-col :span="22" class="right">
|
|
|
+ <span v-for="(item, index) in footInfo.linkList" :key="index" @click="toLink(item)">{{
|
|
|
+ item.name
|
|
|
+ }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-row> -->
|
|
|
+ <el-row :span="24" class="footflex_2">
|
|
|
+ <el-col :span="21" class="left">
|
|
|
+ <el-col :span="24" class="left_1">
|
|
|
+ <el-image class="images" :src="logoBottom" fit="fill" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="left_2"> 电话:{{ footInfo.Phone }} </el-col>
|
|
|
+ <el-col :span="24" class="left_2"> 邮箱:{{ footInfo.Email }} </el-col>
|
|
|
+ <el-col :span="24" class="left_2"> 地址:{{ footInfo.Address }} </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="3" class="right">
|
|
|
+ <el-col :span="24" class="right_1">
|
|
|
+ <el-image class="images" :src="footInfo.Code" fit="fill" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="right_2" @click="toHelp('1')">关于我们</el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :span="24" class="footflex_3">
|
|
|
+ {{ footInfo.Copyright }}
|
|
|
+ </el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+// 图片引入
|
|
|
+import logoUrl from '/images/logo-jilin.png'
|
|
|
+import logoBottom from '/images/logo-jilinbai.png'
|
|
|
import { siteInfo, footInfo, menuList } from '@/layout/site'
|
|
|
// 接口
|
|
|
import { TagsStore } from '@/store/api/system/tags'
|
|
@@ -126,7 +103,6 @@ import { DesignStore } from '@/store/api/platform/design'
|
|
|
const designStore = DesignStore()
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
-const current = ref(route.name || 'one')
|
|
|
import { UserStore } from '@/store/user'
|
|
|
const userStore = UserStore()
|
|
|
const user = computed(() => userStore.user)
|
|
@@ -142,6 +118,10 @@ const search = async () => {
|
|
|
const res = await store.query({ is_use: '0' })
|
|
|
// if (res.errcode == '0' && res.total > 0) data.value = res.data
|
|
|
// else data.value = menuList
|
|
|
+ for (const val of menuList) {
|
|
|
+ if (route.name === val.route) val.hover = true
|
|
|
+ else val.hover = false
|
|
|
+ }
|
|
|
data.value = menuList
|
|
|
// 基础设置
|
|
|
const result = await designStore.query({})
|
|
@@ -151,7 +131,10 @@ const search = async () => {
|
|
|
}
|
|
|
}
|
|
|
const selectMenu = (item, query) => {
|
|
|
- current.value = item
|
|
|
+ for (const val of data.value) {
|
|
|
+ if (route.name === val.route) val.hover = true
|
|
|
+ else val.hover = false
|
|
|
+ }
|
|
|
router.push({ path: `/${item}`, query })
|
|
|
}
|
|
|
// 登录|注册
|
|
@@ -173,11 +156,27 @@ const toCommon = (type) => {
|
|
|
else if (type == '2') router.push('/center')
|
|
|
else if (type == '3') router.push('/sign')
|
|
|
}
|
|
|
+const handleMouseOver = (index) => {
|
|
|
+ data.value[index].hover = true
|
|
|
+}
|
|
|
+const handleMouseLeave = (index) => {
|
|
|
+ data.value[index].hover = false
|
|
|
+ const arr = data.value.every((i) => i.hover === false)
|
|
|
+ if (arr) {
|
|
|
+ for (const val of data.value) {
|
|
|
+ if (route.name === val.route) val.hover = true
|
|
|
+ else val.hover = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
// 退出登录
|
|
|
const toLogout = () => {
|
|
|
userStore.logOut()
|
|
|
router.push('/login')
|
|
|
}
|
|
|
+const toLink = (item) => {
|
|
|
+ window.open(item.href, '_blank') // 在新标签页中打开URL
|
|
|
+}
|
|
|
watch(
|
|
|
route,
|
|
|
(newVal) => {
|
|
@@ -195,10 +194,11 @@ provide('selectMenu', selectMenu)
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-.common-layout {
|
|
|
+.layout {
|
|
|
.top {
|
|
|
position: sticky;
|
|
|
top: 0;
|
|
|
+ padding: 5px 0;
|
|
|
z-index: 100;
|
|
|
background: #ffffff;
|
|
|
|
|
@@ -220,19 +220,23 @@ provide('selectMenu', selectMenu)
|
|
|
width: 40px;
|
|
|
margin: 0 5px 0 0;
|
|
|
}
|
|
|
+ .images {
|
|
|
+ height: auto;
|
|
|
+ width: 335px;
|
|
|
+ }
|
|
|
|
|
|
.content {
|
|
|
margin: 0 0 0 5px;
|
|
|
|
|
|
.title {
|
|
|
margin: 0 0 5px 0;
|
|
|
- font-size: 20px;
|
|
|
+ font-size: $global-font-size-22;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.english {
|
|
|
margin: 0 0 0 5px;
|
|
|
- font-size: 12px;
|
|
|
+ font-size: $global-font-size-14;
|
|
|
opacity: 0.8;
|
|
|
color: #1c66e7;
|
|
|
}
|
|
@@ -263,6 +267,17 @@ provide('selectMenu', selectMenu)
|
|
|
}
|
|
|
.top_3 {
|
|
|
margin: 5px 0 0 0;
|
|
|
+ .list {
|
|
|
+ padding: 10px 0;
|
|
|
+ .text {
|
|
|
+ margin: 0 2px 0 0;
|
|
|
+ padding: 10px;
|
|
|
+ font-family: Microsoft YaHei;
|
|
|
+ font-size: $global-font-size-18;
|
|
|
+ color: #333333;
|
|
|
+ cursor: pointer; /* 改变鼠标样式为手形 */
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.center {
|
|
@@ -271,7 +286,7 @@ provide('selectMenu', selectMenu)
|
|
|
.bottom {
|
|
|
width: 100%;
|
|
|
padding: 7px 0;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: $global-font-size-20;
|
|
|
background-color: #2e3546;
|
|
|
color: #f0f2f5;
|
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
|
@@ -295,21 +310,75 @@ provide('selectMenu', selectMenu)
|
|
|
}
|
|
|
|
|
|
.footTop {
|
|
|
- font-size: 18px;
|
|
|
+ font-size: $global-font-size-20;
|
|
|
margin-bottom: 12px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.footflex {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-evenly;
|
|
|
- }
|
|
|
+ .footflex_1 {
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-end;
|
|
|
+ padding: 30px 0;
|
|
|
+ border-bottom: 1px solid #444444;
|
|
|
+ .left {
|
|
|
+ font-size: $global-font-size-20;
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ color: #cccccc;
|
|
|
+ font-family: microsoft yahei;
|
|
|
+ font-size: $global-font-size-17;
|
|
|
+ font-weight: normal;
|
|
|
+ text-decoration: none;
|
|
|
+ span {
|
|
|
+ margin-right: 50px;
|
|
|
+ }
|
|
|
+ span:hover {
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .footflex_2 {
|
|
|
+ display: flex;
|
|
|
+ padding: 10px 0;
|
|
|
+ border-bottom: 1px solid #444444;
|
|
|
+ .left {
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
+ color: rgb(204, 204, 204);
|
|
|
+ font-size: $global-font-size-18;
|
|
|
+ .left_2 {
|
|
|
+ margin: 5px 0 0 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ text-align: center;
|
|
|
|
|
|
- .footflex1 {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
+ .right_1 {
|
|
|
+ .image {
|
|
|
+ width: 130px;
|
|
|
+ height: 130px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right_2 {
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
+ font-size: $global-font-size-18;
|
|
|
+ color: rgb(204, 204, 204);
|
|
|
+ }
|
|
|
+ .right_2:hover {
|
|
|
+ color: rgb(255, 255, 255);
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .footflex_3 {
|
|
|
+ padding: 10px 0;
|
|
|
+ font-family: 'Microsoft YaHei';
|
|
|
+ font-size: $global-font-size-18;
|
|
|
+ color: rgb(204, 204, 204);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|