Commit f5a1d71f by Sweet Zhang

userPractitionerDetailQuery增加source,判断是来自DYD还是wordpress

parent 295f0bea
...@@ -4,7 +4,9 @@ ...@@ -4,7 +4,9 @@
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve --host 192.168.1.25", "start": "ng serve --host 192.168.1.25",
"build": "ng build", "buildDev": "ng build -c=dev --prod",
"buildStage": "ng build -c=stage --prod",
"buildProd": "ng build -c=prod --prod",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e"
...@@ -46,4 +48,4 @@ ...@@ -46,4 +48,4 @@
"tslint": "~5.11.0", "tslint": "~5.11.0",
"typescript": "~3.2.2" "typescript": "~3.2.2"
} }
} }
\ No newline at end of file
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import { EventBusService } from '../event-bus.service'; import {EventBusService} from '../event-bus.service';
import { ActivatedRoute } from '@angular/router'; import {ActivatedRoute} from '@angular/router';
import { environment } from '../../environments/environment' import {environment} from '../../environments/environment'
@Component({ @Component({
selector: 'app-broker-detail', selector: 'app-broker-detail',
templateUrl: './broker-detail.component.html', templateUrl: './broker-detail.component.html',
...@@ -16,6 +16,7 @@ export class BrokerDetailComponent implements OnInit { ...@@ -16,6 +16,7 @@ export class BrokerDetailComponent implements OnInit {
scaleImgPath: any; scaleImgPath: any;
reloadurl: any; reloadurl: any;
deviceType: number; deviceType: number;
constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) { constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) {
} }
...@@ -29,9 +30,12 @@ export class BrokerDetailComponent implements OnInit { ...@@ -29,9 +30,12 @@ export class BrokerDetailComponent implements OnInit {
this.deviceType = this.checkDeviceType(); this.deviceType = this.checkDeviceType();
} }
userPractitionerDetailQuery() { userPractitionerDetailQuery() {
// source 0.DYD 1.WordPass
const practitionerId = { const practitionerId = {
practitionerId: this.practitionerId practitionerId: this.practitionerId,
source: this.activatedRoute.snapshot.queryParams['source'] ? this.activatedRoute.snapshot.queryParams['source'] : 1
}; };
this.eventBusService.userPractitionerDetailQuery(practitionerId).then(res => { this.eventBusService.userPractitionerDetailQuery(practitionerId).then(res => {
if (res['success']) { if (res['success']) {
...@@ -69,9 +73,9 @@ export class BrokerDetailComponent implements OnInit { ...@@ -69,9 +73,9 @@ export class BrokerDetailComponent implements OnInit {
/** /**
* 检测设备信息 * 检测设备信息
* deviceType:PC为1,移动端为2,微信为3 * deviceType:PC为1,移动端为2,微信为3
*/ */
checkDeviceType() { checkDeviceType() {
let deviceType = null; let deviceType = null;
if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment