Commit 8c6496a5 by Sweet Zhang

优化续期提醒提示框的展示

parent 1e839205
...@@ -41,7 +41,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -41,7 +41,7 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
showSubMenu:boolean; showSubMenu:boolean;
//初始化不显示面板数据 //初始化不显示面板数据
isShowDashBoardData:boolean = true; isShowDashBoardData:boolean = true;
// 0是未看 1是已看 2是没有续保数据 // 0是未看 1是已看
viewStatus:number; viewStatus:number;
constructor( constructor(
private router: Router, private router: Router,
...@@ -53,7 +53,6 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -53,7 +53,6 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
} }
ngOnInit() { ngOnInit() {
this.viewStatus = sessionStorage.getItem('hadView') ? 1 : 0;
const title = this.activatedRoute.snapshot.data[0]['title']; const title = this.activatedRoute.snapshot.data[0]['title'];
this.lifeCommonService.setTitle(title); this.lifeCommonService.setTitle(title);
this.deviceType = this.lifeCommonService.checkDeviceType(); this.deviceType = this.lifeCommonService.checkDeviceType();
...@@ -75,7 +74,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -75,7 +74,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
//活动量得分查询 //活动量得分查询
this.queryPEPScore(); this.queryPEPScore();
// 查询是否有续期提醒订单 // 查询是否有续期提醒订单
if(this.viewStatus===0){ if(sessionStorage.getItem('hadView')){
this.viewStatus = 1;
}else{
this.queryNoticeList(); this.queryNoticeList();
} }
} }
...@@ -293,9 +294,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit { ...@@ -293,9 +294,9 @@ export class MyCenterHomeComponent implements OnInit, AfterViewInit {
this.myService.queryNoticeList({practitionerId:this.lifeCustomerInfo.practitionerId,status:0}).subscribe(res=>{ this.myService.queryNoticeList({practitionerId:this.lifeCustomerInfo.practitionerId,status:0}).subscribe(res=>{
if(res['success']){ if(res['success']){
if(res['data']['list'] && res['data']['list'].length > 0){ if(res['data']['list'] && res['data']['list'].length > 0){
this.viewStatus = 0;
}else{ }else{
this.viewStatus = 2; sessionStorage.setItem('hadView','true')
} }
} }
}) })
......
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