From 364c4c069ba3048c11093571a0d8b72676312f24 Mon Sep 17 00:00:00 2001 From: aaron <> Date: Sun, 12 Jan 2025 00:02:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/merchant.js | 9 + src/layouts/BasicLayout.vue | 3 + src/router/index.js | 5 + src/views/merchant/ProductList.vue | 284 +++++++++++++++++++++++++++++ 4 files changed, 301 insertions(+) create mode 100644 src/api/merchant.js create mode 100644 src/views/merchant/ProductList.vue 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