百色农校

This commit is contained in:
2025-04-17 16:22:32 +08:00
parent fe348ae97b
commit 7078da29f2
35 changed files with 516 additions and 114 deletions

View File

@@ -1,14 +1,23 @@
<template>
<!-- 头部组件 -->
<div class="sm:p-0 px-4 shadow-sm fixed z-100 top-0 w-full bg-white">
<div class="shadow-sm fixed z-100 top-0 left-0 w-full bg-white">
<!-- 顶部通栏 -->
<TopBar />
<!-- 导航栏 -->
<div class="flex justify-between xl:w-screen-xl m-auto">
<el-space>
<Logo />
<Menu :data="navigations" />
</el-space>
<div class="flex justify-between clear-both hidden-sm-and-down">
<div class="flex flex-col w-full">
<div class="flex justify-between menu-bg w-full py-3">
<div class="xl:w-screen-xl m-auto flex justify-between">
<Logo />
<img src="https://gxbsnx.com/Temp/images/background/title_right.png" width="291" height="88" />
</div>
</div>
<div class="w-full bg-white">
<div class="xl:w-screen-xl m-auto">
<Menu :data="navigations" />
</div>
</div>
</div>
<Login />
</div>
</div>

View File

@@ -72,16 +72,6 @@
<el-menu-item v-else :index="`${index}`"><a :href="navTo(item)">{{ item.title }}</a></el-menu-item>
</template>
</el-menu>
<!-- <div v-if="setting.searchBtn" class="search-tools flex justify-center p-4 mt-5">-->
<!-- <el-input v-model="keywords" placeholder="请输入关键词..." :suffix-icon="Search" @change="onSearch"/>-->
<!-- </div>-->
<!-- <div v-if="setting.langBtn" class="lang flex justify-center text-center">-->
<!-- <el-space>-->
<!-- <a @click="onLang(`zh`)" class="text-sm text-gray-500">中文版</a>-->
<!-- <el-divider direction="vertical" />-->
<!-- <a @click="onLang(`en`)" class="text-sm text-gray-400">English</a>-->
<!-- </el-space>-->
<!-- </div>-->
</div>
</el-drawer>
</div>

View File

@@ -1,6 +1,6 @@
<template>
<nuxt-link to="/" class="flex items-center cursor-pointer gap-sm mr-7" v-if="website">
<el-image v-if="website.websiteLogo || logo?.value" :style="`${logo?.style}`" :src="logo?.value || website?.websiteLogo" class="rounded-sm rounded-sm sm:w-[158px] sm:h-[54px] h-[50px] py-1 sm:py-0"/>
<el-image v-if="website.websiteLogo || logo?.value" :style="`${logo?.style}`" :src="logo?.value || website?.websiteLogo" class="rounded-sm rounded-sm sm:w-[360px] sm:h-[80px] h-[80px] py-1 sm:py-0"/>
<h4 v-else class="text-gray-700 text-xl font-bold" :style="`${logo?.style}`">{{ website?.websiteName }}</h4>
</nuxt-link>
</template>

View File

@@ -1,28 +1,62 @@
<script setup lang="ts">
import {useConfigInfo} from "~/composables/configState";
import { Search } from '@element-plus/icons-vue'
import {useConfigInfo, useMenu} from "~/composables/configState";
import { Search,Message, Fold } from '@element-plus/icons-vue'
const config = useConfigInfo();
const keyword = ref<string>('');
const i18n = useI18n();
const navigations = useMenu();
const drawer = ref<boolean>(false);
const onSearch = () => {
window.location.href = `/${i18n.locale.value}/search/${keyword.value}`;
}
</script>
<template>
<div class=" bg-blue-50 text-gray-400 px-2 py-1" v-if="config.showTopBar == 'true'">
<div class="w1200 flex justify-between items-center">
<span>{{ config?.topWelcomeInfo }}</span>
<div class="head-bg bg-blue-50 text-gray-400 px-2">
<div class=" flex justify-between items-center xl:w-screen-xl m-auto sm:px-0 w-full">
<span class="text-white">{{ config?.topWelcomeInfo }}</span>
<div class="lang flex justify-center text-center items-center">
<el-space>
<div class="search">
<div class="fl mr-5">
<el-space size="large">
<a :href="`/zh?spm=zh_CN`" class="text-xs flex items-center hidden-sm-and-down"><el-icon color="#fff" size="16"><Message /></el-icon><span class="text-white px-1">校长信箱</span></a>
<a :href="`https://old.gxbsnx.com`" class="text-xs flex items-center hidden-sm-and-down"><el-icon color="#fff" size="16"><Message /></el-icon><span class="text-white px-1">旧版</span></a>
<div class="search mx-5 hidden-sm-and-down">
<div class="fl">
<el-input v-model="keyword" :placeholder="`${$t('searchKeywords')}...`" :suffix-icon="Search" @change="onSearch" />
</div>
</div>
<a :href="`/zh?spm=zh_CN`" class="text-sm"><span class="text-gray-500">中文版</span></a>
<el-divider direction="vertical" />
<a :href="`/en?spm=en_US`" class="text-sm"><span class="text-gray-500">English</span></a>
<!-- 移动端 -->
<div class="hidden-sm-and-up">
<div class="hidden-sm-and-up mx-5 sm:mx-0">
<div class="el-dropdown-link flex items-center" @click="drawer = true">
<el-icon color="white" :size="24"><Fold /></el-icon>
</div>
<el-drawer
v-model="drawer"
:size="290"
>
<div id="menu">
<el-menu
currentIndex="/product"
:unique-opened="true"
>
<template v-for="(item,index) in navigations" :key="index">
<el-sub-menu v-if="item?.children && item.children.length > 0" :index="`${index}`">
<template #title><span>{{ item.title }}</span></template>
<el-menu-item v-for="(sub,subIndex) in item.children" :index="`${subIndex}`">
<el-space>
<el-avatar v-if="sub.icon" :src="sub.icon" shape="square" size="small"></el-avatar>
<a :href="navTo(sub)">{{ sub.title }}</a>
</el-space>
</el-menu-item>
</el-sub-menu>
<el-menu-item v-else :index="`${index}`"><a :href="navTo(item)">{{ item.title }}</a></el-menu-item>
</template>
</el-menu>
</div>
</el-drawer>
</div>
</div>
</el-space>
</div>
</div>