wangfukang 3 years ago
parent
commit
0ffdd6a5f0
  1. BIN
      components/.DS_Store
  2. 25
      components/kk-printer/index.vue

BIN
components/.DS_Store

Binary file not shown.

25
components/kk-printer/index.vue

@ -103,6 +103,13 @@
},
mounted() {
},
watch: {
isShowSearch(newVal, oldVal) {
if(newVal == false){
this.$parent.$parent.isShow = true
}
}
},
onLoad() {
@ -118,6 +125,8 @@
//点击打印按钮
handlePrintTap() {
let that = this
console.log(this.$parent)
this.$parent.$parent.clickShow();
uni.showLoading({
mask: true,
title: '加载中...'
@ -162,8 +171,8 @@
}
})
uni.removeStorageSync('deviceId');
this.isShowSearch = true
this.sousuo()
that.isShowSearch = true
that.sousuo()
uni.hideLoading();
}
})
@ -206,7 +215,7 @@
wx.createBLEConnection({ //555
deviceId: deviceId, // 搜索到设备的 deviceId
success: () => {
this.isShowSearch = false
that.isShowSearch = false
console.log('连接设备成功')
that.huoqufuwu(deviceId)
},
@ -214,7 +223,7 @@
console.log('连接设备失败', res)
that.tui.toast('连接设备失败', res)
if (uni.getStorageSync('deviceId')) {
this.huoqufuwu(uni.getStorageSync('deviceId'))
that.huoqufuwu(uni.getStorageSync('deviceId'))
} else {
wx.closeBLEConnection({
deviceId: uni.getStorageSync('deviceId'),
@ -223,8 +232,8 @@
}
})
uni.removeStorageSync('deviceId')
this.sousuo()
this.isShowSearch = true
that.sousuo()
that.isShowSearch = true
}
uni.hideLoading();
@ -249,7 +258,7 @@
console.log(res1)
}
})
this.isShowSearch = true
that.isShowSearch = true
uni.hideLoading();
}
})
@ -282,7 +291,7 @@
console.log(res)
}
})
this.isShowSearch = true
that.isShowSearch = true
uni.hideLoading();
}
})

Loading…
Cancel
Save