修改bug,优化导航

This commit is contained in:
zhouyanli
2026-07-30 15:35:02 +08:00
parent a6243cf466
commit 80ff7588b1
54 changed files with 389 additions and 499 deletions

View File

@@ -41,7 +41,7 @@
// 支付成功:返回缴费列表页并刷新数据 // 支付成功:返回缴费列表页并刷新数据
uni.showToast({ title: '支付成功', icon: 'success' }) uni.showToast({ title: '支付成功', icon: 'success' })
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}) })
}, 1500) }, 1500)

View File

@@ -1,8 +1,6 @@
<template> <template>
<view class="page"> <view class="page">
<view class="status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
<uni-nav-bar title="巡检详情" backgroundColor="transparent" :border="false" left-icon="left"
@click-left="goBack" />
<scroll-view scroll-y class="scroll"> <scroll-view scroll-y class="scroll">
<!-- 加载中 --> <!-- 加载中 -->
<view class="loading-wrap" v-if="loading"> <view class="loading-wrap" v-if="loading">

View File

@@ -43,7 +43,7 @@
<script setup> <script setup>
import {ref} from 'vue' import {ref} from 'vue'
import {onLoad,onReachBottom,onPullDownRefresh} from '@dcloudio/uni-app' import {onLoad,onReachBottom,onPullDownRefresh,onBackPress} from '@dcloudio/uni-app'
import {getInspectionList} from '../api/apiSub.js' import {getInspectionList} from '../api/apiSub.js'
import moment from 'moment' // 新增 import moment from 'moment' // 新增
@@ -142,11 +142,19 @@
// ---------- 返回 ---------- // ---------- 返回 ----------
const goBack = () => { const goBack = () => {
uni.switchTab({ uni.navigateBack()
url: '/pages/serviceIndex/serviceIndex'
})
} }
// ---------- 页面返回拦截 ----------
onBackPress(() => {
const pages = getCurrentPages()
if (pages.length > 1) {
return false
}
uni.switchTab({ url: '/pages/serviceIndex/serviceIndex' })
return true
})
// ---------- 跳转详情 ---------- // ---------- 跳转详情 ----------
const goToInspectionDetail = (item) => { const goToInspectionDetail = (item) => {
uni.navigateTo({ uni.navigateTo({
@@ -167,6 +175,9 @@
flex: 1; flex: 1;
padding: 20rpx 40rpx; padding: 20rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex;
flex-direction: column;
overflow: hidden;
} }
.status-bar { .status-bar {
@@ -239,7 +250,8 @@
} }
//滚动容器 App重点高度自适应 \*/ //滚动容器 App重点高度自适应 \*/
.scroll-view { .scroll-view {
height: calc(100vh - 140rpx); flex: 1;
height: 0;
} }
.list-container { .list-container {
display: flex; display: flex;

View File

@@ -1,8 +1,8 @@
<template> <template>
<view class="container"> <view class="container">
<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" left-icon="left" <uni-nav-bar title="收益详情" backgroundColor="transparent" :border="false" left-icon="left"
@click-left="goBack" /> @click-left="goBack" /> -->
<!-- 暂无数据 --> <!-- 暂无数据 -->
<view v-if="isLoaded && !noticeDetail.noticeTitle" class="empty-state"> <view v-if="isLoaded && !noticeDetail.noticeTitle" class="empty-state">
@@ -51,7 +51,6 @@
// =====方法==== // =====方法====
onLoad((options) =>{ onLoad((options) =>{
currentNoticeId.value = options?.id currentNoticeId.value = options?.id
console.log('收益id---------',currentNoticeId.value)
if(currentNoticeId.value){ if(currentNoticeId.value){
getDetailsData(currentNoticeId.value) getDetailsData(currentNoticeId.value)
} else { } else {

View File

@@ -1,13 +1,13 @@
<template> <template>
<view class="page"> <view class="page">
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view> <!-- <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
<!-- 固定导航栏 -->
<uni-nav-bar <uni-nav-bar
left-icon="left" left-icon="left"
title="公区收益" title="公区收益"
background-color="#F9F9F9" background-color="#F9F9F9"
@clickLeft="narBack" @clickLeft="narBack"
/> /> -->
<!-- 滚动区域 --> <!-- 滚动区域 -->
<scroll-view <scroll-view

View File

@@ -41,7 +41,7 @@
<image src="https://wuyeadmin.bugtc.com/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image> <image src="https://wuyeadmin.bugtc.com/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image>
</view> </view>
<uni-easyinput class="input-content" type="text" v-model="account" <uni-easyinput class="input-content" type="text" v-model="account"
placeholder="请输入帐号" :inputBorder="false" maxlength="16" :placeholderStyle="placeholderStyle"> placeholder="请输入帐号" :inputBorder="false" maxlength="20" :placeholderStyle="placeholderStyle">
</uni-easyinput> </uni-easyinput>
</view> </view>

View File

@@ -301,7 +301,7 @@
icon: 'success' icon: 'success'
}); });
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/loginSub/login?mode=pwd' url: '/pageSubPack/loginSub/login?mode=pwd'
}); });
}, 1500); }, 1500);

View File

@@ -287,7 +287,7 @@
const selectItem = (typeStr) => { const selectItem = (typeStr) => {
if (typeStr === '车辆品牌') { if (typeStr === '车辆品牌') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectCarBrand' url: '/pageSubPack/my/selectCarBrand'
}) })
} }
@@ -301,7 +301,7 @@
uni.removeStorageSync('carImageUrl') uni.removeStorageSync('carImageUrl')
uni.removeStorageSync('carBrandId') uni.removeStorageSync('carBrandId')
uni.removeStorageSync('checkType') uni.removeStorageSync('checkType')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myCarIndex' url: '/pageSubPack/my/myCarIndex'
}) })
} }

View File

@@ -300,19 +300,7 @@
name: '其他' name: '其他'
} }
]) ])
const cardTypes = ref([{ const cardTypes = ref([])
id: 0,
name: '居民身份证'
},
{
id: 1,
name: '护照'
},
{
id: 2,
name: '其他'
}
])
@@ -487,6 +475,7 @@
clearInterval(timer) clearInterval(timer)
}) })
onLoad((option) => { onLoad((option) => {
loadCardTypes()
loadRelations() loadRelations()
console.log(uni.getStorageSync('updateHouseId')); console.log(uni.getStorageSync('updateHouseId'));
if (option.id) { if (option.id) {
@@ -535,6 +524,21 @@
upDataListNum.value++ upDataListNum.value++
} }
// 获取证件类型下拉数据
const loadCardTypes = async () => {
try {
const res = await getHouseDataList({dictType:"com_id_card_type",dictName:"证件类型"})
if (res.code === 200) {
cardTypes.value = (res.rows || []).map(item => ({
id: item.dictValue,
name: item.dictLabel
}))
}
} catch (err) {
console.error('加载证件类型失败:', err)
}
}
// 获取与业主关系下拉数据 // 获取与业主关系下拉数据
const loadRelations = async () => { const loadRelations = async () => {
try { try {
@@ -776,7 +780,7 @@
console.log(type); console.log(type);
console.log(uni.getStorageSync('checkType')); console.log(uni.getStorageSync('checkType'));
if (type === '小区') { if (type === '小区') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectResidentialCommunity?sourcePage=' + 'addHouse', url: '/pageSubPack/my/selectResidentialCommunity?sourcePage=' + 'addHouse',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -791,7 +795,7 @@
} else { } else {
uni.setStorageSync('checkType', '楼栋'); uni.setStorageSync('checkType', '楼栋');
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectBuilding', url: '/pageSubPack/my/selectBuilding',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -808,7 +812,7 @@
} else { } else {
uni.setStorageSync('checkType', '单元'); uni.setStorageSync('checkType', '单元');
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectBuilding', url: '/pageSubPack/my/selectBuilding',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -824,7 +828,7 @@
} else { } else {
uni.setStorageSync('checkType', '楼层'); uni.setStorageSync('checkType', '楼层');
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectBuilding', url: '/pageSubPack/my/selectBuilding',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -841,7 +845,7 @@
} else { } else {
uni.setStorageSync('checkType', '户号'); uni.setStorageSync('checkType', '户号');
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectBuilding', url: '/pageSubPack/my/selectBuilding',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -878,7 +882,7 @@
uni.removeStorageSync('houseStatus') uni.removeStorageSync('houseStatus')
uni.removeStorageSync('houseIsDefault') uni.removeStorageSync('houseIsDefault')
uni.removeStorageSync('updateHouseId') uni.removeStorageSync('updateHouseId')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myHouseIndex', url: '/pageSubPack/my/myHouseIndex',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},

View File

@@ -269,14 +269,14 @@
} }
} }
const bindCarClick = () => { const bindCarClick = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/bindCar' url: '/pageSubPack/my/bindCar'
}) })
} }
const selectItem = (typeStr) => { const selectItem = (typeStr) => {
if (typeStr === '选择小区') { if (typeStr === '选择小区') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectResidentialCommunity?sourcePage=addParkingSpace' url: '/pageSubPack/my/selectResidentialCommunity?sourcePage=addParkingSpace'
}) })
} }
@@ -284,7 +284,7 @@
// if (!formData.value.community) { // if (!formData.value.community) {
// return uni.showToast({ title: '请先选择上级', icon: 'none' }) // return uni.showToast({ title: '请先选择上级', icon: 'none' })
// } // }
// uni.redirectTo({ url: '/pageSubPack/my/bindHouse' }) // uni.navigateTo({ url: '/pageSubPack/my/bindHouse' })
// } // }
if (typeStr === '停车场') { if (typeStr === '停车场') {
if (!formData.value.community) { if (!formData.value.community) {
@@ -294,7 +294,7 @@
}) })
} }
uni.setStorageSync('checkType', '停车场') uni.setStorageSync('checkType', '停车场')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectParingLot' url: '/pageSubPack/my/selectParingLot'
}) })
} }
@@ -306,7 +306,7 @@
}) })
} }
uni.setStorageSync('checkType', '车位编号') uni.setStorageSync('checkType', '车位编号')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectParingLot' url: '/pageSubPack/my/selectParingLot'
}) })
} }
@@ -317,7 +317,7 @@
icon: 'none' icon: 'none'
}) })
} }
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectOwner' url: '/pageSubPack/my/selectOwner'
}) })
} }
@@ -338,7 +338,7 @@
uni.removeStorageSync('bindCarName') uni.removeStorageSync('bindCarName')
uni.removeStorageSync('ownerId') uni.removeStorageSync('ownerId')
uni.removeStorageSync('ownerName') uni.removeStorageSync('ownerName')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myParkingSpaceIndex' url: '/pageSubPack/my/myParkingSpaceIndex'
}) })
} }

