Merge branch 'main' of http://47.107.152.87:3000/dyf/APP
This commit is contained in:
@ -86,14 +86,29 @@
|
||||
} catch (error) {}
|
||||
}
|
||||
},
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.deviceId) {
|
||||
this.deviceId = decodeURIComponent(options.deviceId);
|
||||
} else {
|
||||
this.deviceId = '未获取到设备ID';
|
||||
}
|
||||
},
|
||||
// 处理返回键
|
||||
onBackPress() {
|
||||
// 如果绑定成功了,返回时也要刷新首页
|
||||
if (this.isSuccess) {
|
||||
uni.$emit('refreshDeviceList');
|
||||
}
|
||||
return false; // 允许正常返回
|
||||
},
|
||||
// 页面卸载时处理
|
||||
onUnload() {
|
||||
// 如果绑定成功了,卸载时也要刷新首页
|
||||
if (this.isSuccess) {
|
||||
uni.$emit('refreshDeviceList');
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options.deviceId) {
|
||||
this.deviceId = decodeURIComponent(options.deviceId);
|
||||
} else {
|
||||
this.deviceId = '未获取到设备ID';
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user