修改bug,优化导航
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
// 支付成功:返回缴费列表页并刷新数据
|
||||
uni.showToast({ title: '支付成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
})
|
||||
}, 1500)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<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">
|
||||
<!-- 加载中 -->
|
||||
<view class="loading-wrap" v-if="loading">
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
<script setup>
|
||||
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 moment from 'moment' // 新增
|
||||
|
||||
@@ -142,11 +142,19 @@
|
||||
|
||||
// ---------- 返回 ----------
|
||||
const goBack = () => {
|
||||
uni.switchTab({
|
||||
url: '/pages/serviceIndex/serviceIndex'
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
|
||||
// ---------- 页面返回拦截 ----------
|
||||
onBackPress(() => {
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length > 1) {
|
||||
return false
|
||||
}
|
||||
uni.switchTab({ url: '/pages/serviceIndex/serviceIndex' })
|
||||
return true
|
||||
})
|
||||
|
||||
// ---------- 跳转详情 ----------
|
||||
const goToInspectionDetail = (item) => {
|
||||
uni.navigateTo({
|
||||
@@ -167,6 +175,9 @@
|
||||
flex: 1;
|
||||
padding: 20rpx 40rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
@@ -239,7 +250,8 @@
|
||||
}
|
||||
//滚动容器 App重点:高度自适应 \*/
|
||||
.scroll-view {
|
||||
height: calc(100vh - 140rpx);
|
||||
flex: 1;
|
||||
height: 0;
|
||||
}
|
||||
.list-container {
|
||||
display: flex;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<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"
|
||||
@click-left="goBack" />
|
||||
@click-left="goBack" /> -->
|
||||
|
||||
<!-- 暂无数据 -->
|
||||
<view v-if="isLoaded && !noticeDetail.noticeTitle" class="empty-state">
|
||||
@@ -51,7 +51,6 @@
|
||||
// =====方法====
|
||||
onLoad((options) =>{
|
||||
currentNoticeId.value = options?.id
|
||||
console.log('收益id---------',currentNoticeId.value)
|
||||
if(currentNoticeId.value){
|
||||
getDetailsData(currentNoticeId.value)
|
||||
} else {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- 固定导航栏 -->
|
||||
<!-- <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
|
||||
<uni-nav-bar
|
||||
left-icon="left"
|
||||
title="公区收益"
|
||||
background-color="#F9F9F9"
|
||||
@clickLeft="narBack"
|
||||
/>
|
||||
/> -->
|
||||
|
||||
<!-- 滚动区域 -->
|
||||
<scroll-view
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<image src="https://wuyeadmin.bugtc.com/images/login/phone.png" mode="" style="height: 100%;width: 100%;"></image>
|
||||
</view>
|
||||
<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>
|
||||
</view>
|
||||
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
icon: 'success'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/loginSub/login?mode=pwd'
|
||||
});
|
||||
}, 1500);
|
||||
|
||||
@@ -287,7 +287,7 @@
|
||||
|
||||
const selectItem = (typeStr) => {
|
||||
if (typeStr === '车辆品牌') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectCarBrand'
|
||||
})
|
||||
}
|
||||
@@ -301,7 +301,7 @@
|
||||
uni.removeStorageSync('carImageUrl')
|
||||
uni.removeStorageSync('carBrandId')
|
||||
uni.removeStorageSync('checkType')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myCarIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -300,19 +300,7 @@
|
||||
name: '其他'
|
||||
}
|
||||
])
|
||||
const cardTypes = ref([{
|
||||
id: 0,
|
||||
name: '居民身份证'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '护照'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '其他'
|
||||
}
|
||||
])
|
||||
const cardTypes = ref([])
|
||||
|
||||
|
||||
|
||||
@@ -487,6 +475,7 @@
|
||||
clearInterval(timer)
|
||||
})
|
||||
onLoad((option) => {
|
||||
loadCardTypes()
|
||||
loadRelations()
|
||||
console.log(uni.getStorageSync('updateHouseId'));
|
||||
if (option.id) {
|
||||
@@ -535,6 +524,21 @@
|
||||
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 () => {
|
||||
try {
|
||||
@@ -776,7 +780,7 @@
|
||||
console.log(type);
|
||||
console.log(uni.getStorageSync('checkType'));
|
||||
if (type === '小区') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectResidentialCommunity?sourcePage=' + 'addHouse',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -791,7 +795,7 @@
|
||||
|
||||
} else {
|
||||
uni.setStorageSync('checkType', '楼栋');
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectBuilding',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -808,7 +812,7 @@
|
||||
|
||||
} else {
|
||||
uni.setStorageSync('checkType', '单元');
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectBuilding',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -824,7 +828,7 @@
|
||||
|
||||
} else {
|
||||
uni.setStorageSync('checkType', '楼层');
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectBuilding',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -841,7 +845,7 @@
|
||||
|
||||
} else {
|
||||
uni.setStorageSync('checkType', '户号');
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectBuilding',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -878,7 +882,7 @@
|
||||
uni.removeStorageSync('houseStatus')
|
||||
uni.removeStorageSync('houseIsDefault')
|
||||
uni.removeStorageSync('updateHouseId')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myHouseIndex',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
|
||||
@@ -269,14 +269,14 @@
|
||||
}
|
||||
}
|
||||
const bindCarClick = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/bindCar'
|
||||
})
|
||||
}
|
||||
|
||||
const selectItem = (typeStr) => {
|
||||
if (typeStr === '选择小区') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectResidentialCommunity?sourcePage=addParkingSpace'
|
||||
})
|
||||
}
|
||||
@@ -284,7 +284,7 @@
|
||||
// if (!formData.value.community) {
|
||||
// return uni.showToast({ title: '请先选择上级', icon: 'none' })
|
||||
// }
|
||||
// uni.redirectTo({ url: '/pageSubPack/my/bindHouse' })
|
||||
// uni.navigateTo({ url: '/pageSubPack/my/bindHouse' })
|
||||
// }
|
||||
if (typeStr === '停车场') {
|
||||
if (!formData.value.community) {
|
||||
@@ -294,7 +294,7 @@
|
||||
})
|
||||
}
|
||||
uni.setStorageSync('checkType', '停车场')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectParingLot'
|
||||
})
|
||||
}
|
||||
@@ -306,7 +306,7 @@
|
||||
})
|
||||
}
|
||||
uni.setStorageSync('checkType', '车位编号')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectParingLot'
|
||||
})
|
||||
}
|
||||
@@ -317,7 +317,7 @@
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectOwner'
|
||||
})
|
||||
}
|
||||
@@ -338,7 +338,7 @@
|
||||
uni.removeStorageSync('bindCarName')
|
||||
uni.removeStorageSync('ownerId')
|
||||
uni.removeStorageSync('ownerName')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myParkingSpaceIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
}
|
||||
}
|
||||
const goNext = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectParingLot',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -211,7 +211,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
}
|
||||
const clickUpdate = () => {
|
||||
uni.setStorageSync('operationType', 'update')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addCar?id=' + id.value
|
||||
})
|
||||
}
|
||||
@@ -140,7 +140,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myCarIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ const onSubmit = () => {
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/settingIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ import { authChangePassword } from '../api/apiSub.js'
|
||||
}
|
||||
|
||||
const goBack = () =>{
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/settingIndex',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ const onDeleteAccount = () => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({ title: '注销成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/loginSub/login?mode=pwd'
|
||||
})
|
||||
}, 1500)
|
||||
@@ -92,7 +92,7 @@ const onDeleteAccount = () => {
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/settingIndex',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
// 方法(函数名完全不变)
|
||||
const clickUpdate = () => {
|
||||
uni.setStorageSync('operationType', 'update')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addHouse?id=' + id.value + '&sourcePage=addHouse'
|
||||
})
|
||||
}
|
||||
@@ -249,7 +249,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myHouseIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -116,14 +116,14 @@
|
||||
|
||||
const handleItemClick = (item, index) => {
|
||||
uni.setStorageSync('operationType', 'update')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/carDetail?id=' + item.id + '&status=' + item.status
|
||||
})
|
||||
}
|
||||
|
||||
const addCar = () => {
|
||||
uni.setStorageSync('operationType', 'add')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addCar'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
|
||||
const tapHouse = (item) => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/houseDetail?id=' + item.id + '&certificationStatus=' + item.certificationStatus,
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
const addHouse = () => {
|
||||
uni.setStorageSync('operationType', 'add');
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addHouse',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
|
||||
@@ -151,14 +151,14 @@
|
||||
|
||||
const tapParkingSpace = (item) => {
|
||||
console.log(item);
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/parkingSpaceDetail?id=' + item.id + '&statusClass=' + item.checkStatus
|
||||
})
|
||||
}
|
||||
|
||||
const addParkingSpace = () => {
|
||||
uni.setStorageSync('operationType', 'add')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
|
||||
const onModify = () => {
|
||||
uni.setStorageSync('operationType', 'update')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace?id=' + id.value + '&sourcePage=addParkingSpace'
|
||||
})
|
||||
}
|
||||
@@ -258,7 +258,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myParkingSpaceIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -140,11 +140,11 @@
|
||||
const goFreash = () => {
|
||||
console.log(checkType.value, '刷新页面')
|
||||
if (checkType.value !== '户号') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectBuilding'
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addHouse'
|
||||
})
|
||||
}
|
||||
@@ -165,7 +165,7 @@
|
||||
uni.removeStorageSync('houseNumberId')
|
||||
uni.removeStorageSync('houseNumberName')
|
||||
}
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addHouse'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
uni.setStorageSync('carBrandId', item.id);
|
||||
uni.setStorageSync('carBrandName', item.name);
|
||||
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addCar',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -155,7 +155,7 @@
|
||||
uni.removeStorageSync('carBrandId');
|
||||
uni.removeStorageSync('carBrandName');
|
||||
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addCar',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -135,11 +135,11 @@
|
||||
|
||||
const goFreash = () => {
|
||||
if (checkType.value != '车位编号') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectParingLot'
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace'
|
||||
})
|
||||
}
|
||||
@@ -153,7 +153,7 @@
|
||||
uni.removeStorageSync('parkingSpaceId')
|
||||
uni.removeStorageSync('parkingSpaceName')
|
||||
}
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
uni.removeStorageSync('parkingSpaceName');
|
||||
console.log(sourcePage.value);
|
||||
if (sourcePage.value == 'addHouse') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/selectBuilding',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -133,7 +133,7 @@
|
||||
});
|
||||
} else if (sourcePage.value == 'addParkingSpace') {
|
||||
uni.setStorageSync('checkType', '停车场')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
// url: '/pageSubPack/my/bindHouse',
|
||||
url: '/pageSubPack/my/selectParingLot',
|
||||
success: res => {},
|
||||
@@ -149,14 +149,14 @@
|
||||
uni.removeStorageSync('communityId');
|
||||
uni.removeStorageSync('communityName');
|
||||
if (sourcePage.value == 'addHouse') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addHouse',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
} else if (sourcePage.value == 'addParkingSpace') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/addParkingSpace',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
|
||||
@@ -251,11 +251,11 @@
|
||||
//
|
||||
const onItemClick = (item) => {
|
||||
if (item.title == '更改手机号码') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/changePhone'
|
||||
});
|
||||
} else if (item.title == '修改密码') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/changePwd'
|
||||
});
|
||||
} else if (item.title == '清除缓存') {
|
||||
@@ -278,7 +278,7 @@
|
||||
uni.hideLoading();
|
||||
}, 2500);
|
||||
} else if (item.title == '注销账号') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/deleteAccount'
|
||||
});
|
||||
} else if (item.title == '升级版本') {
|
||||
|
||||
@@ -1,50 +1,46 @@
|
||||
<template>
|
||||
<!-- 页面主容器 -->
|
||||
<view class="door-open-page">
|
||||
<view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- 顶部标题栏 -->
|
||||
<view class="top-bar">
|
||||
<uni-nav-bar left-icon="left" title="远程开门" backgroundColor ="none" :border="false" @clickLeft="narBack" />
|
||||
</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="page-content">
|
||||
<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">
|
||||
远程开门
|
||||
<text class="tips-desc">请选择要开的门并保持距离在10米以内,单次仅开一门</text>
|
||||
</view>
|
||||
<!-- 提示文案 -->
|
||||
<view class="tips-text">
|
||||
远程开门
|
||||
<text class="tips-desc">请选择要开的门并保持距离在10米以内,单次仅开一门</text>
|
||||
</view>
|
||||
|
||||
<!-- 开门成功提示(默认隐藏) -->
|
||||
<view v-if="showSuccess" class="success-toast">开门成功</view>
|
||||
<!-- 开门成功提示(默认隐藏) -->
|
||||
<view v-if="showSuccess" class="success-toast">开门成功</view>
|
||||
|
||||
<!-- 开门授权区域 -->
|
||||
<view class="auth-container">
|
||||
<view class="auth-title">开门授权</view>
|
||||
<!-- 网格布局:2行2列 -->
|
||||
<view class="grid-container">
|
||||
<!-- 每个门选项 -->
|
||||
<view
|
||||
v-for="(item, index) in doorList"
|
||||
:key="index"
|
||||
:class="['door-item', { active: selectedDoor === item.id }]"
|
||||
@click="selectDoor(item.id)"
|
||||
>
|
||||
<!-- 图标占位 -->
|
||||
<view class="door-icon">
|
||||
<image class="icon-text" :src="selectedDoor === item.id ? item.iconActive:item.iconText"></image>
|
||||
<!-- 开门授权区域 -->
|
||||
<view class="auth-container">
|
||||
<view class="auth-title">开门授权</view>
|
||||
<!-- 网格布局:2行2列 -->
|
||||
<view class="grid-container">
|
||||
<!-- 每个门选项 -->
|
||||
<view
|
||||
v-for="(item, index) in doorList"
|
||||
:key="index"
|
||||
:class="['door-item', { active: selectedDoor === item.id }]"
|
||||
@click="selectDoor(item.id)"
|
||||
>
|
||||
<!-- 图标占位 -->
|
||||
<view class="door-icon">
|
||||
<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>
|
||||
<!-- 门名称 -->
|
||||
<text class="door-name" :class="{active :selectedDoor === item.id}">{{ item.deviceName }}</text>
|
||||
</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 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>
|
||||
|
||||
<!-- 确认开门按钮 -->
|
||||
@@ -60,7 +56,6 @@ import {getAccessDevices,getAccessOpen} from '../api/api.js'
|
||||
// 响应式数据:选中的门索引、开门成功提示
|
||||
const selectedDoor = ref(-1) // -1表示未选中
|
||||
const showSuccess = ref(false)
|
||||
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
|
||||
|
||||
// 门列表数据
|
||||
const doorList = ref([])
|
||||
@@ -70,46 +65,32 @@ const selectDoor = (id) => {
|
||||
selectedDoor.value = id
|
||||
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 () =>{
|
||||
|
||||
try{
|
||||
const res = await getAccessDevices()
|
||||
if(res.code === 200){
|
||||
if(res.data){
|
||||
doorList.value = res.data || []
|
||||
}else{
|
||||
doorList.value = []
|
||||
}
|
||||
}else{
|
||||
doorList.value = []
|
||||
uni.showToast({
|
||||
title:'门禁查询失败',
|
||||
icon:"error"
|
||||
})
|
||||
}
|
||||
try{
|
||||
const res = await getAccessDevices()
|
||||
if(res.code === 200){
|
||||
if(res.data){
|
||||
doorList.value = res.data || []
|
||||
}else{
|
||||
doorList.value = []
|
||||
}
|
||||
}else{
|
||||
doorList.value = []
|
||||
uni.showToast({
|
||||
title:'门禁查询失败',
|
||||
icon:"error"
|
||||
})
|
||||
}
|
||||
|
||||
}catch(err){
|
||||
doorList.value = []
|
||||
uni.showToast({
|
||||
title:err.msg || '查询失败',
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
}catch(err){
|
||||
doorList.value = []
|
||||
uni.showToast({
|
||||
title:err.msg || '查询失败',
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -132,67 +113,62 @@ const openDoorClick = () => {
|
||||
}
|
||||
// 开门接口
|
||||
const getAccessOpenData = async () =>{
|
||||
uni.showLoading({
|
||||
title: '开门中...',
|
||||
mask: true
|
||||
})
|
||||
try{
|
||||
let params = {deviceId:selectedDoor.value}
|
||||
const res = await getAccessOpen(params)
|
||||
uni.hideLoading()
|
||||
if(res.code === 200){
|
||||
uni.showToast({
|
||||
title:'开门成功',
|
||||
icon:'success'
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'开门失败',
|
||||
icon:"error"
|
||||
})
|
||||
}
|
||||
}catch(err){
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.msg || '开门失败',
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '开门中...',
|
||||
mask: true
|
||||
})
|
||||
try{
|
||||
let params = {deviceId:selectedDoor.value}
|
||||
const res = await getAccessOpen(params)
|
||||
uni.hideLoading()
|
||||
if(res.code === 200){
|
||||
uni.showToast({
|
||||
title:'开门成功',
|
||||
icon:'success'
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title:'开门失败',
|
||||
icon:"error"
|
||||
})
|
||||
}
|
||||
}catch(err){
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: err.msg || '开门失败',
|
||||
icon:"none"
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(() =>{
|
||||
getAccessControl()
|
||||
getAccessControl()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 页面全局样式 */
|
||||
.door-open-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
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;
|
||||
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{
|
||||
width: 460rpx;
|
||||
height: 290rpx;
|
||||
float: right;
|
||||
width: 460rpx;
|
||||
height: 290rpx;
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* 提示文案 */
|
||||
@@ -324,6 +300,7 @@ onLoad(() =>{
|
||||
font-size: 28rpx;
|
||||
border-radius: 20rpx;
|
||||
border: none;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.confirm-btn::after {
|
||||
border: none; /* 去除uni-app默认按钮边框 */
|
||||
|
||||
@@ -119,7 +119,8 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
|
||||
isLoading.value = true
|
||||
|
||||
try {
|
||||
keyword = decodeURIComponent(keyword)
|
||||
// keyword 来自用户输入时是普通文本,无需 decodeURIComponent;
|
||||
// 仅当 keyword 来自 URL 参数时才需要解码(已在外部处理)
|
||||
const params = {
|
||||
pageNum,
|
||||
pageSize,
|
||||
@@ -129,8 +130,10 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
|
||||
const res = await getVillageList(params)
|
||||
|
||||
if (res.code === 200) {
|
||||
const listData = res.data || []
|
||||
const total = res.data?.total || listData.length
|
||||
// 兼容两种返回格式:数组 或 { rows, total }
|
||||
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) {
|
||||
displayedCommunities.value = listData
|
||||
@@ -142,20 +145,32 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
|
||||
hasMoreData.value = displayedCommunities.value.length < totalCount.value
|
||||
|
||||
// 默认选中:优先匹配传入的 villageId,否则选第一条(仅第一页时)
|
||||
// 搜索场景下不覆盖用户已手动选择的项
|
||||
if (pageNum === 1 && displayedCommunities.value.length > 0) {
|
||||
const targetId = currentVillageIdFromHome.value || uni.getStorageSync('currentVillageId') || ''
|
||||
if (targetId) {
|
||||
const matched = displayedCommunities.value.find(
|
||||
item => String(item.villageId) === String(targetId)
|
||||
const userSelectedInCurrentList = selectedItem.value &&
|
||||
displayedCommunities.value.some(
|
||||
item => String(item.villageId) === String(selectedItem.value.villageId)
|
||||
)
|
||||
selectedItem.value = matched || displayedCommunities.value[0]
|
||||
} else {
|
||||
selectedItem.value = displayedCommunities.value[0]
|
||||
// 如果用户已选中且该项仍在当前列表中,保留用户选择
|
||||
if (!isSearching.value || !userSelectedInCurrentList) {
|
||||
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 {
|
||||
displayedCommunities.value = []
|
||||
hasMoreData.value = false
|
||||
selectedItem.value = null
|
||||
uni.showToast({
|
||||
title: res.msg || "查询失败",
|
||||
icon: 'error'
|
||||
@@ -165,6 +180,7 @@ const getCommunityList = async (pageNum = 1, keyword = '') => {
|
||||
// console.error('获取小区列表失败:', err)
|
||||
displayedCommunities.value = []
|
||||
hasMoreData.value = false
|
||||
selectedItem.value = null
|
||||
uni.showToast({
|
||||
title: err.msg || "网络异常",
|
||||
icon: 'error'
|
||||
@@ -238,7 +254,7 @@ const handleConfirm = async () => {
|
||||
uni.hideLoading()
|
||||
|
||||
if (res.code === 200) {
|
||||
if (res.data.villageId) {
|
||||
if (res.data?.villageId) {
|
||||
selectedItem.value.villageId = res.data.villageId
|
||||
}
|
||||
uni.showToast({
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<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">
|
||||
<image src="https://wuyeadmin.bugtc.com/images/home/arr-left.png" style="width: 18px; height: 18px;"></image>
|
||||
</view>
|
||||
<view class="nav-title">在线报修</view>
|
||||
<view class="nav-right"></view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 报修类型Tab -->
|
||||
<scroll-view class="scroll-container" scroll-y="true"
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
<script setup>
|
||||
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';
|
||||
|
||||
// 报修类型(public:公共报修,personal:个人报修)
|
||||
@@ -176,8 +176,9 @@ const fetchRepairList = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 监听状态变化自动刷新
|
||||
// 监听状态变化自动刷新(切换 tab 时重置页码)
|
||||
watch(activeStatus, () => {
|
||||
pageNum.value = 1;
|
||||
fetchRepairList();
|
||||
});
|
||||
|
||||
@@ -220,6 +221,10 @@ onLoad(() => {
|
||||
// maintenanceItemId.value = option.maintenanceProjectId || '' // 接收维修项目id
|
||||
fetchRepairList()
|
||||
});
|
||||
onShow(() => {
|
||||
// 从其他页面返回时刷新列表
|
||||
fetchRepairList()
|
||||
});
|
||||
onUnload(() =>{
|
||||
|
||||
})
|
||||
@@ -229,8 +234,10 @@ onUnload(() =>{
|
||||
/* 页面整体样式 */
|
||||
.repair-page {
|
||||
background: linear-gradient(to bottom left, #E2F0FF 0%, #f9f9f9 50%);
|
||||
min-height: 100vh;
|
||||
height: 100vh;
|
||||
padding: 0 40rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.status_bar {
|
||||
height: var(--status-bar-height);
|
||||
@@ -277,7 +284,6 @@ onUnload(() =>{
|
||||
.scroll-container {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
height: calc(100vh - 100px);
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
@@ -285,7 +291,7 @@ onUnload(() =>{
|
||||
.repair-type-tabs {
|
||||
display: flex;
|
||||
/* background-color: #fff; */
|
||||
/* padding: 10px; */
|
||||
padding: 10px;
|
||||
}
|
||||
.type-tab {
|
||||
flex: 1;
|
||||
@@ -351,7 +357,7 @@ onUnload(() =>{
|
||||
|
||||
/* 报修列表 */
|
||||
.repair-list {
|
||||
padding: 28rpx 0rpx;
|
||||
padding: 28rpx 0rpx 0;
|
||||
}
|
||||
.repair-item {
|
||||
background-color: #fff;
|
||||
@@ -359,6 +365,9 @@ onUnload(() =>{
|
||||
padding: 15px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.repair-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* 列表项头部 */
|
||||
.item-header {
|
||||
@@ -425,14 +434,18 @@ onUnload(() =>{
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 10px;
|
||||
word-break: break-all;
|
||||
white-space: normal;
|
||||
overflow-wrap: break-word;
|
||||
/* background-color: #d7e4f5; */
|
||||
}
|
||||
|
||||
/* 图片占位 */
|
||||
.item-imgs {
|
||||
display: flex;
|
||||
/* gap: 12px; */
|
||||
margin-bottom: 10px;
|
||||
flex-wrap: wrap;
|
||||
margin: -6rpx;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.img-placeholder {
|
||||
width: 80px;
|
||||
@@ -442,7 +455,7 @@ onUnload(() =>{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 8px;
|
||||
margin: 6rpx;
|
||||
}
|
||||
.empty-state {
|
||||
display: flex;
|
||||
|
||||
@@ -22,19 +22,19 @@
|
||||
<!-- 标题 -->
|
||||
<view class="form-item">
|
||||
<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 class="form-item-wenti">
|
||||
<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 class="form-item">
|
||||
<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>
|
||||
|
||||
<!-- 预约时间 -->
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
<!-- 标题输入 -->
|
||||
<view class="form-item">
|
||||
<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 class="form-item-wenti">
|
||||
<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>
|
||||
|
||||
<!-- 手机号 -->
|
||||
|
||||
@@ -109,7 +109,7 @@ const mapData = (data) => {
|
||||
house: data.houseName || '',
|
||||
project: data.maintenanceItemName || '',
|
||||
title: data.item || '',
|
||||
description: data.problem || '',
|
||||
description: (data.problem || '').replace(/\\n/g, '\n'),
|
||||
phone: data.phone || '',
|
||||
time: data.createTime || '',
|
||||
images
|
||||
@@ -251,6 +251,7 @@ const previewImage = (url) => {
|
||||
|
||||
.multi-line {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
line-height: 1.5;
|
||||
border: 1px solid #f0f0f0;
|
||||
border-radius: 8rpx;
|
||||
@@ -260,19 +261,22 @@ const previewImage = (url) => {
|
||||
|
||||
.photo-container {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 4px;
|
||||
margin-right: -12px;
|
||||
margin-bottom: -12px;
|
||||
}
|
||||
|
||||
.photo-item {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
/* border: 1px solid #ccc; */
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #f5f5f5;
|
||||
margin-right: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.btn-container {
|
||||
|
||||
@@ -216,14 +216,14 @@
|
||||
|
||||
// 跳转成功页
|
||||
const goNext = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/addPaymentSuccess?type=bind'
|
||||
})
|
||||
}
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -173,21 +173,21 @@
|
||||
|
||||
// 跳转成功页
|
||||
const goNext = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/addPaymentSuccess'
|
||||
})
|
||||
}
|
||||
|
||||
// 切换(注释保留)
|
||||
const goToChange = () => {
|
||||
// uni.redirectTo({
|
||||
// uni.navigateTo({
|
||||
// url: '/pageSubPack/payment-list/selectPaymentEntity'
|
||||
// })
|
||||
}
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -88,12 +88,12 @@
|
||||
|
||||
// 方法
|
||||
const goBack = () => {
|
||||
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
}
|
||||
|
||||
const handlePrimaryClick = () => {
|
||||
const url = pageConfig.value.backUrl
|
||||
uni.redirectTo({ url });
|
||||
uni.navigateTo({ url });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
@@ -220,7 +220,7 @@
|
||||
|
||||
// 返回缴费列表
|
||||
const handleBackToList = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
// 方法
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onShow, onLoad } from '@dcloudio/uni-app'
|
||||
import { onShow, onLoad, onBackPress } from '@dcloudio/uni-app'
|
||||
|
||||
import {
|
||||
getTopUpSelectByResident,
|
||||
@@ -175,6 +175,15 @@
|
||||
getPayList()
|
||||
})
|
||||
|
||||
// 页面返回拦截
|
||||
onBackPress(() => {
|
||||
const pages = getCurrentPages()
|
||||
if (pages.length <= 1) {
|
||||
uni.switchTab({ url: "/pages/serviceIndex/serviceIndex" })
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const getPayList = async () => {
|
||||
// 防重复请求
|
||||
@@ -202,11 +211,11 @@
|
||||
// 物业费、车位费、垃圾处理费走物业费缴纳页;水费、电费走欠费缴纳页
|
||||
const isProperty = ['物业费', '车位费', '垃圾处理费', '垃圾费', '0', '1', '2'].includes(type)
|
||||
if (isProperty) {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: `/pageSubPack/payment-list/propertyFeePayment?amount=${item.amount || ''}`
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/arrearsPayment'
|
||||
})
|
||||
}
|
||||
@@ -214,18 +223,18 @@
|
||||
|
||||
|
||||
const goToRecord = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentRecord'
|
||||
})
|
||||
}
|
||||
|
||||
const goToAdd = (type) => {
|
||||
if (type.name == '燃气' || type.name == '暖气') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/selectPaymentEntity'
|
||||
})
|
||||
} else if (type.name == '水表' || type.name == '电表') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/addHydropower'
|
||||
})
|
||||
}
|
||||
@@ -376,6 +385,7 @@
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bill-desc {
|
||||
@@ -388,6 +398,9 @@
|
||||
}
|
||||
|
||||
.bill-status {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rpx 16rpx;
|
||||
border-radius: 30rpx;
|
||||
font-size: 24rpx;
|
||||
@@ -500,6 +513,7 @@
|
||||
.details-scroll {
|
||||
max-height: 500rpx;
|
||||
margin-bottom: 40rpx;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.load-more-status {
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
// 返回缴费列表
|
||||
const handleBackToList = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/paymentIndex'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
// 方法
|
||||
const selectItem = (item) => {
|
||||
console.log(item)
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/addPayment'
|
||||
})
|
||||
}
|
||||
@@ -233,7 +233,7 @@
|
||||
const onSearch = () => {}
|
||||
|
||||
const goBack = () => {
|
||||
uni.redirectTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
uni.navigateTo({ url: '/pageSubPack/payment-list/paymentIndex' });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
uni.showToast({ title: '支付成功', icon: 'success' })
|
||||
uni.setStorageSync('paySuccess', true)
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/payment-list/addPaymentSuccess?type=pay'
|
||||
})
|
||||
}, 1500)
|
||||
|
||||
@@ -272,7 +272,7 @@ const submitForm = async () => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({ title: '提交成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/service-list/complaintsSuggestionsIndex'
|
||||
})
|
||||
}, 1500)
|
||||
@@ -290,7 +290,7 @@ const submitForm = async () => {
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/service-list/complaintsSuggestionsIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<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>
|
||||
</uni-nav-bar> -->
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<scroll-view class="page" scroll-y>
|
||||
@@ -120,7 +120,7 @@ const previewImage = (index) => {
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/service-list/complaintsSuggestionsIndex'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<template>
|
||||
<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;">
|
||||
<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(() => {
|
||||
@@ -156,7 +146,7 @@ const goBack = () => {
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||
}
|
||||
|
||||
@@ -296,8 +286,4 @@ const goBack = () => {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,10 +1,5 @@
|
||||
<template>
|
||||
<view class="contentStyle" style="">
|
||||
<view class="status-bar"></view>
|
||||
<uni-nav-bar title="联系物业" backgroundColor="transparent" :border="false" left-icon="left" @clickLeft="goBack">
|
||||
</uni-nav-bar>
|
||||
|
||||
|
||||
<view class="contentStyle">
|
||||
<!-- 表单区域 -->
|
||||
<scroll-view class="page" scroll-y="true">
|
||||
<view v-if="dataList.length === 0" class="empty-state">
|
||||
@@ -15,19 +10,12 @@
|
||||
</view>
|
||||
<view class="property-card" v-for="item,index in dataList" :key="index">
|
||||
<view class="topBox">
|
||||
<!-- 左侧头像 -->
|
||||
<image class="avatar" :src="item.src" mode="aspectFill"></image>
|
||||
<!-- 右侧信息区 -->
|
||||
<view class="info-content">
|
||||
<!-- 物业名称 -->
|
||||
<view class="property-name">{{item.propertyName}}</view>
|
||||
<!-- 物业地址 -->
|
||||
<view class="property-address">{{item.propertyAddress}}</view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- 值班电话 -->
|
||||
<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-num">{{phoneItems.phoneNum}}</text>
|
||||
@@ -37,19 +25,14 @@
|
||||
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { getManagePhoneData } from '../api/apiSub.js'
|
||||
|
||||
const statusBarHeight = ref(20)
|
||||
const dataList = ref([])
|
||||
|
||||
// ====方法=====
|
||||
function callPhone(phone) {
|
||||
if (!phone || !phone.trim()) {
|
||||
uni.showToast({ title: '电话号码为空', icon: 'none' });
|
||||
@@ -84,11 +67,6 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
}
|
||||
});
|
||||
}
|
||||
function goBack() {
|
||||
uni.switchTab({
|
||||
url: '/pages/serviceIndex/serviceIndex',
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
const villageId = uni.getStorageSync('currentVillageId')
|
||||
@@ -115,8 +93,8 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
uni.showToast({ title: '获取失败', icon: 'none' })
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
@@ -127,10 +105,16 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
/* 关键:占满屏幕高度 */
|
||||
/* background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%); */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.page {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0px 40rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 空状态 */
|
||||
.empty-state {
|
||||
display: flex;
|
||||
@@ -147,18 +131,10 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.page {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 0px 40rpx;
|
||||
box-sizing: border-box;
|
||||
/* background-color: #fff; */
|
||||
}
|
||||
|
||||
/* 卡片容器 */
|
||||
.property-card {
|
||||
padding: 30rpx;
|
||||
/* margin: 0px 40rpx 40rpx 40rpx; */
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.05);
|
||||
@@ -187,7 +163,6 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
/* 物业名称 */
|
||||
.property-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
@@ -195,14 +170,12 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
/* 物业地址 */
|
||||
.property-address {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
/* 电话行 */
|
||||
.phone-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -210,27 +183,19 @@ import { getManagePhoneData } from '../api/apiSub.js'
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
/* 电话标签 */
|
||||
.phone-label {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
/* 电话号码 */
|
||||
.phone-num {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
/* 电话图标 */
|
||||
.phone-icon {
|
||||
font-size: 24rpx;
|
||||
color: #409eff !important;
|
||||
/* 蓝色,和原图一致 */
|
||||
margin-left: 8rpx;
|
||||
}
|
||||
.status-bar{
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<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;">
|
||||
<uni-segmented-control :current="currentTab" :values="tabs" @click-item="switchTab" style-type="text"
|
||||
active-color="#007AFF" inactive-color="#999" class="seg-control" />
|
||||
@@ -55,7 +52,6 @@
|
||||
import {getQuestionnaireList} from '../api/apiSub.js'
|
||||
|
||||
// 状态栏高度
|
||||
const statusBarHeight = ref(20)
|
||||
// 当前选中tab
|
||||
const currentTab = ref(0)
|
||||
// tab标题
|
||||
@@ -134,13 +130,6 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.switchTab({
|
||||
url: '/pages/serviceIndex/serviceIndex'
|
||||
})
|
||||
}
|
||||
|
||||
// 生命周期:页面挂载完成
|
||||
onMounted(() => {
|
||||
getDataList()
|
||||
@@ -157,7 +146,7 @@
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||
}
|
||||
|
||||
@@ -241,10 +230,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="visitor-invite">
|
||||
<view class="visitor-invite" :class="{ 'no-scroll': pageFixed }">
|
||||
<!-- 标签切换:车辆来访/人员来访 -->
|
||||
<view class="tab-wrap">
|
||||
<view class="tab-item" :class="{ active: activeTab === 'car' }" @click="switchTab('car')">
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<view class="form-item">
|
||||
<view class="label">访客姓名</view>
|
||||
<input class="input" placeholder="请输入访客姓名" v-model="form.name" />
|
||||
<input class="input" placeholder="请输入访客姓名" v-model="form.name" maxlength="20" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="label">
|
||||
@@ -107,7 +107,7 @@
|
||||
</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-title">选择来访地址</view>
|
||||
<view class="address-list">
|
||||
@@ -121,7 +121,7 @@
|
||||
</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="gender-list">
|
||||
<view class="gender-item" :class="{ active: item === form.gender }" v-for="item in genderList"
|
||||
@@ -172,8 +172,11 @@
|
||||
const addressModalRef = 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();
|
||||
};
|
||||
|
||||
// 地址弹窗状态变化
|
||||
const onAddressModalChange = (e) => {
|
||||
pageFixed.value = e.show;
|
||||
};
|
||||
|
||||
// 选择地址
|
||||
const selectAddress = (item) => {
|
||||
form.address = item.label;
|
||||
@@ -234,6 +242,11 @@
|
||||
genderModalRef.value.close();
|
||||
};
|
||||
|
||||
// 性别弹窗状态变化
|
||||
const onGenderModalChange = (e) => {
|
||||
pageFixed.value = e.show;
|
||||
};
|
||||
|
||||
// 车牌号单格输入
|
||||
const onCarInput = (index, e) => {
|
||||
const val = (e.detail && e.detail.value !== undefined) ? e.detail.value : (e.target ? e.target.value : '');
|
||||
@@ -406,6 +419,15 @@
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.no-scroll {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 导航栏 */
|
||||
.nav-bar {
|
||||
display: flex;
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
<template>
|
||||
<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
|
||||
@@ -33,8 +18,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 访客列表 - 固定高度,内部滚动 -->
|
||||
<scroll-view class="list-container" scroll-y :style="{ height: scrollHeight + 'px' }">
|
||||
<!-- 访客列表 -->
|
||||
<scroll-view class="list-container" scroll-y>
|
||||
<view
|
||||
class="visitor-item"
|
||||
v-for="(item, index) in filterdList"
|
||||
@@ -107,12 +92,10 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
import { onLoad,onShow} from "@dcloudio/uni-app";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import { getVisitorList } from "../api/api.js";
|
||||
|
||||
const activeTab = ref("waiting");
|
||||
const statusBarHeight = ref(0);
|
||||
const scrollHeight = ref(0);
|
||||
const visitorList = ref([]);
|
||||
|
||||
const mapData = (list) => {
|
||||
@@ -132,12 +115,11 @@ const mapData = (list) => {
|
||||
};
|
||||
|
||||
const fetchVisitorList = async () => {
|
||||
|
||||
try {
|
||||
const params = {
|
||||
userId: uni.getStorageSync("userId"),
|
||||
villageId:uni.getStorageSync('currentVillageId')
|
||||
}
|
||||
const params = {
|
||||
userId: uni.getStorageSync("userId"),
|
||||
villageId: uni.getStorageSync('currentVillageId')
|
||||
}
|
||||
const res = await getVisitorList(params);
|
||||
visitorList.value = mapData(res.data || []);
|
||||
} catch (err) {
|
||||
@@ -145,41 +127,14 @@ const fetchVisitorList = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
onLoad(() => {
|
||||
const info = uni.getSystemInfoSync();
|
||||
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();
|
||||
onShow(() => {
|
||||
fetchVisitorList();
|
||||
})
|
||||
|
||||
const filterdList = computed(() => {
|
||||
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) => {
|
||||
uni.navigateTo({
|
||||
url: `/pageSubPack/visitor/visitor-detail?id=${item.id}`,
|
||||
@@ -194,49 +149,17 @@ const addInvitation = () => {
|
||||
<style scoped>
|
||||
/* 页面根容器 */
|
||||
.visitor-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: linear-gradient(135deg, #e2f0ff 0%, #f9f9f9 50%);
|
||||
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 {
|
||||
display: flex;
|
||||
/* border-bottom: 1rpx solid rgba(0, 0, 0, 0.04); */
|
||||
}
|
||||
|
||||
.tab-item {
|
||||
@@ -261,10 +184,16 @@ const addInvitation = () => {
|
||||
width: 126rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 32rpx;
|
||||
/* background-color: #2f77fd; */
|
||||
background: linear-gradient(to bottom, #2F77FD, #CEDFFF);
|
||||
}
|
||||
|
||||
/* 列表区域 */
|
||||
.list-container {
|
||||
flex: 1;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 访客卡片 */
|
||||
.visitor-item {
|
||||
margin-top: 24rpx;
|
||||
@@ -374,9 +303,9 @@ const addInvitation = () => {
|
||||
|
||||
/* 新增邀请按钮 */
|
||||
.add-btn-wrapper {
|
||||
height: 148rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
padding: 20rpx 0;
|
||||
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.add-btn {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "首页",
|
||||
// "navigationStyle": "custom",
|
||||
"navigationBarBackgroundColor": "#F8F8F8"
|
||||
}
|
||||
},
|
||||
@@ -20,14 +19,12 @@
|
||||
"path": "pages/serviceIndex/serviceIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "服务"
|
||||
// "navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/myIndex/myIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的"
|
||||
// "navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +35,6 @@
|
||||
"path": "register-new-user",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册新用户",
|
||||
// "navigationStyle": "custom",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
@@ -54,7 +50,6 @@
|
||||
"path": "forget-pwd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "忘记密码",
|
||||
// "navigationStyle": "custom",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
@@ -62,7 +57,6 @@
|
||||
"path": "change-pwd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改密码",
|
||||
// "navigationStyle": "custom",
|
||||
"disableScroll": true
|
||||
}
|
||||
},
|
||||
@@ -70,7 +64,6 @@
|
||||
"path": "privacy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "用户隐私政策"
|
||||
// "navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -80,8 +73,7 @@
|
||||
"pages": [{
|
||||
"path": "onlineRepair",
|
||||
"style": {
|
||||
"navigationBarTitleText": "在线报修",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "在线报修"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -127,8 +119,7 @@
|
||||
"pages": [{
|
||||
"path": "visitor-list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "访客邀请",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "访客邀请"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -194,8 +185,7 @@
|
||||
{
|
||||
"path": "oneClickOpen",
|
||||
"style": {
|
||||
"navigationBarTitleText": "一键开门",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "一键开门"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -432,14 +422,12 @@
|
||||
"pages": [{
|
||||
"path": "complaintsSuggestionsIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "投诉建议"
|
||||
}
|
||||
}, {
|
||||
"path": "complaintsDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "投诉详情"
|
||||
}
|
||||
}, {
|
||||
"path": "addComplaints",
|
||||
@@ -450,8 +438,7 @@
|
||||
}, {
|
||||
"path": "questionnaireSurveyIndex",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "问卷调查"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -470,8 +457,7 @@
|
||||
}, {
|
||||
"path": "contactProperty",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "联系物业"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -488,22 +474,19 @@
|
||||
{
|
||||
"path": "inspection-details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "巡检详情",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "巡检详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "public-revenue",
|
||||
"style": {
|
||||
"navigationBarTitleText": "公区收益",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "公区收益"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "public-revenue-details",
|
||||
"style": {
|
||||
"navigationBarTitleText": "收益详情",
|
||||
"navigationStyle": "custom"
|
||||
"navigationBarTitleText": "收益详情"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<template>
|
||||
<view class="contentStyle" style="">
|
||||
<!-- <view class="status-bar"></view>
|
||||
<uni-nav-bar title="我的" backgroundColor="transparent" :border="false">
|
||||
</uni-nav-bar> -->
|
||||
<view class="contentStyle">
|
||||
<scroll-view class="page" scroll-y>
|
||||
<view class="topBox">
|
||||
<view class="name">
|
||||
@@ -101,28 +98,28 @@
|
||||
// 返回
|
||||
const onItemClick = (item) => {
|
||||
if (item.title == '我的房屋') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myHouseIndex',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
} else if (item.title == '住户管理') {
|
||||
// uni.redirectTo({
|
||||
// uni.navigateTo({
|
||||
// url: '/pageSubPack/my/changePwd',
|
||||
// success: res => {},
|
||||
// fail: () => {},
|
||||
// complete: () => {}
|
||||
// });
|
||||
} else if (item.title == '我的车位') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myParkingSpaceIndex',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
} else if (item.title == '我的车辆') {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/myCarIndex',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -133,7 +130,7 @@
|
||||
}
|
||||
}
|
||||
const goSetting = () => {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/my/settingIndex',
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
@@ -158,7 +155,7 @@
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 100rpx);
|
||||
height: 100%;
|
||||
|
||||
.topBox {
|
||||
width: 100%;
|
||||
@@ -237,10 +234,6 @@
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.status-bar {
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.list-item {
|
||||
display: flex;
|
||||
|
||||
@@ -129,7 +129,7 @@ const handleBtnClick = () => {
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: "/pageSubPack/loginSub/login?mode=pwd"
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<template>
|
||||
<view class="contentStyle" style="">
|
||||
<!-- <view class="status-bar"></view>
|
||||
<uni-nav-bar title="服务" backgroundColor="transparent" :border="false">
|
||||
</uni-nav-bar> -->
|
||||
<!-- 表单区域 -->
|
||||
<view class="contentStyle">
|
||||
|
||||
<scroll-view class="page" scroll-y>
|
||||
<view class="container">
|
||||
<!-- 顶部 Banner 轮播 -->
|
||||
@@ -143,11 +140,8 @@
|
||||
const handleFuncClick = (item) => {
|
||||
|
||||
uni.setStorageSync('sourcePage', 'serviceIndex')
|
||||
uni.redirectTo({
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
success: res => {},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -165,15 +159,11 @@
|
||||
}
|
||||
</style>
|
||||
<style scoped>
|
||||
.status-bar {
|
||||
width: 100vw;
|
||||
height: 46px;
|
||||
}
|
||||
|
||||
.contentStyle {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
/* 关键:占满屏幕高度 */
|
||||
background: linear-gradient(to left bottom, #e2efff 0%, #f9f9f9 50%);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user