Ver a proveniência

Book mall service --partial commit

master
kj1352 há 5 anos
ascendente
cometimento
b872968e51
4 ficheiros alterados com 70 adições e 15 eliminações
  1. +8
    -0
      src/app/bookmark/bookmark.page.html
  2. +45
    -13
      src/app/bookmark/bookmark.page.scss
  3. +4
    -1
      src/app/bookmark/bookmark.page.ts
  4. +13
    -1
      src/app/services/mall.service.ts

+ 8
- 0
src/app/bookmark/bookmark.page.html Ver ficheiro

@@ -1,2 +1,10 @@
<ion-content>
<div class="header-bar">
<div class="heading-holder">
<button (click)="back()"> <ion-icon name="arrow-back"></ion-icon> </button>
<h3> Bookmarks </h3>
</div>
</div>

</ion-content>

+ 45
- 13
src/app/bookmark/bookmark.page.scss Ver ficheiro

@@ -1,16 +1,48 @@
@import '../mall-details/mall-details.page.scss';

.header-bar {
position: sticky;
}
background-image: url('../../assets/custom/background-5.svg');
background-size: cover;
background-repeat: no-repeat;
background-position: left top;
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px;
height: 75px;
z-index: 3;
top: 0;
left: 0;
width: 100%;
position: sticky;
box-shadow: 0px 3px 5px var(--brand-grey);

.heading-holder {
display: flex;
align-items: center;
}

button, a {
background-color: white;
color: var(--brand-blue);
font-size: 18px;
padding: 5px;
border-radius: 50%;
height: 30px;
width: 30px;
display: flex;
justify-content: center;
align-items: center;

ion-list {
ion-item {
display: none;
margin: 10px auto;
&.active {
color: white;
background-color: var(--brand-blue);
}
}

&.show {
display: block;
}
}
}
h3 {
font-size: 16px;
color: white;
letter-spacing: 0.5px;
margin-left: 10px;
font-weight: 600;
}
}

+ 4
- 1
src/app/bookmark/bookmark.page.ts Ver ficheiro

@@ -1,6 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Location } from '@angular/common';
import { MallService } from '../services/mall.service';

@Component({
selector: 'app-bookmark',
@@ -12,10 +13,12 @@ export class BookmarkPage implements OnInit {

constructor(
private router: Router,
private location: Location,
private location: Location,
private mallService: MallService
) { }

ngOnInit() {
// this.mallService.getBookmarks().then((data) => console.log(data));
}

ionViewDidEnter() {


+ 13
- 1
src/app/services/mall.service.ts Ver ficheiro

@@ -73,5 +73,17 @@ export class MallService {
};

return await this.http.put(URL + '/api/maioraservice/outlet/v1/update/', outletData , httpOptions).toPromise();
}
}
async getBookmarks() {
const httpOptions = {
headers: new HttpHeaders({
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + localStorage.access_Token
})
};

return await this.http.get(URL + '/api/maioraservice/outlet/v1/is_bookmarked/true/', httpOptions).toPromise();
}
}

Carregando…
Cancelar
Guardar