|
|
|
|
@ -92,10 +92,26 @@ export class LoginComponent implements OnInit, OnDestroy {
|
|
|
|
|
requestGetLoginInfo: any;
|
|
|
|
|
logoutFlage: boolean ;
|
|
|
|
|
getuser: any = '';
|
|
|
|
|
getlastlogin: any;
|
|
|
|
|
|
|
|
|
|
private checkUserResult: CheckUserAuthenticationResponse;
|
|
|
|
|
|
|
|
|
|
ionViewWillEnter(){
|
|
|
|
|
|
|
|
|
|
console.log("ionViewWillEnter");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
|
|
|
|
|
// if(!this.cs.getIsTimeSessionOut()){
|
|
|
|
|
|
|
|
|
|
// this.getlastlogin = this.cs.sharedService.getSharedData(
|
|
|
|
|
// AuthenticationService.IMEI_USER_DATA,
|
|
|
|
|
// false
|
|
|
|
|
// );
|
|
|
|
|
// console.log("this.getlastlogin"+ this.getlastlogin);
|
|
|
|
|
// }
|
|
|
|
|
this.currentLang = TranslatorService.getCurrentLanguageCode();
|
|
|
|
|
console.log(TranslatorService.CURRENT_LANGUAGE)
|
|
|
|
|
console.log(TranslatorService.EN)
|
|
|
|
|
@ -127,8 +143,14 @@ export class LoginComponent implements OnInit, OnDestroy {
|
|
|
|
|
this.user = user;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
this.deviceToken = localStorage.getItem('devicyeToken');
|
|
|
|
|
this.deviceToken1 =this.cs.getDeviceToken();
|
|
|
|
|
//this.deviceToken = localStorage.getItem('devicyeToken');
|
|
|
|
|
//this.deviceToken1 =this.cs.getDeviceToken();
|
|
|
|
|
|
|
|
|
|
console.log(" this.user login in init" + this.user);
|
|
|
|
|
//this.deviceToken = localStorage.getItem('devicyeToken');
|
|
|
|
|
this.deviceToken =this.cs.getDeviceToken();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('lngOnInit localStorage: ' + this.deviceToken1);
|
|
|
|
|
console.log('lngOnInit getDeviceToken: ' + this.deviceToken);
|
|
|
|
|
|
|
|
|
|
@ -382,7 +404,7 @@ export class LoginComponent implements OnInit, OnDestroy {
|
|
|
|
|
getLastLoginInfo() {
|
|
|
|
|
this.requestGetLoginInfo = {
|
|
|
|
|
DeviceType: this.cs.getDeviceType(), // "Android",//this.cs.getDeviceType(),
|
|
|
|
|
DeviceToken: this.deviceToken// "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
|
|
|
|
|
DeviceToken: this.cs.getDeviceToken()// "5ca8a69cf1804db55264c349edffb99b9d63acd9fa9b6b18956bcb2ad3f2ba36"//this.deviceToken
|
|
|
|
|
};
|
|
|
|
|
this.authService.getLoginInfo(this.requestGetLoginInfo, () => {}, this.ts.trPK('general', 'ok')).subscribe(res => {
|
|
|
|
|
if (this.cs.validResponse(res)) {
|
|
|
|
|
|