View File

@@ -190,7 +190,7 @@
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace' url: '/pageSubPack/my/addParkingSpace'
}) })
} }

View File

@@ -202,7 +202,7 @@
} }
} }
const goNext = () => { const goNext = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectParingLot', url: '/pageSubPack/my/selectParingLot',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -211,7 +211,7 @@
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace', url: '/pageSubPack/my/addParkingSpace',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},

View File

@@ -100,7 +100,7 @@
} }
const clickUpdate = () => { const clickUpdate = () => {
uni.setStorageSync('operationType', 'update') uni.setStorageSync('operationType', 'update')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addCar?id=' + id.value url: '/pageSubPack/my/addCar?id=' + id.value
}) })
} }
@@ -140,7 +140,7 @@
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myCarIndex' url: '/pageSubPack/my/myCarIndex'
}) })
} }

View File

@@ -135,7 +135,7 @@ const onSubmit = () => {
// 返回 // 返回
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/settingIndex' url: '/pageSubPack/my/settingIndex'
}) })
} }

View File

@@ -80,7 +80,7 @@ import { authChangePassword } from '../api/apiSub.js'
} }
const goBack = () =>{ const goBack = () =>{
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/settingIndex', url: '/pageSubPack/my/settingIndex',
}); });
} }

View File

@@ -75,7 +75,7 @@ const onDeleteAccount = () => {
if (res.code === 200) { if (res.code === 200) {
uni.showToast({ title: '注销成功', icon: 'success' }) uni.showToast({ title: '注销成功', icon: 'success' })
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/loginSub/login?mode=pwd' url: '/pageSubPack/loginSub/login?mode=pwd'
}) })
}, 1500) }, 1500)
@@ -92,7 +92,7 @@ const onDeleteAccount = () => {
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/settingIndex', url: '/pageSubPack/my/settingIndex',
}); });
} }

View File

@@ -203,7 +203,7 @@
// 方法(函数名完全不变) // 方法(函数名完全不变)
const clickUpdate = () => { const clickUpdate = () => {
uni.setStorageSync('operationType', 'update') uni.setStorageSync('operationType', 'update')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addHouse?id=' + id.value + '&sourcePage=addHouse' url: '/pageSubPack/my/addHouse?id=' + id.value + '&sourcePage=addHouse'
}) })
} }
@@ -249,7 +249,7 @@
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myHouseIndex' url: '/pageSubPack/my/myHouseIndex'
}) })
} }

View File

@@ -116,14 +116,14 @@
const handleItemClick = (item, index) => { const handleItemClick = (item, index) => {
uni.setStorageSync('operationType', 'update') uni.setStorageSync('operationType', 'update')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/carDetail?id=' + item.id + '&status=' + item.status url: '/pageSubPack/my/carDetail?id=' + item.id + '&status=' + item.status
}) })
} }
const addCar = () => { const addCar = () => {
uni.setStorageSync('operationType', 'add') uni.setStorageSync('operationType', 'add')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addCar' url: '/pageSubPack/my/addCar'
}) })
} }

View File

@@ -170,7 +170,7 @@
const tapHouse = (item) => { const tapHouse = (item) => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/houseDetail?id=' + item.id + '&certificationStatus=' + item.certificationStatus, url: '/pageSubPack/my/houseDetail?id=' + item.id + '&certificationStatus=' + item.certificationStatus,
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -180,7 +180,7 @@
const addHouse = () => { const addHouse = () => {
uni.setStorageSync('operationType', 'add'); uni.setStorageSync('operationType', 'add');
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addHouse', url: '/pageSubPack/my/addHouse',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},

View File

@@ -151,14 +151,14 @@
const tapParkingSpace = (item) => { const tapParkingSpace = (item) => {
console.log(item); console.log(item);
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/parkingSpaceDetail?id=' + item.id + '&statusClass=' + item.checkStatus url: '/pageSubPack/my/parkingSpaceDetail?id=' + item.id + '&statusClass=' + item.checkStatus
}) })
} }
const addParkingSpace = () => { const addParkingSpace = () => {
uni.setStorageSync('operationType', 'add') uni.setStorageSync('operationType', 'add')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace' url: '/pageSubPack/my/addParkingSpace'
}) })
} }

View File

@@ -218,7 +218,7 @@
const onModify = () => { const onModify = () => {
uni.setStorageSync('operationType', 'update') uni.setStorageSync('operationType', 'update')
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace?id=' + id.value + '&sourcePage=addParkingSpace' url: '/pageSubPack/my/addParkingSpace?id=' + id.value + '&sourcePage=addParkingSpace'
}) })
} }
@@ -258,7 +258,7 @@
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myParkingSpaceIndex' url: '/pageSubPack/my/myParkingSpaceIndex'
}) })
} }

View File

@@ -140,11 +140,11 @@
const goFreash = () => { const goFreash = () => {
console.log(checkType.value, '刷新页面') console.log(checkType.value, '刷新页面')
if (checkType.value !== '户号') { if (checkType.value !== '户号') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectBuilding' url: '/pageSubPack/my/selectBuilding'
}) })
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addHouse' url: '/pageSubPack/my/addHouse'
}) })
} }
@@ -165,7 +165,7 @@
uni.removeStorageSync('houseNumberId') uni.removeStorageSync('houseNumberId')
uni.removeStorageSync('houseNumberName') uni.removeStorageSync('houseNumberName')
} }
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addHouse' url: '/pageSubPack/my/addHouse'
}) })
} }

View File

@@ -143,7 +143,7 @@
uni.setStorageSync('carBrandId', item.id); uni.setStorageSync('carBrandId', item.id);
uni.setStorageSync('carBrandName', item.name); uni.setStorageSync('carBrandName', item.name);
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addCar', url: '/pageSubPack/my/addCar',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -155,7 +155,7 @@
uni.removeStorageSync('carBrandId'); uni.removeStorageSync('carBrandId');
uni.removeStorageSync('carBrandName'); uni.removeStorageSync('carBrandName');
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addCar', url: '/pageSubPack/my/addCar',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},

View File

@@ -171,7 +171,7 @@
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace' url: '/pageSubPack/my/addParkingSpace'
}) })
} }

View File

@@ -135,11 +135,11 @@
const goFreash = () => { const goFreash = () => {
if (checkType.value != '车位编号') { if (checkType.value != '车位编号') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectParingLot' url: '/pageSubPack/my/selectParingLot'
}) })
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace' url: '/pageSubPack/my/addParkingSpace'
}) })
} }
@@ -153,7 +153,7 @@
uni.removeStorageSync('parkingSpaceId') uni.removeStorageSync('parkingSpaceId')
uni.removeStorageSync('parkingSpaceName') uni.removeStorageSync('parkingSpaceName')
} }
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace' url: '/pageSubPack/my/addParkingSpace'
}) })
} }

View File

