From dcc304c6b6448c151e1c58cd8718b76fb1c4284c Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Thu, 11 Jul 2019 00:41:59 +0800 Subject: [PATCH] =?UTF-8?q?feat[litemall-vue]:=20=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=93=81=E7=89=8C=E5=95=86=E5=88=97=E8=A1=A8=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=92=8C=E5=93=81=E7=89=8C=E5=95=86=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-vue/src/api/api.js | 14 ++ litemall-vue/src/router/items.js | 12 ++ litemall-vue/src/views/home/tabbar-home.vue | 38 ++++- .../src/views/items/brand-list/index.vue | 142 ++++++++++++++++++ litemall-vue/src/views/items/brand/index.vue | 127 ++++++++++++++++ 5 files changed, 330 insertions(+), 3 deletions(-) create mode 100644 litemall-vue/src/views/items/brand-list/index.vue create mode 100644 litemall-vue/src/views/items/brand/index.vue 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