根据路径调用函数,如果函数有返回值,那么typeof的结果是undefined,而不是function
if (typeof handle[pathname] === 'function') {
return handle[pathname](response);
} if (typeof handle[pathname] === 'function') {
return handle[pathname](response);
} 
被折叠的 条评论
为什么被折叠?