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/usercenter/fetchUsercenter.js

19 lines
473 B

import { config } from '../../config/index';
/** 获取个人中心信息 */
function mockFetchUserCenter() {
const { delay } = require('../_utils/delay');
const { genUsercenter } = require('../../model/usercenter');
return delay(200).then(() => genUsercenter());
}
/** 获取个人中心信息 */
export function fetchUserCenter() {
if (config.useMock) {
return mockFetchUserCenter();
}
return new Promise((resolve) => {
resolve('real api');
});
}