|
|
|
@ -294,15 +294,15 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
xierushuju(deviceId, res5, res6) { |
|
|
|
let that = this; |
|
|
|
uni.setStorageSync('deviceId', deviceId); |
|
|
|
uni.setStorageSync('serviceId', res5.services[0].uuid); |
|
|
|
uni.setStorageSync('characteristicId', item.uuid); |
|
|
|
let that = this; |
|
|
|
//写入数据 |
|
|
|
for (let i = 0; i < res6.characteristics.length; i++) { |
|
|
|
let item = res6.characteristics[i] |
|
|
|
if (item.properties.write) { // 该特征值可写 |
|
|
|
console.log('该特征值可写') |
|
|
|
console.log('该特征值可写') |
|
|
|
uni.setStorageSync('deviceId', deviceId); |
|
|
|
uni.setStorageSync('serviceId', res5.services[0].uuid); |
|
|
|
uni.setStorageSync('characteristicId', item.uuid); |
|
|
|
if (this.defaultText == '打印小票') { |
|
|
|
that.$emit('onPrintSmall'); |
|
|
|
} else if (this.defaultText == '确认打印') { |
|
|
|
|