修复bug,优化消息通知滚动

This commit is contained in:
zhouyanli
2026-08-19 17:02:14 +08:00
parent 52c041a4e6
commit c39f995bd1
4 changed files with 52 additions and 43 deletions

View File

@@ -53,6 +53,12 @@
</template>
</up-swiper>
</view>
<!-- banner 占位 -->
<view class="bannarClass" v-else>
<view class="banner-placeholder">
<text>暂无轮播图</text>
</view>
</view>
<!-- 巡检 -->
<view class="inspectionClass">
@@ -421,10 +427,9 @@ const slelctHomeData = data => {
onShow(() => {
if (!isLoggedIn.value) return
if (!hasInit.value) {
// 首次加载:onLoad 已触发过核心数据请求,这里只补 onLoad 没调的和需要每次都刷新的
hasInit.value = true
getbannarData() // onLoad 没调 banner
getMyOrderNum() // onLoad 没调工单数
getbannarData()
getMyOrderNum()
permStore.initPerm() // 刷新权限缓存
// currentVillageData 和 getInspectionData 已在 onLoad 中调用,不再重复
return
@@ -628,6 +633,17 @@ onPullDownRefresh(async () => {
border-radius: 15rpx;
}
.banner-placeholder {
height: 180px;
background: #e8f1fb;
border-radius: 15rpx;
display: flex;
align-items: center;
justify-content: center;
color: #999;
font-size: 26rpx;
}
.inspectionClass {
background: linear-gradient(to right, #7b87fa, #4d5dfa);
border-radius: 16rpx;
@@ -700,6 +716,12 @@ onPullDownRefresh(async () => {
width: calc(100% - 30rpx) !important;
}
/* 固定滚动速度 */
:deep(.uni-noticebar__content-text--scrollable) {
animation-duration: 4s !important;
animation-delay: 0s !important;
}
/* 统计区布局 */
.statistics-wrap {
display: flex;