ソースを参照

页面内容无数据不展示(广告、轮播图)

Xiao_123 5 ヶ月 前
コミット
a644b0dbac

+ 1 - 1
components/PositionList/index.vue

@@ -46,7 +46,7 @@
               custom-style="background-color: #e2f0ef; color:#00897B; border-color:#e2f0ef;"
             />
           </view>
-          <view class="font-size-13 color-999" style="text-align: end;">发布时间:{{ timesTampChange(item.job.updateTime, 'Y-M-D h:m') }}</view>
+          <view class="font-size-13 color-999 ss-m-t-10" style="text-align: end;">发布时间:{{ timesTampChange(item.job.updateTime, 'Y-M-D h:m') }}</view>
         </view>
         <!-- 企业信息 -->
         <view class="sub-li-bottom">

+ 2 - 2
pages/index/crowdsourcing.vue

@@ -11,12 +11,12 @@
 			</view>
 			<scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore" style="position:relative;">
 				<view class="content-top">
-					<view class="content-top-carousel">
+					<view v-if="swiperAdList.length" class="content-top-carousel">
 						<view class="content-top-carousel-box">
 							<SwiperAd :list="swiperAdList" imgUrlKey="img" :strType="false" @click="handleToDetails"></SwiperAd>
 						</view>
 					</view>
-					<view class="content-top-recommend">
+					<view class="content-top-recommend" :class="{'ss-m-t-20': !swiperAdList.length}">
 						<view class="content-top-recommend-box">
 							<resume-status>
 								<template #header>

+ 7 - 2
pages/index/position.vue

@@ -4,7 +4,7 @@
     <view class="box defaultBgc">
       <scroll-view class="scrollBox" :scroll-y="true" :scroll-top="scrollTop" @scrolltolower="loadingMore" @scroll="onScroll" style="position:relative;">
         <view>
-          <SwiperAd :list="swiperAdList" imgUrlKey="img" :strType="false" @click="handleToDetails"></SwiperAd>
+          <SwiperAd v-if="swiperAdList.length" :list="swiperAdList" imgUrlKey="img" :strType="false" @click="handleToDetails"></SwiperAd>
           <!-- 五宫格菜单 -->
           <view class="white-bgc ss-p-t-10">
             <uni-grid :column="5" @change="handleGrid" :showBorder="false">
@@ -39,7 +39,9 @@
           <uni-load-more :status="more" />
         </view>
       </scroll-view>
-      <AdvertisePop></AdvertisePop>
+
+      <AdvertisePop v-if="showAdvertisePop" />
+
       <uni-popup ref="inputDialog" type="dialog">
         <view class="shareQrCodePopupContent">
           <view class="ss-m-b-10">请前往网页版门墩儿查看</view>
@@ -97,10 +99,13 @@ const inputDialog = ref()
 const more = ref('more')
 
 // 获取轮播图
+const showAdvertisePop = ref(false)
 const swiperAdList = ref([])
 const getSystemWebContent = async () => {
   const { data } = await getWebContent()
   swiperAdList.value = data.appHomeCarousel || []
+  // 是否展示弹窗广告
+  showAdvertisePop.value = data && data.appAdvertisement && data.appAdvertisement.length ? true : false
 }
 getSystemWebContent()