From b80d2cecf91e0a6406000b7d4122666100c74d54 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 31 May 2024 14:24:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.development.example | 2 +- src/api/store_category.ts | 26 +++ src/api/store_product.ts | 26 +++ src/views/dev_tools/code/edit.vue | 95 +++++++++- src/views/store/store_category/edit.vue | 179 ++++++++++++++++++ src/views/store/store_category/index.vue | 183 ++++++++++++++++++ src/views/store/store_product/details.vue | 83 ++++++++ src/views/store/store_product/edit.vue | 219 ++++++++++++++++++++++ src/views/store/store_product/index.vue | 196 +++++++++++++++++++ 10 files changed, 1007 insertions(+), 4 deletions(-) create mode 100644 src/api/store_category.ts create mode 100644 src/api/store_product.ts create mode 100644 src/views/store/store_category/edit.vue create mode 100644 src/views/store/store_category/index.vue create mode 100644 src/views/store/store_product/details.vue create mode 100644 src/views/store/store_product/edit.vue create mode 100644 src/views/store/store_product/index.vue diff --git a/.env.development b/.env.development index a57c3857..824629a2 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,4 @@ NODE_ENV = 'development' # Base API -VITE_APP_BASE_URL='http://127.0.0.1:8787' \ No newline at end of file +VITE_APP_BASE_URL='http://192.168.1.22:8545' \ No newline at end of file diff --git a/.env.development.example b/.env.development.example index a57c3857..824629a2 100644 --- a/.env.development.example +++ b/.env.development.example @@ -1,4 +1,4 @@ NODE_ENV = 'development' # Base API -VITE_APP_BASE_URL='http://127.0.0.1:8787' \ No newline at end of file +VITE_APP_BASE_URL='http://192.168.1.22:8545' \ No newline at end of file diff --git a/src/api/store_category.ts b/src/api/store_category.ts new file mode 100644 index 00000000..6a11579f --- /dev/null +++ b/src/api/store_category.ts @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 商品分类表列表 +export function apiStoreCategoryLists(params: any) { + return request.get({ url: '/store_category/storecategory/lists', params }) +} + +// 添加商品分类表 +export function apiStoreCategoryAdd(params: any) { + return request.post({ url: '/store_category/storecategory/add', params }) +} + +// 编辑商品分类表 +export function apiStoreCategoryEdit(params: any) { + return request.post({ url: '/store_category/storecategory/edit', params }) +} + +// 删除商品分类表 +export function apiStoreCategoryDelete(params: any) { + return request.post({ url: '/store_category/storecategory/delete', params }) +} + +// 商品分类表详情 +export function apiStoreCategoryDetail(params: any) { + return request.get({ url: '/store_category/storecategory/detail', params }) +} \ No newline at end of file diff --git a/src/api/store_product.ts b/src/api/store_product.ts new file mode 100644 index 00000000..8b562816 --- /dev/null +++ b/src/api/store_product.ts @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 商品表列表 +export function apiStoreProductLists(params: any) { + return request.get({ url: '/store_product/storeproduct/lists', params }) +} + +// 添加商品表 +export function apiStoreProductAdd(params: any) { + return request.post({ url: '/store_product/storeproduct/add', params }) +} + +// 编辑商品表 +export function apiStoreProductEdit(params: any) { + return request.post({ url: '/store_product/storeproduct/edit', params }) +} + +// 删除商品表 +export function apiStoreProductDelete(params: any) { + return request.post({ url: '/store_product/storeproduct/delete', params }) +} + +// 商品表详情 +export function apiStoreProductDetail(params: any) { + return request.get({ url: '/store_product/storeproduct/detail', params }) +} \ No newline at end of file diff --git a/src/views/dev_tools/code/edit.vue b/src/views/dev_tools/code/edit.vue index 67640886..35c3aa9e 100644 --- a/src/views/dev_tools/code/edit.vue +++ b/src/views/dev_tools/code/edit.vue @@ -60,6 +60,15 @@ + + + 必填 + + + + 插入 + + + + 编辑 + + + + 列表 + + + + 查询 + - + @@ -134,7 +180,7 @@ - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/store/store_category/index.vue b/src/views/store/store_category/index.vue new file mode 100644 index 00000000..96eaf236 --- /dev/null +++ b/src/views/store/store_category/index.vue @@ -0,0 +1,183 @@ + + + + + + + + + + + + + + + + 查询 + 重置 + + + + + + + + + 新增 + + + 删除 + + + + + + + + + + + + + + + + + + 编辑 + + + 删除 + + + + + + + + + + + + + + diff --git a/src/views/store/store_product/details.vue b/src/views/store/store_product/details.vue new file mode 100644 index 00000000..9791c06c --- /dev/null +++ b/src/views/store/store_product/details.vue @@ -0,0 +1,83 @@ + + + + + + + + + + + + + diff --git a/src/views/store/store_product/edit.vue b/src/views/store/store_product/edit.vue new file mode 100644 index 00000000..4b0bc8ff --- /dev/null +++ b/src/views/store/store_product/edit.vue @@ -0,0 +1,219 @@ + + + + {{ mode == "add" ? "添加商品" : "编辑商品" }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 提交 + + + + + + diff --git a/src/views/store/store_product/index.vue b/src/views/store/store_product/index.vue new file mode 100644 index 00000000..8a2dd172 --- /dev/null +++ b/src/views/store/store_product/index.vue @@ -0,0 +1,196 @@ + + + + + + + + + 查询 + 重置 + + + + + + + 新增 + + + + 删除 + + + + + + + + + + + + + + + + + + + {{ row.is_show ? "上架" : "未上架" }} + + + + + + + + + + + 编辑 + + + 详情 + + + 删除 + + + + + + + + + + + + + +