




-
-
-
-
diff --git a/proxy.config.json b/proxy.config.json index b28a11f..f9e430c 100644 --- a/proxy.config.json +++ b/proxy.config.json @@ -1,6 +1,6 @@ { "/api": { - "target": "http://121.37.20.190:8000", + "target": "http://121.37.20.190:8006", "secure": false, "changeOrigin": true } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 0eac6ce..8dd5e69 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -7,6 +7,7 @@ import { LockscreenComponent } from './pages/lockscreen/lockscreen.component'; //路由守卫 import {AuthGuard} from './auth.guard' import { CreateTestScoreComponent } from './examiner/create-test-score/create-test-score.component'; +import { CollectionToolsComponent } from './ui/collection-tools/collection-tools.component'; @@ -20,6 +21,7 @@ const routes: Routes = [ ] }, { path:'examiner/create-test-score', component:CreateTestScoreComponent,canActivate: [AuthGuard],}, //创建试卷具体分数页面 + { path: 'canvasTool', component:CollectionToolsComponent,canActivate: [AuthGuard], }, //编制工具 { path:'adminLogin', component:LoginComponent}, //管理员登录路由 { path:'login', component:LockscreenComponent}, //教员学员登录路由 diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 5664cce..0a77d73 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -20,12 +20,12 @@ export class AppComponent { let token = sessionStorage.getItem("token"); let refreshToken = sessionStorage.getItem("refreshToken"); if(token && refreshToken) { - this.http.post('/api/Account/RefreshToken', { + this.http.post('/api/ExamAccounts/RefreshToken', { token: token, refreshToken: refreshToken }).subscribe((data:any) => { - sessionStorage.setItem('realName',data.realName) - sessionStorage.setItem('roleType',data.roleType) + sessionStorage.setItem("realName",data.realName); + sessionStorage.setItem("roleType",data.roleType); sessionStorage.setItem("token",data.token); sessionStorage.setItem("refreshToken",data.refreshToken); this.token.startUp() diff --git a/src/app/http-interceptors/cache-token.service.ts b/src/app/http-interceptors/cache-token.service.ts index 5e0b65e..c5a8399 100644 --- a/src/app/http-interceptors/cache-token.service.ts +++ b/src/app/http-interceptors/cache-token.service.ts @@ -17,11 +17,12 @@ export class CacheTokenService { var token = sessionStorage.getItem("token"); var refreshToken = sessionStorage.getItem("refreshToken"); if (token && refreshToken) { - this.http.post('/api/Account/RefreshToken', { + this.http.post('/api/ExamAccounts/RefreshToken', { token: token, refreshToken: refreshToken, }).subscribe((data:any) => { - sessionStorage.setItem('realName',data.realName) + sessionStorage.setItem("realName",data.realName); + sessionStorage.setItem("roleType",data.roleType); sessionStorage.setItem("token",data.token); sessionStorage.setItem("refreshToken",data.refreshToken); }) diff --git a/src/app/pages/lockscreen/lockscreen.component.html b/src/app/pages/lockscreen/lockscreen.component.html index 5a296cc..2a5c0b5 100644 --- a/src/app/pages/lockscreen/lockscreen.component.html +++ b/src/app/pages/lockscreen/lockscreen.component.html @@ -13,13 +13,13 @@
-
-
-
-