You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
git/scr/miniprogram-2/services/order/orderDetail.js

40 lines
972 B

import { config } from '../../config/index';
/** 获取订单详情mock数据 */
function mockFetchOrderDetail(params) {
const { delay } = require('../_utils/delay');
const { genOrderDetail } = require('../../model/order/orderDetail');
return delay().then(() => genOrderDetail(params));
}
/** 获取订单详情数据 */
export function fetchOrderDetail(params) {
if (config.useMock) {
return mockFetchOrderDetail(params);
}
return new Promise((resolve) => {
resolve('real api');
});
}
/** 获取客服mock数据 */
function mockFetchBusinessTime(params) {
const { delay } = require('../_utils/delay');
const { genBusinessTime } = require('../../model/order/orderDetail');
return delay().then(() => genBusinessTime(params));
}
/** 获取客服数据 */
export function fetchBusinessTime(params) {
if (config.useMock) {
return mockFetchBusinessTime(params);
}
return new Promise((resolve) => {
resolve('real api');
});
}