|
|
@@ -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){
|