lin
2024-02-27 823718ba8671b7ddb1714082f9fdf001918c6681
切换房屋,物业公司需要切换
1 files modified
11 ■■■■■ changed files
pages/home/index.vue 11 ●●●●● patch | view | raw | blame | history
pages/home/index.vue
@@ -263,6 +263,8 @@
                console.log("refreshPage=>", val);
                this.curSelectSite = val
                this.getHouseDataList(val.id)
                this.curHouseCode = this.curSelectSite.houseCode
                uni.setStorageSync("curHouseCode", this.curSelectSite.houseCode)
            })
        },
@@ -342,7 +344,7 @@
            getContactList() {
                getContact({
                    houseCode: this.curHouseCode
                    houseCode: uni.getStorageSync("curHouseCode")
                }).then(res => {
                    let data = res.data;
                    this.contactList = this.navList;
@@ -351,18 +353,24 @@
                        this.contactList[1].phone = data.wg.phone
                        this.contactList[1].path = "/subPackage/grid/comprehensive";
                        this.contactList[1].id = data.wg.code;
                    } else {
                        this.contactList[1].name = "";
                    }
                    if (data.wy) {
                        this.contactList[0].name = data.wy.name;
                        this.contactList[0].phone = data.wy.phone;
                        this.contactList[0].path = "/subPackage/grid/tenement";
                        this.contactList[0].id = data.wy.code;
                    } else {
                        this.contactList[0].name = "";
                    }
                    if (data.ga) {
                        this.contactList[2].name = data.ga.name;
                        this.contactList[2].phone = data.ga.phone;
                        this.contactList[2].path = "/subPackage/grid/publicSecurity";
                        this.contactList[2].id = data.ga.code;
                    } else {
                        this.contactList[2].name = "";
                    }
                })
            },
@@ -418,6 +426,7 @@
                        this.curSelectSite = dataList[0];
                    }
                    this.curHouseCode = this.curSelectSite.id
                    uni.setStorageSync("curHouseCode", this.curSelectSite.id)
                }
            },