|
|
@@ -180,10 +180,12 @@ Page({
|
|
|
});
|
|
|
|
|
|
var oldDeviceList = wx.getStorageSync('deviceList');
|
|
|
- self.setData({
|
|
|
- deviceList: oldDeviceList,
|
|
|
- showBluetoothList: true
|
|
|
- });
|
|
|
+ if (oldDeviceList && oldDeviceList.length) {
|
|
|
+ self.setData({
|
|
|
+ deviceList: oldDeviceList,
|
|
|
+ showBluetoothList: true
|
|
|
+ });
|
|
|
+ }
|
|
|
//第二步关闭适配器,重新来搜索
|
|
|
wx.openBluetoothAdapter({
|
|
|
success: function (res) {
|