Commit b37eea2a authored by lixy's avatar lixy

回到顶部

parent 8d3132e2
html{
font-family:"微软雅黑 Light" !important;
}
body { body {
background: #f2f2f2; background: #f2f2f2;
height: 100%; height: 100%;
width: 100%; width: 100%;
min-width: 1120px; min-width: 1120px;
font-family:"微软雅黑 Light"
} }
#newBridge .nb-middle{ #newBridge .nb-middle{
display: none !important; display: none !important;
} }
#newBridge .icon-right-center{ #newBridge .icon-right-center{
bottom: 100px !important; bottom: 150px !important;
top: auto !important; top: auto !important;
} }
.min-win{ .min-win{
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<p class="ft-12 tc color-ccc">欣新房车助手小程序</p> <p class="ft-12 tc color-ccc">欣新房车助手小程序</p>
</div> </div>
<div class="footer-scan"> <div class="footer-scan">
<img src="../assets/images/dfcapp.png" alt="欣新房车,让生活更美好"/> <img src="https://mgmt.dfangche.com/xxfccn/image/qrcode/appQrcode.png" alt="欣新房车,让生活更美好"/>
<p class="ft-12 tc color-ccc">滴房车App(欣新旗下)</p> <p class="ft-12 tc color-ccc">滴房车App(欣新旗下)</p>
</div> </div>
</div> </div>
......
<template>
<div id="goTop">
<div class="show-go-top" v-show="goTopShow" @click="goTop">
<img style="width: 20px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3FpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9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oaNOLwIEpuCpA4ULNq4DPWDht9/aHhyEYiQIiD+C1X/AYid0Q01B+KvUAWgGJchJukAcRAQf4Pq24Ju6F4kG3WJNBDZQXuAmB/dUF5oBDiRaCBWzDhaSFMdAAQYAIXvsMke49Y7AAAAAElFTkSuQmCC"/>
<div class="goTop">回到顶部</div>
</div>
</div>
</template>
<script>
export default {
name: "goTop",
data() {
return {
scrollTop: "",
goTopShow: false
};
},
watch: {
scrollTop(val) {
if (this.scrollTop > 500) {
this.goTopShow = true;
} else {
this.goTopShow = false;
}
}
},
methods: {
handleScroll() {
this.scrollTop =
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop;
if (this.scrollTop > 500) {
this.goTopShow = true;
}
},
goTop() {
let timer = null,
_that = this;
cancelAnimationFrame(timer);
timer = requestAnimationFrame(function fn() {
if (_that.scrollTop > 0) {
_that.scrollTop -= 50;
document.body.scrollTop = document.documentElement.scrollTop =
_that.scrollTop;
timer = requestAnimationFrame(fn);
} else {
cancelAnimationFrame(timer);
_that.goTopShow = false;
}
});
}
},
created(){
if (typeof window !== 'undefined') {
window.addEventListener('scroll', this.handleScroll);
}
},
destroyed() {
window.removeEventListener("scroll", this.handleScroll);
}
};
</script>
<style scoped>
.show-go-top{
position: fixed;
right: 40px;
bottom: 80px;
width: 40px;
height: 40px;
text-align: center;
background: #333;
color: #fff;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
z-index: 9;
}
.show-go-top:hover .goTop{
display: block !important;
}
.goTop {
display: none;
position: fixed;
right: 40px;
bottom: 80px;
width: 40px;
height: 40px;
font-size: 12px;
padding: 3px;
text-align: center;
background: #1bbb9f;
color: #fff;
cursor: pointer;
z-index: 9;
}
.goTop:hover .goTopIcon {
color: rgba(51, 153, 255, 1);
}
.goTopIcon {
font-size: 20px;
color: rgba(51, 153, 255, 0.8);
}
</style>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="box"> <div class="box">
<ul> <ul>
<li v-for="(item, index) in list" :key="item.id" :class="index === current ? 'active' : ''" @click="bannerClick(index, item)"> <li v-for="(item, index) in list" :key="item.id" :class="index === current ? 'active' : ''" @click="bannerClick(index, item)">
<img :src= "item.cover" style="width:100%;" :alt="item.title"/> <img :src= "item.cover" style="width:100%;min-width: 1120px;" :alt="item.title"/>
</li> </li>
</ul> </ul>
<!--<div class="status">--> <!--<div class="status">-->
...@@ -150,7 +150,8 @@ ...@@ -150,7 +150,8 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
@media screen and (min-width:1120px) and (max-width:1200px){
@media screen and (max-width:1200px){
.box{ .box{
position:relative; position:relative;
height:150px; height:150px;
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -101,9 +102,11 @@ ...@@ -101,9 +102,11 @@
import menuModal from "../components/menu"; import menuModal from "../components/menu";
import footerModal from "../components/footer"; import footerModal from "../components/footer";
import vehicleBanner from "../components/vehicleBanner" import vehicleBanner from "../components/vehicleBanner"
import GoTop from "../components/goTop";
export default { export default {
transition: "bounce", transition: "bounce",
components: { components: {
GoTop,
menuModal, menuModal,
footerModal, footerModal,
vehicleBanner vehicleBanner
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -50,9 +51,11 @@ ...@@ -50,9 +51,11 @@
import menuModal from "../components/menu"; import menuModal from "../components/menu";
import footerModal from "../components/footer"; import footerModal from "../components/footer";
import vehicleBanner from "../components/vehicleBanner" import vehicleBanner from "../components/vehicleBanner"
import GoTop from "../components/goTop";
export default { export default {
transition: "bounce", transition: "bounce",
components: { components: {
GoTop,
menuModal, menuModal,
footerModal, footerModal,
vehicleBanner vehicleBanner
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -46,9 +47,11 @@ ...@@ -46,9 +47,11 @@
import footerModal from "../../components/footer" import footerModal from "../../components/footer"
import Swiper from 'swiper'; import Swiper from 'swiper';
import 'swiper/dist/css/swiper.min.css'; import 'swiper/dist/css/swiper.min.css';
import GoTop from "../../components/goTop";
export default { export default {
transition: 'bounce', transition: 'bounce',
components: { components: {
GoTop,
menuModal, menuModal,
footerModal footerModal
}, },
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -66,9 +67,11 @@ import axios from '../plugins/axios'; ...@@ -66,9 +67,11 @@ import axios from '../plugins/axios';
import menuModal from "../components/menu"; import menuModal from "../components/menu";
import footerModal from "../components/footer"; import footerModal from "../components/footer";
import vehicleBanner from "../components/vehicleBanner" import vehicleBanner from "../components/vehicleBanner"
import GoTop from "../components/goTop";
export default { export default {
transition: "bounce", transition: "bounce",
components: { components: {
GoTop,
menuModal, menuModal,
footerModal, footerModal,
vehicleBanner vehicleBanner
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -111,9 +112,11 @@ import menuModal from "../../components/menu"; ...@@ -111,9 +112,11 @@ import menuModal from "../../components/menu";
import footerModal from "../../components/footer"; import footerModal from "../../components/footer";
import Swiper from "swiper"; import Swiper from "swiper";
import "swiper/dist/css/swiper.min.css"; import "swiper/dist/css/swiper.min.css";
import GoTop from "../../components/goTop";
export default { export default {
transition: "bounce", transition: "bounce",
components: { components: {
GoTop,
menuModal, menuModal,
footerModal footerModal
}, },
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -50,12 +51,14 @@ ...@@ -50,12 +51,14 @@
import menuModal from "../components/menu"; import menuModal from "../components/menu";
import footerModal from "../components/footer"; import footerModal from "../components/footer";
import vehicleBanner from "../components/vehicleBanner" import vehicleBanner from "../components/vehicleBanner"
import GoTop from "../components/goTop";
export default { export default {
transition: "bounce", transition: "bounce",
components: { components: {
menuModal, menuModal,
footerModal, footerModal,
vehicleBanner vehicleBanner,
GoTop
}, },
data() { data() {
return { return {
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -44,9 +45,11 @@ ...@@ -44,9 +45,11 @@
import footerModal from "../../components/footer" import footerModal from "../../components/footer"
import Swiper from 'swiper'; import Swiper from 'swiper';
import 'swiper/dist/css/swiper.min.css'; import 'swiper/dist/css/swiper.min.css';
import GoTop from "../../components/goTop";
export default { export default {
transition: 'bounce', transition: 'bounce',
components: { components: {
GoTop,
menuModal, menuModal,
footerModal footerModal
}, },
......
...@@ -59,15 +59,16 @@ ...@@ -59,15 +59,16 @@
<h2 style="font-size: 20px;font-weight:400;margin:0 0 18px 6px">{{item.name}}</h2> <h2 style="font-size: 20px;font-weight:400;margin:0 0 18px 6px">{{item.name}}</h2>
<h6 style="font-size: 14px;font-weight:400;margin:0 0 54px 14px">{{item.describe}}</h6> <h6 style="font-size: 14px;font-weight:400;margin:0 0 54px 14px">{{item.describe}}</h6>
<button class="buttonDetails">旅行详情<img style="position: absolute;" src="../assets/images/r.png"/></button> <button class="buttonDetails">旅行详情<img style="position: absolute;" src="../assets/images/r.png"/></button>
</div> </div>
</nuxt-link> </nuxt-link>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -77,9 +78,11 @@ ...@@ -77,9 +78,11 @@
import menuModal from "../components/menu" import menuModal from "../components/menu"
import footerModal from "../components/footer" import footerModal from "../components/footer"
import vehicleBanner from "../components/vehicleBanner" import vehicleBanner from "../components/vehicleBanner"
import GoTop from "../components/goTop";
export default { export default {
transition: 'bounce', transition: 'bounce',
components: { components: {
GoTop,
menuModal, menuModal,
footerModal, footerModal,
vehicleBanner vehicleBanner
......
...@@ -154,6 +154,7 @@ ...@@ -154,6 +154,7 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -165,10 +166,12 @@ import footerModal from "../../components/footer"; ...@@ -165,10 +166,12 @@ import footerModal from "../../components/footer";
import Swiper from "swiper"; import Swiper from "swiper";
import "swiper/dist/css/swiper.min.css"; import "swiper/dist/css/swiper.min.css";
import GoTop from "../../components/goTop";
// import { getDetail } from '../../../../demo nuxt/nuxt-bnhcp/ajax/getData'; // import { getDetail } from '../../../../demo nuxt/nuxt-bnhcp/ajax/getData';
export default { export default {
transition: "bounce", transition: "bounce",
components: { components: {
GoTop,
menuModal, menuModal,
footerModal footerModal
}, },
......
...@@ -52,12 +52,14 @@ ...@@ -52,12 +52,14 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
<script> <script>
import axios from '../plugins/axios' import axios from '../plugins/axios'
import GoTop from "../components/goTop";
import menuModal from "../components/menu"; import menuModal from "../components/menu";
import footerModal from "../components/footer"; import footerModal from "../components/footer";
...@@ -67,7 +69,8 @@ ...@@ -67,7 +69,8 @@
components: { components: {
menuModal, menuModal,
footerModal, footerModal,
vehicleBanner vehicleBanner,
GoTop
}, },
data() { data() {
return { return {
......
...@@ -92,6 +92,7 @@ ...@@ -92,6 +92,7 @@
</div> </div>
</div> </div>
</div> </div>
<go-top></go-top>
<footer-modal></footer-modal> <footer-modal></footer-modal>
</div> </div>
</template> </template>
...@@ -102,9 +103,11 @@ ...@@ -102,9 +103,11 @@
import footerModal from "../../components/footer" import footerModal from "../../components/footer"
import Swiper from 'swiper'; import Swiper from 'swiper';
import 'swiper/dist/css/swiper.min.css'; import 'swiper/dist/css/swiper.min.css';
import GoTop from "../../components/goTop";
export default { export default {
transition: 'bounce', transition: 'bounce',
components: { components: {
GoTop,
menuModal, menuModal,
footerModal footerModal
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment