|
|
@@ -1,8 +1,5 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <!-- #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;">
|
|
|
@@ -15,12 +12,12 @@
|
|
|
<view style="width:100vw;height:400upx;display:flex;align-items:center;justify-content:center;position:relative;">
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<view style="position:absolute;top:60upx;font-size:35upx;">
|
|
|
- <text style="color:#333333;margin-left:8upx;font-weight:bold;">批发店点这里登录</text>
|
|
|
+ <text style="color:#333333;margin-left:8upx;font-weight:bold;">批发店登录点这里</text>
|
|
|
</view>
|
|
|
<!-- #endif -->
|
|
|
<button class="admin-button-com big blue" style="width:260upx;" @click="pageTo({url:'/admin/home/login'})">去登录</button>
|
|
|
|
|
|
- <text style="color:green;position:absolute;top:300upx;font-size:32upx;" @click="pageTo({url:'/admin/book/index'})">查看教学视频</text>
|
|
|
+ <text style="color:green;position:absolute;top:300upx;font-size:32upx;text-decoration: underline;" @click="pageTo({url:'/pagesClient/official/apply'})">注册账号</text>
|
|
|
|
|
|
</view>
|
|
|
</block>
|
|
|
@@ -168,10 +165,6 @@
|
|
|
</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";
|
|
|
@@ -186,9 +179,7 @@ import { getErrorPrice } from "@/api/item"
|
|
|
import { getStaffInfo } from "@/api/shop-admin"
|
|
|
export default {
|
|
|
name: "workbench",
|
|
|
- //#ifdef APP-PLUS
|
|
|
- components: { keyboardListener },
|
|
|
- //#endif
|
|
|
+ components: { },
|
|
|
mixins: [productMins,autoUpdateMixins],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -227,9 +218,8 @@ export default {
|
|
|
//登录状态 0未登录 1登录
|
|
|
loginStyle :0,
|
|
|
errorPirceList:[],
|
|
|
- lookMoney:1,
|
|
|
- notifyNum:0,
|
|
|
- switch:0
|
|
|
+ lookMoney:0,
|
|
|
+ notifyNum:0
|
|
|
};
|
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
|
@@ -257,17 +247,6 @@ export default {
|
|
|
if(this.$util.isScanEnv()){
|
|
|
this.isScanEnv = true
|
|
|
}
|
|
|
- //#ifdef APP-PLUS
|
|
|
- //如果是rfid手持机
|
|
|
- if(uni.getSystemInfoSync().brand == 'rockchip'){
|
|
|
- let _this = this;
|
|
|
- Uhf53Helper.initSdk(result => {
|
|
|
- if (result) {
|
|
|
- console.log(result)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- //#endif
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
this.init();
|
|
|
@@ -278,6 +257,7 @@ export default {
|
|
|
if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentGhsShopId > 0){
|
|
|
this.loginStyle = 1
|
|
|
}
|
|
|
+ this.setIndex()
|
|
|
getStaffInfo().then(res=>{
|
|
|
if(res.code == 1){
|
|
|
this.notifyNum = res.data.staff.notifyNum ? Number(res.data.staff.notifyNum) : 0
|
|
|
@@ -286,38 +266,6 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
- //#ifdef APP-PLUS
|
|
|
- onKeydown(event) {
|
|
|
- if(this.switch == 1){
|
|
|
- return false
|
|
|
- }
|
|
|
- if (event.keyCode == 115 && event.type == 'keydown') {
|
|
|
- console.log('已开启')
|
|
|
- this.switch = 1
|
|
|
- Uhf53Helper.startScan();
|
|
|
- }
|
|
|
- },
|
|
|
- onKeyup(event) {
|
|
|
- if(this.switch == 0){
|
|
|
- return false
|
|
|
- }
|
|
|
- if (event.keyCode == 115 && event.type == 'keyup') {
|
|
|
- console.log('已关闭')
|
|
|
- this.switch = 0
|
|
|
- Uhf53Helper.stopScan();
|
|
|
- }
|
|
|
- },
|
|
|
- start() {
|
|
|
- Uhf53Helper.startScan();
|
|
|
- },
|
|
|
- stop() {
|
|
|
- Uhf53Helper.stopScan();
|
|
|
- },
|
|
|
- release() {
|
|
|
- let _this = this;
|
|
|
- Uhf53Helper.releaseUhfDevice();
|
|
|
- },
|
|
|
- //#endif
|
|
|
getShopName(){
|
|
|
currentShop().then(res => {
|
|
|
if(res.code == 1){
|