添加轮播
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<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//img/edit/bj-img1920.png" class="bg-img" alt="" v-if="!bannerLists.data.length">
|
||||
<div class="info-box">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<pageTopBar></pageTopBar>
|
||||
<pageTopBar :bannerList="bannerList.data"></pageTopBar>
|
||||
<!-- 筛选 -->
|
||||
<div class="screen-box wid1200">
|
||||
<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 emptyDuck from '@/components/public/empty-duck.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 Masonry from 'masonry-layout';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
@@ -65,6 +65,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
if (route.query['companyid']) pitchValue['companyid'] = route.query['companyid']
|
||||
banner()
|
||||
getData()
|
||||
|
||||
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>
|
||||
<style lang="less" scoped>
|
||||
.screen-box {
|
||||
|
||||
Reference in New Issue
Block a user