|
|
|
@ -25,6 +25,7 @@ export class HomeComponent implements AfterViewInit {
|
|
|
|
direction: any;
|
|
|
|
direction: any;
|
|
|
|
itemCounter = 1;
|
|
|
|
itemCounter = 1;
|
|
|
|
itemType: any;
|
|
|
|
itemType: any;
|
|
|
|
|
|
|
|
isData = true;
|
|
|
|
// categories:any = [];
|
|
|
|
// categories:any = [];
|
|
|
|
constructor(
|
|
|
|
constructor(
|
|
|
|
public ts: TranslatorService,
|
|
|
|
public ts: TranslatorService,
|
|
|
|
@ -77,15 +78,21 @@ export class HomeComponent implements AfterViewInit {
|
|
|
|
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'),pageNo, categoryId).subscribe((res) => {
|
|
|
|
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'),pageNo, categoryId).subscribe((res) => {
|
|
|
|
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
|
|
|
|
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
|
|
|
|
this.cs.stopLoading();
|
|
|
|
this.cs.stopLoading();
|
|
|
|
if (data['result'])
|
|
|
|
if (data['result']) {
|
|
|
|
this.displayOffers(data['result']);
|
|
|
|
this.displayOffers(data['result']);
|
|
|
|
|
|
|
|
this.isData = true;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.isData = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((res) => {
|
|
|
|
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((res) => {
|
|
|
|
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
|
|
|
|
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
|
|
|
|
this.cs.stopLoading();
|
|
|
|
this.cs.stopLoading();
|
|
|
|
if (data['result'])
|
|
|
|
if (data['result']){
|
|
|
|
this.displayOffers(data['result']);
|
|
|
|
this.displayOffers(data['result']);
|
|
|
|
|
|
|
|
this.isData = true;
|
|
|
|
|
|
|
|
} else{this.isData = false;}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|