famliy login
This commit is contained in:
@@ -6,6 +6,7 @@ import { BlogDataService } from 'src/app/store/blog-data.service';
|
||||
import {NavController} from "@ionic/angular";
|
||||
import { AlertController } from '@ionic/angular';
|
||||
//import { BarcodeScanner } from '@capacitor-community/barcode-scanner';
|
||||
import { Preferences } from '@capacitor/preferences';
|
||||
|
||||
@Component({
|
||||
selector: 'app-familylogin',
|
||||
@@ -34,6 +35,12 @@ export class FamilyloginPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
const checkName = async () => {
|
||||
const { value } = await Preferences.get({ key: 'family_username' });
|
||||
this.username=value;
|
||||
|
||||
//console.log(`Hello ${value}!`);
|
||||
};
|
||||
}
|
||||
|
||||
loginData: {
|
||||
@@ -53,6 +60,16 @@ export class FamilyloginPage implements OnInit {
|
||||
console.log("INTERNAL RETURN->" + this.loginResult.internal_return);
|
||||
if (loginResult != null && loginResult.internal_return == 100 && this.sessionDataProviderService.ConstructGlobalSessionData(this.loginResult) == true) {
|
||||
this.getBlogData();
|
||||
|
||||
const setName = async () => {
|
||||
await Preferences.set({
|
||||
key: 'familiy_username',
|
||||
value: this.username,
|
||||
});
|
||||
};
|
||||
|
||||
setName();
|
||||
|
||||
this.router.navigate(['tabs/tab1']);
|
||||
}
|
||||
else{
|
||||
|
||||
Reference in New Issue
Block a user