2 次代碼提交 726d922ab1 ... 7c804f77e7

作者 SHA1 備註 提交日期
  pengjing 7c804f77e7 Merge branch 'master' of http://39.98.153.250:9080/bowintek/GHSCPartyBuild 5 月之前
  pengjing 43035ece29 app是否开启微信登录配置 5 月之前

+ 1 - 0
parth5/parth5/src/app/service/config.service.ts

@@ -21,6 +21,7 @@ export interface Config {
   siteUrl: string;
   isWxPay: boolean;
   isDev?: boolean;
+  isWxLogin?: boolean;
 }
 
 export interface RequsetData {

+ 10 - 2
parth5/parth5/src/app/views/index/index.page.ts

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

+ 2 - 1
parth5/parth5/src/assets/appconfig.json

@@ -3,5 +3,6 @@
   "webServerHost": "http://localhost:8062",
   "siteUrl": "http://localhost:8062/mobile",
   "isWxPay": true,
-  "isDev": true
+  "isDev": true,
+  "isWxLogin": false
 }