family add side
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {AlertController, NavController} from "@ionic/angular";
|
||||
import {AlertController, LoadingController, NavController} from "@ionic/angular";
|
||||
import {Router} from "@angular/router";
|
||||
import { BarcodeScanner } from '@capacitor-community/barcode-scanner';
|
||||
import {WrenchService} from "../../services/wrench.service";
|
||||
@@ -21,6 +21,7 @@ export class StartscanPage implements OnInit {
|
||||
private wrenchService: WrenchService,
|
||||
public sessionDataProviderService:SessionDataProviderService,
|
||||
public blogDataService:BlogDataService,
|
||||
private loadingCtrl: LoadingController,
|
||||
private alertController: AlertController
|
||||
) { }
|
||||
loginResult: any;
|
||||
@@ -40,18 +41,24 @@ export class StartscanPage implements OnInit {
|
||||
action: number,
|
||||
login_mode: number
|
||||
};
|
||||
startQRLogin(qrString) {
|
||||
async startQRLogin(qrString) {
|
||||
if (qrString == null || qrString == '' ) {
|
||||
return;
|
||||
}
|
||||
const loading = await this.loadingCtrl.create({
|
||||
message: 'Connecting your account...',
|
||||
duration: 6000
|
||||
});
|
||||
// alert(qrString);
|
||||
this.loginQrData = { username: qrString,
|
||||
sessionid: 'DUMMY-APP-SESSION-STARTER',
|
||||
action: 11022,
|
||||
login_mode: 1105 };
|
||||
// alert(1000);
|
||||
loading.present();
|
||||
this.wrenchService.qrLoginUser(this.loginQrData).subscribe(
|
||||
loginResult => {
|
||||
loading.dismiss();
|
||||
// alert("Here 00009");
|
||||
this.loginResult = loginResult;
|
||||
console.log("INTERNAL RETURN->" + this.loginResult.internal_return);
|
||||
|
||||
Reference in New Issue
Block a user