app-config-service.js 3.7 KB

12345678
  1. var isReady=false;var onReadyCallbacks=[];
  2. var isServiceReady=false;var onServiceReadyCallbacks=[];
  3. var __uniConfig = {"pages":["pages/Home","pages/example/components","uview-ui/components/u-avatar-cropper/u-avatar-cropper","pages/example/js","pages/example/template","uview-ui/components/u-full-screen/u-full-screen"],"window":{"navigationBarTextStyle":"black","navigationBarTitleText":"uView","navigationBarBackgroundColor":"#FFFFFF","backgroundColor":"#F2F3F5"},"tabBar":{"color":"#808080","selectedColor":"#1A1A1A","backgroundColor":"#FFFFFF","borderStyle":"black","list":[{"pagePath":"pages/Home","iconPath":"static/uview/imgs/tabbar_icon_01.png","selectedIconPath":"static/uview/imgs/tabbar_icon_01_pre.png","text":"首页"},{"pagePath":"pages/example/js","iconPath":"static/uview/imgs/tabbar_icon_02.png","selectedIconPath":"static/uview/imgs/tabbar_icon_02_pre.png","text":"订单管理"},{"pagePath":"pages/example/template","iconPath":"static/uview/imgs/tabbar_icon_03.png","selectedIconPath":"static/uview/imgs/tabbar_icon_03_pre.png","text":"我的"}]},"preloadRule":{"pages/example/components":{"network":"all","packages":["pages/componentsA","pages/componentsB","pages/componentsC"]}},"nvueCompiler":"uni-app","nvueStyleCompiler":"weex","renderer":"auto","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":false},"appname":"外卖商家端","compilerVersion":"3.1.22","entryPagePath":"pages/Home","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000}};
  4. var __uniRoutes = [{"path":"/pages/Home","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationStyle":"custom","navigationBarTextStyle":"white","backgroundColor":"#F2F3F5"}},{"path":"/pages/example/components","meta":{},"window":{"navigationBarTitleText":"组件"}},{"path":"/uview-ui/components/u-avatar-cropper/u-avatar-cropper","meta":{},"window":{"navigationBarTitleText":"头像裁剪","navigationBarBackgroundColor":"#000000"}},{"path":"/pages/example/js","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"工具"}},{"path":"/pages/example/template","meta":{"isQuit":true,"isTabBar":true},"window":{"navigationBarTitleText":"模板"}},{"path":"/uview-ui/components/u-full-screen/u-full-screen","meta":{},"window":{"navigationStyle":"custom","animationType":"fade-in","background":"transparent","backgroundColor":"rgba(0,0,0,0)","popGesture":"none"}}];
  5. __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()})}});
  6. __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()})}});
  7. 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:Math.round(f/20)})}return{instance:{__uniConfig:__uniConfig,__uniRoutes:__uniRoutes,global:void 0,window:void 0,document:void 0,frames:void 0,self:void 0,location:void 0,navigator:void 0,localStorage:void 0,history:void 0,Caches:void 0,screen:void 0,alert:void 0,confirm:void 0,prompt:void 0,fetch:void 0,XMLHttpRequest:void 0,WebSocket:void 0,webkit:void 0,print:void 0}}}});