diff --git a/src/api/merchant.js b/src/api/merchant.js new file mode 100644 index 0000000..c245c51 --- /dev/null +++ b/src/api/merchant.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +// 获取商家商品列表 +export function getMerchantProducts(merchantId) { + return request({ + url: `/api/merchant/product/merchant/${merchantId}`, + method: 'get' + }) +} \ No newline at end of file diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index a17d835..5b684f1 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -54,6 +54,9 @@ 商家分类 + + 商品列表 + diff --git a/src/router/index.js b/src/router/index.js index 7a9aa66..a806a97 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -60,6 +60,11 @@ const routes = [ path: 'categories', component: () => import('@/views/merchant/CategoryList.vue'), meta: { title: '商家分类' } + }, + { + path: 'products', + component: () => import('@/views/merchant/ProductList.vue'), + meta: { title: '商品列表' } } ] } diff --git a/src/views/merchant/ProductList.vue b/src/views/merchant/ProductList.vue new file mode 100644 index 0000000..353556b --- /dev/null +++ b/src/views/merchant/ProductList.vue @@ -0,0 +1,284 @@ + + + + + \ No newline at end of file