diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index 6c438bd..c571b81 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -5,8 +5,7 @@ export const routes: Routes = [ {path: '', pathMatch: 'full', redirectTo: 'admin/index'}, { path: 'login', - loadChildren: () => import('./pages/login/login.routes').then(m => m.LOGIN_ROUTES), - canActivate: [InitGuardService] + loadChildren: () => import('./pages/login/login.routes').then(m => m.LOGIN_ROUTES) }, { path: 'admin', component: IndexComponent, diff --git a/src/app/pages/system/menu/menu.component.ts b/src/app/pages/system/menu/menu.component.ts index f650b64..f152c55 100644 --- a/src/app/pages/system/menu/menu.component.ts +++ b/src/app/pages/system/menu/menu.component.ts @@ -24,7 +24,6 @@ import {NzFlexDirective} from "ng-zorro-antd/flex"; import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select"; import {NzInputNumberComponent} from "ng-zorro-antd/input-number"; import {NzMessageService} from "ng-zorro-antd/message"; -import {DATA} from "../../../data/login/localStorage.namespace"; @Component({ selector: 'app-menu', @@ -187,19 +186,19 @@ export class MenuComponent { }; if (this.menuDetail != null) { - if (edit) { - // 增加 - menu = { - menuPSid: ""+this.menuDetail.id, - menuType: '1' - }; - } else { - // 修改 - this.editMenuTitle = '修改菜单'; - menu = this.menuDetail; - menu['menuPSid'] = ""+menu['menuPSid'] - menu['menuType'] = ""+menu['menuType'] - } + if (edit) { + // 增加 + menu = { + menuPSid: ""+this.menuDetail.id, + menuType: '1' + }; + } else { + // 修改 + this.editMenuTitle = '修改菜单'; + menu = this.menuDetail; + menu['menuPSid'] = ""+menu['menuPSid'] + menu['menuType'] = ""+menu['menuType'] + } } this.editMenuForm.patchValue(menu); this.editMenuVisible = true; diff --git a/src/app/utils/Interceptor.service.ts b/src/app/utils/Interceptor.service.ts index 2f7ca2a..4e8c52a 100644 --- a/src/app/utils/Interceptor.service.ts +++ b/src/app/utils/Interceptor.service.ts @@ -23,6 +23,8 @@ export class InterceptorService implements HttpInterceptor { const token = this.storage.get(USER_TOKEN); if (token != null) { modifiedHeaders = req.headers.set('Authorization', token); + modifiedHeaders = req.headers.set( 'Cache-Control', 'no-cache',) + modifiedHeaders = req.headers.set( 'Pragma', 'no-cache',) } secureReq = req.clone({