优化登录,修改bug
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user