|
@@ -612,11 +612,6 @@ Page({
|
|
var deviceList = that.getDeviceList();
|
|
var deviceList = that.getDeviceList();
|
|
var deviceListSelect = that.getDeviceListSelect();
|
|
var deviceListSelect = that.getDeviceListSelect();
|
|
|
|
|
|
- if (deviceList.length > 1 && (deviceListSelect === null || deviceList.length <= deviceListSelect)) {
|
|
|
|
- // 2个设备才判断,1个直接删除
|
|
|
|
- return;
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
///是否删除的当前播放这个
|
|
///是否删除的当前播放这个
|
|
var isCurrentIndex = false;
|
|
var isCurrentIndex = false;
|
|
deviceListSelect = deviceListSelect ?? 0;
|
|
deviceListSelect = deviceListSelect ?? 0;
|
|
@@ -629,19 +624,18 @@ Page({
|
|
deviceList = deviceList.filter((item, i) => {
|
|
deviceList = deviceList.filter((item, i) => {
|
|
return deviceId !== item.deviceId;
|
|
return deviceId !== item.deviceId;
|
|
});
|
|
});
|
|
- console.log("断开蓝牙连接", deviceId)
|
|
|
|
-
|
|
|
|
- BtHelper.getInstance().disconnect({
|
|
|
|
- "deviceId": deviceId
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
store.setStore("deviceList", deviceList);
|
|
store.setStore("deviceList", deviceList);
|
|
|
|
+
|
|
var indexPage = that.data.indexPage;
|
|
var indexPage = that.data.indexPage;
|
|
that.setData({
|
|
that.setData({
|
|
deviceList: deviceList,
|
|
deviceList: deviceList,
|
|
indexPage: indexPage == 1 ? 0 : indexPage,
|
|
indexPage: indexPage == 1 ? 0 : indexPage,
|
|
deviceListSelect: isCurrentIndex ? null : deviceListSelect,
|
|
deviceListSelect: isCurrentIndex ? null : deviceListSelect,
|
|
});
|
|
});
|
|
|
|
+
|
|
|
|
+ BtHelper.getInstance().disconnect({
|
|
|
|
+ "deviceId": deviceId
|
|
|
|
+ });
|
|
},
|
|
},
|
|
|
|
|
|
/// 断开连接wifi
|
|
/// 断开连接wifi
|