huituanxueqian 1 năm trước cách đây
mục cha
commit
87986664d1

+ 20 - 16
README.md

@@ -2,23 +2,21 @@
     <img alt="logo" src="https://uviewui.com/common/logo.png" width="120" height="120" style="margin-bottom: 10px;">
 </p>
 <h3 align="center" style="margin: 30px 0 30px;font-weight: bold;font-size:40px;">uView</h3>
-<h3 align="center">多平台快速开发的UI框架</h3>
-
+<h3 align="center">选矿pda</h3>
 
 ## 说明
 
-uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的UI框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
+uView UI,是[uni-app](https://uniapp.dcloud.io/)生态优秀的 UI 框架,全面的组件和便捷的工具会让您信手拈来,如鱼得水
 
 ## 特性
 
-- 兼容安卓,iOS,微信小程序,H5,QQ小程序,百度小程序,支付宝小程序,头条小程序
+- 兼容安卓,iOS,微信小程序,H5,QQ 小程序,百度小程序,支付宝小程序,头条小程序
 - 60+精选组件,功能丰富,多端兼容,让您快速集成,开箱即用
-- 众多贴心的JS利器,让您飞镖在手,召之即来,百步穿杨
+- 众多贴心的 JS 利器,让您飞镖在手,召之即来,百步穿杨
 - 众多的常用页面和布局,让您专注逻辑,事半功倍
 - 详尽的文档支持,现代化的演示效果
 - 按需引入,精简打包体积
 
-
 ## 安装
 
 ```bash
@@ -28,14 +26,16 @@ npm i uview-ui
 
 ## 快速上手
 
-1. `main.js`引入uView库
+1. `main.js`引入 uView 库
+
 ```js
 // main.js
-import uView from 'uview-ui';
+import uView from "uview-ui";
 Vue.use(uView);
 ```
 
-2. `App.vue`引入基础样式(注意style标签需声明scss属性支持)
+2. `App.vue`引入基础样式(注意 style 标签需声明 scss 属性支持)
+
 ```css
 /* App.vue */
 <style lang="scss">
@@ -43,13 +43,14 @@ Vue.use(uView);
 </style>
 ```
 
-3. `uni.scss`引入全局scss变量文件
+3. `uni.scss`引入全局 scss 变量文件
+
 ```css
 /* uni.scss */
 @import "uview-ui/theme.scss";
 ```
 
-4. `pages.json`配置easycom规则(按需引入)
+4. `pages.json`配置 easycom 规则(按需引入)
 
 ```js
 // pages.json
@@ -68,18 +69,19 @@ Vue.use(uView);
 }
 ```
 
-请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容 
+请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
 
 ## 使用方法
-配置easycom规则后,自动按需引入,无需`import`组件,直接引用即可。
+
+配置 easycom 规则后,自动按需引入,无需`import`组件,直接引用即可。
 
 ```html
 <template>
