优化首页的下拉刷新、数据排序、绑定后刷新
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user