feat 首页制作

master
徐科 4 years ago
parent bda2fd7a79
commit 2a2c9eb249

@ -14,6 +14,8 @@
"element-ui": "^2.15.6",
"jquery": "^3.6.0",
"less-loader": "^3.0.0",
"three": "^0.140.2",
"vanta": "^0.5.22",
"vue": "^2.6.11",
"vue-router": "^3.2.0"
},
@ -34,4 +36,4 @@
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
}
}
}

@ -1,26 +1,45 @@
<template>
<el-container class="home-container" id="topAnchor" direction="vertical">
<div style="height:45px; width:100%; background-color:#f7f8fa ">
<div style="position:absolute;top:10px;left:12%;line-height:2.5em;">预约热线 000-000-000</div>
<div style="position:absolute;top:10px;right:5%">
<router-link to="login"><el-button style="width:100px;">登陆</el-button></router-link>
</div>
<el-container
class="home-container"
id="topAnchor"
direction="vertical"
>
<div style="height:45px; width:100%; position:fixed; z-index: 99;left:90%; top:3%">
<router-link to="login">
<el-button style="width:100px;">登陆</el-button>
</router-link>
</div>
<!-- // -->
<el-header style="height: 100px; width:100% display: flex ; justify-content: space-between; background-color: #fff;">
<el-header
style="height: 800px; width:100% display: flex ; justify-content: space-between; background-color: #fff;"
class="home-header"
>
<div style="position: relative;">
<h3 class="top_title1">控温者 - 数据中心节能平台</h3>
</div>
<!-- <p >高路交通理解云</p> -->
</el-header>
<!-- // start-->
<div class="carousel">
<div
class="carousel"
style="margin-top:40px"
>
<template>
<el-carousel :interval="4000" type="card" height="450px">
<el-carousel-item v-for="(item, index) in list" :key="index">
<img :src="item.src" alt="" style="width: 100%; height: 100%; " />
<el-carousel
:interval="4000"
type="card"
height="450px"
>
<el-carousel-item
v-for="(item, index) in list"
:key="index"
>
<img
:src="item.src"
alt=""
style="width: 100%; height: 100%; "
/>
</el-carousel-item>
</el-carousel>
</template>
@ -54,8 +73,7 @@
<!-- 返回顶部按钮 -->
<template>
<el-backtop>
<div
style="{
<div style="{
height: 100%;
width: 100%;
border-radius: 50px;
@ -64,8 +82,7 @@
text-align: center;
line-height: 40px;
color: #1989fa;
}"
>
}">
<i class="el-icon-caret-top"></i>
</div>
</el-backtop>
@ -74,30 +91,51 @@
</template>
<script>
import * as THREE from 'three'
import RINGS from 'vanta/src/vanta.rings'
export default {
name: 'Home',
data () {
return {
list: [
{
src: 'https://img2.baidu.com/it/u=903467524,2920385702&fm=26&fmt=auto'
src: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fp3-tt.byteimg.com%2Forigin%2Fpgc-image%2F52bca5d182394988b80af5bc369f1ef6%3Ffrom%3Dpc&refer=http%3A%2F%2Fp3-tt.byteimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1658374833&t=e3208e68b5c1b74d8af58a1950c4d8db'
},
{
src: 'https://img2.baidu.com/it/u=1514194555,1408855411&fm=26&fmt=auto'
src: 'https://img2.baidu.com/it/u=3926330427,864487345&fm=253&fmt=auto&app=138&f=PNG?w=500&h=313'
},
{
src: 'https://img1.baidu.com/it/u=4264221152,3602489092&fm=26&fmt=auto'
src: 'https://img2.baidu.com/it/u=3669930060,566996354&fm=253&fmt=auto&app=120&f=JPEG?w=900&h=500'
},
{
src: 'https://img2.baidu.com/it/u=2673658967,4041565795&fm=26&fmt=auto'
src: 'https://img0.baidu.com/it/u=2449644919,3388231827&fm=253&fmt=auto&app=120&f=JPEG?w=505&h=338'
},
{
src: 'https://img1.baidu.com/it/u=135466862,2358213243&fm=26&fmt=auto'
src: 'https://img0.baidu.com/it/u=2533984163,3128338185&fm=253&fmt=auto&app=138&f=JPEG?w=751&h=500'
}
],
activeIndex: '1'
}
},
mounted () {
this.vantaEffect = RINGS({
el: ".home-header",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
backgroundColor: 0x90914,
color: 0x27281f, THREE: THREE
})
},
beforeDestroy () {
if (this.vantaEffect) {
this.vantaEffect.destroy()
}
}
}
</script>
@ -105,10 +143,10 @@ export default {
<style lang="less" scoped>
.top_title1 {
position: absolute;
color: #409eff;
font-size: 35px;
top: -12px;
left: 36%;
color: white;
font-size: 60px;
top: 42px;
left: 5%;
}
.top_title2 {
position: absolute;
@ -157,7 +195,7 @@ export default {
.clearfix:before,
.clearfix:after {
display: table;
content: '';
content: "";
}
.clearfix:after {
@ -175,7 +213,7 @@ export default {
}
.el-menu-item:before {
content: '';
content: "";
}
.news_title {
font-weight: normal;

@ -8190,6 +8190,11 @@ thread-loader@^2.1.3:
loader-utils "^1.1.0"
neo-async "^2.6.0"
three@^0.140.2:
version "0.140.2"
resolved "https://registry.npmmirror.com/three/-/three-0.140.2.tgz#ca0b7390d1ce4f7f2850e80afd00ef48fc244491"
integrity sha512-DdT/AHm/TbZXEhQKQpGt5/iSgBrmXpjU26FNtj1KhllVPTKj1eG4X/ShyD5W2fngE+I1s1wa4ttC4C3oCJt7Ag==
throttle-debounce@^1.0.1:
version "1.1.0"
resolved "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-1.1.0.tgz#51853da37be68a155cb6e827b3514a3c422e89cd"
@ -8599,6 +8604,11 @@ validate-npm-package-license@^3.0.1:
spdx-correct "^3.0.0"
spdx-expression-parse "^3.0.0"
vanta@^0.5.22:
version "0.5.22"
resolved "https://registry.npmmirror.com/vanta/-/vanta-0.5.22.tgz#92290e4ebac0b7c0d4822a4316d03ccd6bf33779"
integrity sha512-Y58U1SjHU6HeIuwq+te7eonyi7LWzKqyPDjZyQ7Kb6Zy4ampNJHRIUZvf1Pwl6uTC6Qi6P9fUYDsUVQDHq0KKg==
vary@~1.1.2:
version "1.1.2"
resolved "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"

Loading…
Cancel
Save