@@ -125,7 +125,7 @@
uni.removeStorageSync('parkingSpaceName'); uni.removeStorageSync('parkingSpaceName');
console.log(sourcePage.value); console.log(sourcePage.value);
if (sourcePage.value == 'addHouse') { if (sourcePage.value == 'addHouse') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/selectBuilding', url: '/pageSubPack/my/selectBuilding',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -133,7 +133,7 @@
}); });
} else if (sourcePage.value == 'addParkingSpace') { } else if (sourcePage.value == 'addParkingSpace') {
uni.setStorageSync('checkType', '停车场') uni.setStorageSync('checkType', '停车场')
uni.redirectTo({ uni.navigateTo({
// url: '/pageSubPack/my/bindHouse', // url: '/pageSubPack/my/bindHouse',
url: '/pageSubPack/my/selectParingLot', url: '/pageSubPack/my/selectParingLot',
success: res => {}, success: res => {},
@@ -149,14 +149,14 @@
uni.removeStorageSync('communityId'); uni.removeStorageSync('communityId');
uni.removeStorageSync('communityName'); uni.removeStorageSync('communityName');
if (sourcePage.value == 'addHouse') { if (sourcePage.value == 'addHouse') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addHouse', url: '/pageSubPack/my/addHouse',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
complete: () => {} complete: () => {}
}); });
} else if (sourcePage.value == 'addParkingSpace') { } else if (sourcePage.value == 'addParkingSpace') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace', url: '/pageSubPack/my/addParkingSpace',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},

View File

@@ -251,11 +251,11 @@
// //
const onItemClick = (item) => { const onItemClick = (item) => {
if (item.title == '更改手机号码') { if (item.title == '更改手机号码') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/changePhone' url: '/pageSubPack/my/changePhone'
}); });
} else if (item.title == '修改密码') { } else if (item.title == '修改密码') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/changePwd' url: '/pageSubPack/my/changePwd'
}); });
} else if (item.title == '清除缓存') { } else if (item.title == '清除缓存') {
@@ -278,7 +278,7 @@
uni.hideLoading(); uni.hideLoading();
}, 2500); }, 2500);
} else if (item.title == '注销账号') { } else if (item.title == '注销账号') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/deleteAccount' url: '/pageSubPack/my/deleteAccount'
}); });
} else if (item.title == '升级版本') { } else if (item.title == '升级版本') {

View File

@@ -1,50 +1,46 @@
<template> <template>
<!-- 页面主容器 --> <!-- 页面主容器 -->
<view class="door-open-page"> <view class="door-open-page">
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view> <view class="page-content">
<!-- 顶部标题栏 --> <view class="top-img">
<view class="top-bar"> <image src="https://wuyeadmin.bugtc.com/images/openDoor/remoteOpen.png" mode="" style="width: 100%;height: 100%;"></image>
<uni-nav-bar left-icon="left" title="远程开门" backgroundColor ="none" :border="false" @clickLeft="narBack" /> </view>
</view>
<view class="top-img">
<image src="https://wuyeadmin.bugtc.com/images/openDoor/remoteOpen.png" mode="" style="width: 100%;height: 100%;"></image>
</view>
<!-- 提示文案 --> <!-- 提示文案 -->
<view class="tips-text"> <view class="tips-text">
远程开门 远程开门
<text class="tips-desc">请选择要开的门并保持距离在10米以内单次仅开一门</text> <text class="tips-desc">请选择要开的门并保持距离在10米以内单次仅开一门</text>
</view> </view>
<!-- 开门成功提示默认隐藏 --> <!-- 开门成功提示默认隐藏 -->
<view v-if="showSuccess" class="success-toast">开门成功</view> <view v-if="showSuccess" class="success-toast">开门成功</view>
<!-- 开门授权区域 --> <!-- 开门授权区域 -->
<view class="auth-container"> <view class="auth-container">
<view class="auth-title">开门授权</view> <view class="auth-title">开门授权</view>
<!-- 网格布局2行2列 --> <!-- 网格布局2行2列 -->
<view class="grid-container"> <view class="grid-container">
<!-- 每个门选项 --> <!-- 每个门选项 -->
<view <view
v-for="(item, index) in doorList" v-for="(item, index) in doorList"
:key="index" :key="index"
:class="['door-item', { active: selectedDoor === item.id }]" :class="['door-item', { active: selectedDoor === item.id }]"
@click="selectDoor(item.id)" @click="selectDoor(item.id)"
> >
<!-- 图标占位 --> <!-- 图标占位 -->
<view class="door-icon"> <view class="door-icon">
<image class="icon-text" :src="selectedDoor === item.id ? item.iconActive:item.iconText"></image> <image class="icon-text" :src="selectedDoor === item.id ? item.iconActive:item.iconText"></image>
</view>
<!-- 门名称 -->
<text class="door-name" :class="{active :selectedDoor === item.id}">{{ item.deviceName }}</text>
</view> </view>
<!-- 门名称 --> </view>
<text class="door-name" :class="{active :selectedDoor === item.id}">{{ item.deviceName }}</text> <!-- 空状态 -->
<view v-if="doorList.length === 0" class="empty-state">
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
<text class="empty-text">暂无可用门禁</text>
</view> </view>
</view> </view>
<!-- 空状态 -->
<view v-if="doorList.length === 0" class="empty-state">
<uni-icons type="info" size="30" color="#ccc"></uni-icons>
<text class="empty-text">暂无可用门禁</text>
</view>
</view> </view>
<!-- 确认开门按钮 --> <!-- 确认开门按钮 -->
@@ -60,7 +56,6 @@ import {getAccessDevices,getAccessOpen} from '../api/api.js'
// 响应式数据:选中的门索引、开门成功提示 // 响应式数据:选中的门索引、开门成功提示
const selectedDoor = ref(-1) // -1表示未选中 const selectedDoor = ref(-1) // -1表示未选中
const showSuccess = ref(false) const showSuccess = ref(false)
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
// 门列表数据 // 门列表数据
const doorList = ref([]) const doorList = ref([])
@@ -70,46 +65,32 @@ const selectDoor = (id) => {
selectedDoor.value = id selectedDoor.value = id
showSuccess.value = false // 选择新门时隐藏成功提示 showSuccess.value = false // 选择新门时隐藏成功提示
} }
// 返回
const narBack = () =>{
if(uni.getStorageSync('sourcePage') === "index"){
uni.switchTab({
url:"/pages/index/index"
})
}else if(uni.getStorageSync('sourcePage') === "serviceIndex"){
uni.switchTab({
url:"/pages/serviceIndex/serviceIndex"
})
}
uni.removeStorageSync('sourcePage')
}
// 查询门禁列表 // 查询门禁列表
const getAccessControl = async () =>{ const getAccessControl = async () =>{
try{ try{
const res = await getAccessDevices() const res = await getAccessDevices()
if(res.code === 200){ if(res.code === 200){
if(res.data){ if(res.data){
doorList.value = res.data || [] doorList.value = res.data || []
}else{ }else{
doorList.value = [] doorList.value = []
} }
}else{ }else{
doorList.value = [] doorList.value = []
uni.showToast({ uni.showToast({
title:'门禁查询失败', title:'门禁查询失败',
icon:"error" icon:"error"
}) })
} }
}catch(err){ }catch(err){
doorList.value = [] doorList.value = []
uni.showToast({ uni.showToast({
title:err.msg || '查询失败', title:err.msg || '查询失败',
icon:"none" icon:"none"
}) })
} }
} }
@@ -132,67 +113,62 @@ const openDoorClick = () => {
} }
// 开门接口 // 开门接口
const getAccessOpenData = async () =>{ const getAccessOpenData = async () =>{
uni.showLoading({ uni.showLoading({
title: '开门中...', title: '开门中...',
mask: true mask: true
}) })
try{ try{
let params = {deviceId:selectedDoor.value} let params = {deviceId:selectedDoor.value}
const res = await getAccessOpen(params) const res = await getAccessOpen(params)
uni.hideLoading() uni.hideLoading()
if(res.code === 200){ if(res.code === 200){
uni.showToast({ uni.showToast({
title:'开门成功', title:'开门成功',
icon:'success' icon:'success'
}) })
}else{ }else{
uni.showToast({ uni.showToast({
title:'开门失败', title:'开门失败',
icon:"error" icon:"error"
}) })
} }
}catch(err){ }catch(err){
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: err.msg || '开门失败', title: err.msg || '开门失败',
icon:"none" icon:"none"
}) })
} }
} }
onLoad(() =>{ onLoad(() =>{
getAccessControl() getAccessControl()
}) })
</script> </script>
<style scoped> <style scoped>
/* 页面全局样式 */ /* 页面全局样式 */
.door-open-page { .door-open-page {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
background: linear-gradient(180deg, #E2F0FF, #F6FAFF); background: linear-gradient(180deg, #E2F0FF, #F6FAFF);
min-height: 100vh; box-sizing: border-box;
}
.page-content {
flex: 1;
height: 0;
overflow-y: auto;
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.status_bar {
/* height: var(--status-bar-height); */
width: 100%;
flex-shrink: 0;
}
/* 顶部标题 */
.top-bar {
text-align: center;
margin-bottom: 20rpx;
}
.title-text {
font-size: 48rpx;
color: #ffffff;
font-weight: bold;
}
.top-img{ .top-img{
width: 460rpx; width: 460rpx;
height: 290rpx; height: 290rpx;
float: right; float: right;
} }
/* 提示文案 */ /* 提示文案 */
@@ -324,6 +300,7 @@ onLoad(() =>{
font-size: 28rpx; font-size: 28rpx;
border-radius: 20rpx; border-radius: 20rpx;
border: none; border: none;
flex-shrink: 0;
} }
.confirm-btn::after { .confirm-btn::after {
border: none; /* 去除uni-app默认按钮边框 */ border: none; /* 去除uni-app默认按钮边框 */

View File

@@ -119,7 +119,8 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
isLoading.value = true isLoading.value = true
try { try {
keyword = decodeURIComponent(keyword) // keyword 来自用户输入时是普通文本,无需 decodeURIComponent
// 仅当 keyword 来自 URL 参数时才需要解码(已在外部处理)
const params = { const params = {
pageNum, pageNum,
pageSize, pageSize,
@@ -129,8 +130,10 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
const res = await getVillageList(params) const res = await getVillageList(params)
if (res.code === 200) { if (res.code === 200) {
const listData = res.data || [] // 兼容两种返回格式:数组 或 { rows, total }
const total = res.data?.total || listData.length const resData = res.data || {}
const listData = Array.isArray(resData) ? resData : (resData.rows || [])
const total = Array.isArray(resData) ? resData.length : (resData.total || listData.length)
if (pageNum === 1) { if (pageNum === 1) {
displayedCommunities.value = listData displayedCommunities.value = listData
@@ -142,20 +145,32 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
hasMoreData.value = displayedCommunities.value.length < totalCount.value hasMoreData.value = displayedCommunities.value.length < totalCount.value
// 默认选中:优先匹配传入的 villageId否则选第一条仅第一页时 // 默认选中:优先匹配传入的 villageId否则选第一条仅第一页时
// 搜索场景下不覆盖用户已手动选择的项
if (pageNum === 1 && displayedCommunities.value.length > 0) { if (pageNum === 1 && displayedCommunities.value.length > 0) {
const targetId = currentVillageIdFromHome.value || uni.getStorageSync('currentVillageId') || '' const userSelectedInCurrentList = selectedItem.value &&
if (targetId) { displayedCommunities.value.some(
const matched = displayedCommunities.value.find( item => String(item.villageId) === String(selectedItem.value.villageId)
item => String(item.villageId) === String(targetId)
) )
selectedItem.value = matched || displayedCommunities.value[0] // 如果用户已选中且该项仍在当前列表中,保留用户选择
} else { if (!isSearching.value || !userSelectedInCurrentList) {
selectedItem.value = displayedCommunities.value[0] const targetId = currentVillageIdFromHome.value || uni.getStorageSync('currentVillageId') || ''
if (targetId) {
const matched = displayedCommunities.value.find(
item => String(item.villageId) === String(targetId)
)
selectedItem.value = matched || displayedCommunities.value[0]
} else {
selectedItem.value = displayedCommunities.value[0]
}
} }
} else if (pageNum === 1) {
// 第一页返回空列表(搜索无结果等场景),清除选中项使确认按钮禁用
selectedItem.value = null
} }
} else { } else {
displayedCommunities.value = [] displayedCommunities.value = []
hasMoreData.value = false hasMoreData.value = false
selectedItem.value = null
uni.showToast({ uni.showToast({
title: res.msg || "查询失败", title: res.msg || "查询失败",
icon: 'error' icon: 'error'
@@ -165,6 +180,7 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
// console.error('获取小区列表失败:', err) // console.error('获取小区列表失败:', err)
displayedCommunities.value = [] displayedCommunities.value = []
hasMoreData.value = false hasMoreData.value = false
selectedItem.value = null
uni.showToast({ uni.showToast({
title: err.msg || "网络异常", title: err.msg || "网络异常",
icon: 'error' icon: 'error'
@@ -238,7 +254,7 @@ const handleConfirm = async () => {
uni.hideLoading() uni.hideLoading()
if (res.code === 200) { if (res.code === 200) {
if (res.data.villageId) { if (res.data?.villageId) {
selectedItem.value.villageId = res.data.villageId selectedItem.value.villageId = res.data.villageId
} }
uni.showToast({ uni.showToast({

View File

@@ -1,14 +1,14 @@
<template> <template>
<view class="repair-page"> <view class="repair-page">
<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">
<view class="nav-left" @tap="goBack"> <view class="nav-left" @tap="goBack">
<image src="https://wuyeadmin.bugtc.com/images/home/arr-left.png" style="width: 18px; height: 18px;"></image> <image src="https://wuyeadmin.bugtc.com/images/home/arr-left.png" style="width: 18px; height: 18px;"></image>
</view> </view>
<view class="nav-title">在线报修</view> <view class="nav-title">在线报修</view>
<view class="nav-right"></view> <view class="nav-right"></view>
</view> </view> -->
<!-- 报修类型Tab --> <!-- 报修类型Tab -->
<scroll-view class="scroll-container" scroll-y="true" <scroll-view class="scroll-container" scroll-y="true"
@@ -108,7 +108,7 @@
<script setup> <script setup>
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
import { onLoad,onUnload } from '@dcloudio/uni-app'; import { onLoad, onShow, onUnload } from '@dcloudio/uni-app';
import { getQueryRepair } from '../api/api.js'; import { getQueryRepair } from '../api/api.js';
// 报修类型public:公共报修personal:个人报修) // 报修类型public:公共报修personal:个人报修)
@@ -176,8 +176,9 @@ const fetchRepairList = async () => {
} }
}; };
// 监听状态变化自动刷新 // 监听状态变化自动刷新(切换 tab 时重置页码)
watch(activeStatus, () => { watch(activeStatus, () => {
pageNum.value = 1;
fetchRepairList(); fetchRepairList();
}); });
@@ -220,6 +221,10 @@ onLoad(() => {
// maintenanceItemId.value = option.maintenanceProjectId || '' // 接收维修项目id // maintenanceItemId.value = option.maintenanceProjectId || '' // 接收维修项目id
fetchRepairList() fetchRepairList()
}); });
onShow(() => {
// 从其他页面返回时刷新列表
fetchRepairList()
});
onUnload(() =>{ onUnload(() =>{
}) })
@@ -229,8 +234,10 @@ onUnload(() =>{
/* 页面整体样式 */ /* 页面整体样式 */
.repair-page { .repair-page {
background: linear-gradient(to bottom left, #E2F0FF 0%, #f9f9f9 50%); background: linear-gradient(to bottom left, #E2F0FF 0%, #f9f9f9 50%);
min-height: 100vh; height: 100vh;
padding: 0 40rpx; padding: 0 40rpx;
display: flex;
flex-direction: column;
} }
.status_bar { .status_bar {
height: var(--status-bar-height); height: var(--status-bar-height);
@@ -277,7 +284,6 @@ onUnload(() =>{
.scroll-container { .scroll-container {
flex: 1; flex: 1;
width: 100%; width: 100%;
height: calc(100vh - 100px);
overflow-y: auto; overflow-y: auto;
box-sizing: border-box; box-sizing: border-box;
} }
@@ -285,7 +291,7 @@ onUnload(() =>{
.repair-type-tabs { .repair-type-tabs {
display: flex; display: flex;
/* background-color: #fff; */ /* background-color: #fff; */
/* padding: 10px; */ padding: 10px;
} }
.type-tab { .type-tab {
flex: 1; flex: 1;
@@ -351,7 +357,7 @@ onUnload(() =>{
/* 报修列表 */ /* 报修列表 */
.repair-list { .repair-list {
padding: 28rpx 0rpx; padding: 28rpx 0rpx 0;
} }
.repair-item { .repair-item {
background-color: #fff; background-color: #fff;
@@ -359,6 +365,9 @@ onUnload(() =>{
padding: 15px; padding: 15px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.repair-item:last-child {
margin-bottom: 0;
}
/* 列表项头部 */ /* 列表项头部 */
.item-header { .item-header {
@@ -425,14 +434,18 @@ onUnload(() =>{
color: #666; color: #666;
line-height: 1.5; line-height: 1.5;
margin-bottom: 10px; margin-bottom: 10px;
word-break: break-all;
white-space: normal;
overflow-wrap: break-word;
/* background-color: #d7e4f5; */ /* background-color: #d7e4f5; */
} }
/* 图片占位 */ /* 图片占位 */
.item-imgs { .item-imgs {
display: flex; display: flex;
/* gap: 12px; */ flex-wrap: wrap;
margin-bottom: 10px; margin: -6rpx;
margin-bottom: 4px;
} }
.img-placeholder { .img-placeholder {
width: 80px; width: 80px;
@@ -442,7 +455,7 @@ onUnload(() =>{
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin-right: 8px; margin: 6rpx;
} }
.empty-state { .empty-state {
display: flex; display: flex;

View File

@@ -22,19 +22,19 @@
<!-- 标题 --> <!-- 标题 -->
<view class="form-item"> <view class="form-item">
<text class="label">标题</text> <text class="label">标题</text>
<uni-easyinput v-model="form.title" placeholder="请输入内容" :inputBorder="false" :maxlength="30"></uni-easyinput> <uni-easyinput v-model="form.title" placeholder="请输入内容" :inputBorder="false" maxlength="30"></uni-easyinput>
</view> </view>
<!-- 问题描述 --> <!-- 问题描述 -->
<view class="form-item-wenti"> <view class="form-item-wenti">
<text class="label">问题描述</text> <text class="label">问题描述</text>
<uni-easyinput v-model="form.desc" placeholder="请描述你的问题" type="textarea"></uni-easyinput> <uni-easyinput v-model="form.desc" placeholder="请描述你的问题" type="textarea" maxlength="200"></uni-easyinput>
</view> </view>
<!-- 手机号 --> <!-- 手机号 -->
<view class="form-item"> <view class="form-item">
<text class="label">手机号</text> <text class="label">手机号</text>
<uni-easyinput type="number" v-model="form.phone" placeholder="请输入手机号" :inputBorder="false"></uni-easyinput> <uni-easyinput type="number" v-model="form.phone" placeholder="请输入手机号" :inputBorder="false" maxlength="11"></uni-easyinput>
</view> </view>
<!-- 预约时间 --> <!-- 预约时间 -->

View File

@@ -15,13 +15,13 @@
<!-- 标题输入 --> <!-- 标题输入 -->
<view class="form-item"> <view class="form-item">
<text class="label">标题</text> <text class="label">标题</text>
<uni-easyinput v-model="form.title" placeholder="请输入内容" :inputBorder="false" :maxlength="30"></uni-easyinput> <uni-easyinput v-model="form.title" placeholder="请输入内容" :inputBorder="false" maxlength="30"></uni-easyinput>
</view> </view>
<!-- 问题描述 --> <!-- 问题描述 -->
<view class="form-item-wenti"> <view class="form-item-wenti">
<text class="label">问题描述</text> <text class="label">问题描述</text>
<uni-easyinput v-model="form.desc" placeholder="请描述你的问题" type="textarea"></uni-easyinput> <uni-easyinput v-model="form.desc" placeholder="请描述你的问题" type="textarea" maxlength="200"></uni-easyinput>
</view> </view>
<!-- 手机号 --> <!-- 手机号 -->

View File

@@ -109,7 +109,7 @@ const mapData = (data) => {
house: data.houseName || '', house: data.houseName || '',
project: data.maintenanceItemName || '', project: data.maintenanceItemName || '',
title: data.item || '', title: data.item || '',
description: data.problem || '', description: (data.problem || '').replace(/\\n/g, '\n'),
phone: data.phone || '', phone: data.phone || '',
time: data.createTime || '', time: data.createTime || '',
images images
@@ -251,6 +251,7 @@ const previewImage = (url) => {
.multi-line { .multi-line {
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-all;
line-height: 1.5; line-height: 1.5;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
border-radius: 8rpx; border-radius: 8rpx;
@@ -260,19 +261,22 @@ const previewImage = (url) => {
.photo-container { .photo-container {
display: flex; display: flex;
gap: 12px; flex-wrap: wrap;
margin-top: 4px; margin-top: 4px;
margin-right: -12px;
margin-bottom: -12px;
} }
.photo-item { .photo-item {
width: 80px; width: 80px;
height: 80px; height: 80px;
/* border: 1px solid #ccc; */
border-radius: 4px; border-radius: 4px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
background-color: #f5f5f5; background-color: #f5f5f5;
margin-right: 12px;
margin-bottom: 12px;
} }
.btn-container { .btn-container {

View File

@@ -216,14 +216,14 @@
// 跳转成功页 // 跳转成功页
const goNext = () => { const goNext = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/addPaymentSuccess?type=bind' url: '/pageSubPack/payment-list/addPaymentSuccess?type=bind'
}) })
} }
// 返回 // 返回
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}) })
} }

View File

@@ -173,21 +173,21 @@
// 跳转成功页 // 跳转成功页
const goNext = () => { const goNext = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/addPaymentSuccess' url: '/pageSubPack/payment-list/addPaymentSuccess'
}) })
} }
// 切换(注释保留) // 切换(注释保留)
const goToChange = () => { const goToChange = () => {
// uni.redirectTo({ // uni.navigateTo({
// url: '/pageSubPack/payment-list/selectPaymentEntity' // url: '/pageSubPack/payment-list/selectPaymentEntity'
// }) // })
} }
// 返回 // 返回
const goBack = () => { const goBack = () => {
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' }); uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
} }
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@@ -88,12 +88,12 @@
// 方法 // 方法
const goBack = () => { const goBack = () => {
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' }); uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
} }
const handlePrimaryClick = () => { const handlePrimaryClick = () => {
const url = pageConfig.value.backUrl const url = pageConfig.value.backUrl
uni.redirectTo({ url }); uni.navigateTo({ url });
} }
</script> </script>

View File

@@ -136,7 +136,7 @@
// 返回 // 返回
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}); });
} }
@@ -220,7 +220,7 @@
// 返回缴费列表 // 返回缴费列表
const handleBackToList = () => { const handleBackToList = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}); });
} }

View File

@@ -107,7 +107,7 @@
// 方法 // 方法
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}); });
} }

View File

@@ -89,7 +89,7 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { onShow, onLoad } from '@dcloudio/uni-app' import { onShow, onLoad, onBackPress } from '@dcloudio/uni-app'
import { import {
getTopUpSelectByResident, getTopUpSelectByResident,
@@ -175,6 +175,15 @@
getPayList() getPayList()
}) })
// 页面返回拦截
onBackPress(() => {
const pages = getCurrentPages()
if (pages.length <= 1) {
uni.switchTab({ url: "/pages/serviceIndex/serviceIndex" })
return true
}
})
const getPayList = async () => { const getPayList = async () => {
// 防重复请求 // 防重复请求
@@ -202,11 +211,11 @@
// 物业费、车位费、垃圾处理费走物业费缴纳页;水费、电费走欠费缴纳页 // 物业费、车位费、垃圾处理费走物业费缴纳页;水费、电费走欠费缴纳页
const isProperty = ['物业费', '车位费', '垃圾处理费', '垃圾费', '0', '1', '2'].includes(type) const isProperty = ['物业费', '车位费', '垃圾处理费', '垃圾费', '0', '1', '2'].includes(type)
if (isProperty) { if (isProperty) {
uni.redirectTo({ uni.navigateTo({
url: `/pageSubPack/payment-list/propertyFeePayment?amount=${item.amount || ''}` url: `/pageSubPack/payment-list/propertyFeePayment?amount=${item.amount || ''}`
}) })
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/arrearsPayment' url: '/pageSubPack/payment-list/arrearsPayment'
}) })
} }
@@ -214,18 +223,18 @@
const goToRecord = () => { const goToRecord = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentRecord' url: '/pageSubPack/payment-list/paymentRecord'
}) })
} }
const goToAdd = (type) => { const goToAdd = (type) => {
if (type.name == '燃气' || type.name == '暖气') { if (type.name == '燃气' || type.name == '暖气') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/selectPaymentEntity' url: '/pageSubPack/payment-list/selectPaymentEntity'
}) })
} else if (type.name == '水表' || type.name == '电表') { } else if (type.name == '水表' || type.name == '电表') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/addHydropower' url: '/pageSubPack/payment-list/addHydropower'
}) })
} }
@@ -376,6 +385,7 @@
color: #333; color: #333;
margin-bottom: 10rpx; margin-bottom: 10rpx;
display: flex; display: flex;
align-items: center;
} }
.bill-desc { .bill-desc {
@@ -388,6 +398,9 @@
} }
.bill-status { .bill-status {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 2rpx 16rpx; padding: 2rpx 16rpx;
border-radius: 30rpx; border-radius: 30rpx;
font-size: 24rpx; font-size: 24rpx;
@@ -500,6 +513,7 @@
.details-scroll { .details-scroll {
max-height: 500rpx; max-height: 500rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
padding: 20rpx 0;
} }
.load-more-status { .load-more-status {

View File

@@ -248,7 +248,7 @@
} }
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}); });
} }

