This commit is contained in:
曹辉 2023-05-10 10:13:49 +08:00
parent 54fef52c32
commit 34bbe788b4
2 changed files with 53 additions and 33 deletions

View File

@ -113,6 +113,9 @@
</template> </template>
<script> <script>
import {
AppIdentification
} from '@/api/AppIdentification/index.js'
import { import {
getRegionAndStreetInfo, getRegionAndStreetInfo,
getNurseType, getNurseType,
@ -202,27 +205,47 @@
type: 'error' type: 'error'
}) })
} else { } else {
information(that.query).then(res => { const patientId = uni.getStorageSync('patientId');
if (res.code == 200) { AppIdentification(patientId).then(resp => {
uni.removeStorageSync('invitationPatientId'); if (resp.code == 200) {
that.$refs.uToast.show({ if (res.data.loginFlag) {
title: '完善信息成功', that.$refs.uToast.show({
type: 'success', title: '您已完善',
duration: '1500' type: 'success',
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateBack({
delta: 1
}) })
}, 1500) if (that.timer) {
} else if (res.code == 500) { clearTimeout(that.timer)
that.$refs.uToast.show({ }
title: res.msg, that.timer = setTimeout(e => {
type: 'error', uni.navigateBack({
}) delta: 1
})
}, 1500)
} else {
information(that.query).then(res => {
if (res.code == 200) {
uni.removeStorageSync('invitationPatientId');
that.$refs.uToast.show({
title: '完善信息成功',
type: 'success',
duration: '1500'
})
if (that.timer) {
clearTimeout(that.timer)
}
that.timer = setTimeout(e => {
uni.navigateBack({
delta: 1
})
}, 1500)
} else if (res.code == 500) {
that.$refs.uToast.show({
title: res.msg,
type: 'error',
})
}
})
}
} }
}) })
} }
@ -294,20 +317,16 @@
}, },
// //
getpickerParentValue(e) { getpickerParentValue(e) {
e = e.filter(ele => ele.localName != '暂不选择')
e = e.filter(ele => ele.localName != '暂无需选择')
this.addresslength = e this.addresslength = e
if (e.length == 4) { this.address = ''
this.address = e[0].localName + e[1].localName + e[2].localName + e[3] this.query.areaCode = ''
.localName if (e && e.length >= 1) {
this.query.areaCode = e[3].id e.forEach(el => {
} else if (e.length == 3) { this.address = this.address + el.localName
this.address = e[0].localName + e[1].localName + e[2].localName })
this.query.areaCode = e[2].id this.query.areaCode = e[e.length - 1].id
} else if (e.length == 2) {
this.address = e[0].localName + e[1].localName
this.query.areaCode = e[1].id
} else if (e.length == 1) {
this.address = e[0].localName
this.query.areaCode = e[0].id
} else { } else {
this.address = '' this.address = ''
this.query.areaCode = '' this.query.areaCode = ''

View File

@ -167,6 +167,7 @@
// //
getpickerParentValue(e) { getpickerParentValue(e) {
e = e.filter(ele => ele.localName != '暂不选择') e = e.filter(ele => ele.localName != '暂不选择')
e = e.filter(ele => ele.localName != '暂无需选择')
this.addresslength = e this.addresslength = e
this.infolist.address = '' this.infolist.address = ''
this.infolist.areaCode = '' this.infolist.areaCode = ''