修复bug
This commit is contained in:
@@ -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,8 +287,17 @@
|
||||
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 = () => {
|
||||
currentCommunity.value = '请先绑定房屋'
|
||||
currentVillageId.value = ''
|
||||
@@ -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)
|
||||
} else {
|
||||
uni.navigateTo({ url: `/pageSubPack/notice-list/selectHome?villageId=${cachedVillageId}` })
|
||||
const navigateToPage = () => {
|
||||
const cachedVillageId = uni.getStorageSync('currentVillageId')
|
||||
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user