修复通知bug

This commit is contained in:
zhouyanli
2026-08-24 08:45:03 +08:00
parent 13ca3f1e08
commit b690c76c01
3 changed files with 15 additions and 11 deletions

View File

@@ -5,7 +5,13 @@
"navigationBarTitleText": "工作台", "navigationBarTitleText": "工作台",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"backgroundTextStyle": "dark" // "backgroundTextStyle": "dark"
"app-plus": {
"pullToRefresh": {
"style": "circle",
"offset": "90px"
}
}
} }
}, },
{ {

View File

@@ -8,10 +8,10 @@
<view class="page-content"> <view class="page-content">
<view class="sticky-header"> <view class="sticky-header">
<!-- 状态栏占位 --> <!-- 状态栏占位 -->
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view> <!-- <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view> -->
<!-- 导航栏 --> <!-- 导航栏 -->
<view class="nav-bar"> <view class="nav-bar">
<text class="nav-title">首页</text> <text class="nav-title"></text>
</view> </view>
<!-- 小区选择 --> <!-- 小区选择 -->
<view class="header-container" @click="navigateToPage"> <view class="header-container" @click="navigateToPage">
@@ -417,12 +417,13 @@ function getMyOrderNum() {
}) })
} }
// 接收选择小区返回的参数 // 切换小区返回的参数
const slelctHomeData = data => { const slelctHomeData = data => {
currentCommunity.value = data.villageName currentCommunity.value = data.villageName
uni.setStorageSync('currentVillage', JSON.stringify(data)) uni.setStorageSync('currentVillage', JSON.stringify(data))
getNoticeData() getNoticeData()
getInspectionData() getInspectionData()
getbannarData(true)
} }
onShow(() => { onShow(() => {
@@ -432,10 +433,8 @@ onShow(() => {
getbannarData() getbannarData()
getMyOrderNum() getMyOrderNum()
permStore.initPerm() // 刷新权限缓存 permStore.initPerm() // 刷新权限缓存
// currentVillageData 和 getInspectionData 已在 onLoad 中调用,不再重复
return return
} }
// 从其他页面返回 / 从后台恢复:只刷新可能变化的数据
getbannarData() getbannarData()
getMyOrderNum() getMyOrderNum()
getNoticeData() getNoticeData()
@@ -458,7 +457,7 @@ onLoad(() => {
}) })
return return
} }
// 已登录:确保 tabBar 显示(未登录启动时曾被 hideTabBar 隐藏,switchTab 不会自动恢复) // 已登录:确保 tabBar 显示
uni.showTabBar({ animation: false }) uni.showTabBar({ animation: false })
uni.$on('confirm', slelctHomeData) uni.$on('confirm', slelctHomeData)
currentVillageData() currentVillageData()
@@ -466,7 +465,6 @@ onLoad(() => {
}) })
onReady(() => { onReady(() => {
// 已登录:首页即最终页,渲染完成后关闭启动屏(未登录由引导页 onReady 关闭)
if (isLoggedIn.value) { if (isLoggedIn.value) {
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.navigator.closeSplashscreen() plus.navigator.closeSplashscreen()

View File

@@ -1,7 +1,7 @@
<template> <template>
<view class="content-style"> <view class="content-style">
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view> <!-- <view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view> -->
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false" /> <uni-nav-bar backgroundColor="transparent" :border="false" />
<scroll-view class="page" scroll-y> <scroll-view class="page" scroll-y>
<view class="user-card"> <view class="user-card">
<image src="https://wuyeadmin.bugtc.com/images/guanjia-logo.png" class="avatar" /> <image src="https://wuyeadmin.bugtc.com/images/guanjia-logo.png" class="avatar" />
@@ -106,7 +106,7 @@ const onItemClick = item => {
.user-card { .user-card {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 40rpx 0; padding: 40rpx 0 0 0;
} }
.avatar { .avatar {