Commit f28f0205 authored by Junling Bu's avatar Junling Bu
Browse files

feat[litemall-vue]: 显示品牌商商品

parent dcc304c6
...@@ -15,22 +15,25 @@ ...@@ -15,22 +15,25 @@
</div> </div>
</div> </div>
<van-card v-for="(item, i) in brand.list" <van-row gutter>
:key="i" <van-col span="12"
:desc="item.brief" v-for="(goods ,index) in brandGoods"
:title="item.name" :key="index">
:thumb="item.picUrl" <router-link :to="{ path: `/items/detail/${goods.id}`}">
:price="item.retailPrice" <img :src="goods.picUrl"
:origin-price="item.counterPrice" style="width:150px;height:150px;">
@click="itemClick(item.id)"> </router-link>
</van-card> <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> </div>
</template> </template>
<script> <script>
import { brandDetail } from '@/api/api'; import { brandDetail, goodsList } from '@/api/api';
import { Card } from 'vant'; import { Card, Row, Col } from 'vant';
export default { export default {
props: { props: {
...@@ -38,7 +41,8 @@ export default { ...@@ -38,7 +41,8 @@ export default {
}, },
data() { data() {
return { return {
brand: {} brand: {},
brandGoods: []
}; };
}, },
...@@ -53,6 +57,12 @@ export default { ...@@ -53,6 +57,12 @@ export default {
}).then(res => { }).then(res => {
this.brand = res.data.data; this.brand = res.data.data;
}); });
goodsList({
brandId: this.brandId
}).then(res => {
this.brandGoods = res.data.data.list;
});
}, },
itemClick(id) { itemClick(id) {
this.$router.push(`/items/detail/${id}`); this.$router.push(`/items/detail/${id}`);
...@@ -60,7 +70,9 @@ export default { ...@@ -60,7 +70,9 @@ export default {
}, },
components: { components: {
[Card.name]: Card [Card.name]: Card,
[Row.name]: Row,
[Col.name]: Col
} }
}; };
</script> </script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment