|
@@ -4,6 +4,7 @@ import {WxcpService} from "../../service/wxcp.service";
|
|
import {ActivatedRoute, Router} from "@angular/router";
|
|
import {ActivatedRoute, Router} from "@angular/router";
|
|
import {UserService} from "../../service/user.service";
|
|
import {UserService} from "../../service/user.service";
|
|
import {AccountService} from "../../service/account.service";
|
|
import {AccountService} from "../../service/account.service";
|
|
|
|
+import {ConfigService} from "../../service/config.service";
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-index',
|
|
selector: 'app-index',
|
|
@@ -12,16 +13,23 @@ import {AccountService} from "../../service/account.service";
|
|
})
|
|
})
|
|
export class IndexPage implements OnInit {
|
|
export class IndexPage implements OnInit {
|
|
|
|
|
|
|
|
+ isWxLogin: boolean = false;
|
|
|
|
+
|
|
constructor(private router: Router, private route: ActivatedRoute, private wxcpService: WxcpService, private userService: UserService,
|
|
constructor(private router: Router, private route: ActivatedRoute, private wxcpService: WxcpService, private userService: UserService,
|
|
- private accountService: AccountService, private routeInfo: ActivatedRoute) {
|
|
|
|
|
|
+ private configService: ConfigService, private accountService: AccountService, private routeInfo: ActivatedRoute) {
|
|
}
|
|
}
|
|
|
|
|
|
ngOnInit() {
|
|
ngOnInit() {
|
|
}
|
|
}
|
|
|
|
|
|
ionViewWillEnter() {
|
|
ionViewWillEnter() {
|
|
|
|
+
|
|
|
|
+ this.configService.GetConfig().subscribe((config) => {
|
|
|
|
+ this.isWxLogin = config.isWxLogin;
|
|
|
|
+ });
|
|
|
|
+
|
|
const urlParams = getUrlParams() as any;
|
|
const urlParams = getUrlParams() as any;
|
|
- if (this.wxcpService.isWechat()) {
|
|
|
|
|
|
+ if (this.wxcpService.isWechat() && this.isWxLogin) {
|
|
let routePath = urlParams["routePath"] || '/tapp/tabs/tabMain'; //登录成功后跳转地址
|
|
let routePath = urlParams["routePath"] || '/tapp/tabs/tabMain'; //登录成功后跳转地址
|
|
routePath = decodeURIComponent(routePath);
|
|
routePath = decodeURIComponent(routePath);
|
|
|
|
|