修改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

@@ -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'
})
}

View File

@@ -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: () => {},

View File

@@ -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'
})
}

View File

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

View File

@@ -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: () => {},

View File

@@ -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'
})
}

View File

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

View File

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

View File

@@ -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',
});
}

View File

@@ -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'
})
}

View File

@@ -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'
})
}

View File

@@ -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: () => {},

View File

@@ -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'
})
}

View File

@@ -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'
})
}

View File

@@ -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'
})
}

View File

@@ -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: () => {},

View File

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

View File

@@ -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'
})
}

View File

@@ -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: () => {},

View File

@@ -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 == '升级版本') {