Skip to content

Commit 6a7e592

Browse files
author
wujun
committed
Use encodeURIComponent encode redirect
1 parent 319a9d3 commit 6a7e592

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/app/config/intercepter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ export class AuthInterceptor implements HttpInterceptor {
6262

6363
private codeHandler(response: HttpResponse<any>) {
6464
const { status, statusText } = response;
65+
console.log(this.state.url);
6566
if (status === 401) {
6667
sessionStorage.clear();
67-
this.router.navigate([`/login`], { queryParams: { redirect: this.state.url } });
68+
this.router.navigate([`/login`], { queryParams: { redirect: encodeURIComponent(this.state.url) } });
6869
return;
6970
}
7071
//this.router.navigate([`/${status}`]);

src/app/download/download.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export class DownloadComponent implements OnInit {
1212
ngOnInit() {
1313
}
1414

15-
public prompt(): void{
16-
alert("应用商店审核中....")
15+
public prompt(): void {
16+
alert('应用商店审核中....');
1717
}
1818

1919
}

0 commit comments

Comments
 (0)