import WuhuBase from "../WuhuBase"; export default class FetchUtils extends WuhuBase { /** * 包装jquery ajax 异步返回string * @param url * @param method */ public ajax(url: string, method: 'GET' | 'POST'): Promise { return new Promise((res, rej) => { $.ajax({ method: method, url: url, success: function (data) { res(data) }, error: function (e) { rej(e) } }); }); } }