36 lines
838 B
JavaScript
36 lines
838 B
JavaScript
import { XTOKEN_KEY, USERINFO_KEY, BLUETOOTH_KEY, LOGININFO_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: []
|
|
}
|
|
} |