View File

@@ -118,7 +118,7 @@
// 返回 // 返回
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}); });
} }
@@ -203,7 +203,7 @@
// 返回缴费列表 // 返回缴费列表
const handleBackToList = () => { const handleBackToList = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/paymentIndex' url: '/pageSubPack/payment-list/paymentIndex'
}); });
} }

View File

@@ -213,7 +213,7 @@
// 方法 // 方法
const selectItem = (item) => { const selectItem = (item) => {
console.log(item) console.log(item)
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/addPayment' url: '/pageSubPack/payment-list/addPayment'
}) })
} }
@@ -233,7 +233,7 @@
const onSearch = () => {} const onSearch = () => {}
const goBack = () => { const goBack = () => {
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' }); uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
} }
</script> </script>

View File

@@ -206,7 +206,7 @@
uni.showToast({ title: '支付成功', icon: 'success' }) uni.showToast({ title: '支付成功', icon: 'success' })
uni.setStorageSync('paySuccess', true) uni.setStorageSync('paySuccess', true)
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/payment-list/addPaymentSuccess?type=pay' url: '/pageSubPack/payment-list/addPaymentSuccess?type=pay'
}) })
}, 1500) }, 1500)

View File

@@ -272,7 +272,7 @@ const submitForm = async () => {
if (res.code === 200) { if (res.code === 200) {
uni.showToast({ title: '提交成功', icon: 'success' }) uni.showToast({ title: '提交成功', icon: 'success' })
setTimeout(() => { setTimeout(() => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/service-list/complaintsSuggestionsIndex' url: '/pageSubPack/service-list/complaintsSuggestionsIndex'
}) })
}, 1500) }, 1500)
@@ -290,7 +290,7 @@ const submitForm = async () => {
// 返回 // 返回
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/service-list/complaintsSuggestionsIndex' url: '/pageSubPack/service-list/complaintsSuggestionsIndex'
}) })
} }

