ble.js 349 B

123456789101112131415161718192021222324252627
  1. const handle = require("./handle");
  2. const sonyBleCode = {
  3. }
  4. class BLE{
  5. constructor(){
  6. // this代表实例对象
  7. this.isInit= false;
  8.  }
  9. async initBle(option){
  10. let [err,ok] = await handle(wx.openBluetoothAdapter(option));
  11. if(err){
  12. throw err;
  13. }
  14. return 0
  15. }
  16. }
  17. module.exports = ()=> {
  18. return new BLE();
  19. }