|
|
@@ -4,6 +4,7 @@ const app = getApp();
|
|
|
const util = require('../../utils/util.js');
|
|
|
const timeOut = 40; //超时时间
|
|
|
var timeId = "";
|
|
|
+var showDialog = false;
|
|
|
var sequenceControl = 0;
|
|
|
Page({
|
|
|
|
|
|
@@ -522,11 +523,20 @@ Page({
|
|
|
num++;
|
|
|
} else {
|
|
|
clearInterval(timeId);
|
|
|
- if (self.data.showBluetoothConnected) {
|
|
|
+ if (!showDialog) {
|
|
|
+ showDialog = true;
|
|
|
wx.showModal({
|
|
|
title: '提示',
|
|
|
content: '配网失败,请检查wifi密码或设备是否连接正常',
|
|
|
- showCancel: false
|
|
|
+ showCancel: false,
|
|
|
+ success(res) {
|
|
|
+ showDialog = false;
|
|
|
+ if (res.confirm) {
|
|
|
+ console.log('用户点击确定')
|
|
|
+ } else if (res.cancel) {
|
|
|
+ console.log('用户点击取消')
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
self.setData({
|
|
|
showBluetoothConnected: false
|