Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
getme
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amal
getme
Commits
597497f9
Commit
597497f9
authored
Nov 22, 2019
by
Adarsh K
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into adarsh
parents
ce26e37d
ad03acf5
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
254 additions
and
153 deletions
+254
-153
app-routing.module.ts
src/app/app-routing.module.ts
+95
-34
catstorelist.page.html
src/app/catstorelist/catstorelist.page.html
+9
-1
catstorelist.page.ts
src/app/catstorelist/catstorelist.page.ts
+33
-14
home.page.scss
src/app/home/home.page.scss
+2
-34
home.page.ts
src/app/home/home.page.ts
+41
-48
productlist.page.html
src/app/productlist/productlist.page.html
+10
-1
productlist.page.ts
src/app/productlist/productlist.page.ts
+29
-21
searchmodal.page.html
src/app/searchmodal/searchmodal.page.html
+2
-0
global.scss
src/global.scss
+33
-0
No files found.
src/app/app-routing.module.ts
View file @
597497f9
import
{
NgModule
}
from
'@angular/core'
;
import
{
PreloadAllModules
,
RouterModule
,
Routes
}
from
'@angular/router'
;
import
{
NgModule
}
from
"@angular/core"
;
import
{
PreloadAllModules
,
RouterModule
,
Routes
}
from
"@angular/router"
;
const
routes
:
Routes
=
[
{
path
:
''
,
loadChildren
:
'./landing/landing.module#LandingPageModule'
},
{
path
:
'tabs'
,
loadChildren
:
'./tabs/tabs.module#TabsPageModule'
},
{
path
:
'login'
,
loadChildren
:
'./login/login.module#LoginPageModule'
},
{
path
:
'signup'
,
loadChildren
:
'./signup/signup.module#SignupPageModule'
},
{
path
:
'verification'
,
loadChildren
:
'./verification/verification.module#VerificationPageModule'
},
{
path
:
'forgot'
,
loadChildren
:
'./forgot/forgot.module#ForgotPageModule'
},
{
path
:
'changepass'
,
loadChildren
:
'./changepass/changepass.module#ChangepassPageModule'
},
{
path
:
'orderdelivered'
,
loadChildren
:
'./orderdelivered/orderdelivered.module#OrderdeliveredPageModule'
},
{
path
:
'orderplaced'
,
loadChildren
:
'./orderplaced/orderplaced.module#OrderplacedPageModule'
},
{
path
:
'ordercancelled'
,
loadChildren
:
'./ordercancelled/ordercancelled.module#OrdercancelledPageModule'
},
{
path
:
'myorder'
,
loadChildren
:
'./myorder/myorder.module#MyorderPageModule'
},
{
path
:
'cart'
,
loadChildren
:
'./cart/cart.module#CartPageModule'
},
{
path
:
'changedetails'
,
loadChildren
:
'./changedetails/changedetails.module#ChangedetailsPageModule'
},
{
path
:
'wishlist'
,
loadChildren
:
'./wishlist/wishlist.module#WishlistPageModule'
},
{
path
:
'addaddresss'
,
loadChildren
:
'./addaddresss/addaddresss.module#AddaddresssPageModule'
},
{
path
:
'profile'
,
loadChildren
:
'./profile/profile.module#ProfilePageModule'
},
{
path
:
'home'
,
loadChildren
:
'./home/home.module#HomePageModule'
},
{
path
:
'productlist'
,
loadChildren
:
'./productlist/productlist.module#ProductlistPageModule'
},
{
path
:
'productdetail'
,
loadChildren
:
'./productdetail/productdetail.module#ProductdetailPageModule'
},
{
path
:
'reviewlist'
,
loadChildren
:
'./reviewlist/reviewlist.module#ReviewlistPageModule'
},
{
path
:
'catagory'
,
loadChildren
:
'./catagory/catagory.module#CatagoryPageModule'
},
{
path
:
'trackorder'
,
loadChildren
:
'./trackorder/trackorder.module#TrackorderPageModule'
},
{
path
:
'storelist'
,
loadChildren
:
'./storelist/storelist.module#StorelistPageModule'
},
{
path
:
'catstorelist'
,
loadChildren
:
'./catstorelist/catstorelist.module#CatStorelistPageModule'
},
{
path
:
'nearby'
,
loadChildren
:
'./nearby/nearby.module#NearbyPageModule'
},
{
path
:
'review'
,
loadChildren
:
'./review/review.module#ReviewPageModule'
},
{
path
:
'delivery'
,
loadChildren
:
'./delivery/delivery.module#DeliveryPageModule'
},
{
path
:
'addcard'
,
loadChildren
:
'./addcard/addcard.module#AddcardPageModule'
},
{
path
:
'searchmodal'
,
loadChildren
:
'./searchmodal/searchmodal.module#SearchmodalPageModule'
}
path
:
""
,
loadChildren
:
"./landing/landing.module#LandingPageModule"
},
{
path
:
"tabs"
,
loadChildren
:
"./tabs/tabs.module#TabsPageModule"
},
{
path
:
"login"
,
loadChildren
:
"./login/login.module#LoginPageModule"
},
{
path
:
"signup"
,
loadChildren
:
"./signup/signup.module#SignupPageModule"
},
{
path
:
"verification"
,
loadChildren
:
"./verification/verification.module#VerificationPageModule"
},
{
path
:
"forgot"
,
loadChildren
:
"./forgot/forgot.module#ForgotPageModule"
},
{
path
:
"changepass"
,
loadChildren
:
"./changepass/changepass.module#ChangepassPageModule"
},
{
path
:
"orderdelivered"
,
loadChildren
:
"./orderdelivered/orderdelivered.module#OrderdeliveredPageModule"
},
{
path
:
"orderplaced"
,
loadChildren
:
"./orderplaced/orderplaced.module#OrderplacedPageModule"
},
{
path
:
"ordercancelled"
,
loadChildren
:
"./ordercancelled/ordercancelled.module#OrdercancelledPageModule"
},
{
path
:
"myorder"
,
loadChildren
:
"./myorder/myorder.module#MyorderPageModule"
},
{
path
:
"cart"
,
loadChildren
:
"./cart/cart.module#CartPageModule"
},
{
path
:
"changedetails"
,
loadChildren
:
"./changedetails/changedetails.module#ChangedetailsPageModule"
},
{
path
:
"wishlist"
,
loadChildren
:
"./wishlist/wishlist.module#WishlistPageModule"
},
{
path
:
"addaddresss"
,
loadChildren
:
"./addaddresss/addaddresss.module#AddaddresssPageModule"
},
{
path
:
"profile"
,
loadChildren
:
"./profile/profile.module#ProfilePageModule"
},
{
path
:
"home"
,
loadChildren
:
"./home/home.module#HomePageModule"
},
{
path
:
"productlist"
,
loadChildren
:
"./productlist/productlist.module#ProductlistPageModule"
},
{
path
:
"productdetail"
,
loadChildren
:
"./productdetail/productdetail.module#ProductdetailPageModule"
},
{
path
:
"reviewlist"
,
loadChildren
:
"./reviewlist/reviewlist.module#ReviewlistPageModule"
},
{
path
:
"catagory"
,
loadChildren
:
"./catagory/catagory.module#CatagoryPageModule"
},
{
path
:
"trackorder"
,
loadChildren
:
"./trackorder/trackorder.module#TrackorderPageModule"
},
{
path
:
"storelist"
,
loadChildren
:
"./storelist/storelist.module#StorelistPageModule"
},
{
path
:
"catstorelist"
,
loadChildren
:
"./catstorelist/catstorelist.module#CatStorelistPageModule"
},
{
path
:
"nearby"
,
loadChildren
:
"./nearby/nearby.module#NearbyPageModule"
},
{
path
:
"review"
,
loadChildren
:
"./review/review.module#ReviewPageModule"
},
{
path
:
"delivery"
,
loadChildren
:
"./delivery/delivery.module#DeliveryPageModule"
},
{
path
:
"addcard"
,
loadChildren
:
"./addcard/addcard.module#AddcardPageModule"
},
{
path
:
"searchmodal"
,
loadChildren
:
"./searchmodal/searchmodal.module#SearchmodalPageModule"
}
];
@
NgModule
({
imports
:
[
...
...
src/app/catstorelist/catstorelist.page.html
View file @
597497f9
...
...
@@ -2,7 +2,8 @@
<button
class=
"nav_btn nav_back floatLeft"
(
click
)="
goBack
()"
>
</button>
<div
class=
"nav_title floatLeft"
>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
>
</div>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
(
click
)="
clickSearch
()"
>
</div>
<button
class=
"nav_btn nav_search floatRight"
>
</button>
<div
class=
"clear"
></div>
...
...
@@ -51,3 +52,9 @@
</div>
</ion-content>
<div
class=
"search_item_list"
*
ngIf=
"searchShow"
[@
slideInOut
]
>
<ul>
<li>
sample
</li>
</ul>
</div>
\ No newline at end of file
src/app/catstorelist/catstorelist.page.ts
View file @
597497f9
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Router
}
from
'@angular/router'
;
import
{
Location
}
from
'@angular/common'
;
import
{
ServiceService
}
from
'./../../config/service.service'
;
import
{
ShoppersService
}
from
'./../../config/shopper.service'
;
import
{
Component
,
OnInit
}
from
"@angular/core"
;
import
{
Router
}
from
"@angular/router"
;
import
{
Location
}
from
"@angular/common"
;
import
{
ServiceService
}
from
"./../../config/service.service"
;
import
{
ShoppersService
}
from
"./../../config/shopper.service"
;
import
{
trigger
,
transition
,
animate
,
style
}
from
"@angular/animations"
;
@
Component
({
selector
:
'app-catstorelist'
,
templateUrl
:
'./catstorelist.page.html'
,
styleUrls
:
[
'./catstorelist.page.scss'
],
selector
:
"app-catstorelist"
,
templateUrl
:
"./catstorelist.page.html"
,
styleUrls
:
[
"./catstorelist.page.scss"
],
animations
:
[
trigger
(
"slideInOut"
,
[
transition
(
":enter"
,
[
style
({
transform
:
"translateY(100%)"
}),
animate
(
"200ms ease-in"
,
style
({
transform
:
"translateY(0%)"
}))
]),
transition
(
":leave"
,
[
animate
(
"200ms ease-out"
,
style
({
transform
:
"translateY(100%)"
}))
])
])
]
})
export
class
CatStorelistPage
implements
OnInit
{
searchShow
=
false
;
slideOpts
=
{
slidesPerView
:
1.5
};
data
:
any
;
clickSearch
()
{
this
.
searchShow
=
true
;
}
searchClose
()
{
this
.
searchShow
=
false
;
}
constructor
(
public
router
:
Router
,
public
location
:
Location
,
public
service
:
ServiceService
,
public
shopperService
:
ShoppersService
,
public
shopperService
:
ShoppersService
)
{
this
.
service
.
get
(
'params'
).
then
((
val
)
=>
{
this
.
service
.
get
(
"params"
).
then
(
val
=>
{
this
.
data
=
val
;
this
.
shopperService
.
shopperList
(
this
.
data
.
catId
,
'catId'
);
this
.
shopperService
.
shopperList
(
this
.
data
.
catId
,
"catId"
);
});
}
ngOnInit
()
{}
goToPage
(
path
,
data
=
null
)
{
this
.
service
.
set
(
'params'
,
data
);
this
.
service
.
set
(
"params"
,
data
);
this
.
router
.
navigateByUrl
(
path
,
{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
...
...
@@ -39,5 +59,4 @@ export class CatStorelistPage implements OnInit {
goBack
()
{
this
.
location
.
back
();
}
}
src/app/home/home.page.scss
View file @
597497f9
...
...
@@ -267,7 +267,7 @@
margin
:
0px
;
padding
:
0px
;
color
:
rgba
(
176
,
174
,
199
,
1
);
padding-top
:
5px
;
padding-top
:
5px
;
padding-bottom
:
5px
;
}
.styled-checkbox
{
...
...
@@ -321,35 +321,3 @@
}
}
}
\ No newline at end of file
.search_item_list
{
position
:
absolute
;
background-color
:
#fff
;
left
:
0px
;
right
:
0px
;
width
:
100%
;
margin
:
0px
;
top
:
50px
;
bottom
:
0px
;
z-index
:
99
;
ul
{
margin
:
0px
;
padding
:
0px
;
li
{
list-style
:
none
;
color
:
rgba
(
59
,
57
,
77
,
1
);
text-align
:
left
;
list-style
:
none
;
padding
:
10px
;
border-bottom
:
1px
solid
#ddd
;
&
:hover
{
background-color
:
rgba
(
59
,
57
,
77
,
1
);
color
:
#fff
;
}
&
:focus
{
background-color
:
rgba
(
59
,
57
,
77
,
1
);
color
:
#fff
;
}
}
}
}
\ No newline at end of file
src/app/home/home.page.ts
View file @
597497f9
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Location
}
from
'@angular/common'
;
import
{
trigger
,
transition
,
animate
,
style
}
from
'@angular/animations'
;
import
{
MapsAPILoader
,
MouseEvent
}
from
'@agm/core'
;
import
{
Router
,
ActivatedRoute
}
from
'@angular/router'
;
import
{
MenuController
}
from
'@ionic/angular'
;
import
{
CenterService
}
from
'./../../config/center.service'
;
import
{
ShoppersService
}
from
'./../../config/shopper.service'
;
import
{
CategoriesService
}
from
'./../../config/category.service'
;
import
{
ServiceService
}
from
'./../../config/service.service'
;
import
{
AddressService
}
from
'./../../config/address.service'
;
import
{
SearchService
}
from
'./../../config/search.service'
;
import
{
ProductsService
}
from
'./../../config/products.service'
;
import
{
from
}
from
'rxjs'
;
import
{
ModalController
}
from
'@ionic/angular'
;
import
{
Component
,
OnInit
}
from
"@angular/core"
;
import
{
Location
}
from
"@angular/common"
;
import
{
trigger
,
transition
,
animate
,
style
}
from
"@angular/animations"
;
import
{
MapsAPILoader
,
MouseEvent
}
from
"@agm/core"
;
import
{
Router
,
ActivatedRoute
}
from
"@angular/router"
;
import
{
MenuController
}
from
"@ionic/angular"
;
import
{
CenterService
}
from
"./../../config/center.service"
;
import
{
ShoppersService
}
from
"./../../config/shopper.service"
;
import
{
CategoriesService
}
from
"./../../config/category.service"
;
import
{
ServiceService
}
from
"./../../config/service.service"
;
import
{
AddressService
}
from
"./../../config/address.service"
;
import
{
SearchService
}
from
"./../../config/search.service"
;
import
{
ProductsService
}
from
"./../../config/products.service"
;
import
{
from
}
from
"rxjs"
;
import
{
ModalController
}
from
"@ionic/angular"
;
@
Component
({
selector
:
'app-home'
,
templateUrl
:
'./home.page.html'
,
styleUrls
:
[
'./home.page.scss'
],
selector
:
"app-home"
,
templateUrl
:
"./home.page.html"
,
styleUrls
:
[
"./home.page.scss"
],
animations
:
[
trigger
(
'slideInOut'
,
[
transition
(
':enter'
,
[
style
({
transform
:
'translateY(100%)'
}),
animate
(
'200ms ease-in'
,
style
({
transform
:
'translateY(0%)'
}))
trigger
(
"slideInOut"
,
[
transition
(
":enter"
,
[
style
({
transform
:
"translateY(100%)"
}),
animate
(
"200ms ease-in"
,
style
({
transform
:
"translateY(0%)"
}))
]),
transition
(
':leave'
,
[
animate
(
'200ms ease-out'
,
style
({
transform
:
'translateY(100%)'
}))
transition
(
":leave"
,
[
animate
(
"200ms ease-out"
,
style
({
transform
:
"translateY(100%)"
}))
])
])
]
})
export
class
HomePage
implements
OnInit
{
isShow
=
false
;
searchShow
=
false
;
...
...
@@ -58,8 +56,7 @@ export class HomePage implements OnInit {
private
mapsAPILoader
:
MapsAPILoader
,
private
searchService
:
SearchService
,
private
productsService
:
ProductsService
)
{
}
)
{}
ngOnInit
()
{
this
.
mapsAPILoader
.
load
().
then
(()
=>
{
...
...
@@ -67,7 +64,7 @@ export class HomePage implements OnInit {
this
.
geoCoder
=
new
google
.
maps
.
Geocoder
();
});
this
.
menuCtrl
.
enable
(
true
);
const
users
=
this
.
service
.
get
(
'user'
).
then
((
data
)
=>
{
const
users
=
this
.
service
.
get
(
"user"
).
then
(
data
=>
{
if
(
data
)
{
data
=
JSON
.
parse
(
data
);
this
.
custId
=
data
.
uid
;
...
...
@@ -77,7 +74,7 @@ export class HomePage implements OnInit {
}
private
setCurrentLocation
()
{
if
(
'geolocation'
in
navigator
)
{
if
(
"geolocation"
in
navigator
)
{
navigator
.
geolocation
.
getCurrentPosition
(
position
=>
{
this
.
lat
=
position
.
coords
.
latitude
;
this
.
lng
=
position
.
coords
.
longitude
;
...
...
@@ -92,16 +89,16 @@ export class HomePage implements OnInit {
(
results
,
status
)
=>
{
console
.
log
(
results
);
console
.
log
(
status
);
if
(
status
===
'OK'
)
{
if
(
status
===
"OK"
)
{
if
(
results
[
0
])
{
const
addressData
=
results
[
0
].
formatted_address
.
split
(
', '
);
this
.
address
=
addressData
[
0
]
+
', '
+
addressData
[
1
];
const
addressData
=
results
[
0
].
formatted_address
.
split
(
", "
);
this
.
address
=
addressData
[
0
]
+
", "
+
addressData
[
1
];
console
.
log
(
this
.
address
);
}
else
{
window
.
alert
(
'No results found'
);
window
.
alert
(
"No results found"
);
}
}
else
{
window
.
alert
(
'Geocoder failed due to: '
+
status
);
window
.
alert
(
"Geocoder failed due to: "
+
status
);
}
}
);
...
...
@@ -120,15 +117,13 @@ export class HomePage implements OnInit {
this
.
searchShow
=
false
;
}
ionViewWillEnter
()
{
this
.
menuCtrl
.
enable
(
true
);
}
goToPage
(
path
,
data
=
null
)
{
console
.
log
(
data
);
this
.
service
.
set
(
'params'
,
data
);
this
.
service
.
set
(
"params"
,
data
);
this
.
router
.
navigateByUrl
(
path
,
{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
...
...
@@ -145,24 +140,23 @@ export class HomePage implements OnInit {
console
.
log
(
datas
);
let
data
;
let
url
;
if
(
datas
.
type
===
'shopper'
)
{
if
(
datas
.
type
===
"shopper"
)
{
data
=
datas
.
data
;
this
.
service
.
set
(
'params'
,
data
);
url
=
'productlist'
;
}
else
if
(
datas
.
type
===
'category'
)
{
this
.
service
.
set
(
"params"
,
data
);
url
=
"productlist"
;
}
else
if
(
datas
.
type
===
"category"
)
{
data
=
datas
.
data
;
this
.
service
.
set
(
'params'
,
data
);
url
=
'catstorelist'
;
this
.
service
.
set
(
"params"
,
data
);
url
=
"catstorelist"
;
}
else
{
data
=
datas
.
data
;
data
.
size
=
this
.
service
.
splitSep
(
data
.
size
);
data
.
tag
=
this
.
service
.
splitSep
(
data
.
tag
);
data
.
color
=
this
.
service
.
splitSep
(
data
.
color
),
url
=
'productdetail'
;
(
data
.
color
=
this
.
service
.
splitSep
(
data
.
color
)),
(
url
=
"productdetail"
);
this
.
productsService
.
setProd
(
data
);
}
this
.
searchClose
();
this
.
router
.
navigateByUrl
(
url
,
{
queryParams
:
data
});
this
.
router
.
navigateByUrl
(
url
,
{
queryParams
:
data
});
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
...
...
@@ -170,4 +164,3 @@ export class HomePage implements OnInit {
this
.
searchService
.
search
(
data
);
}
}
src/app/productlist/productlist.page.html
View file @
597497f9
...
...
@@ -3,7 +3,8 @@
<img
src=
"../assets/Group17_2.png"
>
</button>
<div
class=
"nav_title floatLeft"
>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
>
</div>
<input
class=
"search_bar"
placeholder=
"Search here.. eg:shirts, retailers etc..."
(
click
)="
clickSearch
()"
>
</div>
<button
class=
"nav_btn nav_search floatRight"
>
<img
src=
"../assets/search_2.png"
>
</button>
...
...
@@ -73,3 +74,10 @@
</div>
</ion-content>
<div
class=
"search_item_list"
*
ngIf=
"searchShow"
[@
slideInOut
]
>
<ul>
<li>
sample
</li>
</ul>
</div>
\ No newline at end of file
src/app/productlist/productlist.page.ts
View file @
597497f9
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Location
}
from
'@angular/common'
;
import
{
trigger
,
transition
,
animate
,
style
}
from
'@angular/animations'
;
import
{
Router
,
ActivatedRoute
,
NavigationExtras
}
from
'@angular/router'
;
import
{
ProductsService
}
from
'./../../config/products.service'
;
import
{
ServiceService
}
from
'./../../config/service.service'
;
import
{
Component
,
OnInit
}
from
"@angular/core"
;
import
{
Location
}
from
"@angular/common"
;
import
{
trigger
,
transition
,
animate
,
style
}
from
"@angular/animations"
;
import
{
Router
,
ActivatedRoute
,
NavigationExtras
}
from
"@angular/router"
;
import
{
ProductsService
}
from
"./../../config/products.service"
;
import
{
ServiceService
}
from
"./../../config/service.service"
;
@
Component
({
selector
:
'app-productlist'
,
templateUrl
:
'./productlist.page.html'
,
styleUrls
:
[
'./productlist.page.scss'
],
selector
:
"app-productlist"
,
templateUrl
:
"./productlist.page.html"
,
styleUrls
:
[
"./productlist.page.scss"
],
animations
:
[
trigger
(
'slideInOut'
,
[
transition
(
':enter'
,
[
style
({
transform
:
'translateY(100%)'
}),
animate
(
'200ms ease-in'
,
style
({
transform
:
'translateY(0%)'
}))
trigger
(
"slideInOut"
,
[
transition
(
":enter"
,
[
style
({
transform
:
"translateY(100%)"
}),
animate
(
"200ms ease-in"
,
style
({
transform
:
"translateY(0%)"
}))
]),
transition
(
':leave'
,
[
animate
(
'200ms ease-out'
,
style
({
transform
:
'translateY(100%)'
}))
transition
(
":leave"
,
[
animate
(
"200ms ease-out"
,
style
({
transform
:
"translateY(100%)"
}))
])
])
]
})
export
class
ProductlistPage
implements
OnInit
{
onGrid
=
false
;
isShow
=
false
;
data
:
any
;
searchShow
=
false
;
sortValue
:
string
;
constructor
(
...
...
@@ -35,7 +35,7 @@ export class ProductlistPage implements OnInit {
public
prodService
:
ProductsService
,
public
service
:
ServiceService
)
{
this
.
service
.
get
(
'params'
).
then
((
val
)
=>
{
this
.
service
.
get
(
"params"
).
then
(
val
=>
{
this
.
data
=
val
;
console
.
log
(
this
.
data
);
this
.
prodService
.
prodList
(
this
.
data
.
uid
);
...
...
@@ -62,9 +62,17 @@ export class ProductlistPage implements OnInit {
this
.
onGrid
=
!
this
.
onGrid
;
}
clickSearch
()
{
this
.
searchShow
=
true
;
}
searchClose
()
{
this
.
searchShow
=
false
;
}
prodDetails
(
index
:
number
)
{
this
.
prodService
.
setProd
(
this
.
prodService
.
product
[
index
]);
this
.
router
.
navigateByUrl
(
'productdetail'
);
this
.
router
.
navigateByUrl
(
"productdetail"
);
document
.
body
.
scrollTop
=
document
.
documentElement
.
scrollTop
=
0
;
}
...
...
@@ -74,10 +82,10 @@ export class ProductlistPage implements OnInit {
console
.
log
(
this
.
prodService
.
fav
);
if
(
state
>
-
1
)
{
this
.
prodService
.
fav
.
splice
(
state
,
1
);
this
.
prodService
.
changeFav
(
index
,
'yes'
);
this
.
prodService
.
changeFav
(
index
,
"yes"
);
}
else
{
this
.
prodService
.
fav
.
push
(
index
);
this
.
prodService
.
changeFav
(
index
,
'no'
);
this
.
prodService
.
changeFav
(
index
,
"no"
);
}
return
;
console
.
log
(
this
.
prodService
.
fav
);
...
...
@@ -95,6 +103,6 @@ export class ProductlistPage implements OnInit {
checkFavStatus
(
index
)
{
const
state
=
this
.
prodService
.
fav
.
findIndex
(
x
=>
x
===
index
);
return
state
>
-
1
?
'fav_fill'
:
'fav_icon'
;
return
state
>
-
1
?
"fav_fill"
:
"fav_icon"
;
}
}
src/app/searchmodal/searchmodal.page.html
View file @
597497f9
<h1>
Search modal
</h1>
\ No newline at end of file
src/global.scss
View file @
597497f9
...
...
@@ -622,3 +622,35 @@ ion-header {
}
}
}
.search_item_list
{
position
:
absolute
;
background-color
:
#fff
;
left
:
0px
;
right
:
0px
;
width
:
100%
;
margin
:
0px
;
top
:
50px
;
bottom
:
0px
;
z-index
:
99
;
ul
{
margin
:
0px
;
padding
:
0px
;
li
{
list-style
:
none
;
color
:
rgba
(
59
,
57
,
77
,
1
);
text-align
:
left
;
list-style
:
none
;
padding
:
10px
;
border-bottom
:
1px
solid
#ddd
;
&
:hover
{
background-color
:
rgba
(
59
,
57
,
77
,
1
);
color
:
#fff
;
}
&
:focus
{
background-color
:
rgba
(
59
,
57
,
77
,
1
);
color
:
#fff
;
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment