http.js 193 Bytes Edit 1 2 3 4 5 6 7 8 9 import login from "./login"; import xFetch from './xFetch'; export default async function http(options) { if (!getApp().globalData.token) { await login(); } return xFetch(options); }