shish 4 лет назад
Родитель
Сommit
48ad6db673
1 измененных файлов с 9 добавлено и 5 удалено
  1. 9 5
      hdPad/src/pages/home/components/workInfo.vue

+ 9 - 5
hdPad/src/pages/home/components/workInfo.vue

@@ -110,8 +110,8 @@
         <uni-popup-dialog type="info" cancelText="取消" confirmText="确认" title="提示" content="确认完成?" @confirm="confirmFinish"></uni-popup-dialog>
     </uni-popup>
 
-    <uni-popup ref="bluetoothRef" type="dialog">
-        <uni-popup-dialog type="info" cancelText="取消" confirmText="好的" title="提示" content="您还没有连接蓝牙,请先链接" @confirm="confirmGetBlue"></uni-popup-dialog>
+    <uni-popup ref="getPrintRef" type="dialog">
+        <uni-popup-dialog type="info" cancelText="取消" confirmText="好的" title="提示" content="您还没有连接标签机,请先连接" @confirm="confirmGetPrint"></uni-popup-dialog>
     </uni-popup>
 
   </view>
@@ -156,15 +156,19 @@ export default {
       }
   },
   methods:{
-    confirmGetBlue(){
-      this.pageTo({url:'/pages/home/blue'})
+    confirmGetPrint(){
+      // #ifdef APP-PLUS
+			plug.connectUSB({setBackgroundColor:"#2088d2"},ret=>{   
+			  //console.log(ret)
+			})
+      // #endif
     },
     printFn(info){
       let that = this
       // #ifdef APP-PLUS
       plug.state({},ret=>{
         if(ret.code == 1){
-          that.$refs.bluetoothRef.open('center')
+          that.$refs.getPrintRef.open('center')
         }else{
           let currentNum = parseFloat(Number(info.num))
           if(Number(currentNum)<0){