From 961fc83b0d0b679a90e1e557cce69dd76cf29153 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Mon, 19 Jun 2023 14:22:43 -0400 Subject: [PATCH] Home banner add --- src/app/pages/home/home.page.html | 12 ++++----- src/app/pages/home/home.page.ts | 27 +++++++++++++++++-- src/app/pages/tabs/tabs.page.html | 11 ++++---- src/app/pages/tabs/tabs.page.scss | 21 +++++++++------ src/app/services/wrench.service.ts | 10 ++++++- .../store/session-data-provider.service.ts | 2 ++ 6 files changed, 61 insertions(+), 22 deletions(-) diff --git a/src/app/pages/home/home.page.html b/src/app/pages/home/home.page.html index 113bfc9..01a2e28 100644 --- a/src/app/pages/home/home.page.html +++ b/src/app/pages/home/home.page.html @@ -59,21 +59,21 @@ --> -
+
3D Design - 3D Design Illustration + {{item.short_title}} $48.00
- - 4.9 - | - 8266 Students + + + +
diff --git a/src/app/pages/home/home.page.ts b/src/app/pages/home/home.page.ts index c82069e..88777f9 100644 --- a/src/app/pages/home/home.page.ts +++ b/src/app/pages/home/home.page.ts @@ -30,12 +30,13 @@ export class HomePage implements OnInit { ngOnInit() { this.getBlogData(); + this.getBannersData(); console.log("BLOG HOME 002->", this.blogDataService.blogData); - - // debugger; // this.firstname = this.sessionDataProviderService.firstname; } blogResult:any; + bannerResult:any; + bannerData: []; getBlogData(){ this.wrenchService.getBlogData().subscribe( blogResult => { @@ -47,6 +48,28 @@ export class HomePage implements OnInit { ); } + // 'member_id' => int 1 + // 'sessionid' => string '6AD58B08A9F458E6E6819DD603E202C657DB9BFFDD956C16386CC65975CE0D53' (length=64) + // 'uid' => string '3119b744-42ad-4834-bb83-b737588754ca' (length=36) + // 'action' => int 11200 + // + usrData: { + action:11200, member_id: number, uid: string, sessionid: string + }; + getBannersData(){ + this.usrData = {action:11200, member_id: this.sessionDataProviderService.member_id, uid: this.sessionDataProviderService.member_uid, sessionid: this.sessionDataProviderService.session } + this.wrenchService.getHomeBanners(this.usrData).subscribe( + bannerResult => { + this.bannerResult = bannerResult; + console.log("BANNERS RETURN->", this.bannerResult); + this.bannerData = this.bannerResult.result_list; + // debugger; + console.log("BANNERS RETURN DATA->", this.bannerData); + // this.blogDataService.setBlogData(this.blogResult.blog_data); + } + ); + + } onDetails() { this.router.navigate(['detail']); } diff --git a/src/app/pages/tabs/tabs.page.html b/src/app/pages/tabs/tabs.page.html index 6130b4a..409ded1 100644 --- a/src/app/pages/tabs/tabs.page.html +++ b/src/app/pages/tabs/tabs.page.html @@ -1,7 +1,7 @@ - - +
+ Home @@ -12,10 +12,9 @@ My Course - - + - Market + Tasks @@ -29,4 +28,6 @@ +
+
diff --git a/src/app/pages/tabs/tabs.page.scss b/src/app/pages/tabs/tabs.page.scss index 80c8b9d..a6e7c5f 100644 --- a/src/app/pages/tabs/tabs.page.scss +++ b/src/app/pages/tabs/tabs.page.scss @@ -1,8 +1,13 @@ -/* - 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. -*/ +.task_button{ + background-color: aliceblue; + border-radius: 40px; +} +.bottom_bardiv{ + background-color: red; + // position:absolute; +} + +.bottom_bar{ + //background-color: red; + max-width: 600px; +} \ No newline at end of file diff --git a/src/app/services/wrench.service.ts b/src/app/services/wrench.service.ts index e39af3d..1f30c28 100644 --- a/src/app/services/wrench.service.ts +++ b/src/app/services/wrench.service.ts @@ -15,7 +15,7 @@ export class WrenchService { constructor(private http: HttpClient) { - this.url = 'https://www.wrenchboard.com/svs/user'; + this.url = 'https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1'; } getPostData(reqPath:string, reqData): Observable { @@ -33,7 +33,15 @@ export class WrenchService { return this.getPostData('blogdata',blogReq); //blogdata } + + getHomeBanners(usrData){ + return this.getPostData('homebanners',usrData); + } /* + + + + registerUser(newUserData) { // no session needed - will start the session return this.http.post(this.url + '/createmobileuser', newUserData) diff --git a/src/app/store/session-data-provider.service.ts b/src/app/store/session-data-provider.service.ts index 3103c8a..c4660fa 100644 --- a/src/app/store/session-data-provider.service.ts +++ b/src/app/store/session-data-provider.service.ts @@ -20,6 +20,7 @@ export class SessionDataProviderService { isPedningJob: number = 0; isOfferJob: number = 0; profile_pic:string=''; + member_uid:string; session_contructed:boolean = false; @@ -38,6 +39,7 @@ export class SessionDataProviderService { this.username=loginResult.username; this.last_login = loginResult.last_login2; this.member_id = loginResult.member_id; + this.member_uid = loginResult.uid; this.balance = loginResult.balance; this.ccard=loginResult.ccard; this.profile_pic=loginResult.profile_pic;