View File

@@ -1,8 +1,8 @@
<template> <template>
<view class="contentStyle"> <view class="contentStyle">
<view class="status-bar"></view> <!-- <view class="status-bar"></view>
<uni-nav-bar title="投诉详情" backgroundColor="transparent" :border="false" left-icon="left" @clickLeft="goBack"> <uni-nav-bar title="投诉详情" backgroundColor="transparent" :border="false" left-icon="left" @clickLeft="goBack">
</uni-nav-bar> </uni-nav-bar> -->
<!-- 表单区域 --> <!-- 表单区域 -->
<scroll-view class="page" scroll-y> <scroll-view class="page" scroll-y>
@@ -120,7 +120,7 @@ const previewImage = (index) => {
// 返回 // 返回
const goBack = () => { const goBack = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/service-list/complaintsSuggestionsIndex' url: '/pageSubPack/service-list/complaintsSuggestionsIndex'
}) })
} }

View File

@@ -1,9 +1,5 @@
<template> <template>
<view class="contentStyle"> <view class="contentStyle">
<view class="status-bar"></view>
<uni-nav-bar title="投诉建议" backgroundColor="transparent" :border="false" left-icon="left" @clickLeft="goBack">
</uni-nav-bar>
<!-- 顶部分段控制器 --> <!-- 顶部分段控制器 -->
<view style="width: 60vw;"> <view style="width: 60vw;">
<uni-segmented-control :current="currentTab" :values="tabs" @clickItem="onTabClick" style-type="text" <uni-segmented-control :current="currentTab" :values="tabs" @clickItem="onTabClick" style-type="text"
@@ -133,12 +129,6 @@ const addComplaintsSuggestions = () => {
}) })
} }
// 返回
const goBack = () => {
uni.switchTab({
url: '/pages/serviceIndex/serviceIndex'
})
}
// 页面挂载后加载数据 // 页面挂载后加载数据
// onMounted(() => { // onMounted(() => {
@@ -156,7 +146,7 @@ const goBack = () => {
.contentStyle { .contentStyle {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100%;
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%); background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
} }
@@ -296,8 +286,4 @@ const goBack = () => {
border: none; border: none;
} }
.status-bar {
width: 100vw;
height: 46px;
}
</style> </style>

