[AI Generated]: fix(Comp): 新增 SDK 超时取消机制,组件销毁时清除定时器防止残留提示

This commit is contained in:
17792275749
2026-04-09 10:53:53 +08:00
parent 65acceba2a
commit 8cb7a11fbe
4 changed files with 18 additions and 11 deletions
@@ -26,7 +26,7 @@ Component({
this.setNerwork();
},
detached() {
if (this._sdkCancel) { this._sdkCancel(); this._sdkCancel = null; }
}
},
@@ -37,7 +37,7 @@ Component({
let password = this.properties.password;
let version = app.globalData.ppScale.version;
if (version === 'domain1') {
app.callWithTimeout(
this._sdkCancel = app.callWithTimeout(
(done) => app.globalData.ppScale.activeProtocol.dataConfigNetWork({
domain: app.globalData.ppScale.domain1,
ssid: ssid,
@@ -57,7 +57,7 @@ Component({
);
}
if (version === 'domain2') {
app.callWithTimeout(
this._sdkCancel = app.callWithTimeout(
(done) => app.globalData.ppScale.activeProtocol.dataConfigUserNetWork({
domain: app.globalData.ppScale.domain2,
ssid: ssid,