Commit f5a1d71f by Sweet Zhang

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

parent 295f0bea
......@@ -4,7 +4,9 @@
"scripts": {
"ng": "ng",
"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",
"lint": "ng lint",
"e2e": "ng e2e"
......@@ -46,4 +48,4 @@
"tslint": "~5.11.0",
"typescript": "~3.2.2"
}
}
\ No newline at end of file
}
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { EventBusService } from '../event-bus.service';
import { ActivatedRoute } from '@angular/router';
import { environment } from '../../environments/environment'
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {EventBusService} from '../event-bus.service';
import {ActivatedRoute} from '@angular/router';
import {environment} from '../../environments/environment'
@Component({
selector: 'app-broker-detail',
templateUrl: './broker-detail.component.html',
......@@ -16,6 +16,7 @@ export class BrokerDetailComponent implements OnInit {
scaleImgPath: any;
reloadurl: any;
deviceType: number;
constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) {
}
......@@ -29,9 +30,12 @@ export class BrokerDetailComponent implements OnInit {
this.deviceType = this.checkDeviceType();
}
userPractitionerDetailQuery() {
// source 0.DYD 1.WordPass
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 => {
if (res['success']) {
......@@ -69,9 +73,9 @@ export class BrokerDetailComponent implements OnInit {
/**
* 检测设备信息
* deviceType:PC为1,移动端为2,微信为3
*/
* 检测设备信息
* deviceType:PC为1,移动端为2,微信为3
*/
checkDeviceType() {
let deviceType = null;
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