Commit 582f5598 by sunchao

分享页二维码识别修复

parent 8f8ba37a
...@@ -14,15 +14,18 @@ export class BrokerDetailComponent implements OnInit { ...@@ -14,15 +14,18 @@ export class BrokerDetailComponent implements OnInit {
userPractitionerInfo: any; userPractitionerInfo: any;
imgShowFlag: boolean; imgShowFlag: boolean;
scaleImgPath: any; scaleImgPath: any;
reloadurl:any;
constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) { constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) {
} }
ngOnInit() { ngOnInit() {
this.practitionerId = this.activatedRoute.snapshot.params['id']; this.practitionerId = this.activatedRoute.snapshot.params['id'];
this.userPractitionerDetailQuery(); this.userPractitionerDetailQuery();
this.reloadurl = window.location.hash + 'reload=true';
if (this.getQuery('reload') !== 'true') {
window.location.href = this.reloadurl;
}
} }
userPractitionerDetailQuery() { userPractitionerDetailQuery() {
const practitionerId = { const practitionerId = {
practitionerId: this.practitionerId practitionerId: this.practitionerId
...@@ -40,4 +43,13 @@ export class BrokerDetailComponent implements OnInit { ...@@ -40,4 +43,13 @@ export class BrokerDetailComponent implements OnInit {
this.scaleImgPath = path; this.scaleImgPath = path;
this.imgShowFlag = true; this.imgShowFlag = true;
} }
getQuery(name) {
const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)');
const r = decodeURIComponent(window.location.search).substr(1).match(reg);
if (r != null) {
return r[2];
}
return null;
}
} }
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