优化全局下拉刷新
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"name" : "花开物业",
|
||||
"appid" : "__UNI__29C3D60",
|
||||
"description" : "智慧社区居民端面向小区业主使用,支持注册、验证码、账号密码多种登录方式,提供密码找回功能,账号使用安全便捷。支持多小区切换,首页设有轮播 banner、社区公告,集成远程开门、生活缴费、在线报修、访客邀请、社区活动常用服务。全服务板块统一涵盖门禁开门、线上缴费、报修申报、访客预约、投诉反馈、问卷调研、活动报名、社区公示、一键联系物业功能。个人中心可管理房屋、住户、车位、车辆信息,支持更换手机号、修改密码、消息通知设置、版本更新及账号退出,一站式满足业主居家生活、社区服务、房产车辆管理需求,实现社区生活数字化、便捷化。",
|
||||
"versionName" : "1.1.7",
|
||||
"versionCode" : 130,
|
||||
"versionName" : "1.1.8",
|
||||
"versionCode" : 131,
|
||||
"transformPx" : false,
|
||||
"uniCloud" : {
|
||||
"provider" : "aliyun",
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- 顶部标题栏 固定 -->
|
||||
<view class="top-bar">
|
||||
<uni-nav-bar left-icon="left" title="活动列表" backgroundColor="none" :border="false" :statusBar="false"
|
||||
@clickLeft="narBack" />
|
||||
</view>
|
||||
|
||||
<!-- 滚动区域:从banner开始滚动 -->
|
||||
<scroll-view class="scroll-container" scroll-y="true" @scrolltolower="loadMoreData"
|
||||
:lower-threshold="100">
|
||||
<view class="scroll-container">
|
||||
<!-- 顶部图片 -->
|
||||
<view class="top-img">
|
||||
<image class="banner-img" src="http://47.104.199.163:9090/images/home/banner.png" mode="aspectFill"></image>
|
||||
@@ -121,13 +114,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch } from 'vue'
|
||||
import { onLoad, onUnload, onShow } from '@dcloudio/uni-app'
|
||||
import { onLoad, onUnload, onShow, onPullDownRefresh, onReachBottom, onBackPress } from '@dcloudio/uni-app'
|
||||
import moment from 'moment';
|
||||
import { getActivityList,getMyActivityList} from '../api/api.js'
|
||||
|
||||
@@ -140,7 +133,6 @@ const currentPage = ref(1)
|
||||
const pageSize = ref(10)
|
||||
const total = ref(0)
|
||||
const displayedActivities = ref([]) // 当前显示的活动列表
|
||||
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
|
||||
|
||||
// 筛选条件:status ''全部, '0'未开始, '1'进行中, '2'已结束
|
||||
const filters = ref([
|
||||
@@ -161,19 +153,17 @@ const resetAndLoad = () => {
|
||||
getActivityListData(1)
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回上一级页面
|
||||
*/
|
||||
const narBack = () => {
|
||||
// 页面返回拦截:根据来源页返回对应 tab,否则走默认返回
|
||||
onBackPress(() => {
|
||||
const sourcePage = uni.getStorageSync('sourcePage')
|
||||
if (sourcePage === "index") {
|
||||
uni.switchTab({ url: "/pages/index/index" })
|
||||
return true
|
||||
} else if (sourcePage === "serviceIndex") {
|
||||
uni.switchTab({ url: "/pages/serviceIndex/serviceIndex" })
|
||||
} else {
|
||||
uni.navigateBack()
|
||||
return true
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 切换选项卡(活动列表/我的活动)
|
||||
@@ -249,6 +239,7 @@ const getActivityListData = async (pageNum = 1) => {
|
||||
if (pageNum === 1) displayedActivities.value = []
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,6 +285,7 @@ const getMyActivityListData = async (pageNum = 1) => {
|
||||
if (pageNum === 1) displayedActivities.value = []
|
||||
} finally {
|
||||
isLoading.value = false
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,7 +399,21 @@ onLoad(() => {
|
||||
*/
|
||||
onUnload(() => {
|
||||
uni.$off('refreshActivityList')
|
||||
})
|
||||
});
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh(() => {
|
||||
if (activeTab.value === 'list') {
|
||||
resetAndLoad();
|
||||
} else {
|
||||
resetAndLoadMy();
|
||||
}
|
||||
});
|
||||
|
||||
// 上拉加载更多
|
||||
onReachBottom(() => {
|
||||
loadMoreData();
|
||||
});
|
||||
|
||||
/**
|
||||
* 监听我的活动筛选条件变化
|
||||
@@ -423,33 +429,14 @@ watch(() => myFilter.value, () => {
|
||||
/* 页面容器 */
|
||||
.container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 状态栏 - 自适应设备状态栏高度 */
|
||||
.status-bar {
|
||||
/* height: var(--status-bar-height); */
|
||||
/* height: 46px; */
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* 顶部标题 固定 */
|
||||
.top-bar {
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
/* 滚动区域 */
|
||||
.scroll-container {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
padding: 0 30rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ import { navigateToLogin } from '@/common/checkLogin.js'
|
||||
|
||||
let baseUrl = '';
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// baseUrl = 'http://192.168.1.6:8080'; // 开发环境
|
||||
baseUrl = 'http://192.168.1.222:8080';
|
||||
baseUrl = 'http://192.168.1.6:8080'; // 开发环境
|
||||
// baseUrl = 'http://192.168.1.222:8080';
|
||||
} else {
|
||||
baseUrl = 'https://wuyeapi.ckdzkj.com'; // 生产环境
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<view class="contentStyle">
|
||||
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<uni-nav-bar title="巡检记录" backgroundColor="transparent" :border="false" left-icon="left" @click-left="goBack" />
|
||||
<view class="content-wrap">
|
||||
<!-- 时间选择器 -->
|
||||
<view class="timebox">
|
||||
@@ -18,7 +16,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 巡检列表 -->
|
||||
<scroll-view scroll-y class="scroll-view">
|
||||
<view class="scroll-view">
|
||||
<view class="list-container" v-if="listData.length > 0">
|
||||
<view class="card-item" v-for="(item, index) in listData" :key="index" @click="goToInspectionDetail(item)">
|
||||
<view class="card-head">
|
||||
@@ -35,7 +33,7 @@
|
||||
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
|
||||
<text class="empty-text">暂无数据</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@@ -111,14 +109,11 @@
|
||||
// ---------- 日期变更(使用 moment) ----------
|
||||
const handleChangeTime = (e) => {
|
||||
if (e) {
|
||||
// e 格式为 YYYY-MM-DD,用 moment 解析并格式化为 MM-DD
|
||||
showDate.value = moment(e).format('MM-DD')
|
||||
datetime.value = e
|
||||
} else {
|
||||
// 用户清空日期,可根据业务设置默认值或置空
|
||||
showDate.value = '选择日期'
|
||||
datetime.value = ''
|
||||
// 如果希望清空时不请求,可 return,否则也重置列表
|
||||
}
|
||||
// 重置分页并刷新
|
||||
pageNum.value = 1
|
||||
@@ -140,11 +135,6 @@
|
||||
fetchList(true)
|
||||
})
|
||||
|
||||
// ---------- 返回 ----------
|
||||
const goBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
// ---------- 页面返回拦截 ----------
|
||||
onBackPress(() => {
|
||||
const pages = getCurrentPages()
|
||||
@@ -165,9 +155,9 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||
}
|
||||
|
||||
@@ -180,11 +170,6 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.timebox {
|
||||
width: 188rpx;
|
||||
height: 48rpx;
|
||||
@@ -249,10 +234,10 @@
|
||||
}
|
||||
}
|
||||
//滚动容器 App重点:高度自适应 \*/
|
||||
.scroll-view {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
}
|
||||
// .scroll-view {
|
||||
// flex: 1;
|
||||
// height: 0;
|
||||
// }
|
||||
.list-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -1,20 +1,8 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
|
||||
<!-- 滚动区域 -->
|
||||
<pull-refresh-scroll
|
||||
custom-class="scroll-box"
|
||||
:refreshing="refreshing"
|
||||
:loading-more="loadingMore"
|
||||
:no-more-data="noMoreData"
|
||||
:empty="revenueList.length === 0 && !loading"
|
||||
empty-text="暂无通知"
|
||||
no-more-text="没有更多通知了"
|
||||
@refresh="onRefresh"
|
||||
@load-more="loadMore"
|
||||
>
|
||||
<view class="list-wrap">
|
||||
<!-- 列表 -->
|
||||
<view class="list-wrap">
|
||||
<view
|
||||
v-for="revenue in revenueList"
|
||||
:key="revenue.noticeId"
|
||||
@@ -31,17 +19,15 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</pull-refresh-scroll>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad ,onShow,onUnload} from '@dcloudio/uni-app'
|
||||
import { onLoad, onShow, onUnload, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { getRevenueList } from '../api/apiSub.js'
|
||||
|
||||
const revenueList = ref([])
|
||||
const refreshing = ref(false)
|
||||
const loadingMore = ref(false)
|
||||
const noMoreData = ref(false)
|
||||
const loading = ref(false)
|
||||
@@ -73,8 +59,8 @@ const loadRevenue = async (isRefresh = false) => {
|
||||
} catch (e) {}
|
||||
finally {
|
||||
loading.value = false
|
||||
refreshing.value = false
|
||||
loadingMore.value = false
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
// 更新单条已读状态
|
||||
@@ -93,10 +79,13 @@ onShow(() =>{
|
||||
loadRevenue(true)
|
||||
})
|
||||
|
||||
const onRefresh = () => {
|
||||
refreshing.value = true
|
||||
onPullDownRefresh(() => {
|
||||
loadRevenue(true)
|
||||
}
|
||||
})
|
||||
|
||||
onReachBottom(() => {
|
||||
loadMore()
|
||||
})
|
||||
|
||||
const loadMore = () => {
|
||||
if (noMoreData.value || loadingMore.value) return
|
||||
@@ -123,21 +112,7 @@ page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.status_bar {
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.scroll-box {
|
||||
flex: 1;
|
||||
height: 0; /* 让滚动区域生效 */
|
||||
min-height: 100vh;
|
||||
}
|
||||
.list-wrap {
|
||||
padding: 50rpx 40rpx;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="contentStyle" style="">
|
||||
|
||||
<scroll-view class="page" scroll-y="true" @scrolltolower="getList" refresher-enabled="true" :refresher-triggered="isRefreshing" @refresherrefresh="onRefresh">
|
||||
<view class="page">
|
||||
<view v-if="carList.length === 0" class="empty-state">
|
||||
<uni-icons type="info" size="60" color="#ccc"></uni-icons>
|
||||
<text class="empty-text">暂无数据</text>
|
||||
@@ -22,7 +22,7 @@
|
||||
{{ item.certificationStatus }}
|
||||
</view> -->
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<button class="confirm-btn" @click="addCar">添加车辆</button>
|
||||
</view>
|
||||
@@ -38,27 +38,27 @@
|
||||
getMyCarList
|
||||
} from '@/pageSubPack/api/apiSub.js'
|
||||
import {
|
||||
onShow
|
||||
onShow,
|
||||
onPullDownRefresh,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
const statusBarHeight = ref(20)
|
||||
const defaultCarImg = "http://47.104.199.163:9090/images/propertyImgs/defaultCarImg.png"
|
||||
const carList = ref([])
|
||||
const loadingMore = ref(false)
|
||||
const noMoreData = ref(false)
|
||||
const isRefreshing = ref(false)
|
||||
|
||||
const pageNum = ref(1)
|
||||
const pageSize = ref(10)
|
||||
|
||||
// ==================== 下拉刷新 ====================
|
||||
const onRefresh = () => {
|
||||
isRefreshing.value = true
|
||||
onPullDownRefresh(() => {
|
||||
pageNum.value = 1
|
||||
noMoreData.value = false
|
||||
carList.value = []
|
||||
loadingMore.value = false
|
||||
getList()
|
||||
}
|
||||
})
|
||||
|
||||
// 页面加载时请求第一页
|
||||
onMounted(() => {
|
||||
@@ -107,14 +107,16 @@
|
||||
console.error('列表接口报错:', err)
|
||||
} finally {
|
||||
loadingMore.value = false
|
||||
// 关闭 refresher 下拉刷新状态
|
||||
if (isRefreshing.value) {
|
||||
isRefreshing.value = false
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ==================== 上拉加载更多 ====================
|
||||
onReachBottom(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
const getStatusText = (status) => {
|
||||
if (status === 0) return '未绑定'
|
||||
if (status === 1) return '已绑定'
|
||||
@@ -144,24 +146,16 @@
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F3F8FD;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style scoped>
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
min-height: 100vh;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.page {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
height: 0;
|
||||
overflow-y: auto;
|
||||
padding: 0px 40rpx 140rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="contentStyle" style="">
|
||||
|
||||
<scroll-view class="page" scroll-y :refresher-enabled="true" :refresher-triggered="isRefreshing" @refresherrefresh="onRefresh" @scrolltolower="loadMore">
|
||||
<view class="page">
|
||||
<!-- 空状态 -->
|
||||
<view v-if="houseList.length === 0" class="empty-state">
|
||||
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
|
||||
@@ -46,7 +46,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 底部添加按钮 -->
|
||||
<view class="bottom-btn">
|
||||
<button class="add-btn" @click="addHouse">添加房屋</button>
|
||||
@@ -62,7 +62,9 @@
|
||||
onMounted,
|
||||
} from 'vue'
|
||||
import {
|
||||
onShow
|
||||
onShow,
|
||||
onPullDownRefresh,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
getMyHouseList,
|
||||
@@ -74,17 +76,15 @@
|
||||
const pageNum = ref(1)
|
||||
const pageSize = ref(10)
|
||||
const noMoreData = ref(false)
|
||||
const isRefreshing = ref(false)
|
||||
|
||||
// ==================== 下拉刷新 ====================
|
||||
const onRefresh = () => {
|
||||
isRefreshing.value = true
|
||||
onPullDownRefresh(() => {
|
||||
pageNum.value = 1
|
||||
noMoreData.value = false
|
||||
houseList.value = []
|
||||
loading.value = false
|
||||
getList()
|
||||
}
|
||||
})
|
||||
|
||||
// ==================== 获取列表数据 ====================
|
||||
const getList = async () => {
|
||||
@@ -113,7 +113,6 @@
|
||||
console.error('列表接口报错:', err)
|
||||
} finally {
|
||||
loading.value = false
|
||||
isRefreshing.value = false
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
@@ -125,6 +124,11 @@
|
||||
getList()
|
||||
}
|
||||
|
||||
// ==================== 上拉加载更多 ====================
|
||||
onReachBottom(() => {
|
||||
loadMore()
|
||||
})
|
||||
|
||||
// 页面加载时请求第一页
|
||||
onMounted(() => {
|
||||
pageNum.value = 1
|
||||
@@ -211,16 +215,11 @@
|
||||
|
||||
<style scoped>
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
/* 关键:固定高度,底部按钮不动 */
|
||||
min-height: 100vh;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.page {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0px 40rpx 120rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!-- <view class="status-bar"></view>
|
||||
<uni-nav-bar title="我的车位" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false">
|
||||
</uni-nav-bar> -->
|
||||
<scroll-view class="page" scroll-y="true" @scrolltolower="getList" refresher-enabled="true" :refresher-triggered="isRefreshing" @refresherrefresh="onRefresh">
|
||||
<view class="page">
|
||||
<view v-if="parkingSpaceList.length === 0" class="empty-state">
|
||||
<uni-icons type="info" size="60" color="#ccc"></uni-icons>
|
||||
<text class="empty-text">暂无数据</text>
|
||||
@@ -54,7 +54,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="bottom-btn">
|
||||
<button class="add-btn" @click="addParkingSpace">添加车位</button>
|
||||
</view>
|
||||
@@ -66,7 +66,9 @@
|
||||
ref
|
||||
} from 'vue'
|
||||
import {
|
||||
onShow
|
||||
onShow,
|
||||
onPullDownRefresh,
|
||||
onReachBottom
|
||||
} from '@dcloudio/uni-app'
|
||||
import {
|
||||
getCarList
|
||||
@@ -76,14 +78,13 @@
|
||||
const parkingSpaceList = ref([])
|
||||
|
||||
// ==================== 下拉刷新 ====================
|
||||
const onRefresh = () => {
|
||||
isRefreshing.value = true
|
||||
onPullDownRefresh(() => {
|
||||
pageNum.value = 1
|
||||
noMoreData.value = false
|
||||
parkingSpaceList.value = []
|
||||
loadingMore.value = false
|
||||
getList()
|
||||
}
|
||||
})
|
||||
|
||||
// 页面显示时请求第一页(首次进入和从详情/修改页返回时都会刷新)
|
||||
onShow(() => {
|
||||
@@ -96,7 +97,6 @@
|
||||
|
||||
const loadingMore = ref(false)
|
||||
const noMoreData = ref(false)
|
||||
const isRefreshing = ref(false)
|
||||
|
||||
const pageNum = ref(1)
|
||||
const pageSize = ref(10)
|
||||
@@ -148,13 +148,15 @@
|
||||
console.error('列表接口报错:', err)
|
||||
} finally {
|
||||
loadingMore.value = false
|
||||
// 关闭 refresher 下拉刷新状态
|
||||
if (isRefreshing.value) {
|
||||
isRefreshing.value = false
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
|
||||
// ==================== 上拉加载更多 ====================
|
||||
onReachBottom(() => {
|
||||
getList()
|
||||
})
|
||||
|
||||
const tapParkingSpace = (item) => {
|
||||
console.log(item);
|
||||
uni.navigateTo({
|
||||
@@ -187,15 +189,11 @@
|
||||
}
|
||||
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.page {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0px 40rpx 140rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -1,30 +1,7 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="status_bar"></view>
|
||||
<!-- 固定导航栏 -->
|
||||
<uni-nav-bar
|
||||
left-icon="left"
|
||||
title="通知公告"
|
||||
background-color="#F9F9F9"
|
||||
@clickLeft="narBack"
|
||||
/>
|
||||
|
||||
<!-- 滚动区域 -->
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="scroll-box"
|
||||
:refresher-enabled="true"
|
||||
:refresher-triggered="refreshing"
|
||||
@refresherrefresh="onRefresh"
|
||||
@scrolltolower="loadMore"
|
||||
>
|
||||
<view class="list-wrap">
|
||||
<!-- 下拉刷新 -->
|
||||
<view class="refresh" v-if="refreshing">
|
||||
<uni-icons type="spinner-cycle" class="spin"/> 刷新中...
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<view class="list-wrap">
|
||||
<view
|
||||
v-for="notice in noticeList"
|
||||
:key="notice.noticeId"
|
||||
@@ -49,17 +26,15 @@
|
||||
<text class="empty-text">暂无通知</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onLoad ,onShow,onUnload} from '@dcloudio/uni-app'
|
||||
import { onLoad, onShow, onUnload, onBackPress, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
||||
import { getNoticeList } from '../api/api.js'
|
||||
|
||||
const noticeList = ref([])
|
||||
const refreshing = ref(false)
|
||||
const loadingMore = ref(false)
|
||||
const noMoreData = ref(false)
|
||||
const loading = ref(false)
|
||||
@@ -90,8 +65,8 @@ const loadNotices = async (isRefresh = false) => {
|
||||
} catch (e) {}
|
||||
finally {
|
||||
loading.value = false
|
||||
refreshing.value = false
|
||||
loadingMore.value = false
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
}
|
||||
// 更新单条已读状态
|
||||
@@ -107,10 +82,13 @@ onShow(() =>{
|
||||
loadNotices(true)
|
||||
})
|
||||
|
||||
const onRefresh = () => {
|
||||
refreshing.value = true
|
||||
onPullDownRefresh(() => {
|
||||
loadNotices(true)
|
||||
}
|
||||
})
|
||||
|
||||
onReachBottom(() => {
|
||||
loadMore()
|
||||
})
|
||||
|
||||
const loadMore = () => {
|
||||
if (noMoreData.value || loadingMore.value) return
|
||||
@@ -119,12 +97,18 @@ const loadMore = () => {
|
||||
loadNotices()
|
||||
}
|
||||
|
||||
const narBack = () => {
|
||||
onBackPress(() => {
|
||||
const page = uni.getStorageSync('sourcePage')
|
||||
if (page === 'index') uni.switchTab({ url: '/pages/index/index' })
|
||||
if (page === 'serviceIndex') uni.switchTab({ url: '/pages/serviceIndex/serviceIndex' })
|
||||
uni.removeStorageSync('sourcePage')
|
||||
}
|
||||
if (page === 'index') {
|
||||
uni.switchTab({ url: '/pages/index/index' })
|
||||
return true
|
||||
}
|
||||
if (page === 'serviceIndex') {
|
||||
uni.switchTab({ url: '/pages/serviceIndex/serviceIndex' })
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
onLoad(() => {
|
||||
isFirstShow.value = false
|
||||
@@ -140,23 +124,6 @@ onUnload(()=>{
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
.page {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.status_bar {
|
||||
height: 46px;
|
||||
width: 100%;
|
||||
}
|
||||
.scroll-box {
|
||||
flex: 1;
|
||||
height: 0; /* 让滚动区域生效 */
|
||||
}
|
||||
.list-wrap {
|
||||
padding: 40rpx;
|
||||
}
|
||||
@@ -217,7 +184,7 @@ page {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.refresh, .load-more, .no-more {
|
||||
.load-more, .no-more {
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
color: #999;
|
||||
@@ -245,11 +212,4 @@ page {
|
||||
padding: 10rpx 30rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.spin {
|
||||
animation: rotate 1s linear infinite;
|
||||
}
|
||||
@keyframes rotate {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
@@ -1,18 +1,8 @@
|
||||
<template>
|
||||
<view class="repair-page">
|
||||
<!-- <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view> -->
|
||||
<!-- 顶部导航栏 -->
|
||||
<!-- <view class="nav-bar">
|
||||
<view class="nav-left" @tap="goBack">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/home/arr-left.png" style="width: 18px; height: 18px;"></image>
|
||||
</view>
|
||||
<view class="nav-title">在线报修</view>
|
||||
<view class="nav-right"></view>
|
||||
</view> -->
|
||||
|
||||
<!-- 报修类型Tab -->
|
||||
<scroll-view class="scroll-container" scroll-y="true"
|
||||
:lower-threshold="100" @scrolltolower="loadMore">
|
||||
<view class="scroll-container">
|
||||
<view class="repair-type-tabs">
|
||||
<view
|
||||
class="type-tab"
|
||||
@@ -108,13 +98,13 @@
|
||||
<text v-if="loading">加载中...</text>
|
||||
<text v-else-if="!hasMoreData">没有更多数据了</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import { onLoad, onShow, onUnload } from '@dcloudio/uni-app';
|
||||
import { onLoad, onShow, onUnload, onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app';
|
||||
import { getQueryRepair } from '../api/api.js';
|
||||
|
||||
// 报修类型(public:公共报修,personal:个人报修)
|
||||
@@ -192,6 +182,7 @@ const fetchRepairList = async (reset = false) => {
|
||||
uni.showToast({ title: '网络异常', icon: 'none' });
|
||||
} finally {
|
||||
loading.value = false;
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -202,6 +193,16 @@ const loadMore = () => {
|
||||
fetchRepairList();
|
||||
};
|
||||
|
||||
// 下拉刷新
|
||||
onPullDownRefresh(() => {
|
||||
fetchRepairList(true);
|
||||
});
|
||||
|
||||
// 上拉加载更多
|
||||
onReachBottom(() => {
|
||||
loadMore();
|
||||
});
|
||||
|
||||
// 监听状态变化自动刷新(切换 tab 时重置到第一页)
|
||||
watch(activeStatus, () => {
|
||||
fetchRepairList(true);
|
||||
@@ -259,10 +260,8 @@ onUnload(() =>{
|
||||
/* 页面整体样式 */
|
||||
.repair-page {
|
||||
background: linear-gradient(to bottom left, #E2F0FF 0%, #f9f9f9 50%);
|
||||
height: 100vh;
|
||||
min-height: 100vh;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.status_bar {
|
||||
height: var(--status-bar-height);
|
||||
@@ -307,9 +306,7 @@ onUnload(() =>{
|
||||
}
|
||||
/* 滚动区域 */
|
||||
.scroll-container {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
/* 报修类型Tab */
|
||||
@@ -324,7 +321,7 @@ onUnload(() =>{
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100px;
|
||||
height: 85px;
|
||||
border-radius: 8px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
@@ -474,10 +471,10 @@ onUnload(() =>{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: -6rpx;
|
||||
margin-bottom: 4px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
.img-placeholder {
|
||||
width: 80px;
|
||||
width: 95px;
|
||||
height: 80px;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -654,9 +654,10 @@ textarea {
|
||||
.time-item {
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-size: 28rpx;
|
||||
font-size: 26rpx;
|
||||
color: #BBBCBE;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 选中项样式(高亮) */
|
||||
|
||||
@@ -274,7 +274,7 @@ const previewImage = (url) => {
|
||||
}
|
||||
|
||||
.photo-item {
|
||||
width: 80px;
|
||||
width: 95px;
|
||||
height: 80px;
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<view class="page">
|
||||
<view class="container">
|
||||
<!-- 水/电费列表 -->
|
||||
<scroll-view class="details-scroll" scroll-y="true" @scrolltolower="onPayLoadMore" :style="{ height: paymentList.length ? '550rpx' : '180rpx' }">
|
||||
<scroll-view class="details-scroll" scroll-y="true" @scrolltolower="onPayLoadMore">
|
||||
<view class="bill-list">
|
||||
<template v-if="paymentList.length != 0">
|
||||
<view class="bill-item" @click="goToBill(item)" v-for="item,index in paymentList" :key="index">
|
||||
@@ -45,7 +45,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- 物业费/垃圾处理费列表 -->
|
||||
<scroll-view class="details-scroll-bill" scroll-y="true" @scrolltolower="onLoadMore" :style="{ height: detailslist.length ? '550rpx' : '180rpx' }">
|
||||
<scroll-view class="details-scroll-bill" scroll-y="true" @scrolltolower="onLoadMore">
|
||||
<view class="bill-list">
|
||||
<template v-if="detailslist.length != 0">
|
||||
<view class="bill-item" :class="{ 'bill-paid': !item.amount }" @click="!item.amount ? null : goToBill(item)" v-for="item,index in detailslist" :key="index">
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onShow, onLoad, onBackPress, onUnload } from '@dcloudio/uni-app'
|
||||
import { onShow, onLoad, onBackPress, onUnload, onPullDownRefresh } from '@dcloudio/uni-app'
|
||||
import { getTopUpDetails, getTopUpSelectByResident } from '/pageSubPack/api/apiSub.js'
|
||||
import { getCurrentVillage } from '/pageSubPack/api/api.js'
|
||||
|
||||
@@ -266,6 +266,8 @@ const getBillDetails = (isLoadMore = false) => {
|
||||
pageNum.value--
|
||||
loadingMore.value = false
|
||||
}
|
||||
}).finally(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
})
|
||||
}
|
||||
const onLoadMore = () => {
|
||||
@@ -307,12 +309,20 @@ const getPayList = async (isLoadMore = false) => {
|
||||
title: err.msg || '网络异常',
|
||||
icon: 'none'
|
||||
})
|
||||
} finally {
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
const onPayLoadMore = () => {
|
||||
getPayList(true)
|
||||
}
|
||||
|
||||
// 下拉刷新:同时刷新水电费和物业费列表
|
||||
onPullDownRefresh(() => {
|
||||
getBillDetails();
|
||||
getPayList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -391,6 +401,8 @@ page {
|
||||
background-color: #fff;
|
||||
padding: 30rpx;
|
||||
border-radius: 10rpx;
|
||||
min-height: 550rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.bill-item {
|
||||
@@ -576,7 +588,7 @@ page {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 120rpx;
|
||||
height: 490rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<view class="contentStyle" style="">
|
||||
<view class="status-bar"></view>
|
||||
<!-- <view class="status-bar"></view>
|
||||
<uni-nav-bar title="缴费记录" left-icon="left" @clickLeft="goBack" backgroundColor="transparent" :border="false">
|
||||
</uni-nav-bar>
|
||||
</uni-nav-bar> -->
|
||||
|
||||
<view class="page">
|
||||
<!-- 累计缴费 -->
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 列表区域 -->
|
||||
<scroll-view class="page" scroll-y>
|
||||
<view class="page">
|
||||
<view class="page-container">
|
||||
<view v-if="dataList.length === 0" class="empty-state">
|
||||
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
|
||||
@@ -42,7 +42,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="bottom-btn-wrap">
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import {onLoad, onShow} from '@dcloudio/uni-app'
|
||||
import {onLoad, onShow, onPullDownRefresh} from '@dcloudio/uni-app'
|
||||
import {getComplainList} from '../api/apiSub.js'
|
||||
|
||||
// 分段器
|
||||
@@ -111,6 +111,8 @@ const getComplainListData = async () =>{
|
||||
}catch(err){
|
||||
// console.log('dess',err)
|
||||
uni.showToast({title:err.msg || '网络异常',icon:'error'})
|
||||
}finally{
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
onLoad(() =>{
|
||||
@@ -118,7 +120,11 @@ onLoad(() =>{
|
||||
})
|
||||
onShow(() => {
|
||||
getComplainListData()
|
||||
})
|
||||
});
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
getComplainListData();
|
||||
});
|
||||
|
||||
// 跳转到详情
|
||||
const turnToDetail = (item) => {
|
||||
@@ -149,16 +155,12 @@ const addComplaintsSuggestions = () => {
|
||||
|
||||
<style scoped>
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||
}
|
||||
|
||||
.page {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0px 40rpx;
|
||||
padding: 0px 40rpx 200rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -183,6 +185,10 @@ const addComplaintsSuggestions = () => {
|
||||
}
|
||||
|
||||
.tab-wrap {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
background: #e2efff;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
@@ -310,9 +316,15 @@ const addComplaintsSuggestions = () => {
|
||||
}
|
||||
|
||||
.bottom-btn-wrap {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
padding: 20rpx 30rpx 40rpx;
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.next-btn {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<scroll-view class="page" scroll-y>
|
||||
<view class="page">
|
||||
<view class="list-container">
|
||||
<view v-if="currentList.length === 0" class="empty-state">
|
||||
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
|
||||
@@ -43,13 +43,13 @@
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;height:2rpx;"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { onShow,onPullDownRefresh } from '@dcloudio/uni-app'
|
||||
import {getQuestionnaireList} from '../api/apiSub.js'
|
||||
|
||||
// 状态栏高度
|
||||
@@ -102,6 +102,8 @@
|
||||
}
|
||||
}catch(err){
|
||||
uni.showToast({ title: err.msg ||'网络异常', icon: 'none' })
|
||||
}finally{
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,10 +133,13 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 生命周期:每次显示时刷新数据
|
||||
onShow(() => {
|
||||
getDataList()
|
||||
})
|
||||
// 下拉刷新
|
||||
onPullDownRefresh(() => {
|
||||
getDataList();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@@ -145,9 +150,10 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
min-height: 100%;
|
||||
// height: 100%;
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 访客列表 -->
|
||||
<scroll-view class="list-container" scroll-y>
|
||||
<view class="list-container">
|
||||
<view
|
||||
class="visitor-item"
|
||||
v-for="(item, index) in filterdList"
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
<!-- 底部占位,防止最后一项贴底 -->
|
||||
<view class="list-bottom-space"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<!-- 新增邀请按钮 -->
|
||||
<view class="add-btn-wrapper">
|
||||
@@ -92,7 +92,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import { onShow, onPullDownRefresh } from "@dcloudio/uni-app";
|
||||
import { getVisitorList } from "../api/api.js";
|
||||
|
||||
const activeTab = ref("waiting");
|
||||
@@ -124,12 +124,18 @@ const fetchVisitorList = async () => {
|
||||
visitorList.value = mapData(res.data || []);
|
||||
} catch (err) {
|
||||
uni.showToast({ title: err.msg, icon: "none" });
|
||||
} finally {
|
||||
uni.stopPullDownRefresh();
|
||||
}
|
||||
};
|
||||
|
||||
onShow(() => {
|
||||
fetchVisitorList();
|
||||
})
|
||||
});
|
||||
|
||||
onPullDownRefresh(() => {
|
||||
fetchVisitorList();
|
||||
});
|
||||
|
||||
const filterdList = computed(() => {
|
||||
return visitorList.value.filter((item) => item.status === activeTab.value);
|
||||
@@ -149,10 +155,7 @@ const addInvitation = () => {
|
||||
<style scoped>
|
||||
/* 页面根容器 */
|
||||
.visitor-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
min-height: 100vh;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(135deg, #e2f0ff 0%, #f9f9f9 50%);
|
||||
padding: 0 30rpx;
|
||||
@@ -160,7 +163,11 @@ const addInvitation = () => {
|
||||
|
||||
/* 标签切换栏 */
|
||||
.tab-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
background: #e2f0ff;
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
@@ -190,9 +197,6 @@ const addInvitation = () => {
|
||||
|
||||
/* 列表区域 */
|
||||
.list-container {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 访客卡片 */
|
||||
@@ -332,10 +336,3 @@ const addInvitation = () => {
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
/* 页面容器撑满并禁止整体滚动,让内部 scroll-view 单独滚动 */
|
||||
page {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -79,7 +80,8 @@
|
||||
"pages": [{
|
||||
"path": "onlineRepair",
|
||||
"style": {
|
||||
"navigationBarTitleText": "在线报修"
|
||||
"navigationBarTitleText": "在线报修",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -125,7 +127,8 @@
|
||||
"pages": [{
|
||||
"path": "visitor-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客邀请"
|
||||
"navigationBarTitleText": "访客邀请",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -154,7 +157,7 @@
|
||||
"path": "activityList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "活动列表",
|
||||
"navigationStyle": "custom"
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -179,7 +182,8 @@
|
||||
"path": "noticeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "通知公告",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarBackgroundColor": "#F9F9F9",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -287,9 +291,8 @@
|
||||
}, {
|
||||
"path": "myParkingSpaceIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的车位"
|
||||
// "enablePullDownRefresh ": true
|
||||
// "navigationStyle": "custom"
|
||||
"navigationBarTitleText": "我的车位",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -334,7 +337,8 @@
|
||||
{
|
||||
"path": "myCarIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的车辆"
|
||||
"navigationBarTitleText": "我的车辆",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
|
||||
|
||||
@@ -396,8 +400,8 @@
|
||||
{
|
||||
"path": "paymentRecord",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "缴费记录"
|
||||
// "navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -413,6 +417,7 @@
|
||||
"navigationBarTitleText": "生活缴费",
|
||||
"navigationBarBackgroundColor": "#dfedfd",
|
||||
"navigationBarTextStyle": "black",
|
||||
"enablePullDownRefresh": true,
|
||||
"app-plus": {
|
||||
"titleNView": {
|
||||
"autoBackButton": true
|
||||
@@ -453,7 +458,8 @@
|
||||
"pages": [{
|
||||
"path": "complaintsSuggestionsIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "投诉建议"
|
||||
"navigationBarTitleText": "投诉建议",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}, {
|
||||
"path": "complaintsDetail",
|
||||
@@ -469,7 +475,8 @@
|
||||
}, {
|
||||
"path": "questionnaireSurveyIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "问卷调查"
|
||||
"navigationBarTitleText": "问卷调查",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -498,7 +505,7 @@
|
||||
"path": "inspection",
|
||||
"style": {
|
||||
"navigationBarTitleText": "巡检记录",
|
||||
"navigationStyle": "custom"
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -510,7 +517,8 @@
|
||||
{
|
||||
"path": "public-revenue",
|
||||
"style": {
|
||||
"navigationBarTitleText": "公区收益"
|
||||
"navigationBarTitleText": "公区收益",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 顶部渐变背景(固定在内容下方) -->
|
||||
<view class="nar-top" v-if="pageReady"></view>
|
||||
|
||||
<!-- 固定头部 -->
|
||||
<view class="header-fixed" v-if="pageReady">
|
||||
<view class="nar-top"></view>
|
||||
<view class="status-bar"></view>
|
||||
<view class="header-content">
|
||||
<!-- 小区选择 -->
|
||||
@@ -29,11 +31,9 @@
|
||||
</view>
|
||||
|
||||
<!-- 滚动内容区 -->
|
||||
<pull-refresh-scroll
|
||||
custom-class="main-scroll"
|
||||
v-if="pageReady"
|
||||
:refreshing="refreshing"
|
||||
@refresh="onRefresh">
|
||||
<view
|
||||
class="main-scroll"
|
||||
v-if="pageReady">
|
||||
<!-- banner -->
|
||||
<view class="bannarClass">
|
||||
<up-swiper :key="bannerSwiperKey" :list="bannerList" indicator indicatorMode="dot" radius="10" circular>
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
<!-- 底部占位 -->
|
||||
<view class="scroll-bottom-space"></view>
|
||||
</pull-refresh-scroll>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -150,7 +150,8 @@
|
||||
import {
|
||||
onLoad,
|
||||
onUnload,
|
||||
onShow
|
||||
onShow,
|
||||
onPullDownRefresh
|
||||
} from '@dcloudio/uni-app'
|
||||
import moment from 'moment'
|
||||
import {
|
||||
@@ -165,7 +166,6 @@
|
||||
|
||||
// 列表数据状态
|
||||
const isDropdownOpen = ref(false)
|
||||
const refreshing = ref(false)
|
||||
const activityList = ref([])
|
||||
|
||||
const serviceItems = [
|
||||
@@ -354,16 +354,12 @@
|
||||
getNoticeData()
|
||||
getNewActivityList()
|
||||
getbannarData()
|
||||
refreshing.value = false
|
||||
uni.stopPullDownRefresh()
|
||||
}
|
||||
|
||||
const onRefresh = async () => {
|
||||
refreshing.value = true
|
||||
await nextTick()
|
||||
await refreshAllData()
|
||||
await nextTick()
|
||||
refreshing.value = false
|
||||
}
|
||||
onPullDownRefresh(() => {
|
||||
refreshAllData()
|
||||
})
|
||||
|
||||
const resetPageData = () => {
|
||||
currentCommunity.value = '请绑定房屋'
|
||||
@@ -381,7 +377,6 @@
|
||||
const currentUserId = uni.getStorageSync('userId') || ''
|
||||
const userIdChanged = lastUserId.value !== currentUserId
|
||||
const needReload = uni.getStorageSync('needReloadUserInfo')
|
||||
refreshing.value = false
|
||||
if (userIdChanged) {
|
||||
resetPageData()
|
||||
refreshAllData()
|
||||
@@ -477,13 +472,7 @@
|
||||
<style lang="scss" scoped>
|
||||
.content-class {
|
||||
background-color: #f9f9f9;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
|
||||
/* 加载遮罩 */
|
||||
.loading-mask {
|
||||
@@ -501,21 +490,24 @@
|
||||
background: repeating-linear-gradient(to right, #EDF4FA, #C0E4FB);
|
||||
}
|
||||
|
||||
/* 固定头部 */
|
||||
.header-fixed {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
|
||||
/* 顶部渐变背景(固定在内容下方) */
|
||||
.nar-top {
|
||||
height: 400rpx;
|
||||
width: 100%;
|
||||
background: repeating-linear-gradient(to right, #EDF4FA, #C0E4FB);
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* 固定头部 */
|
||||
.header-fixed {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
background: repeating-linear-gradient(to right, #EDF4FA, #C0E4FB);
|
||||
|
||||
.status-bar {
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
@@ -530,9 +522,6 @@
|
||||
|
||||
/* 滚动区域 */
|
||||
.main-scroll {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user