diff --git a/manager/src/config/index.js b/manager/src/config/index.js
index 680fb1b1..1a28698c 100644
--- a/manager/src/config/index.js
+++ b/manager/src/config/index.js
@@ -17,14 +17,14 @@ export default {
* @description api请求基础路径
*/
api_dev: {
- common: "https://common-api.pickmall.cn",
- buyer: "https://buyer-api.pickmall.cn",
- seller: "https://store-api.pickmall.cn",
- manager: "https://admin-api.pickmall.cn"
- // common: 'http://192.168.0.109:8890',
- // buyer: 'http://192.168.0.109:8888',
- // seller: 'http://192.168.0.109:8889',
- // manager: 'http://192.168.0.109:8887'
+ // common: "https://common-api.pickmall.cn",
+ // buyer: "https://buyer-api.pickmall.cn",
+ // seller: "https://store-api.pickmall.cn",
+ // manager: "https://admin-api.pickmall.cn"
+ common: 'http://192.168.0.100:8890',
+ buyer: 'http://192.168.0.100:8888',
+ seller: 'http://192.168.0.100:8889',
+ manager: 'http://192.168.0.100:8887'
},
api_prod: {
common: "https://common-api.pickmall.cn",
diff --git a/manager/src/views/lili-floor-renovation/wap/navbar.vue b/manager/src/views/lili-floor-renovation/wap/navbar.vue
index ef7050c5..d439741a 100644
--- a/manager/src/views/lili-floor-renovation/wap/navbar.vue
+++ b/manager/src/views/lili-floor-renovation/wap/navbar.vue
@@ -8,13 +8,14 @@
-
+
+
diff --git a/seller/src/api/order.js b/seller/src/api/order.js
index 4256cdb0..ce14778d 100644
--- a/seller/src/api/order.js
+++ b/seller/src/api/order.js
@@ -1,129 +1,130 @@
// 统一请求路径前缀在libs/axios.js中修改
-import {getRequest, postRequest, putRequest} from '@/libs/axios';
-
+import { getRequest, postRequest, putRequest ,postRequestWithNoForm } from "@/libs/axios";
+import { baseUrl } from "@/libs/axios.js";
// 下载待发货的订单列表
-export const verificationCode = (verificationCode) => {
- return getRequest(`/orders/getOrderByVerificationCode/${verificationCode}`)
-}
-
-
+export const verificationCode = verificationCode => {
+ return getRequest(`/orders/getOrderByVerificationCode/${verificationCode}`);
+};
// 下载待发货的订单列表
-export const downLoadDeliverExcel = (params) => {
- return getRequest(`/orders/downLoadDeliverExcel`, params)
-}
+export const downLoadDeliverExcel = params => {
+ return getRequest(`/orders/downLoadDeliverExcel`, params, 'blob');
+};
+
+
+// 上传待发货的订单列表
+export const uploadDeliverExcel = params => {
+ return postRequestWithNoForm(`/orders/batchDeliver`, params );
+};
// 获取普通订单列表
-export const getOrderList = (params) => {
- return getRequest(`/orders`, params)
-}
+export const getOrderList = params => {
+ return getRequest(`/orders`, params);
+};
// 获取普通订单详细信息
-export const getOrderDetail = (sn) => {
- return getRequest(`/orders/${sn}`)
-}
+export const getOrderDetail = sn => {
+ return getRequest(`/orders/${sn}`);
+};
// 调整订单金额
export const modifyOrderPrice = (sn, params) => {
- return putRequest(`/orders/update/${sn}/price`, params)
-}
+ return putRequest(`/orders/update/${sn}/price`, params);
+};
// 取消订单
export const cancelOrder = (sn, params) => {
- return postRequest(`/orders/${sn}/cancel`, params)
-}
+ return postRequest(`/orders/${sn}/cancel`, params);
+};
// 修改收货地址
export const editOrderConsignee = (sn, params) => {
- return postRequest(`/orders/update/${sn}/consignee`, params)
-}
+ return postRequest(`/orders/update/${sn}/consignee`, params);
+};
//获取投诉列表
-export const getComplainPage = (params) => {
- return getRequest(`/complain`, params)
-}
+export const getComplainPage = params => {
+ return getRequest(`/complain`, params);
+};
//获取投诉详情
-export const getComplainDetail = (id) => {
- return getRequest(`/complain/${id}`)
-}
+export const getComplainDetail = id => {
+ return getRequest(`/complain/${id}`);
+};
//添加交易投诉对话
-export const addOrderComplaint = (params) => {
- return postRequest(`/complain/communication/`, params)
-}
+export const addOrderComplaint = params => {
+ return postRequest(`/complain/communication/`, params);
+};
//添加交易投诉对话
-export const appeal = (params) => {
- return putRequest(`/complain/appeal`, params)
-}
+export const appeal = params => {
+ return putRequest(`/complain/appeal`, params);
+};
//获取订单日志
export const getOrderLog = (sn, params) => {
- return getRequest(`/orderLog/${sn}`, params)
-}
+ return getRequest(`/orderLog/${sn}`, params);
+};
// 订单发货
export const orderDelivery = (sn, params) => {
- return postRequest(`/orders/${sn}/delivery`, params)
-}
+ return postRequest(`/orders/${sn}/delivery`, params);
+};
// 获取商家选中的物流公司
export const getLogisticsChecked = () => {
- return getRequest(`/logistics/getChecked`)
-}
+ return getRequest(`/logistics/getChecked`);
+};
// 订单核验
export const orderTake = (sn, verificationCode) => {
- return putRequest(`/orders/take/${sn}/${verificationCode}`)
-}
+ return putRequest(`/orders/take/${sn}/${verificationCode}`);
+};
// 售后服务单
-export const afterSaleOrderPage = (params) => {
- return getRequest(`/afterSale/page`, params)
-}
+export const afterSaleOrderPage = params => {
+ return getRequest(`/afterSale/page`, params);
+};
// 售后服务单详情
-export const afterSaleOrderDetail = (sn) => {
- return getRequest(`/afterSale/${sn}`)
-}
+export const afterSaleOrderDetail = sn => {
+ return getRequest(`/afterSale/${sn}`);
+};
// 商家审核
export const afterSaleSellerReview = (sn, params) => {
- return putRequest(`/afterSale/review/${sn}`, params)
-}
+ return putRequest(`/afterSale/review/${sn}`, params);
+};
// 商家确认收货
export const afterSaleSellerConfirm = (sn, params) => {
- return putRequest(`/afterSale/confirm/${sn}`, params)
-}
+ return putRequest(`/afterSale/confirm/${sn}`, params);
+};
// 商家换货业务发货
export const afterSaleSellerDelivery = (sn, params) => {
- return postRequest(`/afterSale/${sn}/delivery`, params)
-}
+ return postRequest(`/afterSale/${sn}/delivery`, params);
+};
//查询物流
export const getTraces = (sn, params) => {
- return postRequest(`/orders/getTraces/${sn}`, params)
-}
+ return postRequest(`/orders/getTraces/${sn}`, params);
+};
//售后单查询物流
export const getSellerDeliveryTraces = (sn, params) => {
- return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params)
-}
+ return getRequest(`/afterSale/getSellerDeliveryTraces/${sn}`, params);
+};
//售后单查询物流
export const getAfterSaleTraces = (sn, params) => {
- return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params)
-}
+ return getRequest(`/afterSale/getDeliveryTraces/${sn}`, params);
+};
//获取发票列表
-export const getReceiptPage = (params) => {
- return getRequest(`/receipt`, params)
-}
+export const getReceiptPage = params => {
+ return getRequest(`/receipt`, params);
+};
//获取发票列表
-export const invoicing = (id) => {
- return postRequest(`receipt/${id}/invoicing`)
-}
-
-
-
+export const invoicing = id => {
+ return postRequest(`receipt/${id}/invoicing`);
+};
diff --git a/seller/src/config/index.js b/seller/src/config/index.js
index 27da5927..17f824e8 100644
--- a/seller/src/config/index.js
+++ b/seller/src/config/index.js
@@ -22,10 +22,10 @@ export default {
// buyer: 'https://buyer-api.pickmall.cn',
// seller: 'https://store-api.pickmall.cn',
// manager: 'https://admin-api.pickmall.cn',
- common: 'http://192.168.0.109:8890',
- buyer: 'http://192.168.0.109:8888',
- seller: 'http://192.168.0.109:8889',
- manager: 'http://192.168.0.109:8887'
+ common: 'http://192.168.0.100:8890',
+ buyer: 'http://192.168.0.100:8888',
+ seller: 'http://192.168.0.100:8889',
+ manager: 'http://192.168.0.100:8887'
},
api_prod: {
common: 'https://common-api.pickmall.cn',
diff --git a/seller/src/libs/axios.js b/seller/src/libs/axios.js
index 56d3afd8..0004efb5 100644
--- a/seller/src/libs/axios.js
+++ b/seller/src/libs/axios.js
@@ -4,28 +4,34 @@ import { getStore, setStore } from "./storage";
import { router } from "../router/index";
import { Message } from "view-design";
import Cookies from "js-cookie";
-import {handleRefreshToken} from "@/api/index"
+import { handleRefreshToken } from "@/api/index";
// 统一请求路径前缀
-export const baseUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.seller : config.api_prod.seller) + config.baseUrlPrefix;
-export const commonUrl = (process.env.NODE_ENV === 'development' ? config.api_dev.common : config.api_prod.common);
+export const baseUrl =
+ (process.env.NODE_ENV === "development"
+ ? config.api_dev.seller
+ : config.api_prod.seller) + config.baseUrlPrefix;
+export const commonUrl =
+ process.env.NODE_ENV === "development"
+ ? config.api_dev.common
+ : config.api_prod.common;
var isRefreshToken = 0;
-const refreshToken = getTokenDebounce()
+const refreshToken = getTokenDebounce();
const service = axios.create({
timeout: 10000,
baseURL: baseUrl
-})
+});
service.interceptors.request.use(
config => {
- if (config.method == 'get') {
+ if (config.method == "get") {
config.params = {
_t: Date.parse(new Date()) / 1000,
...config.params
- }
+ };
}
- const uuid = getStore('uuid');
- config.headers['uuid'] = uuid;
+ const uuid = getStore("uuid");
+ config.headers["uuid"] = uuid;
return config;
},
err => {
@@ -85,30 +91,32 @@ service.interceptors.response.use(
},
async error => {
// 返回状态码不为200时候的错误处理
-
if (error.response) {
if (error.response.status === 401) {
// 这种情况一般调到登录页
} else if (error.response.status === 403) {
isRefreshToken++;
- if(isRefreshToken === 1) {
+ if (isRefreshToken === 1) {
const getTokenRes = await refreshToken();
- if (getTokenRes === 'success') { // 刷新token
+ if (getTokenRes === "success") {
+ // 刷新token
if (isRefreshToken === 1) {
- error.response.config.headers.accessToken = getStore('accessToken')
- return service(error.response.config)
+ error.response.config.headers.accessToken = getStore(
+ "accessToken"
+ );
+ return service(error.response.config);
} else {
- router.go(0)
+ router.go(0);
}
} else {
Cookies.set("userInfo", "");
- router.push('/login')
+ router.push("/login");
}
- isRefreshToken = 0
+ isRefreshToken = 0;
}
} else {
// 其他错误处理
- Message.error(error.response.data.message)
+ Message.error(error.response.data.message);
}
}
@@ -119,59 +127,65 @@ service.interceptors.response.use(
// 防抖闭包来一波
function getTokenDebounce() {
- let lock = false
- let success = false
- return function () {
+ let lock = false;
+ let success = false;
+ return function() {
if (!lock) {
- lock = true
+ lock = true;
let oldRefreshToken = getStore("refreshToken");
- handleRefreshToken(oldRefreshToken).then(res => {
- if (res.success) {
- let {
- accessToken,
- refreshToken
- } = res.result;
- setStore("accessToken", accessToken);
- setStore("refreshToken", refreshToken);
+ handleRefreshToken(oldRefreshToken)
+ .then(res => {
+ if (res.success) {
+ let { accessToken, refreshToken } = res.result;
+ setStore("accessToken", accessToken);
+ setStore("refreshToken", refreshToken);
- success = true
- lock = false
- } else {
- success = false
- lock = false
- // router.push('/login')
- }
- }).catch((err) => {
- success = false
- lock = false
- })
+ success = true;
+ lock = false;
+ } else {
+ success = false;
+ lock = false;
+ // router.push('/login')
+ }
+ })
+ .catch(err => {
+ success = false;
+ lock = false;
+ });
}
return new Promise(resolve => {
// 一直看lock,直到请求失败或者成功
const timer = setInterval(() => {
if (!lock) {
- clearInterval(timer)
+ clearInterval(timer);
if (success) {
- resolve('success')
+ resolve("success");
} else {
- resolve('fail')
+ resolve("fail");
}
}
- }, 500) // 轮询时间间隔
- })
- }
+ }, 500); // 轮询时间间隔
+ });
+ };
}
-export const getRequest = (url, params) => {
+export const getRequest = (url, params, resBlob) => {
let accessToken = getStore("accessToken");
- return service({
+ let data = {
method: "get",
url: `${url}`,
params: params,
headers: {
accessToken: accessToken
- }
- });
+ },
+ responseType: "blob"
+ };
+ if (resBlob != "blob") {
+ delete data.responseType;
+ }
+
+
+ return service(data);
};
export const postRequest = (url, params, headers) => {
@@ -232,29 +246,28 @@ export const postRequestWithHeaders = (url, params) => {
});
};
-
-export const putRequest = (url, params,headers) => {
+export const putRequest = (url, params, headers) => {
let accessToken = getStore("accessToken");
return service({
method: "put",
url: `${url}`,
data: params,
transformRequest: headers
- ? undefined
- : [
- function(data) {
- let ret = "";
- for (let it in data) {
- ret +=
- encodeURIComponent(it) +
- "=" +
- encodeURIComponent(data[it]) +
- "&";
+ ? undefined
+ : [
+ function(data) {
+ let ret = "";
+ for (let it in data) {
+ ret +=
+ encodeURIComponent(it) +
+ "=" +
+ encodeURIComponent(data[it]) +
+ "&";
+ }
+ ret = ret.substring(0, ret.length - 1);
+ return ret;
}
- ret = ret.substring(0, ret.length - 1);
- return ret;
- }
- ],
+ ],
headers: {
"Content-Type": "application/x-www-form-urlencoded",
accessToken: accessToken,
@@ -337,4 +350,3 @@ export const postRequestWithNoToken = (url, params) => {
params: params
});
};
-
diff --git a/seller/src/views/order/order/exportOrderDeliver.vue b/seller/src/views/order/order/exportOrderDeliver.vue
index 2340a62b..e22e8777 100644
--- a/seller/src/views/order/order/exportOrderDeliver.vue
+++ b/seller/src/views/order/order/exportOrderDeliver.vue
@@ -17,8 +17,8 @@
-
+
选择或拖拽文件上传
@@ -41,7 +41,7 @@