优化物业缴费点击去抵扣物业账单后页面的数据请求逻辑
This commit is contained in:
parent
f2acabac3f
commit
15288eaa10
@ -298,6 +298,15 @@ export default {
|
|||||||
this.localHeight = meun.height;
|
this.localHeight = meun.height;
|
||||||
this.currentCommunity = uni.getStorageSync("changeCommData");
|
this.currentCommunity = uni.getStorageSync("changeCommData");
|
||||||
this.currentCommunityAddr = uni.getStorageSync("currentCommunityAddr");
|
this.currentCommunityAddr = uni.getStorageSync("currentCommunityAddr");
|
||||||
|
// 解析从providentFund页面传递过来的房源信息
|
||||||
|
if (options.item) {
|
||||||
|
try {
|
||||||
|
const item = JSON.parse(decodeURIComponent(options.item));
|
||||||
|
this.currentRoom = item;
|
||||||
|
} catch (error) {
|
||||||
|
console.error("解析房源信息失败:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.getRoomSelect();
|
this.getRoomSelect();
|
||||||
this.getUserGovenmentMoney();
|
this.getUserGovenmentMoney();
|
||||||
},
|
},
|
||||||
@ -330,7 +339,7 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 滑动到底部生命周期函数
|
// 滑动到底部生命周期函数
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
// 只有在缴费记录页面且还有更多数据时才触发加载更多
|
// 只有在缴费记录页面且还有更多数据时才触发加载更多
|
||||||
@ -379,7 +388,9 @@ export default {
|
|||||||
page_size: 50,
|
page_size: 50,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.roomList = res.rows;
|
this.roomList = res.rows;
|
||||||
this.currentRoom = this.roomList[0];
|
if (!this.currentRoom.room_id) {
|
||||||
|
this.currentRoom = this.roomList[0]
|
||||||
|
}
|
||||||
this.selectedRoomId = this.currentRoom.room_id;
|
this.selectedRoomId = this.currentRoom.room_id;
|
||||||
this.getOrderList().then(() => {
|
this.getOrderList().then(() => {
|
||||||
resolve();
|
resolve();
|
||||||
@ -401,7 +412,7 @@ export default {
|
|||||||
|
|
||||||
this.currentRoom = item;
|
this.currentRoom = item;
|
||||||
this.getOrderList();
|
this.getOrderList();
|
||||||
|
|
||||||
// 如果当前是缴费记录标签页,重新请求缴费记录数据
|
// 如果当前是缴费记录标签页,重新请求缴费记录数据
|
||||||
if (this.active === 1) {
|
if (this.active === 1) {
|
||||||
// 重置分页参数
|
// 重置分页参数
|
||||||
@ -687,7 +698,7 @@ export default {
|
|||||||
flag = false;
|
flag = false;
|
||||||
}
|
}
|
||||||
this.flag = flag;
|
this.flag = flag;
|
||||||
|
|
||||||
// 如果是第一页,直接替换数据;如果是加载更多,追加数据
|
// 如果是第一页,直接替换数据;如果是加载更多,追加数据
|
||||||
if (this.page_num === 1) {
|
if (this.page_num === 1) {
|
||||||
this.payOrderList = res.rows || [];
|
this.payOrderList = res.rows || [];
|
||||||
|
|||||||
@ -219,7 +219,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
goPay() {
|
goPay() {
|
||||||
NavgateTo("../propertyPayment/index");
|
NavgateTo("../propertyPayment/index?item=" + encodeURIComponent(JSON.stringify(this.defaultName)));
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user