diff --git a/components/kk-printer/index.vue b/components/kk-printer/index.vue index 3a4f48f..5b80902 100644 --- a/components/kk-printer/index.vue +++ b/components/kk-printer/index.vue @@ -28,7 +28,7 @@ - ~ 无可搜索到的设备 ~ + 无可搜索到的设备 @@ -164,17 +164,21 @@ blesdk.openBlue().then((res)=>{ //获取已连接设备 blesdk.getConnectedBluetoothDevices().then((res)=>{ + console.log('看res',res) if(uni.getStorageSync('deviceId') != '' && uni.getStorageSync('serviceId') != ''){ - if(res.devices.length==0){ + if(res.devices.length==0 || res.length==0){ blesdk.createBLEConnection(uni.getStorageSync('deviceId'), this.onConnectSuccess, this.onConnectFail); }else{ let datalen=20; - // #ifdef APP-PLUS - if (plus.os.name != 'Android') - { - datalen=180; - } - // #endif + // uni.getSystemInfo({ + // success: function (res) { + // console.log(res.osName) + // if (res.osName != 'android') + // { + // datalen=180; + // } + // } + // }); this.isPrinting = true; this.$emit('onPrint'); diff --git a/components/kk-printer/utils/bluetoolth.js b/components/kk-printer/utils/bluetoolth.js index ee0862b..b436557 100644 --- a/components/kk-printer/utils/bluetoolth.js +++ b/components/kk-printer/utils/bluetoolth.js @@ -188,7 +188,6 @@ export function getDeviceCharacteristics(deviceId, services, success, fail) { break; } } - if (!finished) { getDeviceCharacteristics(deviceId, services, success, fail); } @@ -244,7 +243,6 @@ export function sendDataToDevice(options) { let byteLength = options.value.byteLength; //这里默认一次20个字节发送 const speed = options.onceLength; //20; - console.log("send data 20"); console.log(options); if (byteLength > 0) { uniAsyncPromise('writeBLECharacteristicValue', { diff --git a/components/password-login/password-login.vue b/components/password-login/password-login.vue deleted file mode 100644 index 645d806..0000000 --- a/components/password-login/password-login.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - -