Files
device-voice-h5/utils/session-context.js
luo da95a914e3
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 2m59s
fix: some
2026-10-13 14:53:19 +08:00

10 lines
335 B
JavaScript

export const getSessionContext = () => ({
token: uni.getStorageSync('token') || '',
identifier: uni.getStorageSync('identifier') || ''
});
export const isCurrentSession = (context) => {
const current = getSessionContext();
return !!context.token && context.token === current.token && context.identifier === current.identifier;
};