2023-12-07 19:05:27 +08:00
|
|
|
|
|
|
|
import axios from "axios";
|
|
|
|
// 创建axios 实例
|
|
|
|
const instacne = axios.create({
|
|
|
|
baseURL: "https://crmeb-test.shop.lihaink.cn/",
|
|
|
|
timeout: 30000,
|
|
|
|
});
|
|
|
|
|
|
|
|
// 请求拦截
|
|
|
|
instacne.interceptors.request.use(
|
|
|
|
(config) => {
|
|
|
|
// 在发送请求之前做什么
|
|
|
|
|
|
|
|
return config;
|
|
|
|
},
|
|
|
|
(err) => {
|
|
|
|
return Promise.reject(err);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
// 响应拦截
|
|
|
|
instacne.interceptors.response.use(
|
|
|
|
(res) => {
|
|
|
|
// 对响应的数据做什么
|
|
|
|
return res.data;
|
|
|
|
},
|
|
|
|
(err) => {
|
|
|
|
return Promise.reject(err);
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function getUserNumApi(params) {
|
|
|
|
return instacne.get('/api/dataview/user_merchat_count', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function getOrderNumApi(params) {
|
|
|
|
return instacne.get('/api/dataview/order_statistics', { params })
|
|
|
|
}
|
|
|
|
export function getSalesRankApi(params) {
|
|
|
|
return instacne.get('/api/dataview/sales_ranking', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function getTodayOrderAmountApi(params) {
|
|
|
|
return instacne.get('/api/dataview/curr_day_order_amount', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function getProductCountApi(params) {
|
|
|
|
return instacne.get('/api/dataview/product_count', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getViewCountApi(params) {
|
|
|
|
return instacne.get('/api/dataview/view_count', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getUserTradeCountApi(params) {
|
|
|
|
return instacne.get('/api/dataview/user_trade_count', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
export function getProductCategoryListApi(params) {
|
|
|
|
return instacne.get('/api/dataview/product_category_list', { params })
|
|
|
|
}
|
2023-12-08 00:06:02 +08:00
|
|
|
|
|
|
|
|
|
|
|
export function getProductListApi(params) {
|
|
|
|
return instacne.get('/api/dataview/product_list', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
export function merchant_listApi(params) {
|
|
|
|
return instacne.get('/api/dataview/merchant_list', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
export function order_listApi(params) {
|
|
|
|
return instacne.get('/api/dataview/order_list', { params })
|
|
|
|
}
|
|
|
|
export function order_list_count_titleApi(params) {
|
|
|
|
return instacne.get('/api/dataview/order_list_count_title', { params })
|
|
|
|
}
|
|
|
|
export function refund_order_listApi(params) {
|
|
|
|
return instacne.get('/api/dataview/refund_order_list', { params })
|
|
|
|
}
|
|
|
|
export function take_order_listApi(params) {
|
|
|
|
return instacne.get('/api/dataview/take_order_list', { params })
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export function take_order_count_titleApi(params) {
|
|
|
|
return instacne.get('/api/dataview/take_order_count_title', { params })
|
|
|
|
}
|
|
|
|
//
|
|
|
|
// /api/dataview/take_order_count_title?areaCode=510524&streetCode=510524100&status&page=1&limit=20
|
2023-12-07 19:05:27 +08:00
|
|
|
|