-	<u-button>按钮</u-button>
+  <u-button>按钮</u-button>
 </template>
 ```
 
-请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容 
+请通过[快速上手](https://uviewui.com/components/quickstart.html)了解更详细的内容
 
 ## 链接
 
@@ -102,5 +104,7 @@ uView文档和源码全部开源免费,如果您认为uView帮到了您的开
 <img src="https://uviewui.com/common/wechat.png" width="220" >
 <img style="margin-left: 100px;" src="https://uviewui.com/common/alipay.png" width="220" >
  -->
+
 ## 版权信息
-uView遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将uView应用到您的产品中。
+
+uView 遵循[MIT](https://en.wikipedia.org/wiki/MIT_License)开源协议,意味着您无需支付任何费用,也无需授权,即可将 uView 应用到您的产品中。

+ 6 - 1
pages/Warehousing/index.vue

@@ -58,6 +58,7 @@
         </view>
       </view>
     </view>
+
     <view class="border-buttons">
       <!-- <view class="buttons" @click="Material">
         <text>新增物料</text>
@@ -126,6 +127,7 @@ export default {
       placeholder: "请输入入库单位",
       valueTmname: "",
       host: "",
+      deviceBrand: "11",
     };
   },
   onLoad(option) {},
@@ -144,7 +146,9 @@ export default {
     }
     this.materialType = this.radiolist1[0].id;
   },
-  created() {},
+  created() {
+    this.deviceBrand = uni.getSystemInfoSync().deviceBrand;
+  },
 
   watch: {
     scanCodeValue(value) {
@@ -219,6 +223,7 @@ export default {
       this.recshowto = false;
       uni.$off("xwscan");
       uni.$on("xwscan", (res) => {
+        this.deviceBrand = uni.getSystemInfoSync().deviceBrand;
         console.log("扫码结果:", res.code);
         this.sourceLocationId = res.code;
         this.valueTmname = res.code;

+ 69 - 71
uni_modules/xw-scan/components/xw-scan/xw-scan.vue

@@ -1,82 +1,80 @@
 <template>
-	<view>
-		<view class="content"></view>
-	</view>
+	<view><view class="content"></view></view>
 </template>
 
 <script>
-	// #ifdef APP-PLUS
-	var main, receiver, filter;
-	var codeQueryTag = false;
-	export default {
-		data() {
-			return {
-				scanCode: ''
+// #ifdef APP-PLUS
+var main, receiver, filter;
+var codeQueryTag = false;
+export default {
+	data() {
+		return {
+			scanCode: ''
+		};
+	},
+	created() {
+		this.initScan();
+		this.startScan();
+	},
+	onHide() {
+		this.stopScan();
+	},
+	destroyed() {
+		this.stopScan();
+	},
+	methods: {
+		initScan() {
+			console.log('initScan');
+			let that = this;
+			main = plus.android.runtimeMainActivity(); //获取activity
+			//var context = plus.android.importClass('android.content.Context'); //上下文
+			var IntentFilter = plus.android.importClass('android.content.IntentFilter');
+			filter = new IntentFilter();
+			//下面的addAction内改为自己的广播动作
+			if (uni.getSystemInfoSync().deviceBrand == 'zebra technologies') {
+				
+				filter.addAction('com.dwexample.ACTION');
+			} else {
+				filter.addAction('nlscan.action.SCANNER_RESULT');
 			}
+			let code;
+			receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', {
+				onReceive: (context, intent) => {
+					console.log('onReceive');
+					plus.android.importClass(intent);
+					//下面的getStringExtra内改为自己的广播标签--有误
+
+					if (uni.getSystemInfoSync().deviceBrand == 'zebra technologies') {
+						code = intent.getStringExtra('com.symbol.datawedge.data_string');
+					} else {
+						code = intent.getStringExtra('SCAN_BARCODE1');
+					}
+					that.queryCode(code);
+				}
+			});
 		},
-		created() {
-			this.initScan()
-			this.startScan();
-		},
-		onHide() {
-			this.stopScan();
+		startScan() {
+			console.log('startScan');
+			main.registerReceiver(receiver, filter);
 		},
-		destroyed() {
-			this.stopScan();
+		stopScan() {
+			console.log('stopScan');
+			main.unregisterReceiver(receiver);
 		},
-		methods: {
-			initScan() {
-				
-				console.log('initScan');
-				let that = this;
-				main = plus.android.runtimeMainActivity(); //获取activity
-				//var context = plus.android.importClass('android.content.Context'); //上下文
-				var IntentFilter = plus.android.importClass('android.content.IntentFilter');
-				filter = new IntentFilter();
-				//下面的addAction内改为自己的广播动作
-				filter.addAction("nlscan.action.SCANNER_RESULT");					
-				receiver = plus.android.implements('io.dcloud.feature.internal.reflect.BroadcastReceiver', {
-					onReceive: (context, intent)=> {
-						console.log('onReceive');
-						plus.android.importClass(intent);
-						//下面的getStringExtra内改为自己的广播标签--有误
-						let code = intent.getStringExtra("SCAN_BARCODE1");
-						that.queryCode(code);							
-					}
-				});
-				
-			},
-			startScan() {
-				
-				console.log('startScan');
-				main.registerReceiver(receiver, filter);
-			
-			},
-			stopScan() {
-			
-				console.log('stopScan');
-				main.unregisterReceiver(receiver);
-				
-			},
-			queryCode: function(code) {
-			
-				console.log('queryCode');
-				if (codeQueryTag) return false;
-				codeQueryTag = true;
-				setTimeout(function() {
-					codeQueryTag = false;
-				}, 150);
-				var id = code
-				uni.$emit('xwscan', {
-					code: id
-				})
-			
-			}
+		queryCode: function(code) {
+			console.log('queryCode');
+			if (codeQueryTag) return false;
+			codeQueryTag = true;
+			setTimeout(function() {
+				codeQueryTag = false;
+			}, 150);
+			var id = code;
+			uni.$emit('xwscan', {
+				code: id
+			});
 		}
-	}// #endif
+	}
+}; // #endif
 </script>
 
-<style>
-
-</style>
-
+<style></style>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
unpackage/dist/build/app-plus/app-service.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


BIN
unpackage/resources/__UNI__5D5D9CA.zip


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 3 - 3
unpackage/resources/__UNI__5D5D9CA/www/app-service.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1 - 1
unpackage/resources/__UNI__5D5D9CA/www/app-view.js