提交 208ee747 作者: 翁进城

优化request类型

上级 55072108
...@@ -7,7 +7,7 @@ import config from './config'; ...@@ -7,7 +7,7 @@ import config from './config';
* @param data 请求的参数 * @param data 请求的参数
* @returns Promise<Response> * @returns Promise<Response>
*/ */
export default function request(url: string, method: String = 'get', data?: any): Promise<Response> { export default function request(url: string, method: String = 'get', data?: any): Promise<Response<any>> {
let options = {}; let options = {};
switch (method.toLowerCase()) { switch (method.toLowerCase()) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论