Compare commits

..

No commits in common. "3e884f1b1a829e29a22170794344e102a69bca15" and "1de223346d7ac972b39d7a4b7548314088949a64" have entirely different histories.

View File

@ -209,14 +209,12 @@ export default {
loadMoreText: "",
isShowBill: false,
houseVal: "",
};
},
async onLoad(options) {
// if (!uni.getStorageSync("changeCommData")) {
// return;
// }
if(!uni.getStorageSync("changeCommData")){
return
}
await request(apiArr2.commInfo, "POST", {
user_id: uni.getStorageSync("userId"),
longitude: uni.getStorageSync("location").lng,
@ -224,30 +222,14 @@ export default {
page_num: this.page_num,
page_size: this.page_size,
}).then((res) => {
// res.rows.find((item) => {
// if (item.community_id == uni.getStorageSync("changeCommData").id) {
// this.isShowBill = item.bill_front_end_display == 1 ? true : false;
// }
// });
if (res.rows.length == 0) {
uni.removeStorageSync("changeCommData");
return;
}
const targetItem = res.rows.find((item) => {
return item.community_id == uni.getStorageSync("changeCommData").id;
});
if (targetItem) {
//
this.isShowBill = targetItem.bill_front_end_display == 1;
//
if (targetItem.front_end_display == 1) {
uni.removeStorageSync("changeCommData");
}
}
res.rows = res.rows.filter((item) => {
return item.front_end_display != 1;
});
console.log("🚀 ~ onLoad ~ res.rows:", res.rows)
uni.setStorageSync("changeCommData",{ name: res.rows[0].name, id: res.rows[0].community_id })
this.communityList = res.rows;
});
const meun = menuButtonInfo();
@ -349,8 +331,8 @@ export default {
},
async getfunctionList() {
if (!uni.getStorageSync("changeCommData")) {
return;
if(!uni.getStorageSync("changeCommData")){
return
}
const res = await request(apiArr.navPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id),
@ -373,8 +355,8 @@ export default {
},
async getAdvertising() {
if (!uni.getStorageSync("changeCommData")) {
return;
if(!uni.getStorageSync("changeCommData")){
return
}
const res = await request(apiArr.advPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id),
@ -533,8 +515,8 @@ export default {
},
async getCategoryList() {
if (!uni.getStorageSync("changeCommData")) {
return;
if(!uni.getStorageSync("changeCommData")){
return
}
const res = await request(apiArr.categoryPage, "POST", {
community_id: Number(uni.getStorageSync("changeCommData").id),