✨ 订单列表:接入 95%
This commit is contained in:
+1
-10
@@ -37,16 +37,7 @@ export default {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
// 订单列表
|
||||
list: (params) =>
|
||||
request({
|
||||
url: '/app-api/trade/order/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
|
||||
// list: (params) =>
|
||||
// request({
|
||||
// url: 'order/order',
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import request2 from '@/sheep/request2';
|
||||
import request from '@/sheep/request';
|
||||
|
||||
const OrderApi = {
|
||||
// 计算订单信息
|
||||
@@ -48,6 +49,27 @@ const OrderApi = {
|
||||
},
|
||||
});
|
||||
},
|
||||
// 订单列表
|
||||
getOrderPage: (params) => {
|
||||
return request({
|
||||
url: '/app-api/trade/order/page',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
// 确认收货
|
||||
receiveOrder: (id) => {
|
||||
return request2({
|
||||
url: `/app-api/trade/order/receive`,
|
||||
method: 'PUT',
|
||||
params: {
|
||||
id,
|
||||
},
|
||||
});
|
||||
},
|
||||
// 取消订单
|
||||
cancelOrder: (id) => {
|
||||
return request2({
|
||||
@@ -67,7 +89,7 @@ const OrderApi = {
|
||||
id,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export default OrderApi;
|
||||
|
||||
@@ -94,6 +94,7 @@ http.interceptors.request.use(
|
||||
if (config.url.indexOf('/app-api/') !== -1) {
|
||||
config.header['Accept'] = '*/*'
|
||||
config.header['tenant-id'] = '1';
|
||||
config.header['terminal'] = '20';
|
||||
config.header['Authorization'] = 'Bearer test247';
|
||||
}
|
||||
return config;
|
||||
@@ -212,8 +213,8 @@ const request = (config) => {
|
||||
}
|
||||
// TODO 芋艿:额外拼接
|
||||
if (config.url.indexOf('/app-api/') >= 0) {
|
||||
config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
}
|
||||
return http.middleware(config);
|
||||
};
|
||||
|
||||
@@ -96,7 +96,8 @@ http.interceptors.request.use(
|
||||
if (config.url.indexOf('/app-api/') !== -1) {
|
||||
config.header['Accept'] = '*/*'
|
||||
config.header['tenant-id'] = '1';
|
||||
config.header['Authorization'] = 'Bearer test247';
|
||||
config.header['terminal'] = '20';
|
||||
config.header['Authorization'] = 'Bearer test247';
|
||||
}
|
||||
// console.log(config, '看参数')
|
||||
return config;
|
||||
@@ -216,9 +217,9 @@ const request = (config) => {
|
||||
// TODO 芋艿:额外拼接
|
||||
if (config.url.indexOf('/app-api/') >= 0) {
|
||||
// 设置接口地址
|
||||
config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
// config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】
|
||||
// config.url = 'https://app.test.huizhizao.vip/prod-api' + config.url; // 调用【云端】
|
||||
// config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】
|
||||
}
|
||||
return http.middleware(config);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user