From de522af86f575d5f52119cd135a4a42803957083 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Thu, 30 May 2024 18:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mall/product/index.js | 25 +++++ src/views/MiniMall/Product/add.vue | 34 ++++-- src/views/MiniMall/Product/index.vue | 161 ++++++++++++++------------- 3 files changed, 135 insertions(+), 85 deletions(-) create mode 100644 src/api/mall/product/index.js diff --git a/src/api/mall/product/index.js b/src/api/mall/product/index.js new file mode 100644 index 0000000..23f25a4 --- /dev/null +++ b/src/api/mall/product/index.js @@ -0,0 +1,25 @@ +import request from '@/config/axios' +// 查询列表 +export const getProductPage = async (params) => { + return await request.get({ url: '/admin-api/crm/erp-product//page', params }) +} + +// 查询详情 +export const getProduct = async (id) => { + return await request.get({ url: '/admin-api/crm/erp-product//get?id=' + id }) +} + +// 新增 +export const createProduct = async (data) => { + return await request.post({ url: '/admin-api/crm/erp-product//create', data: data }) +} + +// 修改 +export const updateProduct = async (params) => { + return await request.put({ url: '/admin-api/crm/erp-product//update', data: params }) +} + +// 删除 +export const deleteProduct = async (id) => { + return await request.delete({ url: '/admin-api/crm/erp-product//delete?id=' + id }) +} diff --git a/src/views/MiniMall/Product/add.vue b/src/views/MiniMall/Product/add.vue index fc15b24..5447064 100644 --- a/src/views/MiniMall/Product/add.vue +++ b/src/views/MiniMall/Product/add.vue @@ -4,26 +4,39 @@ - - + + - - + + - - + + + + - + - - - + + - - + + + + + + @@ -36,36 +45,34 @@ - + -