View File

@@ -1,10 +1,5 @@
<template> <template>
<view class="contentStyle" style=""> <view class="contentStyle">
<view class="status-bar"></view>
<uni-nav-bar title="联系物业" backgroundColor="transparent" :border="false" left-icon="left" @clickLeft="goBack">
</uni-nav-bar>
<!-- 表单区域 --> <!-- 表单区域 -->
<scroll-view class="page" scroll-y="true"> <scroll-view class="page" scroll-y="true">
<view v-if="dataList.length === 0" class="empty-state"> <view v-if="dataList.length === 0" class="empty-state">
@@ -15,19 +10,12 @@
</view> </view>
<view class="property-card" v-for="item,index in dataList" :key="index"> <view class="property-card" v-for="item,index in dataList" :key="index">
<view class="topBox"> <view class="topBox">
<!-- 左侧头像 -->
<image class="avatar" :src="item.src" mode="aspectFill"></image> <image class="avatar" :src="item.src" mode="aspectFill"></image>
<!-- 右侧信息区 -->
<view class="info-content"> <view class="info-content">
<!-- 物业名称 -->
<view class="property-name">{{item.propertyName}}</view> <view class="property-name">{{item.propertyName}}</view>
<!-- 物业地址 -->
<view class="property-address">{{item.propertyAddress}}</view> <view class="property-address">{{item.propertyAddress}}</view>
</view> </view>
</view> </view>
<!-- 值班电话 -->
<view class="phone-item" v-for="phoneItems,phoneIndex in item.phoneList" :key="phoneIndex" @click="callPhone(phoneItems.phoneNum)" @longpress="copyPhone(phoneItems.phoneNum)"> <view class="phone-item" v-for="phoneItems,phoneIndex in item.phoneList" :key="phoneIndex" @click="callPhone(phoneItems.phoneNum)" @longpress="copyPhone(phoneItems.phoneNum)">
<text class="phone-label">值班电话</text> <text class="phone-label">值班电话</text>
<text class="phone-num">{{phoneItems.phoneNum}}</text> <text class="phone-num">{{phoneItems.phoneNum}}</text>
@@ -37,19 +25,14 @@
</scroll-view> </scroll-view>
</view> </view>
</template> </template>
<script setup> <script setup>
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { getManagePhoneData } from '../api/apiSub.js' import { getManagePhoneData } from '../api/apiSub.js'
const statusBarHeight = ref(20)
const dataList = ref([]) const dataList = ref([])
// ====方法=====
function callPhone(phone) { function callPhone(phone) {
if (!phone || !phone.trim()) { if (!phone || !phone.trim()) {
uni.showToast({ title: '电话号码为空', icon: 'none' }); uni.showToast({ title: '电话号码为空', icon: 'none' });
@@ -84,11 +67,6 @@ import { getManagePhoneData } from '../api/apiSub.js'
} }
}); });
} }
function goBack() {
uni.switchTab({
url: '/pages/serviceIndex/serviceIndex',
});
}
onMounted(() => { onMounted(() => {
const villageId = uni.getStorageSync('currentVillageId') const villageId = uni.getStorageSync('currentVillageId')
@@ -115,8 +93,8 @@ import { getManagePhoneData } from '../api/apiSub.js'
uni.showToast({ title: '获取失败', icon: 'none' }) uni.showToast({ title: '获取失败', icon: 'none' })
}) })
}) })
</script> </script>
<style lang="scss"> <style lang="scss">
page { page {
background: #f9f9f9; background: #f9f9f9;
@@ -127,10 +105,16 @@ import { getManagePhoneData } from '../api/apiSub.js'
.contentStyle { .contentStyle {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100%;
/* 关键:占满屏幕高度 */
/* background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%); */
} }
.page {
flex: 1;
overflow-y: auto;
padding: 0px 40rpx;
box-sizing: border-box;
}
/* 空状态 */ /* 空状态 */
.empty-state { .empty-state {
display: flex; display: flex;
@@ -147,18 +131,10 @@ import { getManagePhoneData } from '../api/apiSub.js'
margin-top: 20rpx; margin-top: 20rpx;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.page {
flex: 1;
overflow-y: auto;
padding: 0px 40rpx;
box-sizing: border-box;
/* background-color: #fff; */
}
/* 卡片容器 */ /* 卡片容器 */
.property-card { .property-card {
padding: 30rpx; padding: 30rpx;
/* margin: 0px 40rpx 40rpx 40rpx; */
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05); box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
@@ -187,7 +163,6 @@ import { getManagePhoneData } from '../api/apiSub.js'
gap: 12rpx; gap: 12rpx;
} }
/* 物业名称 */
.property-name { .property-name {
font-size: 32rpx; font-size: 32rpx;
font-weight: 600; font-weight: 600;
@@ -195,14 +170,12 @@ import { getManagePhoneData } from '../api/apiSub.js'
line-height: 35px; line-height: 35px;
} }
/* 物业地址 */
.property-address { .property-address {
font-size: 28rpx; font-size: 28rpx;
color: #666666; color: #666666;
line-height: 24rpx; line-height: 24rpx;
} }
/* 电话行 */
.phone-item { .phone-item {
display: flex; display: flex;
align-items: center; align-items: center;
@@ -210,27 +183,19 @@ import { getManagePhoneData } from '../api/apiSub.js'
line-height: 60rpx; line-height: 60rpx;
} }
/* 电话标签 */
.phone-label { .phone-label {
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
} }
/* 电话号码 */
.phone-num { .phone-num {
font-size: 28rpx; font-size: 28rpx;
color: #666666; color: #666666;
} }
/* 电话图标 */
.phone-icon { .phone-icon {
font-size: 24rpx; font-size: 24rpx;
color: #409eff !important; color: #409eff !important;
/* 蓝色,和原图一致 */
margin-left: 8rpx; margin-left: 8rpx;
} }
.status-bar{
width: 100vw;
height: 46px;
}
</style> </style>

View File

@@ -1,8 +1,5 @@
<template> <template>
<view class="contentStyle"> <view class="contentStyle">
<view class="status-bar"></view>
<uni-nav-bar title="问卷调查" backgroundColor="transparent" :border="false" left-icon="left" @click-left="goBack" />
<view style="width: 40vw;"> <view style="width: 40vw;">
<uni-segmented-control :current="currentTab" :values="tabs" @click-item="switchTab" style-type="text" <uni-segmented-control :current="currentTab" :values="tabs" @click-item="switchTab" style-type="text"
active-color="#007AFF" inactive-color="#999" class="seg-control" /> active-color="#007AFF" inactive-color="#999" class="seg-control" />
@@ -55,7 +52,6 @@
import {getQuestionnaireList} from '../api/apiSub.js' import {getQuestionnaireList} from '../api/apiSub.js'
// 状态栏高度 // 状态栏高度
const statusBarHeight = ref(20)
// 当前选中tab // 当前选中tab
const currentTab = ref(0) const currentTab = ref(0)
// tab标题 // tab标题
@@ -134,13 +130,6 @@
}) })
} }
// 返回
const goBack = () => {
uni.switchTab({
url: '/pages/serviceIndex/serviceIndex'
})
}
// 生命周期:页面挂载完成 // 生命周期:页面挂载完成
onMounted(() => { onMounted(() => {
getDataList() getDataList()
@@ -157,7 +146,7 @@
.contentStyle { .contentStyle {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100%;
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%); background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
} }
@@ -241,10 +230,6 @@
} }
} }
.status-bar {
width: 100vw;
height: 46px;
}
.empty-state { .empty-state {
display: flex; display: flex;

View File

@@ -1,5 +1,5 @@
<template> <template>
<view class="visitor-invite"> <view class="visitor-invite" :class="{ 'no-scroll': pageFixed }">
<!-- 标签切换车辆来访/人员来访 --> <!-- 标签切换车辆来访/人员来访 -->
<view class="tab-wrap"> <view class="tab-wrap">
<view class="tab-item" :class="{ active: activeTab === 'car' }" @click="switchTab('car')"> <view class="tab-item" :class="{ active: activeTab === 'car' }" @click="switchTab('car')">
@@ -32,7 +32,7 @@
<view class="form-item"> <view class="form-item">
<view class="label">访客姓名</view> <view class="label">访客姓名</view>
<input class="input" placeholder="请输入访客姓名" v-model="form.name" /> <input class="input" placeholder="请输入访客姓名" v-model="form.name" maxlength="20" />
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="label"> <view class="label">
@@ -107,7 +107,7 @@
</view> </view>
<!-- 地址选择弹窗 --> <!-- 地址选择弹窗 -->
<uni-popup ref="addressModalRef" type="bottom" :mask-click="false"> <uni-popup ref="addressModalRef" type="bottom" :mask-click="false" @change="onAddressModalChange">
<view class="modal-wrap"> <view class="modal-wrap">
<view class="modal-title">选择来访地址</view> <view class="modal-title">选择来访地址</view>
<view class="address-list"> <view class="address-list">
@@ -121,7 +121,7 @@
</uni-popup> </uni-popup>
<!-- 性别选择弹窗 --> <!-- 性别选择弹窗 -->
<uni-popup ref="genderModalRef" type="bottom" :mask-click="false"> <uni-popup ref="genderModalRef" type="bottom" :mask-click="false" @change="onGenderModalChange">
<view class="modal-wrap"> <view class="modal-wrap">
<view class="gender-list"> <view class="gender-list">
<view class="gender-item" :class="{ active: item === form.gender }" v-for="item in genderList" <view class="gender-item" :class="{ active: item === form.gender }" v-for="item in genderList"
@@ -172,8 +172,11 @@
const addressModalRef = ref(null); const addressModalRef = ref(null);
const genderModalRef = ref(null); const genderModalRef = ref(null);
// 页面固定标志
const pageFixed = ref(false);
// 车牌号输入框聚焦索引 // 车牌号输入框聚焦索引
const carFocusIndex = ref(0); const carFocusIndex = ref(-1);
// =========方法=========== // =========方法===========
// 获取房屋列表 // 获取房屋列表
@@ -215,6 +218,11 @@
addressModalRef.value.close(); addressModalRef.value.close();
}; };
// 地址弹窗状态变化
const onAddressModalChange = (e) => {
pageFixed.value = e.show;
};
// 选择地址 // 选择地址
const selectAddress = (item) => { const selectAddress = (item) => {
form.address = item.label; form.address = item.label;
@@ -234,6 +242,11 @@
genderModalRef.value.close(); genderModalRef.value.close();
}; };
// 性别弹窗状态变化
const onGenderModalChange = (e) => {
pageFixed.value = e.show;
};
// 车牌号单格输入 // 车牌号单格输入
const onCarInput = (index, e) => { const onCarInput = (index, e) => {
const val = (e.detail && e.detail.value !== undefined) ? e.detail.value : (e.target ? e.target.value : ''); const val = (e.detail && e.detail.value !== undefined) ? e.detail.value : (e.target ? e.target.value : '');
@@ -406,6 +419,15 @@
min-height: 100vh; min-height: 100vh;
} }
.no-scroll {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
/* 导航栏 */ /* 导航栏 */
.nav-bar { .nav-bar {
display: flex; display: flex;

View File

@@ -1,20 +1,5 @@
<template> <template>
<view class="visitor-page"> <view class="visitor-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"
class="back-icon"
/>
</view>
<view class="nav-title">访客邀请</view>
<view class="nav-right"></view>
</view>
<!-- 标签切换栏 --> <!-- 标签切换栏 -->
<view class="tab-bar"> <view class="tab-bar">
<view <view
@@ -33,8 +18,8 @@
</view> </view>
</view> </view>
<!-- 访客列表 - 固定高度内部滚动 --> <!-- 访客列表 -->
<scroll-view class="list-container" scroll-y :style="{ height: scrollHeight + 'px' }"> <scroll-view class="list-container" scroll-y>
<view <view
class="visitor-item" class="visitor-item"
v-for="(item, index) in filterdList" v-for="(item, index) in filterdList"
@@ -107,12 +92,10 @@
<script setup> <script setup>
import { ref, computed } from "vue"; import { ref, computed } from "vue";
import { onLoad,onShow} from "@dcloudio/uni-app"; import { onShow } from "@dcloudio/uni-app";
import { getVisitorList } from "../api/api.js"; import { getVisitorList } from "../api/api.js";
const activeTab = ref("waiting"); const activeTab = ref("waiting");
const statusBarHeight = ref(0);
const scrollHeight = ref(0);
const visitorList = ref([]); const visitorList = ref([]);
const mapData = (list) => { const mapData = (list) => {
@@ -132,12 +115,11 @@ const mapData = (list) => {
}; };
const fetchVisitorList = async () => { const fetchVisitorList = async () => {
try { try {
const params = { const params = {
userId: uni.getStorageSync("userId"), userId: uni.getStorageSync("userId"),
villageId:uni.getStorageSync('currentVillageId') villageId: uni.getStorageSync('currentVillageId')
} }
const res = await getVisitorList(params); const res = await getVisitorList(params);
visitorList.value = mapData(res.data || []); visitorList.value = mapData(res.data || []);
} catch (err) { } catch (err) {
@@ -145,41 +127,14 @@ const fetchVisitorList = async () => {
} }
}; };
onLoad(() => { onShow(() => {
const info = uni.getSystemInfoSync(); fetchVisitorList();
statusBarHeight.value = info.statusBarHeight || 0;
// rpx 转 px 比例
const scale = info.windowWidth / 750;
// 各固定区域高度rpx 转 px
const navPx = 90 * scale; // 导航栏
const tabPx = 88 * scale; // tab栏
const btnPx = 148 * scale; // 底部按钮区域
// 列表区域可用高度 = 窗口高度 - 状态栏 - 导航栏 - tab栏 - 底部按钮区
scrollHeight.value = info.windowHeight - statusBarHeight.value - navPx - tabPx - btnPx;
});
onShow(()=>{
fetchVisitorList();
}) })
const filterdList = computed(() => { const filterdList = computed(() => {
return visitorList.value.filter((item) => item.status === activeTab.value); return visitorList.value.filter((item) => item.status === activeTab.value);
}); });
const goBack = () => {
const source = uni.getStorageSync("sourcePage");
if (source === "index") {
uni.switchTab({ url: "/pages/index/index" });
} else if (source === "serviceIndex") {
uni.switchTab({ url: "/pages/serviceIndex/serviceIndex" });
}
uni.removeStorageSync("sourcePage");
};
const viewDetail = (item) => { const viewDetail = (item) => {
uni.navigateTo({ uni.navigateTo({
url: `/pageSubPack/visitor/visitor-detail?id=${item.id}`, url: `/pageSubPack/visitor/visitor-detail?id=${item.id}`,
@@ -194,49 +149,17 @@ const addInvitation = () => {
<style scoped> <style scoped>
/* 页面根容器 */ /* 页面根容器 */
.visitor-page { .visitor-page {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
background: linear-gradient(135deg, #e2f0ff 0%, #f9f9f9 50%); background: linear-gradient(135deg, #e2f0ff 0%, #f9f9f9 50%);
padding: 0 30rpx; padding: 0 30rpx;
} }
.status-bar {
width: 100%;
}
/* 顶部导航栏 */
.nav-bar {
display: flex;
align-items: center;
height: 90rpx;
}
.nav-left {
width: 60rpx;
display: flex;
align-items: center;
justify-content: center;
}
.back-icon {
width: 36rpx;
height: 36rpx;
}
.nav-title {
flex: 1;
text-align: center;
font-size: 32rpx;
font-weight: 500;
color: #000;
}
.nav-right {
width: 60rpx;
}
/* 标签切换栏 */ /* 标签切换栏 */
.tab-bar { .tab-bar {
display: flex; display: flex;
/* border-bottom: 1rpx solid rgba(0, 0, 0, 0.04); */
} }
.tab-item { .tab-item {
@@ -261,10 +184,16 @@ const addInvitation = () => {
width: 126rpx; width: 126rpx;
height: 8rpx; height: 8rpx;
border-radius: 32rpx; border-radius: 32rpx;
/* background-color: #2f77fd; */
background: linear-gradient(to bottom, #2F77FD, #CEDFFF); background: linear-gradient(to bottom, #2F77FD, #CEDFFF);
} }
/* 列表区域 */
.list-container {
flex: 1;
height: 0;
overflow: hidden;
}
/* 访客卡片 */ /* 访客卡片 */
.visitor-item { .visitor-item {
margin-top: 24rpx; margin-top: 24rpx;
@@ -374,9 +303,9 @@ const addInvitation = () => {
/* 新增邀请按钮 */ /* 新增邀请按钮 */
.add-btn-wrapper { .add-btn-wrapper {
height: 148rpx; flex-shrink: 0;
display: flex; padding: 20rpx 0;
align-items: center; padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
} }
.add-btn { .add-btn {

View File

@@ -3,7 +3,6 @@
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
// "navigationStyle": "custom",
"navigationBarBackgroundColor": "#F8F8F8" "navigationBarBackgroundColor": "#F8F8F8"
} }
}, },
@@ -20,14 +19,12 @@
"path": "pages/serviceIndex/serviceIndex", "path": "pages/serviceIndex/serviceIndex",
"style": { "style": {
"navigationBarTitleText": "服务" "navigationBarTitleText": "服务"
// "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/myIndex/myIndex", "path": "pages/myIndex/myIndex",
"style": { "style": {
"navigationBarTitleText": "我的" "navigationBarTitleText": "我的"
// "navigationStyle": "custom"
} }
} }
@@ -38,7 +35,6 @@
"path": "register-new-user", "path": "register-new-user",
"style": { "style": {
"navigationBarTitleText": "注册新用户", "navigationBarTitleText": "注册新用户",
// "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
}, },
@@ -54,7 +50,6 @@
"path": "forget-pwd", "path": "forget-pwd",
"style": { "style": {
"navigationBarTitleText": "忘记密码", "navigationBarTitleText": "忘记密码",
// "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
}, },
@@ -62,7 +57,6 @@
"path": "change-pwd", "path": "change-pwd",
"style": { "style": {
"navigationBarTitleText": "修改密码", "navigationBarTitleText": "修改密码",
// "navigationStyle": "custom",
"disableScroll": true "disableScroll": true
} }
}, },
@@ -70,7 +64,6 @@
"path": "privacy", "path": "privacy",
"style": { "style": {
"navigationBarTitleText": "用户隐私政策" "navigationBarTitleText": "用户隐私政策"
// "navigationStyle": "custom"
} }
} }
] ]
@@ -80,8 +73,7 @@
"pages": [{ "pages": [{
"path": "onlineRepair", "path": "onlineRepair",
"style": { "style": {
"navigationBarTitleText": "在线报修", "navigationBarTitleText": "在线报修"
"navigationStyle": "custom"
} }
}, },
{ {
@@ -127,8 +119,7 @@
"pages": [{ "pages": [{
"path": "visitor-list", "path": "visitor-list",
"style": { "style": {
"navigationBarTitleText": "访客邀请", "navigationBarTitleText": "访客邀请"
"navigationStyle": "custom"
} }
}, },
{ {
@@ -194,8 +185,7 @@
{ {
"path": "oneClickOpen", "path": "oneClickOpen",
"style": { "style": {
"navigationBarTitleText": "一键开门", "navigationBarTitleText": "一键开门"
"navigationStyle": "custom"
} }
}, },
{ {
@@ -432,14 +422,12 @@
"pages": [{ "pages": [{
"path": "complaintsSuggestionsIndex", "path": "complaintsSuggestionsIndex",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "投诉建议"
"navigationStyle": "custom"
} }
}, { }, {
"path": "complaintsDetail", "path": "complaintsDetail",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "投诉详情"
"navigationStyle": "custom"
} }
}, { }, {
"path": "addComplaints", "path": "addComplaints",
@@ -450,8 +438,7 @@
}, { }, {
"path": "questionnaireSurveyIndex", "path": "questionnaireSurveyIndex",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "问卷调查"
"navigationStyle": "custom"
} }
}, },
{ {
@@ -470,8 +457,7 @@
}, { }, {
"path": "contactProperty", "path": "contactProperty",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "联系物业"
"navigationStyle": "custom"
} }
} }
] ]
@@ -488,22 +474,19 @@
{ {
"path": "inspection-details", "path": "inspection-details",
"style": { "style": {
"navigationBarTitleText": "巡检详情", "navigationBarTitleText": "巡检详情"
"navigationStyle": "custom"
} }
}, },
{ {
"path": "public-revenue", "path": "public-revenue",
"style": { "style": {
"navigationBarTitleText": "公区收益", "navigationBarTitleText": "公区收益"
"navigationStyle": "custom"
} }
}, },
{ {
"path": "public-revenue-details", "path": "public-revenue-details",
"style": { "style": {
"navigationBarTitleText": "收益详情", "navigationBarTitleText": "收益详情"
"navigationStyle": "custom"
} }
} }
] ]

View File

@@ -1,8 +1,5 @@
<template> <template>
<view class="contentStyle" style=""> <view class="contentStyle">
<!-- <view class="status-bar"></view>
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false">
</uni-nav-bar> -->
<scroll-view class="page" scroll-y> <scroll-view class="page" scroll-y>
<view class="topBox"> <view class="topBox">
<view class="name"> <view class="name">
@@ -101,28 +98,28 @@
// 返回 // 返回
const onItemClick = (item) => { const onItemClick = (item) => {
if (item.title == '我的房屋') { if (item.title == '我的房屋') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myHouseIndex', url: '/pageSubPack/my/myHouseIndex',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
complete: () => {} complete: () => {}
}); });
} else if (item.title == '住户管理') { } else if (item.title == '住户管理') {
// uni.redirectTo({ // uni.navigateTo({
// url: '/pageSubPack/my/changePwd', // url: '/pageSubPack/my/changePwd',
// success: res => {}, // success: res => {},
// fail: () => {}, // fail: () => {},
// complete: () => {} // complete: () => {}
// }); // });
} else if (item.title == '我的车位') { } else if (item.title == '我的车位') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myParkingSpaceIndex', url: '/pageSubPack/my/myParkingSpaceIndex',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
complete: () => {} complete: () => {}
}); });
} else if (item.title == '我的车辆') { } else if (item.title == '我的车辆') {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/myCarIndex', url: '/pageSubPack/my/myCarIndex',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -133,7 +130,7 @@
} }
} }
const goSetting = () => { const goSetting = () => {
uni.redirectTo({ uni.navigateTo({
url: '/pageSubPack/my/settingIndex', url: '/pageSubPack/my/settingIndex',
success: res => {}, success: res => {},
fail: () => {}, fail: () => {},
@@ -158,7 +155,7 @@
.contentStyle { .contentStyle {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: calc(100vh - 100rpx); height: 100%;
.topBox { .topBox {
width: 100%; width: 100%;
@@ -237,10 +234,6 @@
color: #999999; color: #999999;
} }
.status-bar {
width: 100vw;
height: 46px;
}
.list-item { .list-item {
display: flex; display: flex;

View File

@@ -129,7 +129,7 @@ const handleBtnClick = () => {
url: '/pages/index/index' url: '/pages/index/index'
}) })
} else { } else {
uni.redirectTo({ uni.navigateTo({
url: "/pageSubPack/loginSub/login?mode=pwd" url: "/pageSubPack/loginSub/login?mode=pwd"
}) })
} }

View File

@@ -1,9 +1,6 @@
<template> <template>
<view class="contentStyle" style=""> <view class="contentStyle">
<!-- <view class="status-bar"></view>
<uni-nav-bar title="服务" backgroundColor="transparent" :border="false">
</uni-nav-bar> -->
<!-- 表单区域 -->
<scroll-view class="page" scroll-y> <scroll-view class="page" scroll-y>
<view class="container"> <view class="container">
<!-- 顶部 Banner 轮播 --> <!-- 顶部 Banner 轮播 -->
@@ -143,11 +140,8 @@
const handleFuncClick = (item) => { const handleFuncClick = (item) => {
uni.setStorageSync('sourcePage', 'serviceIndex') uni.setStorageSync('sourcePage', 'serviceIndex')
uni.redirectTo({ uni.navigateTo({
url: item.path, url: item.path,
success: res => {},
fail: () => {},
complete: () => {}
}); });
} }
@@ -165,15 +159,11 @@
} }
</style> </style>
<style scoped> <style scoped>
.status-bar {
width: 100vw;
height: 46px;
}
.contentStyle { .contentStyle {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100vh; height: 100%;
/* 关键:占满屏幕高度 */ /* 关键:占满屏幕高度 */
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%); background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
} }