1
0

app-config-service.js 4.0 KB

1234567891011
  1. ;(function(){
  2. let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
  3. const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#f0efef","bottomBarColor":"#007bff","navigationBar":{"backgroundColor":"#f0efef","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"电话","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"tabBar":{"position":"bottom","color":"#999","selectedColor":"#007aff","borderStyle":"black","blurEffect":"none","fontSize":"10px","iconWidth":"40px","spacing":"3px","height":"50px","backgroundColor":"#f0efef","list":[{"pagePath":"pages/history/history","iconPath":"/./static/fonts/directory.png","selectedIconPath":"/static/fonts/directory1.png"},{"pagePath":"pages/index/index","iconPath":"/./static/fonts/linkman.png","selectedIconPath":"/static/fonts/linkman1.png"},{"pagePath":"pages/tel/tel","iconPath":"/./static/fonts/24gf-telephoneKeypad4 (1).png","selectedIconPath":"/static/fonts/24gf-telephoneKeypad4.png"}],"selectedIndex":0,"shown":true},"locales":{},"darkmode":false,"themeConfig":{}};
  4. const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"isTabBar":true,"tabBarIndex":1,"navigationBar":{"backgroundColor":"#f0efef","titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/add/add","meta":{"enablePullDownRefresh":false,"navigationBar":{"titleText":"添加联系人","type":"default"},"isNVue":false}},{"path":"pages/setting/setting","meta":{"enablePullDownRefresh":false,"navigationBar":{"titleText":"设置","type":"default"},"isNVue":false}},{"path":"pages/history/history","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":0,"enablePullDownRefresh":false,"navigationBar":{"titleText":"","style":"custom","type":"default"},"isNVue":false}},{"path":"pages/tel/tel","meta":{"isQuit":true,"isTabBar":true,"tabBarIndex":2,"enablePullDownRefresh":false,"navigationBar":{"titleText":"","type":"default"},"isNVue":false}},{"path":"pages/ContactDetails/ContactDetails","meta":{"navigationBar":{"style":"custom","type":"default"},"isNVue":false}},{"path":"pages/edit/edit","meta":{"navigationBar":{"titleText":"编辑","type":"default"},"isNVue":false}},{"path":"pages/test/test","meta":{"navigationBar":{"titleText":"","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
  5. __uniConfig.styles=[];//styles
  6. __uniConfig.onReady=function(callback){if(__uniConfig.ready){callback()}else{onReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"ready",{get:function(){return isReady},set:function(val){isReady=val;if(!isReady){return}const callbacks=onReadyCallbacks.slice(0);onReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
  7. __uniConfig.onServiceReady=function(callback){if(__uniConfig.serviceReady){callback()}else{onServiceReadyCallbacks.push(callback)}};Object.defineProperty(__uniConfig,"serviceReady",{get:function(){return isServiceReady},set:function(val){isServiceReady=val;if(!isServiceReady){return}const callbacks=onServiceReadyCallbacks.slice(0);onServiceReadyCallbacks.length=0;callbacks.forEach(function(callback){callback()})}});
  8. service.register("uni-app-config",{create(a,b,c){if(!__uniConfig.viewport){var d=b.weex.config.env.scale,e=b.weex.config.env.deviceWidth,f=Math.ceil(e/d);Object.assign(__uniConfig,{viewport:f,defaultFontSize:16})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:u,window:u,document:u,frames:u,self:u,location:u,navigator:u,localStorage:u,history:u,Caches:u,screen:u,alert:u,confirm:u,prompt:u,fetch:u,XMLHttpRequest:u,WebSocket:u,webkit:u,print:u}}}});
  9. })();