优化首页的下拉刷新、数据排序、绑定后刷新

This commit is contained in:
liub
2025-12-24 10:52:28 +08:00
parent 425b7b9cfd
commit 637658a762
202 changed files with 5432 additions and 301514 deletions

View File

@ -79,6 +79,13 @@
icon: 'success'
});
this.isConnecting = true;
uni.$emit('refreshDeviceList');
setTimeout(()=>{
uni.switchTab({
url: '/pages/common/index/index'
})
},500);
} else {
this.isConnectNo = false
uni.showToast({
@ -93,17 +100,17 @@
// 处理返回键
onBackPress() {
// 如果绑定成功了,返回时也要刷新首页
if (this.isSuccess) {
uni.$emit('refreshDeviceList');
}
return false; // 允许正常返回
// if (this.isSuccess) {
// uni.$emit('refreshDeviceList');
// }
// return false; // 允许正常返回
},
// 页面卸载时处理
onUnload() {
// 如果绑定成功了,卸载时也要刷新首页
if (this.isSuccess) {
uni.$emit('refreshDeviceList');
}
// if (this.isSuccess) {
// uni.$emit('refreshDeviceList');
// }
},
onLoad(options) {
if (options.deviceId) {