http.js 193 Bytes
import login from "./login";
import xFetch from './xFetch';

export default async function http(options) {
  if (!getApp().globalData.token) {
    await login();
  }
  return xFetch(options);
}