提交 560661d1 编写于 作者: KK's avatar KK

权限服务

上级 9d23462b
/**
* 权限服务基类
*
* @export
* @class CounterService
*/
export class AuthService {
/**
* Creates an instance of AuthService.
*
* @param {*} [opts={}]
* @memberof AuthService
*/
constructor(opts: any = {}) {
}
/**
* 获取计数器服务
*
* @protected
* @param {string} name 实体名称
* @returns {Promise<any>}
* @memberof AuthService
*/
public getService(name: string): Promise<any> {
return window.authServiceConstructor.getService(name);
}
}
\ No newline at end of file
...@@ -39,12 +39,16 @@ export { ThirdPartyService } from './third-party-service/ThirdPartyService'; ...@@ -39,12 +39,16 @@ export { ThirdPartyService } from './third-party-service/ThirdPartyService';
import { appEntityServiceConstructor } from '@/app-core/service/app-entity-service-constructor'; import { appEntityServiceConstructor } from '@/app-core/service/app-entity-service-constructor';
import { counterServiceConstructor } from '@/app-core/counter/counter-service-constructor'; import { counterServiceConstructor } from '@/app-core/counter/counter-service-constructor';
import { AppCommunicationsCenter } from './app-service/message-center/app-communications-center'; import { AppCommunicationsCenter } from './app-service/message-center/app-communications-center';
import { authServiceConstructor } from '@/app-core/auth-service/auth-service-constructor'
// 全局挂载应用实体服务构造器 // 全局挂载应用实体服务构造器
window['appEntityServiceConstructor'] = appEntityServiceConstructor; window['appEntityServiceConstructor'] = appEntityServiceConstructor;
// 全局挂载计数器服务构造器 // 全局挂载计数器服务构造器
window['counterServiceConstructor'] = counterServiceConstructor; window['counterServiceConstructor'] = counterServiceConstructor;
// 全局挂载权限服务构造器
window['authServiceConstructor'] = authServiceConstructor;
// 全局挂载应用通讯中心 // 全局挂载应用通讯中心
window['acc'] = AppCommunicationsCenter.getInstance(); window['acc'] = AppCommunicationsCenter.getInstance();
/** /**
* 注册组件 * 注册组件
*/ */
......
import { AppEntityServiceConstructor } from '@/app-core/service/app-entity-service-constructor'; import { AppEntityServiceConstructor } from '@/app-core/service/app-entity-service-constructor';
import { CounterServiceConstructor } from '@/app-core/counter/counter-service-constructor'; import { CounterServiceConstructor } from '@/app-core/counter/counter-service-constructor';
import { AppCommunicationsCenter } from '../app-service/message-center/app-communications-center'; import { AppCommunicationsCenter } from '../app-service/message-center/app-communications-center';
import { AuthServiceConstructor } from '@/app-core/auth-service/auth-service-constructor';
declare global { declare global {
interface Window { interface Window {
appEntityServiceConstructor: AppEntityServiceConstructor, appEntityServiceConstructor: AppEntityServiceConstructor,
counterServiceConstructor: CounterServiceConstructor, counterServiceConstructor: CounterServiceConstructor,
authServiceConstructor: AuthServiceConstructor,
acc: AppCommunicationsCenter acc: AppCommunicationsCenter
} }
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册