




-
-
-
-
From 9b744d44bb1a2cf47fdf2e5defba26198424ccb3 Mon Sep 17 00:00:00 2001 From: cpf <1105965053@qq.com> Date: Sat, 12 Dec 2020 11:04:18 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E7=BC=96=E5=88=B6?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy.config.json | 2 +- src/app/app-routing.module.ts | 2 + src/app/app.component.ts | 6 +- .../http-interceptors/cache-token.service.ts | 5 +- .../lockscreen/lockscreen.component.html | 6 +- .../pages/lockscreen/lockscreen.component.ts | 19 +- src/app/pages/login/login.component.html | 2 +- src/app/pages/login/login.component.ts | 5 +- src/app/tabbar/tabbar.component.ts | 2 +- .../collection-tools.component.html | 310 ++++-------------- .../collection-tools.component.scss | 32 +- .../collection-tools.component.ts | 23 +- src/app/ui/collection-tools/panel.scss | 5 +- src/app/ui/ui-routing.module.ts | 2 - src/assets/css/ngZorroTree.css | 6 +- src/styles.scss | 17 +- 16 files changed, 134 insertions(+), 310 deletions(-) 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 @@
-
-
-
-