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.
21 lines
555 B
21 lines
555 B
import { config } from '../../../config/index';
|
|
import { queryCommentDetail } from '../../../model/comments/queryDetail';
|
|
/** 获取商品评价数据 */
|
|
function mockQueryCommentDetail(params) {
|
|
const { delay } = require('../../_utils/delay');
|
|
const data = queryCommentDetail(params);
|
|
return delay().then(() => {
|
|
return data;
|
|
});
|
|
}
|
|
|
|
/** 获取评价详情 */
|
|
export function getCommentDetail(params) {
|
|
if (config.useMock) {
|
|
return mockQueryCommentDetail(params);
|
|
}
|
|
return new Promise((resolve) => {
|
|
resolve('real api');
|
|
});
|
|
}
|