修复bug

This commit is contained in:
zhouyanli
2026-08-01 11:56:28 +08:00
parent a34b625092
commit f74fb33e11
30 changed files with 162 additions and 257 deletions

View File

@@ -294,16 +294,14 @@
}
const goBack = () => {
uni.removeStorageSync('carNum')
uni.removeStorageSync('carBrand')
uni.removeStorageSync('carModel')
uni.removeStorageSync('carColor')
uni.removeStorageSync('carImageUrl')
uni.removeStorageSync('carBrandId')
uni.removeStorageSync('checkType')
uni.navigateTo({
url: '/pageSubPack/my/myCarIndex'
})
uni.removeStorageSync("carNum")
uni.removeStorageSync("carBrand")
uni.removeStorageSync("carModel")
uni.removeStorageSync("carColor")
uni.removeStorageSync("carImageUrl")
uni.removeStorageSync("carBrandId")
uni.removeStorageSync("checkType")
uni.navigateBack()
}
</script>

View File

@@ -869,25 +869,20 @@
});
const goBack = () => {
uni.removeStorageSync('communityId');
uni.removeStorageSync('communityName');
uni.removeStorageSync('buildingId');
uni.removeStorageSync('buildingName');
uni.removeStorageSync('unitId');
uni.removeStorageSync('unitName');
uni.removeStorageSync('floorId');
uni.removeStorageSync('floorName');
uni.removeStorageSync('houseNumberId');
uni.removeStorageSync('houseNumberName');
uni.removeStorageSync('houseStatus')
uni.removeStorageSync('houseIsDefault')
uni.removeStorageSync('updateHouseId')
uni.navigateTo({
url: '/pageSubPack/my/myHouseIndex',
success: res => {},
fail: () => {},
complete: () => {}
});
uni.removeStorageSync("communityId");
uni.removeStorageSync("communityName");
uni.removeStorageSync("buildingId");
uni.removeStorageSync("buildingName");
uni.removeStorageSync("unitId");
uni.removeStorageSync("unitName");
uni.removeStorageSync("floorId");
uni.removeStorageSync("floorName");
uni.removeStorageSync("houseNumberId");
uni.removeStorageSync("houseNumberName");
uni.removeStorageSync("houseStatus")
uni.removeStorageSync("houseIsDefault")
uni.removeStorageSync("updateHouseId")
uni.navigateBack()
}
</script>
<style lang="scss">

View File

@@ -324,23 +324,19 @@
}
const goBack = () => {
uni.removeStorageSync('communityId')
uni.removeStorageSync('communityName')
// uni.removeStorageSync('bindHouseId')
// uni.removeStorageSync('bindHouseName')
uni.removeStorageSync('checkType')
uni.removeStorageSync('parkingLotId')
uni.removeStorageSync('parkingLotName')
uni.removeStorageSync('parkingSpaceId')
uni.removeStorageSync('parkingStatus')
uni.removeStorageSync('parkingSpaceName')
uni.removeStorageSync('bindCarId')
uni.removeStorageSync('bindCarName')
uni.removeStorageSync('ownerId')
uni.removeStorageSync('ownerName')
uni.navigateTo({
url: '/pageSubPack/my/myParkingSpaceIndex'
})
uni.removeStorageSync("communityId")
uni.removeStorageSync("communityName")
uni.removeStorageSync("checkType")
uni.removeStorageSync("parkingLotId")
uni.removeStorageSync("parkingLotName")
uni.removeStorageSync("parkingSpaceId")
uni.removeStorageSync("parkingStatus")
uni.removeStorageSync("parkingSpaceName")
uni.removeStorageSync("bindCarId")
uni.removeStorageSync("bindCarName")
uni.removeStorageSync("ownerId")
uni.removeStorageSync("ownerName")
uni.navigateBack()
}
</script>

View File

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

View File

@@ -211,12 +211,7 @@
}
const goBack = () => {
uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace',
success: res => {},
fail: () => {},
complete: () => {}
})
uni.navigateBack()
}
</script>

View File

@@ -140,9 +140,7 @@
}
const goBack = () => {
uni.navigateTo({
url: '/pageSubPack/my/myCarIndex'
})
uni.navigateBack()
}
</script>

View File

