uu
This commit is contained in:
parent
ae63a9b210
commit
3d09e6d3b9
@ -3,6 +3,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSessionSystemInfo } from "@/session"
|
||||
export default {
|
||||
props: {
|
||||
customintent: {
|
||||
@ -30,8 +31,12 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let { hongWaiSwitch } = getSessionSystemInfo()
|
||||
// 红外开启,才可使用该功能
|
||||
if(hongWaiSwitch) {
|
||||
this.initScan()
|
||||
this.startScan();
|
||||
}
|
||||
},
|
||||
onHide() {
|
||||
// this.stopScan();
|
||||
|
||||
@ -102,7 +102,7 @@
|
||||
<u-text margin="0 0 0 30rpx" text="红线扫描模式" size="28" color="#333"></u-text>
|
||||
</u-row>
|
||||
<u-row>
|
||||
<u-switch v-model="saomiao" active-color="#B12D29" size="34"></u-switch>
|
||||
<u-switch v-model="hongWaiSwitch" @change="handleHongWaiChange" active-color="#B12D29" size="34"></u-switch>
|
||||
</u-row>
|
||||
</u-row>
|
||||
<u-line></u-line>
|
||||
@ -133,6 +133,7 @@
|
||||
import { USERKEY } from "@/store/actionKey"
|
||||
import { dealBtnMap } from "@/common/enum"
|
||||
import * as apiService from "@/common/api"
|
||||
import { setSessionSystemInfo, getSessionSystemInfo } from "@/session"
|
||||
import { getAuthList, authCodeEnum } from "@/common/authCode"
|
||||
import { getCurrentAppInfo, getSystemInfo, checkUpdate } from "@/common/appUpdate"
|
||||
|
||||
@ -164,6 +165,7 @@
|
||||
props: {
|
||||
},
|
||||
data() {
|
||||
let { hongWaiSwitch } = getSessionSystemInfo()
|
||||
return {
|
||||
staticInfo: {
|
||||
commStat: {},
|
||||
@ -171,8 +173,8 @@
|
||||
},
|
||||
saomiao: true,
|
||||
curAppVersion: '',
|
||||
curDeviceId: ''
|
||||
|
||||
curDeviceId: '',
|
||||
hongWaiSwitch,
|
||||
}
|
||||
},
|
||||
onShareAppMessage() {
|
||||
@ -208,7 +210,11 @@
|
||||
handleClearCache() {
|
||||
// TODO
|
||||
this.showToast('清除成功')
|
||||
},
|
||||
handleHongWaiChange(val){
|
||||
setSessionSystemInfo({ hongWaiSwitch: val })
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { XTOKEN_KEY, USERINFO_KEY, BLUETOOTH_KEY, LOGININFO_KEY } from "./key"
|
||||
import { XTOKEN_KEY, USERINFO_KEY, BLUETOOTH_KEY, LOGININFO_KEY, SYSTEM_INFO_KEY } from "./key"
|
||||
|
||||
export const setSessionXToken = (val = '')=> {
|
||||
uni.setStorageSync(XTOKEN_KEY, val)
|
||||
@ -34,3 +34,16 @@ export const getSessionLoginInfo = ()=> {
|
||||
remberPassport: []
|
||||
}
|
||||
}
|
||||
|
||||
export const setSessionSystemInfo = (val = {})=> {
|
||||
// {
|
||||
// hongWaiSwitch: false, // 红外扫描
|
||||
// }
|
||||
uni.setStorageSync(SYSTEM_INFO_KEY, val)
|
||||
}
|
||||
|
||||
export const getSessionSystemInfo = ()=> {
|
||||
return uni.getStorageSync(SYSTEM_INFO_KEY) || {
|
||||
hongWaiSwitch: false
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,3 +2,4 @@ export const XTOKEN_KEY = 'XTOKEN_KEY'
|
||||
export const USERINFO_KEY = 'USERINFO_KEY'
|
||||
export const BLUETOOTH_KEY = 'BLUETOOTH_KEY'
|
||||
export const LOGININFO_KEY = 'LOGININFO_KEY'
|
||||
export const SYSTEM_INFO_KEY = 'SYSTEM_INFO_KEY'
|
||||
Loading…
Reference in New Issue
Block a user