zs 1 年間 前
コミット
07e2d90744

BIN
src/assets/home.mp4


+ 6 - 6
src/components/head.vue

@@ -72,16 +72,16 @@ const props = defineProps({
   is_head: { type: Boolean, default: true },
   is_menu: { type: Boolean, default: true },
   is_foot: { type: Boolean, default: true },
-  currentIndex: { type: String, default: 'tran' }
+  currentIndex: { type: String, default: 'home' }
 });
 const { is_menu, is_head, is_foot, currentIndex } = toRefs(props);
 const current = ref<any>([currentIndex.value]);
 const menuList = ref<MenuProps['items']>([
-  // {
-  //   key: 'home',
-  //   label: '首页',
-  //   title: '首页'
-  // },
+  {
+    key: 'home',
+    label: '首页',
+    title: '首页'
+  },
   {
     key: 'tran',
     label: '交易大厅',

+ 2 - 1
src/layout/site.ts

@@ -4,7 +4,8 @@ export const siteInfo = {
   zhTitle: '吉林省重点领域技术转移平台',
   zhEnglish: 'Jilin Province Key Field Technology Transfer Platform',
   zhPhone: '400-469-1899',
-  logoUrl: '/src/assets/logo.png'
+  logoUrl: '/src/assets/logo.png',
+  videoUrl: '/src/assets/home.mp4'
 };
 // 菜单设置
 export const menuList = [

+ 21 - 6
src/views/home/components/home.vue

@@ -2,7 +2,11 @@
   <div id="index">
     <el-row>
       <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
-        <el-col :span="24" class="one">系统首页</el-col>
+        <el-col :span="24" class="one">
+          <video loop autoplay muted class="video">
+            <source :src="siteInfo.videoUrl" />
+          </video>
+        </el-col>
       </el-col>
     </el-row>
   </div>
@@ -12,6 +16,7 @@
 // 基础
 import type { Ref } from 'vue';
 import { onMounted, ref } from 'vue';
+import { siteInfo } from '@/layout/site';
 
 // 接口
 // import { ToolsStore } from '@/stores/tool';
@@ -29,14 +34,24 @@ onMounted(async () => {
   loading.value = false;
 });
 const search = async () => {
-//   let res: IQueryResult = await toolsAxios.dataCount();
-//   if (res.errcode == '0') {
-//     info.value = res.data;
-//   }
+  //   let res: IQueryResult = await toolsAxios.dataCount();
+  //   if (res.errcode == '0') {
+  //     info.value = res.data;
+  //   }
 };
 </script>
 <style scoped lang="scss">
 .main {
-  
+  .one {
+    .video {
+      position: fixed;
+      top: 0;
+      left: 0;
+      z-index: -1;
+      width: 100%;
+      height: 635px;
+      object-fit: cover;
+    }
+  }
 }
 </style>

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

@@ -63,9 +63,9 @@ import activity from './components/activity.vue';
 
 // 加载中
 const loading: Ref<any> = ref(false);
-const current = ref('tran'); // 创建一个响应式数据
-const is_head: Ref<any> = ref(true);
-const is_foot: Ref<any> = ref(true);
+const current = ref('home'); // 创建一个响应式数据
+const is_head: Ref<any> = ref(false);
+const is_foot: Ref<any> = ref(false);
 // 菜单
 const toolList: Ref<any> = ref([
   { name: '我要交易', url: '/src/assets/service_1.png', route: 'tran' },