@@ -134,11 +134,9 @@ const onSubmit = () => {
}
// 返回
const goBack = () => {
uni.navigateTo({
url: '/pageSubPack/my/settingIndex'
})
}
const goBack = () => {
uni.navigateBack()
}
// 页面卸载清除定时器
onUnmounted(() => {

View File

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

View File

@@ -91,11 +91,9 @@ const onDeleteAccount = () => {
})
}
const goBack = () => {
uni.navigateTo({
url: '/pageSubPack/my/settingIndex',
});
}
const goBack = () => {
uni.navigateBack()
}
// 页面进入时开始倒计时
onMounted(() => {

View File

@@ -249,9 +249,7 @@
}
const goBack = () => {
uni.navigateTo({
url: '/pageSubPack/my/myHouseIndex'
})
uni.navigateBack()
}
</script>

View File

@@ -129,9 +129,7 @@
}
const goBack = () => {
uni.switchTab({
url: '/pages/myIndex/myIndex'
})
uni.navigateBack()
}
</script>

View File

@@ -46,7 +46,7 @@
<text
class="value">{{ item.houseStatus==0?'自住':item.houseStatus==1?'闲置':item.houseStatus==2?'租赁':item.houseStatus==3?'其他':''}}</text>
</view>
<view class="defaultBox" v-if="item.certificationStatus=='1'&&!item.isDefault==1">
<view class="defaultBox" >
<text class="set-default">设为默认</text>
<switch class="no-cross-switch" :checked="item.isDefault==1" color="#1677ff"
@change="onSwitchChange($event,item)" @click.stop />
@@ -144,10 +144,6 @@
const onSwitchChange = async (e, i) => {
// uni.showLoading({
// title: '设置中...',
// mask: true
// });
try {
const res = await setMyHouseDefault({
@@ -155,17 +151,15 @@
})
const data = res
if (data.code === 200) {
// uni.hideLoading();
pageNum.value = 1
noMoreData.value = false
getList()
uni.setStorageSync('houseIsDefault', e.detail.value)
uni.showToast({
title: '设置默认房屋成功',
title: res.msg || '设置默认房屋成功',
icon: 'none'
});
} else {
// uni.hideLoading();
uni.showToast({
title: res.msg,
icon: 'none'
@@ -205,12 +199,7 @@
}
const goBack = () => {
uni.switchTab({
url: '/pages/myIndex/myIndex',
success: res => {},
fail: () => {},
complete: () => {}
});
uni.navigateBack()
}
</script>

View File

@@ -164,9 +164,7 @@
}
const goBack = () => {
uni.switchTab({
url: '/pages/myIndex/myIndex'
})
uni.navigateBack()
}
</script>

View File

@@ -258,9 +258,7 @@
}
const goBack = () => {
uni.navigateTo({
url: '/pageSubPack/my/myParkingSpaceIndex'
})
uni.navigateBack()
}
</script>

View File

@@ -152,22 +152,20 @@
// 返回新增
const goBackAdd = () => {
if (checkType.value === '楼栋') {
uni.removeStorageSync('buildingId')
uni.removeStorageSync('buildingName')
} else if (checkType.value === '单元') {
uni.removeStorageSync('unitId')
uni.removeStorageSync('unitName')
} else if (checkType.value === '楼层') {
uni.removeStorageSync('floorId')
uni.removeStorageSync('floorName')
} else if (checkType.value === '户号') {
uni.removeStorageSync('houseNumberId')
uni.removeStorageSync('houseNumberName')
if (checkType.value === "楼栋") {
uni.removeStorageSync("buildingId")
uni.removeStorageSync("buildingName")
} else if (checkType.value === "单元") {
uni.removeStorageSync("unitId")
uni.removeStorageSync("unitName")
} else if (checkType.value === "楼层") {
uni.removeStorageSync("floorId")
uni.removeStorageSync("floorName")
} else if (checkType.value === "户号") {
uni.removeStorageSync("houseNumberId")
uni.removeStorageSync("houseNumberName")
}
uni.navigateTo({
url: '/pageSubPack/my/addHouse'
})
uni.navigateBack()
}
// 获取数据
const getList = async (type) => {

View File

@@ -152,15 +152,9 @@
}
const goBackAdd = () => {
uni.removeStorageSync('carBrandId');
uni.removeStorageSync('carBrandName');
uni.navigateTo({
url: '/pageSubPack/my/addCar',
success: res => {},
fail: () => {},
complete: () => {}
});
uni.removeStorageSync("carBrandId");
uni.removeStorageSync("carBrandName");
uni.navigateBack()
}
onShow(() => {})

View File

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

View File

@@ -146,16 +146,14 @@
}
const goBackAdd = () => {
if (checkType.value == '停车场') {
uni.removeStorageSync('parkingLotId')
uni.removeStorageSync('parkingLotName')
} else if (checkType.value == '车位编号') {
uni.removeStorageSync('parkingSpaceId')
uni.removeStorageSync('parkingSpaceName')
if (checkType.value == "停车场") {
uni.removeStorageSync("parkingLotId")
uni.removeStorageSync("parkingLotName")
} else if (checkType.value == "车位编号") {
uni.removeStorageSync("parkingSpaceId")
uni.removeStorageSync("parkingSpaceName")
}
uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace'
})
uni.navigateBack()
}
</script>

View File

@@ -146,25 +146,9 @@
}
const goBackAdd = () => {
uni.removeStorageSync('communityId');
uni.removeStorageSync('communityName');
if (sourcePage.value == 'addHouse') {
uni.navigateTo({
url: '/pageSubPack/my/addHouse',
success: res => {},
fail: () => {},
complete: () => {}
});
} else if (sourcePage.value == 'addParkingSpace') {
uni.navigateTo({
url: '/pageSubPack/my/addParkingSpace',
success: res => {},
fail: () => {},
complete: () => {}
});
} else {
}
uni.removeStorageSync("communityId");
uni.removeStorageSync("communityName");
uni.navigateBack()
}
</script>

