Commit 582f5598 by sunchao

分享页二维码识别修复

parent 8f8ba37a
......@@ -14,15 +14,18 @@ export class BrokerDetailComponent implements OnInit {
userPractitionerInfo: any;
imgShowFlag: boolean;
scaleImgPath: any;
reloadurl:any;
constructor(private eventBusService: EventBusService, private activatedRoute: ActivatedRoute) {
}
ngOnInit() {
this.practitionerId = this.activatedRoute.snapshot.params['id'];
this.userPractitionerDetailQuery();
this.reloadurl = window.location.hash + 'reload=true';
if (this.getQuery('reload') !== 'true') {
window.location.href = this.reloadurl;
}
}
userPractitionerDetailQuery() {
const practitionerId = {
practitionerId: this.practitionerId
......@@ -40,4 +43,13 @@ export class BrokerDetailComponent implements OnInit {
this.scaleImgPath = path;
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