Commit a172956f by sunchao

文章分享获取头像

parent e9e1936c
......@@ -53,7 +53,7 @@ export class ApprovalCommentsComponent implements OnInit {
}
this.myService.hiringApprove(param).subscribe((res)=>{
if(res['success']){
this.openPopInfo('你的审批成功');
this.openPopInfo('你的审批成功');
sessionStorage.setItem('viewApprovalInfo','1')
}else{
this.openPopInfo(res['message']);
......
......@@ -35,18 +35,18 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
ngOnInit() {
this.articleId = this.activatedRoute.snapshot.params['id'];
this.shareCode = this.activatedRoute.snapshot.queryParams['shareCode'];
this.state = this.lifeCommonService.getQueryString('state')
// if (this.activatedRoute.snapshot.queryParams['shareCode'] && this.state) {
// this.practitionerFileSharingList(null, this.shareCode);
// } else if(this.activatedRoute.snapshot.queryParams['shareCode']){
// this.articleTrackSave();
// }else{this.practitionerFileSharingList(this.articleId, null);
// }
if (this.activatedRoute.snapshot.queryParams['shareCode']) {
this.shareCode = this.lifeCommonService.getQueryString('shareCode');
this.state = this.lifeCommonService.getQueryString('state');
//检测浏览器刷新
window.onbeforeunload = () =>{
//清除sessionStorage值
sessionStorage.removeItem('articleTrackId')
}
if (this.shareCode) {
this.practitionerFileSharingList(null, this.shareCode);
this.articleTrackSave();
if(!this.state){
this.articleTrackSave();
}
} else {
this.practitionerFileSharingList(this.articleId, null);
}
......@@ -67,8 +67,10 @@ export class ArticleDetailComponent implements OnInit, OnDestroy {
}
ngOnDestroy() {
this.articleTrackSave();
sessionStorage.removeItem('articleTrackId');
if(this.shareCode && this.state == '1'){
this.articleTrackSave();
sessionStorage.removeItem('articleTrackId');
}
}
// 从后台获取到获取微信code的URL
......
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