Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
f28f0205
Commit
f28f0205
authored
Jul 11, 2019
by
Junling Bu
Browse files
feat[litemall-vue]: 显示品牌商商品
parent
dcc304c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-vue/src/views/items/brand/index.vue
View file @
f28f0205
...
...
@@ -15,22 +15,25 @@
</div>
</div>
<van-card
v-for=
"(item, i) in brand.list"
:key=
"i"
:desc=
"item.brief"
:title=
"item.name"
:thumb=
"item.picUrl"
:price=
"item.retailPrice"
:origin-price=
"item.counterPrice"
@
click=
"itemClick(item.id)"
>
</van-card>
<van-row
gutter
>
<van-col
span=
"12"
v-for=
"(goods ,index) in brandGoods"
:key=
"index"
>
<router-link
:to=
"
{ path: `/items/detail/${goods.id}`}">
<img
:src=
"goods.picUrl"
style=
"width:150px;height:150px;"
>
</router-link>
<div
style=
"margin-left: 20px; rgb(123, 116, 116);"
>
{{
goods
.
name
}}
</div>
<div
style=
"margin-left: 20px; color:#ab956d"
>
¥
{{
goods
.
retailPrice
}}
</div>
</van-col>
</van-row>
</div>
</
template
>
<
script
>
import
{
brandDetail
}
from
'
@/api/api
'
;
import
{
Card
}
from
'
vant
'
;
import
{
brandDetail
,
goodsList
}
from
'
@/api/api
'
;
import
{
Card
,
Row
,
Col
}
from
'
vant
'
;
export
default
{
props
:
{
...
...
@@ -38,7 +41,8 @@ export default {
},
data
()
{
return
{
brand
:
{}
brand
:
{},
brandGoods
:
[]
};
},
...
...
@@ -53,6 +57,12 @@ export default {
}).
then
(
res
=>
{
this
.
brand
=
res
.
data
.
data
;
});
goodsList
({
brandId
:
this
.
brandId
}).
then
(
res
=>
{
this
.
brandGoods
=
res
.
data
.
data
.
list
;
});
},
itemClick
(
id
)
{
this
.
$router
.
push
(
`/items/detail/
${
id
}
`
);
...
...
@@ -60,7 +70,9 @@ export default {
},
components
:
{
[
Card
.
name
]:
Card
[
Card
.
name
]:
Card
,
[
Row
.
name
]:
Row
,
[
Col
.
name
]:
Col
}
};
</
script
>
...
...
Write
Preview
Supports
Markdown
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