提交 905db44c 编写于 作者: X xjh22222228

fix: router

上级 54e6f642
import { Component } from '@angular/core'
import { Router, ActivatedRoute } from '@angular/router'
import { TONGJI_URL, TITLE, THEME } from '../../config'
import { TONGJI_URL, TITLE } from '../../config'
import { queryString, setLocation } from '../utils'
@Component({
......@@ -17,9 +17,7 @@ export class AppComponent {
this.goRoute()
this.appendTongji()
this.activatedRoute.queryParams.subscribe(() => {
setLocation()
})
this.activatedRoute.queryParams.subscribe(setLocation)
}
goRoute() {
......@@ -29,8 +27,6 @@ export class AppComponent {
if (screenWidth < 768) {
this.router.navigate(['/app'], { queryParams })
} else {
this.router.navigate(['/' + THEME], { queryParams })
}
}
......
......@@ -35,8 +35,8 @@
}
img {
width: 30px;
height: 30px;
width: 25px;
height: 25px;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册