From acff55dc65e537ca363d92b35cd03114f87e02d0 Mon Sep 17 00:00:00 2001 From: paulGao Date: Sat, 12 Feb 2022 15:20:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E4=BF=AE=E6=94=B9=E5=90=8E?= =?UTF-8?q?=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/api/address.js | 2 +- buyer/src/api/member.js | 6 +- manager/src/api/common.js | 2 +- manager/src/api/goods.js | 18 +- manager/src/api/index.js | 12 +- manager/src/api/member.js | 14 +- manager/src/api/order.js | 2 +- manager/src/api/pages.js | 2 +- manager/src/api/promotion.js | 10 +- manager/src/api/setting.js | 4 +- manager/src/api/shops.js | 8 +- seller/src/api/common.js | 4 +- seller/src/api/goods.js | 4 +- seller/src/api/shops.js | 8 +- seller/src/views/goods/goods-seller/goods.vue | 163 +++++++++++++----- .../promotion/full-discount/full-discount.vue | 2 +- 16 files changed, 167 insertions(+), 94 deletions(-) diff --git a/buyer/src/api/address.js b/buyer/src/api/address.js index 76e060de..6de478f4 100644 --- a/buyer/src/api/address.js +++ b/buyer/src/api/address.js @@ -52,7 +52,7 @@ export function getAddrDetail (id) { // 传给后台citycode 获取城市街道等id export function handleRegion (params) { return request({ - url: `${commonUrl}/common/common/common/region/region`, + url: `${commonUrl}/common/common/region/region`, needToken: true, method: Method.GET, params diff --git a/buyer/src/api/member.js b/buyer/src/api/member.js index 5cf5c55c..5cfe167d 100644 --- a/buyer/src/api/member.js +++ b/buyer/src/api/member.js @@ -214,7 +214,7 @@ export function afterSaleInfo (sn) { // 获取申请售后、投诉原因 export function afterSaleReason (serviceType) { return request({ - url: `/buyer/order/afterSale//get/afterSaleReason/${serviceType}`, + url: `/buyer/order/afterSale/get/afterSaleReason/${serviceType}`, method: Method.GET, needToken: true }); @@ -222,7 +222,7 @@ export function afterSaleReason (serviceType) { // 获取申请售后详情 export function afterSaleDetail (sn) { return request({ - url: `/buyer/order/afterSale//get/${sn}`, + url: `/buyer/order/afterSale/get/${sn}`, method: Method.GET, needToken: true }); @@ -230,7 +230,7 @@ export function afterSaleDetail (sn) { // 售后日志 export function afterSaleLog (sn) { return request({ - url: `/buyer/order/afterSale//get/getAfterSaleLog/${sn}`, + url: `/buyer/order/afterSale/get/getAfterSaleLog/${sn}`, method: Method.GET, needToken: true }); diff --git a/manager/src/api/common.js b/manager/src/api/common.js index 47afbab6..fe6aca80 100644 --- a/manager/src/api/common.js +++ b/manager/src/api/common.js @@ -7,7 +7,7 @@ export const getChildRegion = (id) => { // 点地图获取地址信息 export const getRegion = (params) => { - return getRequest(`${commonUrl}/common/region/region`, params); + return getRequest(`${commonUrl}/common/common/region/region`, params); }; // 获取拼图验证 diff --git a/manager/src/api/goods.js b/manager/src/api/goods.js index 2e29313b..cab60545 100644 --- a/manager/src/api/goods.js +++ b/manager/src/api/goods.js @@ -26,15 +26,15 @@ export const disableBrand = (id, params) => { } //根据分类id获取关联品牌 export const getCategoryBrandListData = (category_id, params) => { - return getRequest(`/goods/category/brand/${category_id}`, params) + return getRequest(`/goods/categoryBrand/${category_id}`, params) } //保存获取关联品牌 export const saveCategoryBrand = (category_id, params) => { - return postRequest(`/goods/category/brand/${category_id}`, params) + return postRequest(`/goods/categoryBrand/${category_id}`, params) } //保存获取关联规格 export const saveCategorySpec = (category_id, params) => { - return postRequest(`/goods/category/spec/${category_id}`, params) + return postRequest(`/goods/categorySpec/${category_id}`, params) } //获取所有可用品牌 @@ -88,7 +88,7 @@ export const updateSpec = (id,params) => { } //根据分类id获取关联规格 export const getCategorySpecListData = (category_id, params) => { - return getRequest(`/goods/category/spec/${category_id}`, params) + return getRequest(`/goods/categorySpec/${category_id}`, params) } //删除gUI个 export const delSpec = (id, params) => { @@ -130,7 +130,7 @@ export const authGoods = (id, params) => { //查询分类绑定参数信息 export const getCategoryParamsListData = (id, params) => { - return getRequest(`/goods/category/parameters/${id}`, params) + return getRequest(`/goods/categoryParameters/${id}`, params) } //查询商品绑定参数信息 @@ -151,20 +151,20 @@ export const deleteParams = (id, params) => { } //保存参数组 export const insertParamsGroup = (params) => { - return postRequest('/goods/category/parameters', params) + return postRequest('/goods/categoryParameters', params) } //更新参数组 export const updateParamsGroup = (params) => { - return putRequest('/goods/category/parameters', params) + return putRequest('/goods/categoryParameters', params) } //删除参数组 export const deleteParamsGroup = (id, params) => { - return deleteRequest(`/goods/category/parameters/${id}`, params) + return deleteRequest(`/goods/categoryParameters/${id}`, params) } //保存获取关联规格 export const getGoodsSpecInfo = (category_id, params) => { - return getRequest(`/goods/category/spec/goods/${category_id}`, params) + return getRequest(`/goods/categorySpec/goods/${category_id}`, params) } diff --git a/manager/src/api/index.js b/manager/src/api/index.js index e368e818..1e70fc9a 100644 --- a/manager/src/api/index.js +++ b/manager/src/api/index.js @@ -22,7 +22,7 @@ export const ws = managerUrl + "/ws"; //获取所有city export const getAllCity = (params) => { - return getRequest(commonUrl + '/common/region/allCity', params) + return getRequest(commonUrl + '/common/common/region/allCity', params) } @@ -53,7 +53,7 @@ export const login = (params) => { // 登出 export const logout = () => { - return postRequest("/user/logout"); + return postRequest("/passport/user/logout"); }; // 刷新token @@ -277,11 +277,11 @@ export const deleteAllLog = (params) => { // 分页获取消息数据 export const getMessageData = (params) => { - return getRequest("/message/getByCondition", params); + return getRequest("/other/message/getByCondition", params); }; // 获取单个消息详情 export const getMessageDataById = (id, params) => { - return getRequest(`/message/get/${id}`, params); + return getRequest(`/other/message/get/${id}`, params); }; // 发送消息 export const addMessage = (params) => { @@ -289,11 +289,11 @@ export const addMessage = (params) => { }; // 编辑消息 export const editMessage = (params) => { - return postRequest("/message/edit", params); + return postRequest("/other/message/edit", params); }; // 删除消息 export const deleteMessage = (ids, params) => { - return deleteRequest(`/message/delByIds/${ids}`, params); + return deleteRequest(`/other/message/delByIds/${ids}`, params); }; // 编辑发送消息 export const editMessageSend = (params) => { diff --git a/manager/src/api/member.js b/manager/src/api/member.js index 5c55c037..1e098d77 100644 --- a/manager/src/api/member.js +++ b/manager/src/api/member.js @@ -35,12 +35,12 @@ export const insertOrUpdateSpec = params => { // 获取会员列表 export const getMemberListData = params => { - return getRequest("/member/passport", params); + return getRequest("/passport/member", params); }; // 获取会员详情 export const getMemberInfoData = (id) => { - return getRequest(`/member/passport/${id}`); + return getRequest(`/passport/member/${id}`); }; // 修改会员基本信息 @@ -50,22 +50,22 @@ export const updateMember = (params) => { // 添加会员基本信息 export const addMember = params => { - return postRequest(`/member/passport`, params); + return postRequest(`/passport/member`, params); }; // 获取会员列表 export const getMemberAll = () => { - return getRequest("/member/passport/getAll"); + return getRequest("/passport/member/getAll"); }; // 增加或修改会员列表 export const operationMemberListData = params => { - return postRequest("/member/passport/insertOrUpdate", params); + return postRequest("/passport/member/insertOrUpdate", params); }; // 增加或修改会员列表 export const deleteMemberListData = ids => { - return deleteRequest(`/member/passport/delByIds/${ids}`); + return deleteRequest(`/passport/member/delByIds/${ids}`); }; // 获取充值记录列表数据 export const getUserRecharge = params => { @@ -110,7 +110,7 @@ export const historyMemberChartList = () => { //查询会员数量 export const getMemberNum = params => { - return getRequest("/member/passport/num", params); + return getRequest("/passport/member/num", params); }; //查询会员历史积分 export const getHistoryPointData = (params) => { diff --git a/manager/src/api/order.js b/manager/src/api/order.js index 904891ec..b57ab1e2 100644 --- a/manager/src/api/order.js +++ b/manager/src/api/order.js @@ -153,5 +153,5 @@ export const refundLog = (params) => { //售后单商家收货信息 export const storeAddress = (sn) => { - return getRequest(`/afterSale/getStoreAfterSaleAddress/${sn}`) + return getRequest(`/order/afterSale/getStoreAfterSaleAddress/${sn}`) } diff --git a/manager/src/api/pages.js b/manager/src/api/pages.js index 1ca3c4f7..6595cd97 100644 --- a/manager/src/api/pages.js +++ b/manager/src/api/pages.js @@ -72,7 +72,7 @@ export const saveArticleCategory = (params) => { //删除文章分类 export const delArticleCategory = (id) => { - return deleteRequest(`/other/articleCategory${id}`) + return deleteRequest(`/other/articleCategory/${id}`) } //修改文章分类 export const updateArticleCategory = (params, id) => { diff --git a/manager/src/api/promotion.js b/manager/src/api/promotion.js index 8fcede9a..50591f28 100644 --- a/manager/src/api/promotion.js +++ b/manager/src/api/promotion.js @@ -66,29 +66,29 @@ export const updatePintuanStatus = (pintuanId, params) => { // 修改砍价活动商品 export const saveKanJiaActivityGoods = params => { - return postRequest("/promotion/kan-jia-goods", params, { + return postRequest("/promotion/kanJiaGoods", params, { "Content-type": "application/json" }); }; // 修改砍价活动商品 export const editKanJiaActivityGoods = params => { - return putRequest("/promotion/kan-jia-goods", params, { + return putRequest("/promotion/kanJiaGoods", params, { "Content-type": "application/json" }); }; // 获取砍价活动商品 export const getKanJiaGoodsList = params => { - return getRequest(`/promotion/kan-jia-goods`, params); + return getRequest(`/promotion/kanJiaGoods`, params); }; //删除砍价活动商品 export const delKanJiaGoods = ids => { - return deleteRequest(`/promotion/kan-jia-goods/${ids}`); + return deleteRequest(`/promotion/kanJiaGoods/${ids}`); }; // 砍价活动商品详情 export const getKanJiaActivityGoodsById = id => { - return getRequest(`/promotion/kan-jia-goods/${id}`); + return getRequest(`/promotion/kanJiaGoods/${id}`); }; // 保存平台优惠券 diff --git a/manager/src/api/setting.js b/manager/src/api/setting.js index b9e7aa97..43665c98 100644 --- a/manager/src/api/setting.js +++ b/manager/src/api/setting.js @@ -11,7 +11,7 @@ export const getMessageData = params => { }; //修改短信模板 export const editSmsMessageTemplate = (id, params) => { - return putRequest(`/message/sms/${id}`, params) + return putRequest(`/sms/sms/${id}`, params) } //修改站内信模板 export const editNoticeMessage = (id, params) => { @@ -61,7 +61,7 @@ export const getNoticeMessageData = params => { }; //删除站内信 export const deleteMessage = (id) => { - return deleteRequest(`message/${id}`); + return deleteRequest(`/other/message/${id}`); }; // 开启站内信模板 export const openNoticeMessage = (id) => { diff --git a/manager/src/api/shops.js b/manager/src/api/shops.js index 7ed90731..93d3493e 100644 --- a/manager/src/api/shops.js +++ b/manager/src/api/shops.js @@ -47,12 +47,12 @@ export const shopDetail = (id) => { // 获取结算单分页 export const getBuyBillPage = (params) => { - return getRequest(`/store/bill/getByPage`,params) + return getRequest(`/order/bill/getByPage`,params) } // 获取结算单详情 export const getBuyBillDetail = (id) => { - return getRequest(`/store/bill/get/${id}`) + return getRequest(`/order/bill/get/${id}`) } @@ -64,12 +64,12 @@ export const getStoreFlow = (id,params) => { // 审核结算单 export const examine = (id) => { - return putRequest(`/store/bill/examine/${id}`) + return putRequest(`/order/bill/examine/${id}`) } // 审核结算单 export const pay = (id) => { - return putRequest(`/store/bill/pay/${id}`) + return putRequest(`/order/bill/pay/${id}`) } //获取所有商家 diff --git a/seller/src/api/common.js b/seller/src/api/common.js index 8b8ae7c4..f33a6d38 100644 --- a/seller/src/api/common.js +++ b/seller/src/api/common.js @@ -2,10 +2,10 @@ import {commonUrl, getRequest} from '@/libs/axios'; // 通过id获取子地区 export const getChildRegion = (id) => { - return getRequest(`${commonUrl}/common/region/item/${id}`); + return getRequest(`${commonUrl}/common/common/region/item/${id}`); }; // 点地图获取地址信息 export const getRegion = (params) => { - return getRequest(`${commonUrl}/common/region/region`, params); + return getRequest(`${commonUrl}/common/common/region/region`, params); }; diff --git a/seller/src/api/goods.js b/seller/src/api/goods.js index c7267356..0b61715c 100644 --- a/seller/src/api/goods.js +++ b/seller/src/api/goods.js @@ -69,7 +69,7 @@ export const saveCategoryBrand = (category_id, params) => { }; //保存获取关联规格 export const saveCategorySpec = (category_id, params) => { - return postRequest(`/goods/category/spec/${category_id}`, params); + return postRequest(`/goods/categorySpec/${category_id}`, params); }; //获取所有可用品牌 @@ -117,7 +117,7 @@ export const insertOrUpdateSpec = params => { }; //根据分类id获取关联规格 export const getCategorySpecListData = (category_id, params) => { - return getRequest(`/goods/category/spec/${category_id}`, params); + return getRequest(`/goods/categorySpec/${category_id}`, params); }; //删除gUI个 export const delSpec = (id, params) => { diff --git a/seller/src/api/shops.js b/seller/src/api/shops.js index 3f378701..19384148 100644 --- a/seller/src/api/shops.js +++ b/seller/src/api/shops.js @@ -53,22 +53,22 @@ export const logisticsUnChecked = (id, params) => { } // 获取商家自提点 export const getShopAddress = (id, params) => { - return getRequest(`/storeAddress/`, params) + return getRequest(`/member/storeAddress/`, params) } // 修改商家自提点 export const editShopAddress = (id, params) => { - return putRequest(`/storeAddress/${id}`, params) + return putRequest(`/member/storeAddress/${id}`, params) } // 添加商品自提点 export const addShopAddress = (params) => { - return postRequest(`/storeAddress/`, params) + return postRequest(`/member/storeAddress/`, params) } // 添加商品自提点 export const deleteShopAddress = (id) => { - return deleteRequest(`/storeAddress/${id}`) + return deleteRequest(`/member/storeAddress/${id}`) } // 获取商家详细信息 diff --git a/seller/src/views/goods/goods-seller/goods.vue b/seller/src/views/goods/goods-seller/goods.vue index d9d337a2..d1c41683 100644 --- a/seller/src/views/goods/goods-seller/goods.vue +++ b/seller/src/views/goods/goods-seller/goods.vue @@ -2,24 +2,52 @@