/**
 * 空GUID
 */
export const EMPTY_ID = '00000000-0000-0000-0000-000000000000'

/**
 * 文件预览地址
 */
import { urls } from '@/common/api'
export const PERVIEW_URL = process.env.VUE_APP_BASE_URL + urls.sysFileInfoPreview[0]


/**
 * 全局信息设置
 */
import app from '@/main'
import { GLOBAL_INFO_KEY } from '@/common/storage'
import { encryptByDES, decryptByDES } from '@/util/des'
export const setGlobal = (info) => {
    app.$set(app.global, 'info', info)
    window.sessionStorage.setItem(GLOBAL_INFO_KEY, encryptByDES(JSON.stringify(info)))
}
export const removeGlobal = () => {
    app.$set(app.global, 'info', undefined)
    window.sessionStorage.removeItem(GLOBAL_INFO_KEY)
}
export const getGlobal = () => {
    return JSON.parse(decryptByDES(window.sessionStorage.getItem(GLOBAL_INFO_KEY)))
}

export const RSA_PUBLIC_KEY = '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC273zAyijb3uX6O66VThrdfHtzZJn3d/SBM8qiETS7PijyNY3zNecAB+F/owxOWSB/6ojBo5Eu0FCiENxfpenTZB7sKrYu6NVH5gkfHLa6jz4pNzlGP93Q6RON4KjMZolAfRevBQ7vD6sOfJfMDnYi8xk+dRXcqc6PWY8fQiGs5QIDAQAB-----END PUBLIC KEY-----'