w-ui-v1 1.0.68 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
@@ -1,4 +1,4 @@
1
- //注意:需要在插件市场 安装 安卓原生插件“iData条码扫描插件”
1
+ //注意:需要在插件市场 安装 安卓原生插件“iData条码扫描插件”,https://ext.dcloud.net.cn/plugin?id=3898#
2
2
  interface callback {
3
3
  (scanData:any): void;
4
4
  }
@@ -63,7 +63,30 @@ const closeBarcode=()=>{
63
63
  });
64
64
  // #endif
65
65
  }
66
+
67
+ const stopBarcode=()=>{
68
+ // #ifdef APP-PLUS
69
+ //建议在页面onHide方法里调用
70
+ //停止扫描
71
+ //接口scanStop(UniJSCallback callback)
72
+ barcodeModel.scanStop((ret) => {
73
+ console.log(ret)
74
+ });
75
+ // #endif
76
+ }
77
+ const startBarcode=()=>{
78
+ // #ifdef APP-PLUS
79
+ //建议在页面onShow方法里调用
80
+ //开始扫描
81
+ //接口scanStop(UniJSCallback callback)
82
+ barcodeModel.scanStart((ret) => {
83
+ console.log(ret)
84
+ });
85
+ // #endif
86
+ }
66
87
  export default {
67
88
  initBarcode,
68
- closeBarcode
89
+ closeBarcode,
90
+ stopBarcode,
91
+ startBarcode
69
92
  }