config.js 519 B

1234567891011121314
  1. module.exports = function(e) {
  2. getApp().api;
  3. var t = getApp().core,
  4. g = getApp();
  5. if (e && "function" == typeof e) {
  6. var n = t.getStorageSync(g.const.STORE_CONFIG);
  7. n && e(n), g.config ? n = g.config : (getApp().trigger.add(getApp().trigger.events.callConfig, "call", function(t) {
  8. e(t)
  9. }), getApp().configReadyCall && "function" == typeof getApp().configReadyCall || (getApp().configReadyCall =
  10. function(t) {
  11. getApp().trigger.run(getApp().trigger.events.callConfig, function() {}, t)
  12. }))
  13. }
  14. };