50 lines
1.1 KiB
JavaScript
50 lines
1.1 KiB
JavaScript
import { XTOKEN_KEY, USERINFO_KEY, BLUETOOTH_KEY, LOGININFO_KEY, SYSTEM_INFO_KEY } from "./key"
|
|
|
|
export const setSessionXToken = (val = '')=> {
|
|
uni.setStorageSync(XTOKEN_KEY, val)
|
|
}
|
|
|
|
export const getSessionXToken = ()=> {
|
|
return uni.getStorageSync(XTOKEN_KEY) || ''
|
|
}
|
|
|
|
export const setSessionUserInfo = (val = {})=> {
|
|
uni.setStorageSync(USERINFO_KEY, val)
|
|
}
|
|
|
|
export const getSessionUserInfo = ()=> {
|
|
return uni.getStorageSync(USERINFO_KEY) || {}
|
|
}
|
|
|
|
|
|
export const setSessionBluetoothInfo = (val = {})=> {
|
|
uni.setStorageSync(BLUETOOTH_KEY, val)
|
|
}
|
|
|
|
export const getSessionBluetoothInfo = ()=> {
|
|
return uni.getStorageSync(BLUETOOTH_KEY) || {}
|
|
}
|
|
|
|
export const setSessionLoginInfo = (val = {})=> {
|
|
uni.setStorageSync(LOGININFO_KEY, val)
|
|
}
|
|
|
|
export const getSessionLoginInfo = ()=> {
|
|
return uni.getStorageSync(LOGININFO_KEY) || {
|
|
remberPassport: []
|
|
}
|
|
}
|
|
|
|
export const setSessionSystemInfo = (val = {})=> {
|
|
// {
|
|
// hongWaiSwitch: false, // 红外扫描
|
|
// }
|
|
uni.setStorageSync(SYSTEM_INFO_KEY, val)
|
|
}
|
|
|
|
export const getSessionSystemInfo = ()=> {
|
|
return uni.getStorageSync(SYSTEM_INFO_KEY) || {
|
|
hongWaiSwitch: false
|
|
}
|
|
}
|