shish 3 gadi atpakaļ
vecāks
revīzija
ba3f85fd97

BIN
ghsApp/nativeplugins/Uhf53Helper/android/SerialPort.jar


BIN
ghsApp/nativeplugins/Uhf53Helper/android/Uhf53Lib-release.aar


BIN
ghsApp/nativeplugins/Uhf53Helper/android/connect-lib.jar


BIN
ghsApp/nativeplugins/Uhf53Helper/android/libs/arm64-v8a/libserialPort.so


BIN
ghsApp/nativeplugins/Uhf53Helper/android/libs/armeabi-v7a/libserialPort.so


BIN
ghsApp/nativeplugins/Uhf53Helper/android/reader-lib.jar


+ 25 - 0
ghsApp/nativeplugins/Uhf53Helper/package.json

@@ -0,0 +1,25 @@
+{
+	"name": "Uhf53Helper",
+	"id": "Uhf53Helper",
+	"version": "1.0.0",
+	"description": "Uhf53Helper",
+	"_dp_type": "nativeplugin",
+	"_dp_nativeplugin": {
+		"android": {
+			"plugins": [{
+				"type": "module",
+				"name": "Uhf53Helper",
+				"class": "com.wm.uhf53lib.UhfScanModule"
+			}],
+			"compileOptions": {
+				"sourceCompatibility": "1.8",
+				"targetCompatibility": "1.8"
+			},
+			"integrateType": "aar",
+			"minSdkVersion": 19,
+			"abis": [
+				"armeabi-v7a", "arm64-v8a"
+			]
+		}
+	}
+}

+ 13 - 0
ghsApp/nativeplugins/Uhf53Helper/使用说明.md

@@ -0,0 +1,13 @@
+**使用方法**
+
+1. 引用原生插件:
+	const Uhf53Helper = uni.requireNativePlugin("Uhf53Helper");
+
+2. 具体使用api:
+	(1).initSdk:Uhf53Helper.initSdk(result => {}),result 为扫描返回的结果值;
+	(2).startScan:Uhf53Helper.startScan();
+	(4).stopScan:Uhf53Helper.stopScan();
+	(5).releaseUhfDevice:Uhf53Helper.releaseUhfDevice();
+
+   
+

+ 21 - 1
ghsApp/src/admin/home/workbench.vue

@@ -29,7 +29,7 @@
 
 		<div class="user-wrap">
 			<div class="user-top" style="position: relative;">
-				<div class="app-size-28">今日概况</div>
+				<div class="app-size-28" @click="start()">今日概况</div>
 				<image :src="`${constant.imgUrl}/icon/notice_icon.png`" class="mind-item"></image>
 				<view class="red-mind" v-if="notifyNum>0">{{ notifyNum>9?9:notifyNum }}</view>
 				<view class="mind-mask" @click="toNotify()"> </view>
@@ -165,6 +165,7 @@
 </template>
 
 <script>
+const Uhf53Helper = uni.requireNativePlugin("Uhf53Helper");
 import { mapGetters,mapActions } from "vuex";
 import { getShopInfo } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
@@ -247,6 +248,15 @@ export default {
 		if(this.$util.isScanEnv()){
 			this.isScanEnv = true
 		}
+		//如果是rfid手持机
+		if(uni.getSystemInfoSync().brand == 'rockchip'){
+			let _this = this;
+			Uhf53Helper.initSdk(result => {
+				if (result) {
+					console.log(result)
+				}
+			})
+		}
 	},
 	onPullDownRefresh() {
 		this.init();
@@ -265,6 +275,16 @@ export default {
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
+		start() {
+			Uhf53Helper.startScan();
+		},
+		stop() {
+			Uhf53Helper.stopScan();
+		},
+		release() {
+			let _this = this;
+			Uhf53Helper.releaseUhfDevice();
+		},
 		getShopName(){
 			currentShop().then(res => {
 				if(res.code == 1){

+ 17 - 2
ghsApp/src/manifest.json

@@ -60,7 +60,8 @@
                     "entitlements" : {
                         "com.apple.developer.associated-domains" : [ "applinks:fronttg.wixhb.com" ]
                     }
-                }          
+                },
+                "dSYMs" : false
             },
             /* SDK配置 */
             "sdkConfigs" : {
@@ -149,6 +150,20 @@
                     "pid" : "462",
                     "parameters" : {}
                 }
+            },
+            "Uhf53Helper" : {
+                "__plugin_info__" : {
+                    "name" : "Uhf53Helper",
+                    "description" : "Uhf53Helper",
+                    "platforms" : "Android",
+                    "url" : "",
+                    "android_package_name" : "",
+                    "ios_bundle_id" : "",
+                    "isCloud" : false,
+                    "bought" : -1,
+                    "pid" : "",
+                    "parameters" : {}
+                }
             }
         }
     },
@@ -169,7 +184,7 @@
         "optimization" : {
             "subPackages" : true
         },
-        "lazyCodeLoading":"requiredComponents"
+        "lazyCodeLoading" : "requiredComponents"
     },
     "mp-alipay" : {
         "usingComponents" : true