@@ -1,33 +1,31 @@
< template >
< view class = "content-class" >
< view class = "nar-top" >
<!-- 这里是状态栏占位 -- >
< view class = "status_bar" > < / view >
<!-- 导航栏 -- >
< view class = "nav-bar" >
< text class = "nav-title" > 首页 < / text >
<!-- 顶部渐变背景层 ( 仅视觉 , 不参与文档流 ) -- >
< view class = "nar-top" > < / view >
<!-- 这里是状态栏占位 -- >
< view class = "status_bar" : style = "{ height: statusBarHeight + 'px' }" > < / view >
<!-- 导航栏 -- >
< view class = "nav-bar" >
< text class = "nav-title" > 首页 < / text >
< / view >
<!-- 小区选择 -- >
< view class = "header-container" @click ="navigateToPage" >
< ! - - 左侧小区选择区域 - - >
< view class = "location-area" >
<!-- 定位图标 -- >
< view class = "location-icon" >
< image src = "https://wuyeadmin.bugtc.com/images/home/adress.png" style = "height: 100%;width: 100%;" > < / image >
< / view >
< view class = "tabbarClass" >
< view class = "header-container" @click ="navigateToPage" >
< ! - - 左侧小区选择区域 - - >
< view class = "location-area" >
<!-- 定位图标 -- >
< view class = "location-icon" >
< image src = "https://wuyeadmin.bugtc.com/images/home/adress.png" style = "height: 100%;width: 100%;" > < / image >
< / view >
<!-- 小区名称和下拉箭头 -- >
< view class = "community-selector" >
< text class = "community-name" > { { currentCommunity } } < / text >
< u-icon
name = "arrow-down-fill"
size = "16"
: color = "isDropdownOpen ? '#2979ff' : '#222222'"
: class = "['dropdown-arrow', { 'rotate': isDropdownOpen }]"
> < / u-icon >
< / view >
< / view >
<!-- 小区名称和下拉箭头 -- >
< view class = "community-selector" >
< text class = "community-name" > { { currentCommunity } } < / text >
< u-icon
name = "arrow-down-fill"
size = "16"
: color = "isDropdownOpen ? '#2979ff' : '#222222'"
: class = "['dropdown-arrow', { 'rotate': isDropdownOpen }]"
> < / u-icon >
< / view >
< / view >
< / view >
@@ -36,12 +34,12 @@
< up-swiper :list = "bannerList" indicator indicatorMode = "dot" > < / up-swiper >
< / view >
< view class = "noticeClass" @click ="getNoticeMore" >
< image src = "https://wuyeadmin.bugtc.com/images/home/notice.png" style = "width: 38px;height: 38px;position: absolute;top: 12px;left: 17px;" > < / image >
< view class = "col-line" > < / view >
< uni -notice -bar show -icon :text = "noticeText" type = "line"
:showIcon = "false" show -get -more scrollable color = "#000" background -color = " # fff " moreColor = "#000" >
show -get -more scrollable color = "#000" background -color = " # fff " moreColor = "#000" >
< template # noticebarIcon >
< image src = "https://wuyeadmin.bugtc.com/images/home/notice.png" style = "width: 38px;height: 38px;" > < / image >
< / template >
< / uni-notice-bar >
< / view >
<!-- 一键开门 -- >
< view class = "u-demo-block__content bg-card-open" >
@@ -174,6 +172,7 @@ const scrollTop = ref(0)
const activityList = ref ( [ ] ) // 活动列表数据
const currentCommunity = ref ( '请认证小区' )
const currentVillageId = ref ( '' )
const statusBarHeight = ref ( uni . getSystemInfoSync ( ) . statusBarHeight || 0 )
const bannerList = ref ( [
// 'http://47.104.199.163:9090/images/home/banner.png',
// "http://47.104.199.163:9090/images/propertyImgs/serviceImg2.png"
@@ -251,7 +250,7 @@ const getNoticeData = async() =>{
noticeText . value = res . data . noticeTitle || ''
noticeId . value = res . data . noticeId || ''
} else {
noticeText . value = ''
noticeText . value = '暂无公告 '
noticeId . value = ''
}
@@ -263,13 +262,12 @@ const getNoticeData = async() =>{
} )
}
} catch ( err ) {
// console.error('获取通知数据异常:', err)
uni . showToast ( {
title : err . msg || '网络异常' ,
icon : 'error' ,
duration : 1000
} )
noticeText . value = ''
noticeText . value = '暂无公告 '
noticeId . value = ''
}
}
@@ -393,30 +391,37 @@ const moreClick = () =>{
< style lang = "scss" scoped >
. content - class {
background - color : # f9f9f9 ;
padding - bottom : 10 0rpx ;
padding - bottom : 4 0rpx ;
box - sizing : border - box ; /* 保证padding不会撑大容器 */
min - height : 100 vh ;
overflow - y : auto ;
position : relative ;
. nar - top {
height : 400 rpx ;
width : 100 % ;
background : repeating - linear - gradient ( to right , # EDF4FA , # C0E4FB ) ;
position : absolute ;
top : 0 ;
left : 0 ;
z - index : 0 ;
}
. status _bar {
height : 46 px ;
width : 100 % ;
flex - shrink : 0 ;
position : relative ;
z - index : 1 ;
}
/* 导航栏 */
. nav - bar {
height : 44 px ;
line - height : 44 px ;
text - align : center ;
position : relative ;
z - index : 1 ;
}
. nav - title {
font - size : 14 px ;
font - weight : 4 00;
font - size : 32 r px;
font - weight : 5 00;
}
. header - container {
display : flex ;
@@ -425,10 +430,8 @@ const moreClick = () =>{
padding : 4 rpx 30 rpx ;
box - sizing : border - box ;
// border-bottom: 1rpx solid #f0f0f0;
position : absolut e;
top : 85 px ;
left : 0 ;
z - index : 9999 ;
position : relativ e ;
z - index : 10 ;
}
// 左侧区域
. location - area {
@@ -461,9 +464,8 @@ const moreClick = () =>{
}
. bannarClass {
position : relative ;
top : 112 px ;
left : 0 ;
padding : 20 rpx 40 rpx ;
// margin-bottom: 20rpx;
height : 300 rpx ;
: : v - deep . u - swiper {
height : 300 rpx ! important ;
@@ -476,31 +478,25 @@ const moreClick = () =>{
}
}
. noticeClass {
position : relative ;
top : 184 rpx ;
left : 0 ;
padding : 20 rpx 36 rpx 40 rpx ;
padding : 0 rpx 36 rpx ;
margin - bot tom : 20 rpx ;
}
// 修改通知栏样式
: : v - deep . uni - noticebar _ _content - wrapper -- scrollable {
left : 20 px ;
margin - right : 20 px ;
}
. noticeClass . uni - noticebar {
padding : 10 px 15 px 10 px 45 px ;
: : v - deep . uni - noticebar {
padding : 4 px 12 px ;
}
. notice - bar : : after {
color : # 3 E8EFF ;
}
. bg - card - open {
position : relative ;
top : 110 rpx ;
left : 0 ;
padding : 20 rpx ;
background - color : # fff ;
border - radius : 8 rpx ;
margin : 2 0px 18 px ;
margin : 0 18 px 20 r px;
}
. openClass {
display : flex ;
@@ -528,13 +524,10 @@ const moreClick = () =>{
. adCardClass {
// width: 100%;
height : 200 rpx ;
margin : 4 0rpx 3 0rpx ;
margin : 0 3 0rpx 2 0rpx ;
background - color : # 3 E8EFF ;
// margin-top: 30rpx;
border - radius : 28 rpx ;
position : relative ;
top : 49 px ;
left : 0 ;
. titleLeft {
text - align : left ;
line - height : 2 ;
@@ -549,14 +542,10 @@ const moreClick = () =>{
margin : 36 rpx ;
}
}
. activity - card {
position : relative ;
top : 40 px ;
left : 0 ;
bottom : 20 ;
}
. uni - card {
margin : 18 px ! important ;
. activity - card {
}
. uni - card {
margin : 0 18 px 20 rpx ! important ;
}
. eventListClass {
margin : 10 rpx 0 ;
@@ -580,7 +569,7 @@ const moreClick = () =>{
top : 0 ;
left : 0 ;
// padding: 6px 18px;
padding : 0 px 9 px 10 px 11 px ;
padding : 0 px 7 px 10 px 11 px ;
border - radius : 10 px 0 px 10 px 0 px ;
font - size : 12 px ;
color : # fff ;