vm = new Vue({
...
methods: {
a: function () {
plus.bluetooth.createBLEConnection({
deviceId: self.deviceId,
success: function(e){
self.link.T = true
getDeviceServices(type)
},
fail: function(e){
console.log(JSON.stringify(e))
}
});
}
}
})
...
function getDeviceServices (type) {
plus.bluetooth.getBLEDeviceServices({
deviceId: vm.deviceId,
success: function(e) {
vm.bss = e.services;
console.log('get services success: '+ e.services.length)
// vm.getCharacteristics(type)
},
fail: function(e){
console.log(JSON.stringify(e))
}
})
)