From 332a0aa0daccfc57fef431a6d7433881de6804af Mon Sep 17 00:00:00 2001 From: KangKang0928 <443456429@qq.com> Date: Fri, 9 Aug 2024 14:14:44 +0800 Subject: [PATCH] add --- src/api/modules/mer_admin.js | 31 +- .../modules/product/popup/add-or-update.vue | 1081 ++++++----------- 2 files changed, 375 insertions(+), 737 deletions(-) diff --git a/src/api/modules/mer_admin.js b/src/api/modules/mer_admin.js index 22f5672..33168cd 100644 --- a/src/api/modules/mer_admin.js +++ b/src/api/modules/mer_admin.js @@ -1,4 +1,5 @@ import $http from '@/utils/httpRequest.js' +import city_data from '@/utils/country-level2-data.js' export const mer_admin = { /** @@ -32,23 +33,35 @@ export const mer_admin = { }, //商品管理 //保存商品信息 - saveProduct:(data)=>{ - return $http.post(`/merchant-api/product/save`,data); + saveProduct: (data) => { + return $http.post(`/merchant-api/product/save`, data); }, //保存商品基本信息 - saveProductBase:(data)=>{ - return $http.post(`/merchant-api/product/save/basic`,data); + saveProductBase: (data) => { + return $http.post(`/merchant-api/product/save/basic`, data); }, //返回商品分类以及列表(聚合) - getPolyProduct:(data)=>{ - return $http.post(`/merchant-api/product/polymerization/list`,data); + getPolyProduct: (data) => { + return $http.post(`/merchant-api/product/polymerization/list`, data); }, //商品分页 - getProductPage:(data)=>{ - return $http.post(`/merchant-api/product/page`,data); + getProductPage: (data) => { + return $http.post(`/merchant-api/product/page`, data); }, //商户商品分类 - getProductCategory:()=>{ + getProductCategory: () => { return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`); + }, + //获取销售单位 + getSaleUnit: (data) => { + return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data }); + }, + //文件上传 + uploadFile:()=>{ + return `${window.SITE_CONFIG['baseUrl']}/merchant-api/file/upload` + }, + //直接获取城市数据 + getCityOptions:()=>{ + return city_data; } } \ No newline at end of file diff --git a/src/views/modules/product/popup/add-or-update.vue b/src/views/modules/product/popup/add-or-update.vue index ed744c0..f4a6a12 100644 --- a/src/views/modules/product/popup/add-or-update.vue +++ b/src/views/modules/product/popup/add-or-update.vue @@ -1,726 +1,128 @@ - \ No newline at end of file + \ No newline at end of file