Browse Source

修改logo

zs 10 months ago
parent
commit
11f781d12f

+ 3 - 3
src/App.vue

@@ -6,9 +6,9 @@ import AdaptiveView from '@/components/AdaptiveView/index.vue'
 
 <template>
   <a-config-provider :locale="zhCN">
-    <AdaptiveView>
-      <router-view />
-    </AdaptiveView>
+    <!-- <AdaptiveView> -->
+    <router-view />
+    <!-- </AdaptiveView> -->
   </a-config-provider>
 </template>
 

+ 1 - 1
src/components/AdaptiveView/index.vue

@@ -9,7 +9,7 @@ export default {
   props: {
     width: {
       type: String,
-      default: window.innerWidth
+      default: window.innerWidth - 17
     },
     height: {
       type: String,

+ 53 - 33
src/layout/index.vue

@@ -4,18 +4,12 @@
       <div class="w_1200">
         <el-row :gutter="20" align="middle">
           <el-col :span="12" class="top_1">
-            <el-image class="images" :src="logoUrl" fit="fill" />
-            <!-- <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>
-            </div> -->
+              <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>
@@ -39,25 +33,22 @@
       </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>
@@ -104,7 +95,7 @@
 // 图片引入
 import logoUrl from '/images/logo-jilin.png'
 import logoBottom from '/images/logo-jilinbai.png'
-import { footInfo, menuList } from '@/layout/site'
+import { siteInfo, footInfo, menuList } from '@/layout/site'
 // 接口
 import { TagsStore } from '@/store/api/system/tags'
 const store = TagsStore()
@@ -112,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)
@@ -128,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({})
@@ -137,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 })
 }
 // 登录|注册
@@ -159,6 +156,19 @@ 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()
@@ -257,6 +267,16 @@ provide('selectMenu', selectMenu)
     }
     .top_3 {
       margin: 5px 0 0 0;
+      .list {
+        padding: 10px 0;
+        .text {
+          padding: 10px;
+          font-family: Microsoft YaHei;
+          font-size: $global-font-size-18;
+          color: #333333;
+          cursor: pointer; /* 改变鼠标样式为手形 */
+        }
+      }
     }
   }
   .center {

+ 3 - 2
src/layout/site.js

@@ -5,8 +5,9 @@ import Code from '/images/code.jpg'
 // 网站基本设置
 export const siteInfo = {
   display: false,
-  zhTitle: '产学研用协同创新平台',
-  zhEnglish: 'Information Technology Incubation Platform',
+  zhTitle: '产学研用协同创新数字化平台',
+  zhEnglish:
+    'Collaborative Innovation Digital Platform for Industry University Research Application',
   zhBrief: '方寸心间 创新无限',
   logoUrl: logo,
   vkeyeoUrl: home

+ 1 - 1
src/views/help/index.vue

@@ -61,7 +61,7 @@ const $checkRes = inject('$checkRes')
 import { DesignStore } from '@/store/api/platform/design'
 const designStore = DesignStore()
 // 图片引入
-import map from '/images/map.jpg'
+import map from '/images/map.png'
 const route = useRoute()
 // 加载中
 const loading = ref(false)

+ 6 - 3
src/views/index/index.vue

@@ -5,7 +5,11 @@
         <div class="one">
           <el-row>
             <el-col :span="14" class="left">
-              <el-image class="images" :src="logoUrl" fit="fill" />
+              <el-image class="image" :src="siteInfo.logoUrl" fit="fill" />
+              <div class="content">
+                <text class="title">{{ siteInfo.zhTitle }}</text>
+                <!-- <text class="english">{{ siteInfo.zhBrief }}</text> -->
+              </div>
             </el-col>
             <el-col :span="10" class="right">
               <el-row align="middle">
@@ -77,7 +81,6 @@
 
 <script setup>
 // 基础
-import logoUrl from '/images/logo-jilin.png'
 import homeBg from '/images/homebg.png'
 
 import { siteInfo, footInfo, menuList } from '@/layout/site'
@@ -222,7 +225,7 @@ const toLogout = () => {
     }
     .two_2 {
       position: absolute;
-      left: 41%;
+      left: 38%;
       text {
         font-size: 22px;
         color: #ffffff;