From 6d13688aa80cddbc17b2358dfb8dc1b349565ce2 Mon Sep 17 00:00:00 2001 From: KangKang0928 <443456429@qq.com> Date: Mon, 19 Aug 2024 17:14:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0api=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/mer_admin.js | 46 ++++++++++++++++++++++++++++++++++-- 1 file changed, 44 insertions(+), 2 deletions(-) diff --git a/src/api/modules/mer_admin.js b/src/api/modules/mer_admin.js index 33168cd..3021fc9 100644 --- a/src/api/modules/mer_admin.js +++ b/src/api/modules/mer_admin.js @@ -57,11 +57,53 @@ export const mer_admin = { return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data }); }, //文件上传 - uploadFile:()=>{ + uploadFile: () => { return `${window.SITE_CONFIG['baseUrl']}/merchant-api/file/upload` }, //直接获取城市数据 - getCityOptions:()=>{ + getCityOptions: () => { return city_data; + }, + //省市县数据 + getCity: () => { + return $http.get(`/merchant-api/common/pca`); + }, + //添加运费模板 + addShippingTemplate: (data) => { + return $http.post(`/merchant-api/shippingTemplates/add`, data); + }, + //删除模板 + removeShippingTemplate: (id) => { + return $http.post(`/merchant-api/shippingTemplates/delete`, { + id + }) + }, + //更新模板 + updateShippingTemplate: (data) => { + return $http.post(`/merchant-api/shippingTemplates/update`, data); + }, + //获取模板分页 + getShippingTemplatePage: (data) => { + return $http.request({ + method: 'get', + url: '/merchant-api/shippingTemplates/page', + params: data + }) + }, + //获取配送模板列表 + getShippingTemplateList: (data) => { + return $http.request({ + method: 'get', + url: '/merchant-api/shippingTemplates/list', + params: data + }) + }, + //获取模板详情 + getShippingTemplateInfo: (id) => { + return $http.request({ + method: 'get', + url: '/merchant-api/shippingTemplates/list', + params: { id } + }) } } \ No newline at end of file