Newer
Older
urbanLifeline_YanAn / src / store / modules / imouPlayerToken.js
@zhangzhihui zhangzhihui 1 day ago 615 bytes 视频接入
import { getAccessToken, getKitToken } from '@/api/imouPlayerApi'; // 部门

let accessParam = {
  system: {
    ver: '1.0',
    sign: '',
    appId: '',
    time: '',
    nonce: '',
  },
  params: {},
  id: '',
};

const useImouPlayerStore = defineStore('imouPlayer', {
  state: () => {
    return {
      kitToken: '',
      access_token: '',
    };
  },
  actions: {},
  persist: {
    enabled: true,
    // 自定义持久化参数
    strategies: [
      {
        storage: sessionStorage,
        paths: ['deptList', 'systemDeptList', 'userList'],
      },
    ],
  },
});
export default useImouPlayerStore;