优化登录,修改bug
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
<view class="form-item">
|
||||
<view class="item-label">车牌号</view>
|
||||
<input class="item-input" v-model="formData.carNum" placeholder="请输入"
|
||||
placeholder-class="input-placeholder" />
|
||||
placeholder-class="input-placeholder" maxlength="8" />
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<text class="item-label">车辆品牌</text>
|
||||
<input class="item-input" v-model="formData.carBrand" placeholder="请输入"
|
||||
placeholder-class="input-placeholder" />
|
||||
placeholder-class="input-placeholder" maxlength="32"/>
|
||||
</view>
|
||||
<!-- <view class="form-item" @click="selectItem('车辆品牌')">
|
||||
<text class="item-label">车辆品牌</text>
|
||||
@@ -28,13 +28,13 @@
|
||||
<view class="form-item">
|
||||
<view class="item-label">车辆型号</view>
|
||||
<input class="item-input" v-model="formData.carModel" placeholder="请输入"
|
||||
placeholder-class="input-placeholder" />
|
||||
placeholder-class="input-placeholder" maxlength="32"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
<view class="item-label">车辆颜色</view>
|
||||
<input class="item-input" v-model="formData.carColor" placeholder="请输入"
|
||||
placeholder-class="input-placeholder" />
|
||||
placeholder-class="input-placeholder" maxlength="5"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item upload-item">
|
||||
@@ -140,7 +140,6 @@
|
||||
title: err.msg || '网络异常',
|
||||
icon: 'none'
|
||||
})
|
||||
console.error('列表接口报错:', err)
|
||||
} finally {
|
||||
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<scroll-view scroll-y class="form-box">
|
||||
<view class="form-item">
|
||||
<text class="label">住户名称</text>
|
||||
<input class="input" v-model="form.name" placeholder="请输入真实姓名" placeholder-class="ph" />
|
||||
<input class="input" v-model="form.name" placeholder="请输入真实姓名" placeholder-class="ph" maxlength="20"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">证件号码</text>
|
||||
<input class="input" v-model="form.cardNo" placeholder="请输入证件号码" placeholder-class="ph" />
|
||||
<input class="input" v-model="form.cardNo" placeholder="请输入证件号码" placeholder-class="ph" maxlength="18"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item arrow-item" @click="openRelation">
|
||||
@@ -129,7 +129,7 @@
|
||||
<view class="form-item phone-item">
|
||||
<text class="label">手机号码</text>
|
||||
<input class="input" v-model="form.phone" placeholder="请输入手机号" placeholder-class="ph"
|
||||
type="tel" />
|
||||
type="tel" maxlength="11"/>
|
||||
<!-- <button class="code-btn" :disabled="cd>0" @click="sendCode">
|
||||
{{ cd > 0 ? cd+'s' : '获取验证码' }}
|
||||
</button> -->
|
||||
@@ -141,7 +141,7 @@
|
||||
<view class="form-item">
|
||||
<text class="label">验证码</text>
|
||||
<input class="input" v-model="form.code" placeholder="请输入6位验证码" placeholder-class="ph"
|
||||
type="number" />
|
||||
type="number" maxlength="6"/>
|
||||
</view>
|
||||
|
||||
<!-- 身份证上传 -->
|
||||
@@ -255,6 +255,7 @@
|
||||
getHouseAuthSendSmsCode,
|
||||
getMyHouseDetail,
|
||||
upDateMyHouse,
|
||||
getHouseDataList,
|
||||
} from '/pageSubPack/api/apiSub.js'
|
||||
import {
|
||||
useImageUpload
|
||||
@@ -315,35 +316,7 @@
|
||||
|
||||
|
||||
|
||||
const relations = ref([{
|
||||
id: 0,
|
||||
name: '本人'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '配偶'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '父母'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '子女'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '亲属'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '租户'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '其他'
|
||||
}
|
||||
])
|
||||
const relations = ref([])
|
||||
|
||||
const upDataListNum = ref(0)
|
||||
// const idCardFront = ref('')
|
||||
@@ -495,8 +468,8 @@
|
||||
idCardBackUpload.setPreviewUrl(data.data.cardImageBack?.url || data.data.cardImageBack || '')
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: `${res.msg}`,
|
||||
icon: 'error'
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
@@ -514,6 +487,7 @@
|
||||
clearInterval(timer)
|
||||
})
|
||||
onLoad((option) => {
|
||||
loadRelations()
|
||||
console.log(uni.getStorageSync('updateHouseId'));
|
||||
if (option.id) {
|
||||
if (uni.getStorageSync('operationType') == 'update') {
|
||||
@@ -560,6 +534,21 @@
|
||||
showRelation.value = false
|
||||
upDataListNum.value++
|
||||
}
|
||||
|
||||
// 获取与业主关系下拉数据
|
||||
const loadRelations = async () => {
|
||||
try {
|
||||
const res = await getHouseDataList({dictType:"com_resident_relationship",dictName:'与业主关系'})
|
||||
if (res.code === 200) {
|
||||
relations.value = (res.rows || []).map(item => ({
|
||||
id: item.dictValue,
|
||||
name: item.dictLabel
|
||||
}))
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('加载与业主关系失败:', err)
|
||||
}
|
||||
}
|
||||
const selectClick = (item) => {
|
||||
formData.status = item;
|
||||
uni.setStorageSync('houseStatus', item)
|
||||
|
||||
@@ -76,7 +76,7 @@ const onDeleteAccount = () => {
|
||||
uni.showToast({ title: '注销成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pageSubPack/loginSub/pwd-login'
|
||||
url: '/pageSubPack/loginSub/login?mode=pwd'
|
||||
})
|
||||
}, 1500)
|
||||
} else {
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
title: err.msg || '网络异常',
|
||||
icon: 'none'
|
||||
})
|
||||
console.error('列表接口报错:', err)
|
||||
// console.error('列表接口报错:', err)
|
||||
} finally {
|
||||
|
||||
}
|
||||
|
||||
@@ -298,6 +298,8 @@
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.2s ease;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* 选中状态 */
|
||||
@@ -315,6 +317,9 @@
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 成功提示弹窗 */
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: `${res.msg}`,
|
||||
icon: 'error'
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -86,7 +86,7 @@
|
||||
}else {
|
||||
uni.showToast({
|
||||
title: `${res.msg}`,
|
||||
icon: 'error'
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -105,10 +105,7 @@
|
||||
content: '确认选择此' + checkType.value + '吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.showLoading({
|
||||
title: '选择中...',
|
||||
mask: true
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '选择成功',
|
||||
@@ -129,7 +126,6 @@
|
||||
}
|
||||
}, 1000)
|
||||
setTimeout(() => {
|
||||
uni.hideLoading()
|
||||
goFreash()
|
||||
}, 2500)
|
||||
}
|
||||
@@ -190,12 +186,7 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.parkingLot-grid {
|
||||
display: grid;
|
||||
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 30rpx;
|
||||
}
|
||||
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
@@ -212,6 +203,15 @@
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
.parkingLot-grid {
|
||||
/* display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 30rpx; */
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 30rpx
|
||||
|
||||
}
|
||||
|
||||
.parkingLot-item {
|
||||
height: 100rpx;
|
||||
@@ -223,6 +223,9 @@
|
||||
border-radius: 20rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.2s ease;
|
||||
/* padding: 0 24rpx; */
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.parkingLot-item.active {
|
||||
@@ -238,5 +241,8 @@
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
@@ -310,7 +310,7 @@
|
||||
setTimeout(() => {
|
||||
uni.hideLoading();
|
||||
uni.reLaunch({
|
||||
url: '/pageSubPack/loginSub/pwd-login'
|
||||
url: '/pageSubPack/loginSub/login?mode=pwd'
|
||||
});
|
||||
}, 1500);
|
||||
} else {
|
||||
@@ -320,7 +320,7 @@
|
||||
uni.removeStorageSync('currentVillageId');
|
||||
uni.hideLoading();
|
||||
uni.reLaunch({
|
||||
url: '/pageSubPack/loginSub/pwd-login'
|
||||
url: '/pageSubPack/loginSub/login?mode=pwd'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
uni.removeStorageSync('currentVillageId');
|
||||
uni.hideLoading();
|
||||
uni.reLaunch({
|
||||
url: '/pageSubPack/loginSub/pwd-login'
|
||||
url: '/pageSubPack/loginSub/login?mode=pwd'
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user