2024-05-25 08:57:03 +00:00
|
|
|
import { XTOKEN_KEY, USERINFO_KEY, BLUETOOTH_KEY, LOGININFO_KEY } from "./key"
|
2024-02-21 12:23:38 +00:00
|
|
|
|
|
|
|
|
export const setSessionXToken = (val = '')=> {
|
|
|
|
|
uni.setStorageSync(XTOKEN_KEY, val)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getSessionXToken = ()=> {
|
2024-02-28 09:40:22 +00:00
|
|
|
return uni.getStorageSync(XTOKEN_KEY) || ''
|
2024-02-21 12:23:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const setSessionUserInfo = (val = {})=> {
|
|
|
|
|
uni.setStorageSync(USERINFO_KEY, val)
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-28 09:40:22 +00:00
|
|
|
export const getSessionUserInfo = ()=> {
|
|
|
|
|
return uni.getStorageSync(USERINFO_KEY) || {}
|
2024-05-12 16:49:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const setSessionBluetoothInfo = (val = {})=> {
|
|
|
|
|
uni.setStorageSync(BLUETOOTH_KEY, val)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getSessionBluetoothInfo = ()=> {
|
|
|
|
|
return uni.getStorageSync(BLUETOOTH_KEY) || {}
|
2024-05-25 08:57:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const setSessionLoginInfo = (val = {})=> {
|
|
|
|
|
uni.setStorageSync(LOGININFO_KEY, val)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const getSessionLoginInfo = ()=> {
|
|
|
|
|
return uni.getStorageSync(LOGININFO_KEY) || {
|
|
|
|
|
remberPassport: []
|
|
|
|
|
}
|
2024-02-21 12:23:38 +00:00
|
|
|
}
|