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