Browse Source

添加公告

zhuf 1 year ago
parent
commit
b3bd6ff678
2 changed files with 59 additions and 29 deletions
  1. 4 0
      components.d.ts
  2. 55 29
      src/components/TheHeader.vue

+ 4 - 0
components.d.ts

@@ -10,12 +10,16 @@ export {}
 declare module '@vue/runtime-core' {
   export interface GlobalComponents {
     CheckRow: typeof import('./src/components/CheckRow/index.vue')['default']
+    ElAlert: typeof import('element-plus/es')['ElAlert']
+    ElCarousel: typeof import('element-plus/es')['ElCarousel']
+    ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
     ElDropdown: typeof import('element-plus/es')['ElDropdown']
     ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
     ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
     ElEmpty: typeof import('element-plus/es')['ElEmpty']
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElInput: typeof import('element-plus/es')['ElInput']
+    ElLink: typeof import('element-plus/es')['ElLink']
     ElPagination: typeof import('element-plus/es')['ElPagination']
     InputSearch: typeof import('./src/components/InputSearch/index.vue')['default']
     RouterLink: typeof import('vue-router')['RouterLink']

+ 55 - 29
src/components/TheHeader.vue

@@ -43,42 +43,68 @@ function browserOpen(path: string, flag?: boolean) {
         <div>宜昌市乡村教育振兴网络扶智课堂</div>
       </div>
 
-      <el-dropdown trigger="click">
-        <div class="cursor-pointer">
-          <img
-            class="inline-block h-40px w-40px rounded-1/2 align-middle hover:bg-hex-1259A110 hover:text-hex-1259A1"
-            :src="user?.user_avatar?.small || undefined" alt=""
-          >
-          <span class="ml-10px inline-block align-middle">
-            {{ user.user_realname }}
-          </span>
+      <div>
+        <el-dropdown trigger="click">
+          <div class="cursor-pointer">
+            <img class="inline-block h-20px w-20px rounded-1/2 align-middle hover:bg-hex-1259A110 hover:text-hex-1259A1"
+              :src="user?.user_avatar?.small || undefined" alt="">
+            <div class="ml-10px inline-block align-middle">
+              {{ user.user_realname }}
+            </div>
+          </div>
+          <template #dropdown>
+            <el-dropdown-menu v-if="user.user_role_id !== '76'">
+              <el-dropdown-item
+                @click="browserOpen('https://ycxcktapi.bozedu.net/index.php?mod=index&action=index&do=index')">
+                后台管理
+              </el-dropdown-item>
+              <el-dropdown-item
+                @click="browserOpen(`https://uc.bozedu.net/webapps/page/glzx.html?type=xuexiao&token=${user.token}`)">
+                个人中心
+              </el-dropdown-item>
+              <el-dropdown-item @click="browserOpen(`https://stat.bozedu.net?token=${user.token}`)">
+                数据分析
+              </el-dropdown-item>
+            </el-dropdown-menu>
+          </template>
+        </el-dropdown>
+        <div class="text-xs">
+          扶智平台账号: {{ user.user_name }}
         </div>
-        <template #dropdown>
-          <el-dropdown-menu v-if="user.user_role_id !== '76'">
-            <el-dropdown-item
-              @click="browserOpen('https://ycxcktapi.bozedu.net/index.php?mod=index&action=index&do=index')"
-            >
-              后台管理
-            </el-dropdown-item>
-            <el-dropdown-item @click="browserOpen(`https://uc.bozedu.net/webapps/page/glzx.html?type=xuexiao&token=${user.token}`)">
-              个人中心
-            </el-dropdown-item>
-            <el-dropdown-item @click="browserOpen(`https://stat.bozedu.net?token=${user.token}`)">
-              数据分析
-            </el-dropdown-item>
-          </el-dropdown-menu>
-        </template>
-      </el-dropdown>
+      </div>
     </div>
   </div>
   <div class="flex items-center justify-center bg-blue-600 text-lg text-light-50">
     <div class="w-1200px flex">
-      <div
-        v-for="item in NavList" :key="item.id"
-        class="h-64px w-120px cursor-pointer text-center leading-64px hover:bg-blue-500" @click="browserOpen(item.id)"
-      >
+      <div v-for="item in NavList" :key="item.id"
+        class="h-64px w-120px cursor-pointer text-center leading-64px hover:bg-blue-500" @click="browserOpen(item.id)">
         {{ item.label }}
       </div>
+
     </div>
   </div>
+  <div class="flex justify-center bg-hex-f4f4f5">
+    <el-alert type="info" show-icon :closable="false" class="w-1200px">
+      <template #title>
+        <el-carousel indicator-position="none" arrow="never" height="20px" class="w-1200px" autoplay>
+          <el-carousel-item>
+            <el-link
+              href="https://ossdownload.bozedu.net/data/ycxckt/%E5%85%B3%E4%BA%8E%E5%BC%80%E5%B1%952023%E5%B9%B4%E5%85%A8%E5%B8%82%E5%9C%A8%E7%BA%BF%E6%95%99%E8%82%B2%E6%89%B6%E6%99%BA%E8%AF%BE%E5%A0%82%EF%BC%88%E7%AC%AC%E4%B8%80%E6%9C%9F%EF%BC%89%E6%B4%BB%E5%8A%A8%E7%9A%84%E9%80%9A%E7%9F%A5.pdf">关于开展2023年全市在线教育扶智课堂(第一期)活动的通知</el-link>
+          </el-carousel-item>
+          <el-carousel-item>
+            <el-link
+              href="https://ossdownload.bozedu.net/data/ycxckt/%E5%85%B3%E4%BA%8E%E5%BC%80%E5%B1%952023%E5%B9%B4%E5%85%A8%E5%B8%82%E5%9C%A8%E7%BA%BF%E6%95%99%E8%82%B2%E6%89%B6%E6%99%BA%E8%AF%BE%E5%A0%82%EF%BC%88%E7%AC%AC%E4%BA%8C%E6%9C%9F%EF%BC%89%E6%B4%BB%E5%8A%A8%E7%9A%84%E9%80%9A%E7%9F%A5.pdf">关于开展2023年全市在线教育扶智课堂(第二期)活动的通知</el-link>
+          </el-carousel-item>
+          <el-carousel-item>
+            <el-link
+              href="https://ossdownload.bozedu.net/data/ycxckt/%E5%85%B3%E4%BA%8E%E5%BC%80%E5%B1%952023%E5%B9%B4%E5%85%A8%E5%B8%82%E5%9C%A8%E7%BA%BF%E6%95%99%E8%82%B2%E6%89%B6%E6%99%BA%E8%AF%BE%E5%A0%82%EF%BC%88%E7%AC%AC%E4%B8%80%E6%9C%9F%EF%BC%89%E6%B4%BB%E5%8A%A8%E7%9A%84%E9%80%9A%E7%9F%A5.pdf">关于开展2023年全市在线教育扶智课堂(第一期)活动的通知</el-link>
+          </el-carousel-item>
+          <el-carousel-item>
+            <el-link
+              href="https://ossdownload.bozedu.net/data/ycxckt/%E5%85%B3%E4%BA%8E%E5%BC%80%E5%B1%952023%E5%B9%B4%E5%85%A8%E5%B8%82%E5%9C%A8%E7%BA%BF%E6%95%99%E8%82%B2%E6%89%B6%E6%99%BA%E8%AF%BE%E5%A0%82%EF%BC%88%E7%AC%AC%E4%BA%8C%E6%9C%9F%EF%BC%89%E6%B4%BB%E5%8A%A8%E7%9A%84%E9%80%9A%E7%9F%A5.pdf">关于开展2023年全市在线教育扶智课堂(第二期)活动的通知</el-link>
+          </el-carousel-item>
+        </el-carousel>
+      </template>
+    </el-alert>
+  </div>
 </template>