shish 3 лет назад
Родитель
Сommit
1e76aca94e
1 измененных файлов с 12 добавлено и 2 удалено
  1. 12 2
      ghsApp/src/admin/home/workbench.vue

+ 12 - 2
ghsApp/src/admin/home/workbench.vue

@@ -1,6 +1,8 @@
 <template>
 <view>
-  <keyboard-listener @keyup="onKeyup" @keydown="onKeydown"></keyboard-listener>
+	<!-- #ifdef APP-PLUS -->
+	<keyboard-listener @keyup="onKeyup" @keydown="onKeydown"></keyboard-listener>
+	<!-- #endif -->
   <block v-if="loginStyle  == 0">
 	<!-- #ifdef MP-WEIXIN -->
     <view style="width:100vw;height:400upx;display:flex;align-items:center;justify-content:center;position:relative;">
@@ -166,8 +168,10 @@
 </template>
 
 <script>
+//#ifdef APP-PLUS
 import keyboardListener from "@/components/keyboard-listener/keyboard-listener";
 const Uhf53Helper = uni.requireNativePlugin("Uhf53Helper");
+//#endif
 import { mapGetters,mapActions } from "vuex";
 import { getShopInfo } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
@@ -181,8 +185,10 @@ import { getWeixinId } from "@/api/invite/index";
 import { getErrorPrice } from "@/api/item"
 import { getStaffInfo } from "@/api/shop-admin"
 export default {
-	name: "admin-workbench",
+	name: "workbench",
+	//#ifdef APP-PLUS
 	components: { keyboardListener },
+	//#endif
 	mixins: [productMins,autoUpdateMixins],
 	data() {
 		return {
@@ -251,6 +257,7 @@ export default {
 		if(this.$util.isScanEnv()){
 			this.isScanEnv = true
 		}
+		//#ifdef APP-PLUS
 		//如果是rfid手持机
 		if(uni.getSystemInfoSync().brand == 'rockchip'){
 			let _this = this;
@@ -260,6 +267,7 @@ export default {
 				}
 			})
 		}
+		//#endif
 	},
 	onPullDownRefresh() {
 		this.init();
@@ -278,6 +286,7 @@ export default {
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
+		//#ifdef APP-PLUS
 		onKeydown(event) {
 			if(this.switch == 1){
 				return false
@@ -308,6 +317,7 @@ export default {
 			let _this = this;
 			Uhf53Helper.releaseUhfDevice();
 		},
+		//#endif
 		getShopName(){
 			currentShop().then(res => {
 				if(res.code == 1){