请求状态等通知提示抽取
This commit is contained in:
@@ -3,9 +3,7 @@ import { Router, NavigationEnd, ActivatedRoute } from '@angular/router';
|
||||
import { BasicDataService } from '../services/basic-data-service';
|
||||
import { OperateSpinServiceService } from '../services/operate-spin-service.service';
|
||||
import { HttpClientService } from '../services/http-client.service';
|
||||
|
||||
import { ToastService } from '../components/toast/toast.service';
|
||||
import { ToastConfig, ToastType } from '../components/toast/toast-model';
|
||||
import { NzMessageService } from 'ng-zorro-antd';
|
||||
|
||||
import { filter } from 'rxjs/operators';
|
||||
// import 'rxjs/add/operator/map';
|
||||
@@ -196,7 +194,7 @@ export class PagesComponent implements OnInit {
|
||||
private basicDataService: BasicDataService,
|
||||
private operateSpinService: OperateSpinServiceService,
|
||||
private httpClient: HttpClientService,
|
||||
private toastService: ToastService,
|
||||
private message: NzMessageService
|
||||
) {
|
||||
this.operateSpinService.spinSubject.subscribe(
|
||||
val => this.isSpinning = val
|
||||
@@ -259,8 +257,7 @@ export class PagesComponent implements OnInit {
|
||||
sessionStorageMsg.forEach(element => {
|
||||
sessionStorage.removeItem(element)
|
||||
})
|
||||
const toastCfg = new ToastConfig(ToastType.SUCCESS, '', '退出系统成功!', 3000);
|
||||
this.toastService.toast(toastCfg);
|
||||
this.message.success('退出系统成功!');
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user