From 70ab41ed7d2f456896035da2f9c4ba3969c5fa21 Mon Sep 17 00:00:00 2001
From: 明梦爽 <2972214568@qq.com>
Date: 星期三, 23 三月 2022 17:46:56 +0800
Subject: [PATCH] 上传后台aip服务
---
src/components/page/index.vue | 151 +++++++++++++++++++++++++++++++++-----------------
1 files changed, 99 insertions(+), 52 deletions(-)
diff --git a/src/components/page/index.vue b/src/components/page/index.vue
index f5d804f..789723f 100644
--- a/src/components/page/index.vue
+++ b/src/components/page/index.vue
@@ -1,66 +1,113 @@
<template>
- <el-container>
+ <div calss="box">
<!-- 棣栭〉涓婂崐閮ㄥ垎 -->
- <el-header>
- <el-container>
- <el-aside width="600px">鍥剧墖瑕侀椈</el-aside>
- <el-main>閫氱煡鍏憡</el-main>
- </el-container>
- </el-header>
+ <el-row type="flex" class="row-bg" justify="space-between">
+ <div class="block marr10">
+ <el-carousel height="450px" arrow="always" :interval="3000">
+ <el-carousel-item v-for="(item,index) in imgList" :key="index">
+ <div @click="gonew(item.id)" class="cursor" style="width:590px; height:450px">
+ <img :src="'http://localhost:7070/'+item.picturePath" alt="" style="width:100%; height:90%">
+ </div>
+ </el-carousel-item>
+ </el-carousel>
+ </div>
+ <notice class="notice" />
+ </el-row>
<!-- 棣栭〉涓嬪崐閮ㄥ垎 -->
- <el-main class="xiaBian">
- <el-container>
- <!-- 涓嬭竟宸﹀崐閮ㄥ垎 -->
- <el-aside width="1000px">
- <el-container>
- <el-aside width="500px">宸ヤ綔鐘舵��</el-aside>
- <el-main>瀛﹂櫌鍔ㄦ��</el-main>
- </el-container>
- </el-aside>
- <!-- 涓嬭竟鍙冲崐閮ㄥ垎 -->
- <el-main class="youXiaJiao">
- <el-container>
- <el-header>鍙嬫儏閾炬帴</el-header>
- <el-main>鑱旂郴鎴戜滑</el-main>
- </el-container>
- </el-main>
- </el-container>
- </el-main>
- </el-container>
+ <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>
-.el-header {
- background-color: rgb(131, 51, 51);
- height: 400px !important;
- padding: 0;
- .el-main {
- background-color: rgb(25, 202, 193);
- height: 400px;
+.block {
+ width: 50%;
+}
+.block div {
+ img {
+ width: 100%;
+ height: 100%;
+ // object-fit:cover;
}
}
-.xiaBian {
- background: rgb(132, 199, 44);
- height: 400px;
- padding: 0;
- .el-main {
- background-color: rgb(70, 27, 187);
- height: 400px;
- }
+.notice{
+ width: 50%;
}
-.youXiaJiao {
- padding: 0;
- // height: 400px;
- .el-header {
- height: 200px !important;
- }
- .el-main {
- height: 200px;
- background-color: rgb(206, 44, 171);
- }
+.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