BUG 27633

This commit is contained in:
aixianling
2022-02-28 15:14:09 +08:00
parent 7a10b684ee
commit d9788c214d

View File

@@ -41,20 +41,27 @@ export default {
}, },
data() { data() {
return { return {
areaId: '',
info: {} info: {}
} }
}, },
onLoad() { onLoad() {
if (uni.getStorageSync('areaId')) { this.getArea().then(areaId => this.getDetail(areaId))
this.areaId = uni.getStorageSync('areaId')||this.user.areaId
}
this.getDetail()
}, },
methods: { methods: {
getDetail() { getArea() {
this.$instance.post(`/app/appeveryvillagecode/queryDetailByAreaId?areaId=${this.areaId}`).then(res => { return this.$instance.post(`/app/appresident/detailForWx`, null, {
if (res.code === 0) { params: {id: this.user.residentId}
}).then(res => {
if (res?.data) {
return res.data.resident?.currentAreaId || ""
}
})
},
getDetail(areaId) {
areaId && this.$instance.post(`/app/appeveryvillagecode/queryDetailByAreaId`, null, {
params: {areaId}
}).then(res => {
if (res?.code === 0) {
this.info = res.data this.info = res.data
} }
}) })