问题解决了吗,我也遇到同样的问题
微信商家券插件引用报错,本地开发调试或者真机调试都正常,上传设置成体验版,报错?[图片]
2020-07-29有没有大神来回答一下啊
小程序后台已开通直播,报插件禁止申请?小程序后台已开通直播,报插件禁止申请? 麻烦管理员帮忙看看 APPID:wxcd427da11c93bd10 [图片] [图片] [图片]
2020-04-27我也是返回成功,但是打印机没反应, 请问楼主具体怎么处理的,我试了下面的代码也没反应 [代码]writeBLECharacteristicValue(uuid) {[代码][代码] [代码][代码]// 向蓝牙设备发送一个0x00的16进制数据[代码] [代码] [代码][代码]let str = [代码][代码]"你要打印的内容"[代码][代码];[代码][代码] [代码][代码]let buffer = [代码][代码]new[代码] [代码]encoding.TextEncoder([代码][代码]"gb2312"[代码][代码], { NONSTANDARD_allowLegacyEncoding: [代码][代码]true[代码] [代码]}).encode(str).buffer[代码][代码] [代码][代码]wx.writeBLECharacteristicValue({[代码][代码] [代码][代码]deviceId: [代码][代码]this[代码][代码].data.deviceId,[代码][代码] [代码][代码]serviceId: [代码][代码]this[代码][代码].data.serviceId,[代码][代码] [代码][代码]characteristicId: uuid,[代码][代码] [代码][代码]value: buffer,[代码][代码] [代码][代码]success: (res) => {[代码][代码] [代码][代码]console.log([代码][代码]'write success'[代码][代码], res)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: (err) => {[代码][代码] [代码][代码]console.log([代码][代码]'write error'[代码][代码], err)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码]},[代码]
安卓不能连接蓝牙小票打印机,苹果能发送数据但不能打印[代码]sendtoequ: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码] [代码][代码]console.log([代码][代码]"发送消息到:deviceId"[代码] [代码]+ that.data.connectedDeviceId);[代码][代码] [代码][代码]console.log([代码][代码]"serviceId:"[代码] [代码]+ that.data.serviceId);[代码][代码] [代码][代码]console.log([代码][代码]"characteristicId:"[代码] [代码]+that.data.characteristicId)[代码]; let _value = str2ab(that.data.inputValue);//输入的数据 [代码] [代码][代码]wx.writeBLECharacteristicValue({[代码][代码] [代码][代码]// 这里的 deviceId 需要在上面的 getBluetoothDevices 或 onBluetoothDeviceFound 接口中获取[代码][代码] [代码][代码]deviceId: that.data.connectedDeviceId,[代码][代码] [代码][代码]// 这里的 serviceId 需要在上面的 getBLEDeviceServices 接口中获取[代码][代码] [代码][代码]serviceId: that.data.serviceId,[代码][代码] [代码][代码]// 这里的 characteristicId 需要在上面的 getBLEDeviceCharacteristics 接口中获取[代码][代码] [代码][代码]characteristicId: that.data.characteristicId,[代码][代码] [代码][代码]// 这里的value是ArrayBuffer类型[代码][代码] [代码][代码]value: _value,[代码][代码] [代码][代码]// value: buffer,[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]console.log(res)[代码][代码] [代码][代码]console.log([代码][代码]'writeBLECharacteristicValue success'[代码][代码], ab2str(_value))[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码], [代码][代码] function ab2str(buf) { return String.fromCharCode.apply(null, new Uint16Array(buf)); } [代码]function[代码] [代码]str2ab(str) {[代码][代码] [代码][代码]var[代码] [代码]buf = [代码][代码]new[代码] [代码]ArrayBuffer(str.length*4); [代码][代码]// 4 bytes for each char[代码][代码] [代码][代码]var[代码] [代码]bufView = [代码][代码]new[代码] [代码]Uint16Array(buf);[代码][代码] [代码][代码]for[代码] [代码]([代码][代码]var[代码] [代码]i=0, strLen=str.length; i<strlen; i++)="" {<="" code="">[代码][代码][代码][代码] [代码][代码]bufView[i] = str.charCodeAt(i);[代码][代码][代码][代码][代码][代码] [代码][代码]}[代码][代码][代码][代码][代码][代码] [代码][代码]return[代码] [代码]buf;[代码][代码][代码][代码][代码][代码]}[代码][代码][代码] [代码][代码][代码] [代码][代码][代码] [代码][代码][代码] [代码][代码][代码] [代码][代码][代码] [代码][代码][代码] 安卓不能连接蓝牙小票打印机,苹果能发送数据,但不能打印 下图成功发送1到打印机,但是,打印机没反应 [图片]
2018-07-10