修复bug
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
<template>
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="prs-scroll"
|
||||
:class="customClass"
|
||||
:style="scrollStyle"
|
||||
:refresher-enabled="refresherEnabled"
|
||||
:refresher-triggered="refreshing"
|
||||
@refresherrefresh="onRefresh"
|
||||
@scrolltolower="onScrollToLower"
|
||||
>
|
||||
<!-- 下拉刷新指示器 -->
|
||||
<view class="prs-refresh" v-if="refreshing">
|
||||
<uni-icons type="spinner-cycle" class="prs-spin" size="16" color="#999" />
|
||||
<text class="prs-refresh-text">刷新中...</text>
|
||||
</view>
|
||||
|
||||
<!-- 主体内容 -->
|
||||
<slot></slot>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view v-if="empty && showEmpty" class="prs-empty">
|
||||
<slot name="empty">
|
||||
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
|
||||
<text class="prs-empty-text">{{ emptyText }}</text>
|
||||
</slot>
|
||||
</view>
|
||||
|
||||
<!-- 底部加载/无更多状态 -->
|
||||
<view class="prs-bottom">
|
||||
<view v-if="loadingMore" class="prs-load-more">加载中...</view>
|
||||
<view v-else-if="noMoreData && !empty" class="prs-no-more">{{ noMoreText }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineProps({
|
||||
/** 是否正在刷新 */
|
||||
refreshing: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/** 下拉刷新是否启用 */
|
||||
refresherEnabled: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/** 加载更多状态 */
|
||||
loadingMore: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/** 是否无更多数据 */
|
||||
noMoreData: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/** 列表是否为空 */
|
||||
empty: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/** 是否显示空状态 */
|
||||
showEmpty: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
/** 空状态文案 */
|
||||
emptyText: {
|
||||
type: String,
|
||||
default: '暂无数据'
|
||||
},
|
||||
/** 没有更多文案 */
|
||||
noMoreText: {
|
||||
type: String,
|
||||
default: '没有更多了'
|
||||
},
|
||||
/** 自定义类名,允许外部设置 scroll-view 样式 */
|
||||
customClass: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
/** 自定义 scroll-view 内联样式 */
|
||||
scrollStyle: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['refresh', 'loadMore'])
|
||||
|
||||
const onRefresh = () => {
|
||||
emit('refresh')
|
||||
}
|
||||
|
||||
const onScrollToLower = () => {
|
||||
emit('loadMore')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.prs-scroll {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// 刷新指示器
|
||||
.prs-refresh {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.prs-spin {
|
||||
animation: prs-rotate 1s linear infinite;
|
||||
}
|
||||
|
||||
.prs-refresh-text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
// 空状态
|
||||
.prs-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 100rpx 0;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.prs-empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
// 底部状态
|
||||
.prs-bottom {
|
||||
.prs-load-more,
|
||||
.prs-no-more {
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes prs-rotate {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "花开物业",
|
||||
"appid" : "__UNI__29C3D60",
|
||||
"description" : "智慧社区居民端面向小区业主使用,支持注册、验证码、账号密码多种登录方式,提供密码找回功能,账号使用安全便捷。支持多小区切换,首页设有轮播 banner、社区公告,集成远程开门、生活缴费、在线报修、访客邀请、社区活动常用服务。全服务板块统一涵盖门禁开门、线上缴费、报修申报、访客预约、投诉反馈、问卷调研、活动报名、社区公示、一键联系物业功能。个人中心可管理房屋、住户、车位、车辆信息,支持更换手机号、修改密码、消息通知设置、版本更新及账号退出,一站式满足业主居家生活、社区服务、房产车辆管理需求,实现社区生活数字化、便捷化。",
|
||||
"versionName" : "1.0.2",
|
||||
"versionCode" : 115,
|
||||
"versionName" : "1.0.3",
|
||||
"versionCode" : 116,
|
||||
"transformPx" : false,
|
||||
"uniCloud" : {
|
||||
"provider" : "aliyun",
|
||||
|
||||
@@ -574,6 +574,7 @@ watch(() => myFilter.value, () => {
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
padding-right: 100rpx;
|
||||
}
|
||||
|
||||
.activity-detail {
|
||||
|
||||
@@ -129,7 +129,8 @@
|
||||
// border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
.article-title {
|
||||
font-size: 32rpx;
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
line-height: 1.4;
|
||||
@@ -215,6 +216,8 @@
|
||||
}
|
||||
|
||||
.paragraph {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
margin-bottom: 20px;
|
||||
text-align: justify;
|
||||
text-indent: 2em;
|
||||
@@ -422,6 +425,8 @@
|
||||
border-bottom-color: #333333;
|
||||
|
||||
.article-title {
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,20 +10,18 @@
|
||||
/> -->
|
||||
|
||||
<!-- 滚动区域 -->
|
||||
<scroll-view
|
||||
scroll-y
|
||||
class="scroll-box"
|
||||
:refresher-enabled="true"
|
||||
:refresher-triggered="refreshing"
|
||||
@refresherrefresh="onRefresh"
|
||||
@scrolltolower="loadMore"
|
||||
<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="refresh" v-if="refreshing">
|
||||
<uni-icons type="spinner-cycle" class="spin"/> 刷新中...
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<view
|
||||
v-for="revenue in revenueList"
|
||||
@@ -40,16 +38,8 @@
|
||||
<uni-icons type="right" size="13" color="#007AFF"/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载中 / 无更多 / 空布局 -->
|
||||
<view class="load-more" v-if="loadingMore">加载中...</view>
|
||||
<view class="no-more" v-if="noMoreData && revenueList.length">没有更多通知了</view>
|
||||
<view v-if="revenueList.length === 0 && !loading" class="empty-state">
|
||||
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
|
||||
<text class="empty-text">暂无通知</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</pull-refresh-scroll>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -215,39 +205,4 @@ page {
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
.refresh, .load-more, .no-more {
|
||||
text-align: center;
|
||||
padding: 20rpx;
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 100rpx 0;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.refresh-btn {
|
||||
background: #007AFF;
|
||||
color: #fff;
|
||||
border-radius: 50rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.spin {
|
||||
animation: rotate 1s linear infinite;
|
||||
}
|
||||
@keyframes rotate {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
</style>
|
||||
@@ -58,12 +58,12 @@
|
||||
title: '注销账号',
|
||||
type: 'arrow'
|
||||
},
|
||||
// {
|
||||
// title: '升级版本',
|
||||
// type: 'text',
|
||||
// value: '当前版本 1.0.0',
|
||||
// valueClass: 'item-version'
|
||||
// }
|
||||
{
|
||||
title: '升级版本',
|
||||
type: 'text',
|
||||
value: '当前版本 1.0.0',
|
||||
valueClass: 'item-version'
|
||||
}
|
||||
])
|
||||
|
||||
// 格式化字节大小
|
||||
|
||||
@@ -196,6 +196,8 @@
|
||||
line-height: 1.4;
|
||||
margin-bottom: 16px;
|
||||
text-align: center;
|
||||
word-break: break-all;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.article-meta {
|
||||
@@ -279,6 +281,8 @@
|
||||
margin-bottom: 20px;
|
||||
text-align: justify;
|
||||
text-indent: 2em;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
|
||||
/* 富文本里的图片不超出屏幕 */
|
||||
:deep(img),
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"pages": [{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationBarBackgroundColor": "#F8F8F8"
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<!-- 固定头部 -->
|
||||
<view class="header-fixed" v-if="pageReady">
|
||||
<view class="nar-top"></view>
|
||||
<view class="status-bar"></view>
|
||||
<view class="header-content">
|
||||
<!-- 小区选择 -->
|
||||
<view class="header-container" @click="navigateToPage">
|
||||
@@ -28,10 +29,14 @@
|
||||
</view>
|
||||
|
||||
<!-- 滚动内容区 -->
|
||||
<scroll-view class="main-scroll" v-if="pageReady" scroll-y>
|
||||
<pull-refresh-scroll
|
||||
custom-class="main-scroll"
|
||||
v-if="pageReady"
|
||||
:refreshing="refreshing"
|
||||
@refresh="onRefresh">
|
||||
<!-- banner -->
|
||||
<view class="bannarClass">
|
||||
<up-swiper :key="bannerSwiperKey" :list="bannerList" indicator indicatorMode="dot" radius="10">
|
||||
<up-swiper :key="bannerSwiperKey" :list="bannerList" indicator indicatorMode="dot" radius="10" circular>
|
||||
<template #default="{ item, index }">
|
||||
<image :src="item" mode="aspectFill" class="banner-img" @tap="bannerClick(index)"></image>
|
||||
</template>
|
||||
@@ -47,43 +52,15 @@
|
||||
</template>
|
||||
</uni-notice-bar>
|
||||
</view>
|
||||
<!-- 一键开门 -->
|
||||
<!-- 快捷服务 -->
|
||||
<view class="u-demo-block__content bg-card-open">
|
||||
<up-row justify="space-between" gutter="10">
|
||||
<up-col span="3">
|
||||
<view class="demo-layout bg-purple openClass" @click="openDoorClick">
|
||||
<up-col span="3" v-for="item in serviceItems" :key="item.title">
|
||||
<view class="demo-layout bg-purple openClass" @click="serviceClick(item)">
|
||||
<view class="iconClass">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/home/openDoor.png" class="iconClass-img">
|
||||
</image>
|
||||
<image :src="item.icon" class="iconClass-img"></image>
|
||||
</view>
|
||||
<view class="title-dome-calss">一键开门</view>
|
||||
</view>
|
||||
</up-col>
|
||||
<up-col span="3">
|
||||
<view class="demo-layout bg-purple-light openClass" @click="payMentClick">
|
||||
<view class="iconClass">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/home/lifePay.png" class="iconClass-img">
|
||||
</image>
|
||||
</view>
|
||||
<view class="title-dome-calss">生活缴费</view>
|
||||
</view>
|
||||
</up-col>
|
||||
<up-col span="3">
|
||||
<view class="demo-layout bg-purple openClass" @click="onlineRepairClick">
|
||||
<view class="iconClass">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/home/repair.png" class="iconClass-img">
|
||||
</image>
|
||||
</view>
|
||||
<view class="title-dome-calss">在线报修</view>
|
||||
</view>
|
||||
</up-col>
|
||||
<up-col span="3">
|
||||
<view class="demo-layout bg-purple-light openClass" @click="visitorClick">
|
||||
<view class="iconClass">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/home/visitorInvite.png"
|
||||
class="iconClass-img"></image>
|
||||
</view>
|
||||
<view class="title-dome-calss">访客邀请</view>
|
||||
<view class="title-dome-calss">{{ item.title }}</view>
|
||||
</view>
|
||||
</up-col>
|
||||
</up-row>
|
||||
@@ -161,7 +138,7 @@
|
||||
|
||||
<!-- 底部占位 -->
|
||||
<view class="scroll-bottom-space"></view>
|
||||
</scroll-view>
|
||||
</pull-refresh-scroll>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -188,7 +165,15 @@
|
||||
|
||||
// 列表数据状态
|
||||
const isDropdownOpen = ref(false)
|
||||
const refreshing = ref(false)
|
||||
const activityList = ref([])
|
||||
|
||||
const serviceItems = [
|
||||
{ title: '一键开门', icon: 'https://wuyeadmin.bugtc.com/images/home/openDoor.png', url: '/pageSubPack/notice-list/oneClickOpen' },
|
||||
{ title: '生活缴费', icon: 'https://wuyeadmin.bugtc.com/images/home/lifePay.png', url: '/pageSubPack/payment-list/paymentIndex' },
|
||||
{ title: '在线报修', icon: 'https://wuyeadmin.bugtc.com/images/home/repair.png', url: '/pageSubPack/online-repair/onlineRepair' },
|
||||
{ title: '访客邀请', icon: 'https://wuyeadmin.bugtc.com/images/home/visitorInvite.png', url: '/pageSubPack/visitor/visitor-list' }
|
||||
]
|
||||
const currentCommunity = ref('请绑定房屋')
|
||||
const currentVillageId = ref('')
|
||||
const bannerList = ref([])
|
||||
@@ -302,6 +287,15 @@
|
||||
getNewActivityList()
|
||||
getbannarData()
|
||||
pageReady.value = true
|
||||
refreshing.value = false
|
||||
}
|
||||
|
||||
const onRefresh = async () => {
|
||||
refreshing.value = true
|
||||
await nextTick()
|
||||
await refreshAllData()
|
||||
await nextTick()
|
||||
refreshing.value = false
|
||||
}
|
||||
|
||||
const resetPageData = () => {
|
||||
@@ -334,30 +328,28 @@
|
||||
uni.$off('confirm', slelctHomeData)
|
||||
})
|
||||
|
||||
const openDoorClick = () => {
|
||||
if (!requireLogin()) return
|
||||
uni.setStorageSync('sourcePage', "index")
|
||||
uni.navigateTo({ url: "/pageSubPack/notice-list/oneClickOpen" })
|
||||
}
|
||||
|
||||
const payMentClick = () => {
|
||||
if (!requireLogin()) return
|
||||
uni.setStorageSync('sourcePage', "index")
|
||||
uni.navigateTo({ url: "/pageSubPack/payment-list/paymentIndex" })
|
||||
}
|
||||
|
||||
const navigateToPage = () => {
|
||||
const cachedVillageId = uni.getStorageSync('currentVillageId')
|
||||
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
|
||||
currentCommunity.value = '请先绑定房屋'
|
||||
uni.setStorageSync('currentCommunity', '请先绑定房屋')
|
||||
uni.showToast({ title: '请先绑定小区', icon: 'none', duration: 1500 })
|
||||
setTimeout(() => { uni.switchTab({ url: '/pages/myIndex/myIndex' }) }, 1500)
|
||||
uni.navigateTo({ url: '/pageSubPack/my/myHouseIndex' })
|
||||
} else {
|
||||
uni.navigateTo({ url: `/pageSubPack/notice-list/selectHome?villageId=${cachedVillageId}` })
|
||||
}
|
||||
}
|
||||
|
||||
const serviceClick = (item) => {
|
||||
if (!requireLogin()) return
|
||||
const cachedVillageId = uni.getStorageSync('currentVillageId')
|
||||
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
|
||||
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 })
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('sourcePage', 'index')
|
||||
uni.navigateTo({ url: item.url })
|
||||
}
|
||||
|
||||
const getNewActivityList = async () => {
|
||||
try {
|
||||
const res = await getActivitylatest({ villageId: uni.getStorageSync('currentVillageId') })
|
||||
@@ -371,17 +363,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
const onlineRepairClick = () => {
|
||||
if (!requireLogin()) return
|
||||
uni.setStorageSync('sourcePage', "index")
|
||||
uni.navigateTo({ url: '/pageSubPack/online-repair/onlineRepair' })
|
||||
}
|
||||
|
||||
const visitorClick = () => {
|
||||
if (!requireLogin()) return
|
||||
uni.setStorageSync('sourcePage', "index")
|
||||
uni.navigateTo({ url: "/pageSubPack/visitor/visitor-list" })
|
||||
}
|
||||
|
||||
const goToActivityDetail = (activity) => {
|
||||
if (!requireLogin()) return
|
||||
@@ -392,6 +374,11 @@
|
||||
|
||||
const moreClick = () => {
|
||||
if (!requireLogin()) return
|
||||
const cachedVillageId = uni.getStorageSync('currentVillageId')
|
||||
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
|
||||
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 })
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('sourcePage', "index")
|
||||
uni.navigateTo({ url: "/pageSubPack/activity-list/activityList" })
|
||||
}
|
||||
@@ -439,6 +426,12 @@
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.header-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
|
||||
@@ -99,6 +99,14 @@
|
||||
// 返回
|
||||
const onItemClick = (item) => {
|
||||
if (!requireLogin()) return
|
||||
const cachedVillageId = uni.getStorageSync('currentVillageId')
|
||||
// 设置不需要绑定小区
|
||||
if (item.title !== '设置') {
|
||||
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
|
||||
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 })
|
||||
return
|
||||
}
|
||||
}
|
||||
if (item.title == '我的房屋') {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myHouseIndex',
|
||||
|
||||
@@ -140,6 +140,11 @@
|
||||
|
||||
const handleFuncClick = (item) => {
|
||||
if (!requireLogin()) return
|
||||
const cachedVillageId = uni.getStorageSync('currentVillageId')
|
||||
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
|
||||
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 })
|
||||
return
|
||||
}
|
||||
uni.setStorageSync('sourcePage', 'serviceIndex')
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
|
||||
Reference in New Issue
Block a user