添加轮播
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="top-bg-img-box pos-r" :style="{ 'height': bannerLists.data.length ? '568px' : '260px' }">
|
<div class="top-bg-img-box pos-r" :style="{ 'height': bannerLists.data.length ? '530px' : '260px' }">
|
||||||
<img src="../../assets/homeImage/indexBg.jpg" class="bg-img" alt="" v-if="bannerLists.data.length">
|
<img src="../../assets/homeImage/indexBg.jpg" class="bg-img" alt="" v-if="bannerLists.data.length">
|
||||||
<img src="../../assets//img/edit/bj-img1920.png" class="bg-img" alt="" v-if="!bannerLists.data.length">
|
<img src="../../assets//img/edit/bj-img1920.png" class="bg-img" alt="" v-if="!bannerLists.data.length">
|
||||||
<div class="info-box">
|
<div class="info-box">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<pageTopBar></pageTopBar>
|
<pageTopBar :bannerList="bannerList.data"></pageTopBar>
|
||||||
<!-- 筛选 -->
|
<!-- 筛选 -->
|
||||||
<div class="screen-box wid1200">
|
<div class="screen-box wid1200">
|
||||||
<seach-module @handleTransfer="handleTransfer" :count="listCount"></seach-module>
|
<seach-module @handleTransfer="handleTransfer" :count="listCount"></seach-module>
|
||||||
@@ -34,7 +34,7 @@ import haveQuestions from '@/components/public/have-questions.vue'
|
|||||||
import pageFooter from '@/components/footer/footer.vue'
|
import pageFooter from '@/components/footer/footer.vue'
|
||||||
import emptyDuck from '@/components/public/empty-duck.vue'
|
import emptyDuck from '@/components/public/empty-duck.vue'
|
||||||
import circleBtn from '@/components/public/circle-btn.vue'
|
import circleBtn from '@/components/public/circle-btn.vue'
|
||||||
import { ref, onMounted, onUnmounted, watch, getCurrentInstance, nextTick } from 'vue';
|
import { ref, onMounted, onUnmounted, watch, getCurrentInstance, nextTick,reactive } from 'vue';
|
||||||
import { ElLoading } from 'element-plus'
|
import { ElLoading } from 'element-plus'
|
||||||
import Masonry from 'masonry-layout';
|
import Masonry from 'masonry-layout';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
@@ -65,6 +65,7 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (route.query['companyid']) pitchValue['companyid'] = route.query['companyid']
|
if (route.query['companyid']) pitchValue['companyid'] = route.query['companyid']
|
||||||
|
banner()
|
||||||
getData()
|
getData()
|
||||||
|
|
||||||
window.addEventListener('scroll', handleScroll);
|
window.addEventListener('scroll', handleScroll);
|
||||||
@@ -141,6 +142,16 @@ const handleTransfer = (data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//轮播
|
||||||
|
let bannerList = reactive({ data: [] })
|
||||||
|
let banner = () => {
|
||||||
|
proxy.$get("/tenement/pc/api/banner",{ type: 'home' }).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
bannerList.data = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.screen-box {
|
.screen-box {
|
||||||
|
|||||||
Reference in New Issue
Block a user