[AI Generated]: fix(Comp): 新增 SDK 超时取消机制,组件销毁时清除定时器防止残留提示
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user