Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
K
kiaisoft_tuananh_nuxt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Boards
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
TTS Tran Viet Anh
kiaisoft_tuananh_nuxt
Commits
ed2989c1
Commit
ed2989c1
authored
Apr 14, 2023
by
Le Dinh Trung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
home-page
parent
8529b8fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
20 deletions
+62
-20
index.vue
pages/home-page/index.vue
+62
-20
No files found.
pages/home-page/index.vue
View file @
ed2989c1
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</div>
</div>
<v-row>
<v-row>
<v-col
<v-col
v-for=
"(item, i) in
item
s"
v-for=
"(item, i) in
categorie
s"
:key=
"i"
:key=
"i"
cols=
"12"
cols=
"12"
md=
"3"
md=
"3"
...
@@ -21,24 +21,26 @@
...
@@ -21,24 +21,26 @@
:elevation="hover ? 12 : 2"
:elevation="hover ? 12 : 2"
:class="{ 'on-hover': hover }"
:class="{ 'on-hover': hover }"
>
>
<v-card
<nuxt-link
:to=
"`/home-page/categories/$
{item.id}`">
:elevation=
"hover ? 16 : 2"
<v-card
:class=
"
{ 'on-hover': hover }"
:elevation=
"hover ? 16 : 2"
class="mx-auto pa-2 ma-3 no-padding"
:class=
"
{ 'on-hover': hover }"
max-width="280"
class="mx-auto pa-2 ma-3 no-padding"
link
max-width="280"
>
link
<div>
>
<v-img
<div>
:src=
"item.images"
<v-img
height=
"250px"
:src=
"item.image"
cover
height=
"250px"
/>
cover
</div>
/>
<v-card-title
class=
"d-flex justify-center card-category-title"
>
</div>
{{
item
.
name
}}
<v-card-title
class=
"d-flex justify-center card-category-title"
>
</v-card-title>
{{
item
.
name
}}
</v-card>
</v-card-title>
</v-card>
</nuxt-link>
</v-hover>
</v-hover>
</v-col>
</v-col>
</v-row>
</v-row>
...
@@ -353,7 +355,47 @@ export default {
...
@@ -353,7 +355,47 @@ export default {
title
:
'
20% Off Coupon for CyberWeek
'
,
title
:
'
20% Off Coupon for CyberWeek
'
,
content
:
'
Lorem ipsum dolor sit amet,onadipiscing elit, sedsddoeiu smod tempo...
'
content
:
'
Lorem ipsum dolor sit amet,onadipiscing elit, sedsddoeiu smod tempo...
'
}
}
]
],
categories
:
[],
product
:
[]
}
},
mounted
()
{
this
.
getCategories
()
this
.
getNewProducts
()
},
methods
:
{
getCategories
()
{
this
.
$axios
.
get
(
'
/guest/categories/main-categories/
'
,
{
headers
:
{
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
})
.
then
((
response
)
=>
{
this
.
categories
=
response
.
data
.
data
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
)
})
},
getNewProducts
()
{
this
.
$axios
.
get
(
'
/guest/products/new-release/
'
,
{
headers
:
{
Authorization
:
`Bearer
${
this
.
$auth
.
$storage
.
getUniversal
(
'
token
'
)}
`
}
})
.
then
((
response
)
=>
{
this
.
product
=
response
.
data
.
data
})
.
catch
(
function
(
error
)
{
console
.
log
(
error
)
})
}
}
}
}
}
}
...
...
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