修改切换账号绑定小区

This commit is contained in:
zhouyanli
2026-06-09 17:11:25 +08:00
parent ebdfa8d95e
commit aaf828c6e3
15 changed files with 54 additions and 29 deletions

View File

@@ -138,7 +138,7 @@ const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
// 筛选条件status ''全部, '0'未开始, '1'进行中, '2'已结束
const filters = ref([
{ label: '审核中', value: '' },
{ label: '全部', value: '' },
{ label: '未开始', value: '0' },
{ label: '进行中', value: '1' },
{ label: '已结束', value: '2' }

View File

@@ -269,7 +269,7 @@ const submitStatus = async () => {
}, 1500);
} catch (err) {
uni.hideLoading();
uni.showToast({ title: err || '提交失败', icon: 'none' });
uni.showToast({ title: err.msg || '提交失败', icon: 'none' });
}
};
</script>

View File

@@ -47,6 +47,10 @@ export const getVillageSwitch = (data)=>{
export const getActivitylatest = () =>{
return get('/api/resident/activity/latest')
}
// 重新加载用户信息
export const getReloadUserInfo = () =>{
return get('/api/resident/auth/reloadUserInfo')
}
// ========公告列表======
// 获取公告列表

View File

@@ -1,6 +1,6 @@
let baseUrl = '';
if (process.env.NODE_ENV === 'development') {
baseUrl = 'http://192.168.0.239:8080'; // 开发环境
baseUrl = 'http://192.168.1.222:8080'; // 开发环境
} else {
baseUrl = 'http://192.168.0.224:8080'; // 生产环境
}

View File

@@ -1,5 +1,5 @@
// 服务器地址(与 request.js 保持一致)
const baseUrl = 'http://192.168.0.239:8080';
const baseUrl = 'http://192.168.1.222:8080';
/**
* 图片上传 Hook

View File

@@ -155,6 +155,7 @@ const getVerifyCode = () => {
});
}
}).catch(err => {
uni.hideLoading();
uni.showToast({
title: '网络异常',
icon: 'error'
@@ -195,6 +196,7 @@ const handleLogin = () => {
}
getLoginBySms(params).then(res =>{
if(res.code === 200){
uni.hideLoading();
if(res.data){
uni.setStorageSync('token', res.data.token);
// 存用户ID
@@ -219,6 +221,7 @@ const handleLogin = () => {
}
}).catch(err => {
uni.hideLoading();
uni.showToast({
title: err.msg || '网络异常,请重试',
icon: 'error'

View File

@@ -163,6 +163,7 @@ const handleLogin = () => {
}).catch(err => {
// console.log('密码登录异常',err)
uni.hideLoading();
uni.showToast({
title: err.msg || '网络异常',
icon: 'error'

View File

@@ -261,6 +261,7 @@
});
}
}).catch((err) => {
uni.hideLoading();
uni.showToast({
title: err.msg || '网络异常',
icon: 'error'

View File

@@ -449,7 +449,7 @@
}
} catch (err) {
uni.showToast({
title: `${err}`,
title: err.msg || '网络异常',
icon: 'none'
})
} finally {
@@ -694,7 +694,7 @@
const params = {
villageId: uni.getStorageSync('communityId'),
buildingId: uni.getStorageSync('buildingId'),
unitNo: uni.getStorageSync('unitId'),
unitNoId: uni.getStorageSync('unitId'),
floorNo: uni.getStorageSync('floorId'),
houseNo: uni.getStorageSync('houseNumberName'),
houseId: uni.getStorageSync('houseNumberId'),
@@ -727,6 +727,8 @@
title: '提交成功',
icon: 'success'
})
// 标记需要从绑定房屋返回首页后重新加载用户信息
uni.setStorageSync('needReloadUserInfo', true)
setTimeout(() => {
goBack()
}, 1500)

View File

@@ -187,8 +187,8 @@
buildingId: selectedBuilding.value
})
const newList = res.data.map(item => ({
id: item,
name: item
id: item.id,
name: item.name
}))
dataList.value = newList

View File

@@ -382,6 +382,7 @@ const submitForm = async () => {
const res = await addQueryRepair(params)
if (res.code === 200) {
uni.hideLoading();
uni.showToast({ title: '提交成功', icon: 'success' })
form.value = { title: '', desc: '', phone: '', datetime: '', images: [] }
houseName.value = ''

View File

@@ -200,6 +200,7 @@ const submitForm = async () => {
const res = await addQueryRepair(params)
if (res.code === 200) {
uni.hideLoading();
uni.showToast({ title: '提交成功', icon: 'success' })
// const tempProjectId = projectId.value
form.value = { title: '', desc: '', phone: '', images: [] }

View File

@@ -33,7 +33,7 @@
<view class="img-scroll-container">
<view v-for="(img, imgIndex) in item.imgList" :key="imgIndex" class="img-item">
<image :src="img" mode="widthFix" class="card-img"></image>
<image :src="img" mode="aspectFill" class="card-img"></image>
</view>
</view>