|
@@ -51,32 +51,36 @@ function doConnect() {
|
|
wsss.send(ExexuteMove(JSON.stringify(bitRate), form.sn))
|
|
wsss.send(ExexuteMove(JSON.stringify(bitRate), form.sn))
|
|
};
|
|
};
|
|
wsss.onclose = function () {
|
|
wsss.onclose = function () {
|
|
- $.confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- text: '连接断开,是否准备重连?',
|
|
|
|
- onOK: function () {
|
|
|
|
- doConnect();
|
|
|
|
- },
|
|
|
|
- onCancel: function () {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ wsss.close();
|
|
|
|
+ doConnect();
|
|
|
|
+ // $.confirm({
|
|
|
|
+ // title: '提示',
|
|
|
|
+ // text: '连接断开,是否准备重连?',
|
|
|
|
+ // onOK: function () {
|
|
|
|
+ // doConnect();
|
|
|
|
+ // },
|
|
|
|
+ // onCancel: function () {
|
|
|
|
+ // wx.miniProgram.switchTab({
|
|
|
|
+ // url: '/pages/home/home'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
};
|
|
};
|
|
wsss.onerror = function () {
|
|
wsss.onerror = function () {
|
|
- $.confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- text: '连接断开,是否准备重连?',
|
|
|
|
- onOK: function () {
|
|
|
|
- doConnect();
|
|
|
|
- },
|
|
|
|
- onCancel: function () {
|
|
|
|
- wx.miniProgram.switchTab({
|
|
|
|
- url: '/pages/home/home'
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ wsss.close();
|
|
|
|
+ doConnect();
|
|
|
|
+ // $.confirm({
|
|
|
|
+ // title: '提示',
|
|
|
|
+ // text: '连接断开,是否准备重连?',
|
|
|
|
+ // onOK: function () {
|
|
|
|
+ // doConnect();
|
|
|
|
+ // },
|
|
|
|
+ // onCancel: function () {
|
|
|
|
+ // wx.miniProgram.switchTab({
|
|
|
|
+ // url: '/pages/home/home'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
};
|
|
};
|
|
}
|
|
}
|
|
$('#box').on("click", function () {
|
|
$('#box').on("click", function () {
|