Commit e952588e by 姜雷

Merge branch 'test'

parents e39eeb62 509ca0c6
...@@ -214,9 +214,18 @@ class Pay extends Component { ...@@ -214,9 +214,18 @@ class Pay extends Component {
} }
checkBluetoothAndWs() { checkBluetoothAndWs() {
if (this.checkIsShower()) { if (this.checkIsShower()) {
this.closeBluetooth()
.then(() => {
console.log('打开蓝牙和WebSocket'); console.log('打开蓝牙和WebSocket');
this.openBluetooth(); this.openBluetooth();
this.connectDeviceSocket(); this.connectDeviceSocket();
})
.catch(err => {
console.log(err);
console.log(err, '打开蓝牙和WebSocket');
this.openBluetooth();
this.connectDeviceSocket();
});
} }
} }
...@@ -271,7 +280,7 @@ class Pay extends Component { ...@@ -271,7 +280,7 @@ class Pay extends Component {
} }
closeBluetooth() { closeBluetooth() {
Taro.closeBluetoothAdapter(); return Taro.closeBluetoothAdapter();
} }
warnBluetoothOpen() { warnBluetoothOpen() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment