Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
SenRanYo committed Aug 16, 2020
1 parent 252174c commit 92880b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 6 additions & 2 deletions components/print/bluetooth.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,12 @@ class Bluetooth {
}

// 停止搜索蓝牙设备
stopDevicesDiscovery() {
stopDevicesDiscovery(callback) {
callback = callback || function() {};
uni.stopBluetoothDevicesDiscovery({
success: e => {},
success: e => {
callback()
},
fail: e => {
if (err.errCode == 0) return;
this.handleError(err.errCode)
Expand All @@ -203,6 +206,7 @@ class Bluetooth {
})
list.forEach(item => {
item.nickName = item.name
item.connect = false
})
this.services = list
callback(list);
Expand Down
1 change: 0 additions & 1 deletion pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
</template>

<script>
import _ from 'lodash'
import print from '../../components/print/print.js'
import Bluetooth from '../../components/print/bluetooth.js'
export default {
Expand Down

0 comments on commit 92880b7

Please sign in to comment.