diff --git a/components/configureDevice_2/configureDevice_2.js b/components/configureDevice_2/configureDevice_2.js index dea5b08..d2dacf7 100644 --- a/components/configureDevice_2/configureDevice_2.js +++ b/components/configureDevice_2/configureDevice_2.js @@ -207,8 +207,14 @@ Component({ wx.showLoading({ title: "正在同步用户数据...", mask: true }); - // 第一步:清除秤上所有用户信息 + // 第一步:清除秤上所有用户信息(15秒超时保护) + let clearTimer = setTimeout(() => { + wx.hideLoading(); + wx.showToast({ title: "清除设备数据超时,请重试", icon: "none" }); + }, 15000); + app.globalData.ppScale.activeProtocol.codeClearDeviceData("01", (clearRes) => { + clearTimeout(clearTimer); console.log("codeClearDeviceData res", clearRes); if (clearRes !== 0x00) { wx.hideLoading();