添加zorro,alain样例

This commit is contained in:
Taric Xin
2021-11-27 17:17:55 +08:00
parent 8e2bd3e502
commit d4bd35b9df
25 changed files with 803 additions and 297 deletions

View File

@ -9,7 +9,6 @@ import { Injectable, Injector } from '@angular/core';
import { Observable, zip } from 'rxjs';
import { catchError, switchMap } from 'rxjs/operators';
import { CoreService } from 'src/app/core/core.service';
import { EAEncryptUtil } from '../../utils';
import { BaseService } from '../core/base.service';
@Injectable({
@ -61,7 +60,7 @@ export class EAPlatformService extends BaseService {
getPlatformStatus(): number {
const encryptStatus = this.coreSrv.cacheSrv.getNone<string>(this._cachePlatformStatusKey);
try {
const status = EAEncryptUtil.deencryptByDeAES(encryptStatus);
// const status = EAEncryptUtil.deencryptByDeAES(encryptStatus);
return +status;
} catch (error) {
return 0;
@ -118,8 +117,8 @@ export class EAPlatformService extends BaseService {
}
// 加密并保存平台状态
const ciphertext = EAEncryptUtil.encryptByEnAES(status.toString());
this.coreSrv.cacheSrv.set(this._cachePlatformStatusKey, ciphertext);
// const ciphertext = EAEncryptUtil.encryptByEnAES(status.toString());
// this.coreSrv.cacheSrv.set(this._cachePlatformStatusKey, ciphertext);
}
/**

View File

@ -101,7 +101,7 @@ export class EAUserService extends BaseService {
if (res?.token) {
this.cacheSrv.set(cacheConf.token, res.token);
this.doAfterLogin();
this.eventSrv.event.emit(eventConf.reflesh_login_status);
// this.eventSrv.event.emit(eventConf.reflesh_login_status);
this.router.navigate([this.ar.snapshot.queryParams.returnUrl || '/']);
}
});
@ -117,7 +117,7 @@ export class EAUserService extends BaseService {
if (res?.token) {
this.tokenSrv.set({ token: res.token });
this.doAfterLogin();
this.eventSrv.event.emit(eventConf.reflesh_login_status, this.ar.snapshot.queryParams.returnUrl || '/');
// this.eventSrv.event.emit(eventConf.reflesh_login_status, this.ar.snapshot.queryParams.returnUrl || '/');
}
});
}