|
@@ -7,7 +7,7 @@ export default defineComponent({
|
|
|
})
|
|
|
</script>
|
|
|
<script setup lang="ts">
|
|
|
-import { defineComponent,nextTick, onMounted, provide, ref, watch } from 'vue'
|
|
|
+import { defineComponent, nextTick, onMounted, provide, ref, watch } from 'vue'
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import emitter from '@/util/eventBus'
|
|
|
import { message } from 'ant-design-vue';
|
|
@@ -15,13 +15,17 @@ const router = useRouter()
|
|
|
let nickName = ref<string>('')
|
|
|
let avatar = ref<string>('https://joeschmoe.io/api/v1/random')
|
|
|
let isTop = ref<boolean>(true)
|
|
|
-let activeIndex = ref<number>(0)
|
|
|
let menuList = ref(['首页', '优巨引擎官网', '文档中心', '管理中心'])
|
|
|
const container = ref()
|
|
|
let currentRouteName = ref()
|
|
|
let visible = ref<boolean>(false)
|
|
|
let isRouterAlive = ref<boolean>(true);
|
|
|
let showAgreement = ref<boolean>(false)
|
|
|
+let activeIndex = ref<number>(0)
|
|
|
+let index = localStorage.getItem('activeIndex')
|
|
|
+if (index) {
|
|
|
+ activeIndex.value = Number(index)
|
|
|
+}
|
|
|
const reload = () => {
|
|
|
isRouterAlive.value = false;
|
|
|
nextTick(() => {
|
|
@@ -70,7 +74,10 @@ const loginOut = () => {
|
|
|
}
|
|
|
const menu = (i: number) => {
|
|
|
let token = localStorage.getItem('token')
|
|
|
- activeIndex.value = i
|
|
|
+ if (i === 0 || i === 3) {
|
|
|
+ activeIndex.value = i
|
|
|
+ localStorage.setItem('activeIndex', String(i))
|
|
|
+ }
|
|
|
switch (i) {
|
|
|
case 0:
|
|
|
router.push('/')
|
|
@@ -105,7 +112,7 @@ const menu = (i: number) => {
|
|
|
<!-- 头部 -->
|
|
|
<a-layout-header
|
|
|
:class="['header', isTop ? '' : 'header-color', currentRouteName === 'login' ? 'login-header' : '']">
|
|
|
- <div class="head-content">
|
|
|
+ <div class="container">
|
|
|
<div class="left" @click="router.push('/')">
|
|
|
<img v-if="isTop" class="img" src="@/assets/images/1.png" alt="">
|
|
|
<img v-else class="img" src="@/assets/images/1-1.png" alt="">
|
|
@@ -159,6 +166,7 @@ const menu = (i: number) => {
|
|
|
</div>
|
|
|
</a-layout-footer>
|
|
|
</a-layout>
|
|
|
+ <!-- 客服、公众号 -->
|
|
|
<div class="fixed top-40vh right-20px">
|
|
|
<a-tooltip placement="left" color="white">
|
|
|
<template #title>
|
|
@@ -187,15 +195,16 @@ const menu = (i: number) => {
|
|
|
</div>
|
|
|
</a-tooltip>
|
|
|
</div>
|
|
|
- <a-modal centered v-model:visible="visible" ok-text="确认" cancel-text="取消" title="提示" @ok="loginOut">
|
|
|
- <p>此操作将退出当前登录用户, 是否继续?</p>
|
|
|
- </a-modal>
|
|
|
+ <!-- 开发者协议 -->
|
|
|
<a-modal centered v-model:visible="showAgreement" :footer="null" :width="900">
|
|
|
<DevelopAgreement></DevelopAgreement>
|
|
|
</a-modal>
|
|
|
+ <a-modal centered v-model:visible="visible" ok-text="确认" cancel-text="取消" title="提示" @ok="loginOut">
|
|
|
+ <p>此操作将退出当前登录用户, 是否继续?</p>
|
|
|
+ </a-modal>
|
|
|
</template>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
+<style lang="scss">
|
|
|
#app {
|
|
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
@@ -210,95 +219,64 @@ const menu = (i: number) => {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
- height: 60px;
|
|
|
- color: #FFFFFF;
|
|
|
- background: none;
|
|
|
+ height: $header-height !important;
|
|
|
+ color: #FFFFFF !important;
|
|
|
+ background: none !important;
|
|
|
+ padding: 0 !important;
|
|
|
z-index: 99;
|
|
|
|
|
|
- .head-content {
|
|
|
+ .left {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- width: 100%;
|
|
|
- min-width: 600px;
|
|
|
-
|
|
|
- .left {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .img {
|
|
|
- width: 30px;
|
|
|
- height: 30px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .name {
|
|
|
- font-size: 16px;
|
|
|
- font-weight: bold;
|
|
|
- cursor: pointer;
|
|
|
- margin-left: 20px;
|
|
|
- }
|
|
|
+ .img {
|
|
|
+ width: 40px;
|
|
|
+ height: 40px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
|
|
|
- .right {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .btn {
|
|
|
- font-size: 15px;
|
|
|
- margin-right: 40px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
-
|
|
|
- .active-btn {
|
|
|
- color: #0077EE;
|
|
|
- font-weight: bold;
|
|
|
- }
|
|
|
-
|
|
|
- .login {
|
|
|
- width: 80px;
|
|
|
- height: 32px;
|
|
|
- line-height: 32px;
|
|
|
- text-align: center;
|
|
|
- background: linear-gradient(141deg, #50A7FF 0%, #1B8DFF 100%);
|
|
|
- border-radius: 16px 16px 16px 16px;
|
|
|
- font-size: 14px;
|
|
|
- color: #FFFFFF;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
+ .name {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 20px;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
- @media (min-width: 544px) {
|
|
|
- .head-content {
|
|
|
- max-width: 576px;
|
|
|
- }
|
|
|
- }
|
|
|
+ .right {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- @media (min-width: 768px) {
|
|
|
- .head-content {
|
|
|
- max-width: 720px;
|
|
|
+ .btn {
|
|
|
+ font-size: 15px;
|
|
|
+ margin-right: 40px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- @media (min-width: 992px) {
|
|
|
- .head-content {
|
|
|
- max-width: 940px;
|
|
|
+ .active-btn {
|
|
|
+ color: #0077EE;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- @media (min-width: 1900px) {
|
|
|
- .head-content {
|
|
|
- max-width: 1500px;
|
|
|
+ .login {
|
|
|
+ width: 80px;
|
|
|
+ height: 32px;
|
|
|
+ line-height: 32px;
|
|
|
+ text-align: center;
|
|
|
+ background: linear-gradient(141deg, #50A7FF 0%, #1B8DFF 100%);
|
|
|
+ border-radius: 16px 16px 16px 16px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #FFFFFF;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-color {
|
|
|
- background-color: #ffffff;
|
|
|
+ background-color: #ffffff !important;
|
|
|
box-shadow: 0px 4px 4px rgb(198 198 198 / 25%);
|
|
|
- color: #222222;
|
|
|
+ color: #222222 !important;
|
|
|
}
|
|
|
|
|
|
.login-header {
|
|
@@ -308,19 +286,19 @@ const menu = (i: number) => {
|
|
|
}
|
|
|
|
|
|
.lb-container {
|
|
|
- min-height: calc(100vh - 80px);
|
|
|
+ min-height: calc(100vh - $footer-height);
|
|
|
background: white;
|
|
|
}
|
|
|
|
|
|
.footer {
|
|
|
- height: 80px;
|
|
|
- padding: 10px 0;
|
|
|
+ height: $footer-height;
|
|
|
+ padding: 10px 0 !important;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
justify-content: space-evenly;
|
|
|
- background: #252525;
|
|
|
- color: #FFFFFF;
|
|
|
+ background: #252525 !important;
|
|
|
+ color: #FFFFFF !important;
|
|
|
|
|
|
.name {
|
|
|
font-size: 18px;
|