From 08e0f4f66d2e39a19b91e8e2fe1bcad75569d4b8 Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期三, 26 一月 2022 23:24:08 +0800
Subject: [PATCH] 登录权限设置好

---
 src/components/page/index.vue |  108 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 104 insertions(+), 4 deletions(-)

diff --git a/src/components/page/index.vue b/src/components/page/index.vue
index 42c7f68..506c2ad 100644
--- a/src/components/page/index.vue
+++ b/src/components/page/index.vue
@@ -1,13 +1,113 @@
 <template>
-    <div>
-        <span>棣栭〉</span>
+  <div calss="box">
+    <!-- 棣栭〉涓婂崐閮ㄥ垎 -->
+    <el-row type="flex" class="row-bg" justify="space-between">
+        <div class="block marr10">
+          <el-carousel height="460px"  arrow="always" :interval="3000">
+            <el-carousel-item v-for="(item,index) in imgList" :key="index">
+              <div @click="gonew(item.id)" class="cursor">
+                <img :src="'http://localhost:8080/'+item.picturePath"  alt="" style="width:105%;">
+              </div>
+            </el-carousel-item>
+          </el-carousel>
+        </div>
+      <notice class="notice" />
+    </el-row>
+    <!-- 棣栭〉涓嬪崐閮ㄥ垎 -->
+    <el-row type="flex" class="row-bg" justify="space-between">
+      <work class="work"/>
+      <school class="school"/>
+      <other class="other"/>
+    </el-row>
+
+    <!-- 瀹氫綅fixed -->
+    <div class="fixed1">
+      <a href="#"><img src="../../assets/gzh.jpg" alt=""></a>
     </div>
+    <div class="fixed2">
+      <a href="#"><img src="../../assets/wb.jpg" alt=""></a>
+    </div>
+  </div>
 </template>
 <script>
+import notice from '../../views/notice.vue'
+import work from '../../views/work.vue'
+import school from '../../views/school.vue'
+import other from '../../views/other.vue'
+
+import {getNewsList} from '../../api/api'
+
 export default {
-    name:'index'
+  components: { notice, work, school, other },
+  name: 'index',
+  data(){
+    return{
+      // imgList:[
+      //   { path:require('../../assets/1.jpg'),index: 1},
+      //   { path:require('../../assets/2.jpg'),index: 2},
+      //   { path:require('../../assets/3.jpg'),index: 3},
+      // ],
+      imgList:[],
+    }
+  },
+  created(){
+    this.getnews()
+  },
+  methods:{
+    getnews(){
+      const data ={
+        current:1,
+        newsCategoryId:45,
+        size:3
+      }
+      getNewsList(data).then(res => {
+        console.log(res);
+        if(res.code == 200){
+          this.imgList = res.data.records
+        }
+      }).catch(err => {
+        console.log(err);
+      })
+    },
+    gonew(id){
+      this.$router.push({path:'/home/news',query:{id:id}})
+    }
+  }
 }
 </script>
 <style lang="less" scoped>
-    
+.block {
+  width: 50%;
+}
+.block div {
+  img {
+    width: 100%;
+    height: 100%;
+    // object-fit:cover;
+  }
+}
+.notice{
+  width: 50%;
+}
+.work {
+  width: 40%;
+  margin-right: 10px;
+}
+.school {
+  width: 40%;
+}
+.other {
+  width: 20%;
+  margin-left: 5px;
+}
+.fixed1 {
+  position: fixed;
+  top:270px;
+  right: 2px;
+}
+.fixed2 {
+  position: fixed;
+  top:340px;
+  right: 2px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0