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() {
return {
areaId: '',
info: {}
}
},
onLoad() {
if (uni.getStorageSync('areaId')) {
this.areaId = uni.getStorageSync('areaId')||this.user.areaId
}
this.getDetail()
this.getArea().then(areaId => this.getDetail(areaId))
},
methods: {
getDetail() {
this.$instance.post(`/app/appeveryvillagecode/queryDetailByAreaId?areaId=${this.areaId}`).then(res => {
if (res.code === 0) {
getArea() {
return this.$instance.post(`/app/appresident/detailForWx`, null, {
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
}
})