tuanshiwei-web/components/AppHeader.vue

217 lines
7.0 KiB
Vue
Raw Normal View History

2025-05-24 09:12:30 +08:00
<template>
2025-07-08 15:01:30 +08:00
<!-- 左边导航栏 -->
<div class="bgimg">
<div class="pc-nav">
2025-07-08 15:01:30 +08:00
<div class="pc-nav-item" @click="gotoList(1)">
2025-07-08 15:01:30 +08:00
<img :src="crrent == 1 ? '/img/index/home1.png' : '/img/index/home.png'" alt=""></img>
<span :class="['span', { 'active': crrent == 1 }]">官网首页</span>
<img v-if="crrent == 1" src="/img/index/arrow.png" alt=""
style="width: 9px;height: 12px;margin-left: 10px;">
2025-05-24 09:12:30 +08:00
</div>
2025-07-08 15:01:30 +08:00
<div class="pc-nav-item" @click="gotoList(2)">
<img :src="crrent == 2 ? '/img/index/aboutus1.png' : '/img/index/aboutus.png'" alt=""></img>
<span :class="['span', { 'active': crrent == 2 }]">组织机构</span>
<img v-if="crrent == 2" src="/img/index/arrow.png" alt=""
style="width: 9px;height: 12px;margin-left: 10px;">
2025-05-24 09:12:30 +08:00
</div>
<div class="pc-nav-item" @click="gotoList(3)">
2025-07-08 15:01:30 +08:00
<img :src="crrent == 3 ? '/img/index/news1.png' : '/img/index/news.png'" alt=""></img>
<span :class="['span', { 'active': crrent == 3 }]">新闻动态</span>
<img v-if="crrent == 3" src="/img/index/arrow.png" alt=""
style="width: 9px;height: 12px;margin-left: 10px;">
</div>
<div class="pc-nav-item" @click="gotoList(4)">
2025-07-08 15:01:30 +08:00
<img :src="crrent == 4 ? '/img/index/ly1.png' : '/img/index/ly.png'" alt=""></img>
<span :class="['span', { 'active': crrent == 4 }]">青春洛阳</span>
<img v-if="crrent == 4" src="/img/index/arrow.png" alt=""
style="width: 9px;height: 12px;margin-left: 10px;">
</div>
<div class="pc-nav-item" @click="gotoList(5)">
2025-07-08 15:01:30 +08:00
<img :src="crrent == 5 ? '/img/index/news1.png' : '/img/index/news.png'" alt=""></img>
<span :class="['span', { 'active': crrent == 5 }]">服务青年</span>
<img v-if="crrent == 5" src="/img/index/arrow.png" alt=""
style="width: 9px;height: 12px;margin-left: 10px;">
</div>
2025-07-01 18:31:19 +08:00
<div class="pc-nav-item" @click="gotoList(6)">
2025-07-08 15:01:30 +08:00
<img :src="crrent == 6 ? '/img/index/message1.png' : '/img/index/message.png'" alt=""></img>
<span :class="['span', { 'active': crrent == 6 }]">信息公开</span>
<img v-if="crrent == 6" src="/img/index/arrow.png" alt=""
style="width: 9px;height: 12px;margin-left: 10px;">
2025-07-01 18:31:19 +08:00
</div>
<div class="pc-nav-item" @click="gotoList(7)">
2025-07-08 15:01:30 +08:00
<img :src="crrent == 7 ? '/img/index/tt1.png' : '/img/index/tt.png'" alt=""></img>
<span :class="['span', { 'active': crrent == 7 }]">团团留言板</span>
<img v-if="crrent == 7" src="/img/index/arrow.png" alt=""
style="width: 9px;height: 12px;margin-left: 10px;">
2025-07-01 18:31:19 +08:00
</div>
<!-- <div class="pc-nav-item" @click="gotoList(8)">
<img :src="crrent==8?'/img/index/gx1.png':'/img/index/gx.png'" alt=""></img>
<span :class="['span',{'active': crrent==8}]">团关系转接</span>
<img v-if="crrent==8" src="/img/index/arrow.png" alt="" style="width: 9px;height: 12px;margin-left: 10px;">
</div> -->
</div>
<div class="line_h"></div>
2025-07-01 18:31:19 +08:00
<!-- <div class="goback" @click="goBack">返回首页</div> -->
<div style="margin-top: 50px;margin-left: 40px;">
<div class="box_1" id='assist-open'>无障碍阅读</div>
2025-07-01 18:31:19 +08:00
<!-- <div class="box_2" @click="openOldMode">{{ isOld ? '退出适老模式' : '进入适老模式' }}</div> -->
2025-05-24 09:12:30 +08:00
</div>
2025-07-08 15:01:30 +08:00
<div style="margin-top: 50px;margin-left: 35px;">
<iframe allowtransparency="true" frameborder="0" width="220" height="28" scrolling="no"
src="//tianqi.2345.com/plugin/widget/index.htm?s=3&z=1&t=0&v=0&d=1&bd=0&k=000000&f=ffffff&ltf=ffffff&htf=ffffff&q=0&e=0&a=0&c=57073&w=200&h=28&align=left"></iframe>
</div>
</div>
2025-05-24 09:12:30 +08:00
</template>
<script lang="ts" setup>
2025-07-08 15:01:30 +08:00
import { ref, defineEmits, defineProps } from 'vue'
2025-05-30 14:30:11 +08:00
import '@/assets/assist/assist-entry.js'
2025-07-08 15:01:30 +08:00
const router = useRouter();
2025-05-27 18:33:40 +08:00
const props = defineProps({
2025-07-08 15:01:30 +08:00
crrentNum: Number,
isOld: Boolean
2025-05-27 18:33:40 +08:00
});
const crrent = ref(0);
2025-05-27 18:33:40 +08:00
const emit = defineEmits(['crrentTop'])
2025-05-27 09:02:43 +08:00
const goBack = () => {
2025-07-08 15:01:30 +08:00
if (router.currentRoute.value.path != '/') {
window.open(`/`, '_blank');
}
2025-07-08 15:01:30 +08:00
emit('crrentTop', 0)
2025-05-27 09:02:43 +08:00
}
2025-05-24 09:12:30 +08:00
2025-05-30 14:30:11 +08:00
const openOldMode = () => {
emit('openOldMode')
}
2025-07-08 15:01:30 +08:00
const gotoList = (index: number) => {
console.log(router.currentRoute);
2025-07-08 15:01:30 +08:00
if (router.currentRoute.value.path != '/') {
window.open(`/`, '_blank');
2025-07-08 15:01:30 +08:00
localStorage.setItem('index_detail', index)
}
2025-05-27 18:33:40 +08:00
crrent.value = index
2025-07-08 15:01:30 +08:00
emit('crrentTop', index)
2025-05-27 09:02:43 +08:00
}
2025-05-27 18:33:40 +08:00
//更新当前索引值
onUpdated(() => {
crrent.value = props.crrentNum;
})
onMounted(() => {
crrent.value = props.crrentNum;
})
2025-05-24 09:12:30 +08:00
</script>
<style lang="scss" scoped>
@import '@/assets/index.scss';
2025-07-08 15:01:30 +08:00
.pc-nav {
margin-left: 60px;
margin-top: 80px;
text-align: center;
}
.bgimg {
2025-05-24 09:12:30 +08:00
width: 350px;
height: 100vh;
background-image: url('/img/index/leftHead.png');
background-size: 100% 100%;
position: absolute;
z-index: 1000;
2025-07-08 15:01:30 +08:00
.line_h {
width: 220px;
height: 1px;
background: #FFFFFF;
opacity: 0.2;
margin-left: 40px;
}
.goback {
width: 72px;
height: 17px;
font-family: Microsoft YaHei UI;
font-weight: 400;
font-size: 18px;
color: #FFFFFF;
margin-left: 114px;
margin-top: 20px;
cursor: pointer;
}
.box_1 {
width: 200px;
height: 58px;
line-height: 58px;
background: #FFA234;
font-family: Microsoft YaHei UI;
font-weight: 400;
font-size: 18px;
2025-05-24 09:12:30 +08:00
text-align: center;
2025-07-08 15:01:30 +08:00
color: #FFFFFF;
cursor: pointer;
2025-05-24 09:12:30 +08:00
}
2025-07-08 15:01:30 +08:00
.box_2 {
width: 200px;
height: 58px;
line-height: 58px;
background: #4EB64B;
margin-top: 16px;
2025-05-24 09:12:30 +08:00
font-family: Microsoft YaHei UI;
2025-07-08 15:01:30 +08:00
font-weight: 400;
2025-05-24 09:12:30 +08:00
font-size: 18px;
color: #FFFFFF;
2025-07-08 15:01:30 +08:00
text-align: center;
cursor: pointer;
}
}
.pc-nav-item {
width: 100%;
// height: 18px;
font-family: Microsoft YaHei UI;
font-weight: bold;
font-size: 18px;
color: #FFFFFF;
text-shadow: 0px 1px 0px rgba(0, 0, 64, 0.4);
display: flex;
align-items: center;
margin-bottom: 30px;
&:hover {
cursor: pointer;
color: #FFA234;
}
.span {
margin-left: 20px;
&.active {
2025-05-24 09:12:30 +08:00
color: #FFA234;
}
}
2025-07-08 15:01:30 +08:00
}
2025-07-08 16:18:58 +08:00
@media screen and (max-width: 1366px) {
.pc-nav-item {
margin-bottom: 20px;
}
.pc-nav {
margin-top: 40px;
}
}
2025-07-08 15:01:30 +08:00
@media screen and (max-width: 1280px) {
.pc-nav-item {
margin-bottom: 20px;
}
.pc-nav {
margin-top: 60px;
2025-05-24 09:12:30 +08:00
}
}
2025-05-24 09:12:30 +08:00
</style>