diff --git a/litemall-vue/src/api/api.js b/litemall-vue/src/api/api.js index 8b80b566..52d08215 100644 --- a/litemall-vue/src/api/api.js +++ b/litemall-vue/src/api/api.js @@ -118,7 +118,21 @@ export function goodsDetail(query) { const GoodsRelated='wx/goods/related'; //商品详情页的关联商品(大家都在看) const BrandList='wx/brand/list'; //品牌列表 +export function brandList(query) { + return request({ + url: BrandList, + method: 'get', + params: query + }) +} const BrandDetail='wx/brand/detail'; //品牌详情 +export function brandDetail(query) { + return request({ + url: BrandDetail, + method: 'get', + params: query + }) +} const CartList='wx/cart/index'; //获取购物车的数据 export function cartList(query) { diff --git a/litemall-vue/src/router/items.js b/litemall-vue/src/router/items.js index 07f4aa85..2569041e 100644 --- a/litemall-vue/src/router/items.js +++ b/litemall-vue/src/router/items.js @@ -49,5 +49,17 @@ export default [ name: 'groupon', component: () => import('@/views/items/groupon'), props: route => route.query + }, + { + path: '/items/brand/:brandId', + name: 'brand', + props: true, + component: () => import('@/views/items/brand') + }, + { + path: '/items/brand-list', + name: 'brandList', + component: () => import('@/views/items/brand-list'), + props: route => route.query } ]; diff --git a/litemall-vue/src/views/home/tabbar-home.vue b/litemall-vue/src/views/home/tabbar-home.vue index 383a336b..33700c71 100755 --- a/litemall-vue/src/views/home/tabbar-home.vue +++ b/litemall-vue/src/views/home/tabbar-home.vue @@ -82,6 +82,29 @@ + + + + +
{{ brand.name }}
+
+
+
+ + + 更多品牌商 + + +
+
+ 更多人气推荐 - + @@ -149,6 +172,8 @@ import { CouponList, Toast, Card, + Grid, + GridItem, Row, Col, Tag @@ -172,6 +197,9 @@ export default { goDetail(id) { return `#/items/detail/${id}`; }, + goBrand(id) { + return `#/items/brand/${id}`; + }, getCoupon(id) { couponReceive({ couponId: id }).then(res => { Toast.success('领取成功'); @@ -207,7 +235,9 @@ export default { [SwipeItem.name]: SwipeItem, [Tabbar.name]: Tabbar, [TabbarItem.name]: TabbarItem, - [Tag.name]: Tag + [Tag.name]: Tag, + [Grid.name]: Grid, + [GridItem.name]: GridItem } }; @@ -217,7 +247,9 @@ export default { .interval_bot { margin-bottom: 10px; } - +.van-panel { + margin-top: 20px; +} .goods-channel { background: #fff; display: flex; diff --git a/litemall-vue/src/views/items/brand-list/index.vue b/litemall-vue/src/views/items/brand-list/index.vue new file mode 100644 index 00000000..b7e00753 --- /dev/null +++ b/litemall-vue/src/views/items/brand-list/index.vue @@ -0,0 +1,142 @@ + + + + + \ No newline at end of file diff --git a/litemall-vue/src/views/items/brand/index.vue b/litemall-vue/src/views/items/brand/index.vue new file mode 100644 index 00000000..dd023665 --- /dev/null +++ b/litemall-vue/src/views/items/brand/index.vue @@ -0,0 +1,127 @@ + + + + + \ No newline at end of file