View File

@@ -58,12 +58,12 @@
title: '注销账号',
type: 'arrow'
},
{
title: '升级版本',
type: 'text',
value: '当前版本 1.0.0',
valueClass: 'item-version'
}
// {
// title: '升级版本',
// type: 'text',
// value: '当前版本 1.0.0',
// valueClass: 'item-version'
// }
])
// 格式化字节大小
@@ -105,7 +105,9 @@
currentVersion.value = manifest.version
}
// #endif
settingList.value[5].value = '当前版本 ' + currentVersion.value
if (settingList.value[5]) {
settingList.value[5].value = '当前版本 ' + currentVersion.value
}
}
// 版本号比较v1 > v2 返回 1v1 = v2 返回 0v1 < v2 返回 -1
@@ -247,7 +249,12 @@
url: '/pageSubPack/my/changePwd'
});
} else if (item.title == '清除缓存') {
uni.clearStorageSync();
// 保存登录相关数据,清完恢复
const preserveKeys = ['token', 'userId', 'currentVillageId', 'hasShowGuide', 'push_cid']
const saved = {}
preserveKeys.forEach(key => { saved[key] = uni.getStorageSync(key) })
uni.clearStorageSync()
preserveKeys.forEach(key => { if (saved[key]) uni.setStorageSync(key, saved[key]) })
// #ifdef APP-PLUS
plus.cache.clear(() => {})
// #endif
@@ -279,52 +286,30 @@
title: '提示',
content: '确定要退出当前账号吗?',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '退出中...',
mask: true
});
authLogout().then(res => {
if (res.code === 200) {
// 清除本地登录凭证
uni.removeStorageSync('token');
uni.removeStorageSync('userId');
uni.removeStorageSync('currentVillageId');
uni.hideLoading();
uni.showToast({
title: '退出成功',
icon: 'success'
});
setTimeout(() => {
uni.hideLoading();
uni.reLaunch({
url: '/pageSubPack/loginSub/login?mode=pwd'
});
}, 1500);
} else {
// 即使服务端返回失败,也清除本地数据并跳转登录页
uni.removeStorageSync('token');
uni.removeStorageSync('userId');
uni.removeStorageSync('currentVillageId');
uni.hideLoading();
uni.reLaunch({
url: '/pageSubPack/loginSub/login?mode=pwd'
});
}
}).catch(err => {
console.log(err);
// 网络异常时也清除本地数据并跳转登录页
uni.removeStorageSync('token');
uni.removeStorageSync('userId');
uni.removeStorageSync('currentVillageId');
uni.hideLoading();
uni.reLaunch({
url: '/pageSubPack/loginSub/login?mode=pwd'
});
})
if (!res.confirm) return
uni.showLoading({ title: '退出中...', mask: true })
const clearAndGo = () => {
uni.removeStorageSync('token')
uni.removeStorageSync('userId')
uni.removeStorageSync('currentVillageId')
uni.hideLoading()
uni.hideToast()
uni.reLaunch({ url: '/pageSubPack/loginSub/login?mode=pwd' })
}
authLogout().then(res => {
if (res.code === 200) {
uni.hideLoading()
uni.showToast({ title: '退出成功', icon: 'success' })
setTimeout(clearAndGo, 1500)
} else {
clearAndGo()
}
}).catch(err => {
console.log(err)
clearAndGo()
})
}
})
}