diff --git a/src/app/app.config.ts b/src/app/app.config.ts index ada3192..a8c9593 100644 --- a/src/app/app.config.ts +++ b/src/app/app.config.ts @@ -1,5 +1,5 @@ import { ApplicationConfig, importProvidersFrom } from '@angular/core'; -import { provideRouter } from '@angular/router'; +import {provideRouter, RouteReuseStrategy} from '@angular/router'; import { routes } from './app.routes'; import { provideClientHydration } from '@angular/platform-browser'; @@ -11,6 +11,7 @@ import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http'; import {BrowserAnimationsModule, provideAnimations} from '@angular/platform-browser/animations'; import {InitGuardService} from "./utils/initGuard.service"; import {InterceptorService} from "./utils/Interceptor.service"; +import {AiRouteReuseStrategy} from "./utils/routeReuseStrategy"; registerLocaleData(zh); @@ -24,6 +25,7 @@ export const appConfig: ApplicationConfig = { provideAnimations(), BrowserAnimationsModule, InitGuardService, // 校验登录 - { provide: HTTP_INTERCEPTORS, useClass: InterceptorService, multi: true} + { provide: HTTP_INTERCEPTORS, useClass: InterceptorService, multi: true}, + { provide: RouteReuseStrategy, useClass: AiRouteReuseStrategy } ] }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 1942a40..debd267 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,7 +4,7 @@ export const environment = { production: false, - baseUrl: 'http://localhost:9802/brest/', // 测试环境服务器地址(请求数据地址) + baseUrl: 'https://test-oil.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) imageUrl: 'https://test-oil.dctpay.com/filesystem/', };