Blog data

This commit is contained in:
CHIEFSOFT\ameye
2023-05-13 11:44:02 -04:00
parent 1ec3c830e9
commit 93705241e5
6 changed files with 42 additions and 19 deletions
-8
View File
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
ion-header {
--background: white;
border-bottom: 0;
-8
View File
@@ -1,11 +1,3 @@
/*
Authors : initappz (Rahul Jograna)
Website : https://initappz.com/
App Name : E-Learning App Template
This App Template Source code is licensed as per the
terms found in the Website https://initappz.com/license
Copyright and Good Faith Purchasers © 2021-present initappz.
*/
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { IonicModule } from '@ionic/angular';
+11 -1
View File
@@ -12,6 +12,7 @@ export class LoginPage implements OnInit {
@ViewChild('username') username;
@ViewChild('password') password;
loginResult: any;
blogResult:any;
constructor(
private router: Router,
@@ -22,6 +23,15 @@ export class LoginPage implements OnInit {
ngOnInit() {
}
getBlogData(){
this.wrenchService.getBlogData().subscribe(
blogResult => {
this.blogResult = blogResult;
console.log("BLOG RETURN->" + this.blogResult);
}
);
}
loginData: {
username: string, password: string, sessionid: string
};
@@ -36,11 +46,11 @@ export class LoginPage implements OnInit {
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']);
}
}
);
//this.router.navigate(['tabs/tab1']);
}
onForgot() {
+6 -2
View File
@@ -25,10 +25,14 @@ export class WrenchService {
}
loginUser(loginData) {
return this.getPostData('userlogin',loginData);
}
getBlogData(){
const blogReq=[];
return this.getPostData('blogdata',blogReq);
//blogdata
}
/*
registerUser(newUserData) {
// no session needed - will start the session
+16
View File
@@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { BlogDataService } from './blog-data.service';
describe('BlogDataService', () => {
let service: BlogDataService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(BlogDataService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});
+9
View File
@@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class BlogDataService {
constructor() { }
}