kIDS LOGIN

This commit is contained in:
CHIEFSOFT\ameye
2023-07-29 21:51:21 -04:00
parent 073ec2bfa3
commit 86a9fe45b1
12 changed files with 82 additions and 4 deletions
@@ -25,7 +25,7 @@
<ion-item lines="none">
<ion-icon slot="start" name="lock-closed-outline"></ion-icon>
<ion-input type="password" placeholder="PIN" [(ngModel)]='password'></ion-input>
<ion-input type="password" placeholder="PIN" [(ngModel)]='pin'></ion-input>
</ion-item>
<div class="check">
+81 -3
View File
@@ -1,5 +1,8 @@
import { Component, OnInit } from '@angular/core';
import {Router} from "@angular/router";
import { Router } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { WrenchService } from 'src/app/services/wrench.service';
import { SessionDataProviderService } from 'src/app/store/session-data-provider.service';
import { BlogDataService } from 'src/app/store/blog-data.service';
@Component({
selector: 'app-familylogin',
@@ -7,12 +10,87 @@ import {Router} from "@angular/router";
styleUrls: ['./familylogin.page.scss'],
})
export class FamilyloginPage implements OnInit {
//Y7P0WW9B05
// 1234
constructor( private router: Router) { }
@ViewChild('username') username;
@ViewChild('pin') pin;
loginResult: any;
blogResult:any;
constructor(
private router: Router,
private wrenchService: WrenchService,
public sessionDataProviderService:SessionDataProviderService,
public blogDataService:BlogDataService
) {
}
ngOnInit() {
}
/*
action
:
11025
login_mode
:
1105
pin
:
"1234"
sessionid
:
"20067A92714"
username
:
"Y7P0WW9B05"
*/
loginData: {
username: string, pin: string, sessionid: string, action: '11025',login_mode: '1105'
};
startLogin() {
this.username='Y7P0WW9B05';
this.pin='1234';
if (this.username == null || this.username == '' || this.pin == null || this.pin == '') {
this.showAlert('Invalid Login', 'Enter username(email) and pin to login');
return;
}
this.loginData = { username: this.username, pin: this.pin, sessionid: 'DUMMY-APP-SESSION-STARTER', action: '11025',login_mode: '1105' }
this.wrenchService.loginUser(this.loginData).subscribe(
loginResult => {
this.loginResult = loginResult;
console.log("INTERNAL RETURN->" + this.loginResult.internal_return);
if (loginResult != null && loginResult.internal_return == 100 && this.sessionDataProviderService.ConstructGlobalSessionData(this.loginResult) == true) {
this.getBlogData();
this.router.navigate(['tabs/tab1']);
}
}
);
}
showAlert(mtitle: string, amessage: string) {
/* let alert = this.alertCtrl.create({
title: mtitle,
subTitle: amessage,
buttons: ['OK']
});
alert.present();*/
alert(amessage);
}
getBlogData(){
this.wrenchService.getBlogData().subscribe(
blogResult => {
this.blogResult = blogResult;
console.log("BLOG RETURN->", this.blogResult);
this.blogDataService.setBlogData(this.blogResult.blog_data);
}
);
}
userLogin(){
this.router.navigate(['login']);
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB