index.js 772 B

123456789101112131415161718192021222324252627282930313233343536
  1. import devCache from "../libs/devCache";
  2. import console from "./console";
  3. import request from "./request";
  4. import storage from "./storage";
  5. import uniBus from "./uniBus";
  6. import uniListen from "./uniListen";
  7. /**
  8. * dev调试工具初始化
  9. */
  10. export default function devToolsProxyInstall(options) {
  11. try {
  12. if (options.network && options.network.status) {
  13. request.install()
  14. }
  15. if (options.console && options.console.status) {
  16. console.install()
  17. }
  18. if (options.logs && options.logs.status) {
  19. uniListen.install()
  20. }
  21. storage.install()
  22. if (options.uniBus && options.uniBus.status) {
  23. uniBus.install()
  24. }
  25. devCache.syncLocalCache();
  26. } catch (error) {
  27. console.log("devToolsProxyInstall error", error);
  28. }
  29. }