BUG 27633
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user