26 lines
695 B
TypeScript
26 lines
695 B
TypeScript
|
|
import { errorMessage } from '@/public/generalTools'
|
||
|
|
|
||
|
|
export class UserSoftware {
|
||
|
|
constructor() {}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 同步授权信息
|
||
|
|
* @param authorizationMessage 授权信息
|
||
|
|
*/
|
||
|
|
public async SyncAuthorization(authorizationMessage: SoftwareModal.SoftwareAuthorizationMessage) {
|
||
|
|
try {
|
||
|
|
// 直接充数据库获取授权信息
|
||
|
|
// let res = await
|
||
|
|
global.am = authorizationMessage
|
||
|
|
if (authorizationMessage.useType != 1) {
|
||
|
|
global.am.isPro = false
|
||
|
|
} else {
|
||
|
|
global.am.isPro = true
|
||
|
|
}
|
||
|
|
console.log('授权信息', global.am)
|
||
|
|
} catch (error) {
|
||
|
|
errorMessage('同步授权信息失败', 'SystemIpc_SyncAuthorization')
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|