From f56e474c81bb25845b46cf99c85bd313dbfcd3b5 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期六, 31 一月 2026 19:26:25 +0800
Subject: [PATCH] 项目初始化+首页+公告详情页面

---
 src/views/main/components/MyHeader.vue |   62 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/src/views/main/components/MyHeader.vue b/src/views/main/components/MyHeader.vue
new file mode 100644
index 0000000..16ff088
--- /dev/null
+++ b/src/views/main/components/MyHeader.vue
@@ -0,0 +1,62 @@
+<template>
+  <div class="custom-header">
+    <el-row class="content" justify="space-between">
+      <el-text class="text-white text-2xl font-bold">骞夸笢鐪佹妧鑳戒汉鎵嶈瘎浠疯�冨姟绠$悊骞冲彴</el-text>
+      <el-dropdown v-if="!userInfo.id" placement="bottom">
+        <el-row  align="middle">
+          <Icon icon="fa:user-circle" width="22" height="22" class="mr-2"  style="color: #fff" />
+          <el-text class="text-white cursor-p text-lg font-bold">榛勫┓濠�</el-text>
+          <Icon icon="flowbite:caret-down-solid" width="22" height="22" class="ml-2"  style="color: #fff" />
+        </el-row>
+        <template #dropdown>
+          <el-dropdown-menu>
+            <el-dropdown-item>涓汉涓績</el-dropdown-item>
+            <el-dropdown-item>閫�鍑虹櫥褰�</el-dropdown-item>
+          </el-dropdown-menu>
+        </template>
+      </el-dropdown>
+      <el-button  v-else color="#007AFF">
+        <el-text class="text-white cursor-p text-lg font-bold" @click="login">鐧� 褰�</el-text>
+      </el-button>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { useSessionStore } from '@/stores/session.js' 
+import { useLoginStore } from '@/stores/login.js'
+import { storeToRefs } from 'pinia';
+
+export default {
+  setup() {
+    const { loginDialogVisible } = storeToRefs(useLoginStore())
+    const { userInfo } = storeToRefs(useSessionStore())
+    return { loginDialogVisible, userInfo }
+  },
+  data() {
+    return {
+      
+    }
+  },
+  methods: {
+    login() {
+      this.loginDialogVisible = true
+    }
+  }
+}
+
+</script>
+<style>
+.custom-header {
+  width: 100%;
+  align-content: center;
+  background-color: var(--el-color-primary);
+  height: 60px;
+}
+.content {
+  width: 100%;
+  max-width: 1280px;
+  margin: 0 auto;
+  padding: 0 40px;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.8.0