master-emergent
Phoenix 3 months ago
parent 520b80da65
commit 69d16c85e3

@ -2,8 +2,8 @@
;(function(){ ;(function(){
let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[]; let u=void 0,isReady=false,onReadyCallbacks=[],isServiceReady=false,onServiceReadyCallbacks=[];
const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"oa考勤系统","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}}; const __uniConfig = {"pages":[],"globalStyle":{"backgroundColor":"#F8F8F8","navigationBar":{"backgroundColor":"#F8F8F8","titleText":"uni-app","type":"default","titleColor":"#000000"},"isNVue":false},"nvue":{"compiler":"uni-app","styleCompiler":"uni-app","flex-direction":"column"},"renderer":"auto","appname":"oa考勤系统","splashscreen":{"alwaysShowBeforeRender":true,"autoclose":true},"compilerVersion":"4.15","entryPagePath":"pages/index/index","entryPageQuery":"","realEntryPagePath":"","networkTimeout":{"request":60000,"connectSocket":60000,"uploadFile":60000,"downloadFile":60000},"locales":{},"darkmode":false,"themeConfig":{}};
const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":true}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute)); const __uniRoutes = [{"path":"pages/index/index","meta":{"isQuit":true,"isEntry":true,"navigationBar":{"titleText":"uni-app","style":"custom","type":"default"},"isNVue":false}}].map(uniRoute=>(uniRoute.meta.route=uniRoute.path,__uniConfig.pages.push(uniRoute.path),uniRoute.path='/'+uniRoute.path,uniRoute));
__uniConfig.styles=[{}];//styles __uniConfig.styles=[];//styles
__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()})}}); __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()})}});
__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()})}}); __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()})}});
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}}}}); 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}}}});

@ -31,6 +31,24 @@ if (uni.restoreGlobal) {
} }
(function(vue) { (function(vue) {
"use strict"; "use strict";
const env = "dev";
const configs = {
dev: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://192.168.88.37:8080/#/"
},
test: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://172.16.100.93:8041/#/"
},
prod: {
apiBaseUrl: "https://oa-a.szjixun.cn/api",
h5Url: "https://oa-a.szjixun.cn/#/"
}
};
const config = configs[env];
const ON_SHOW = "onShow";
const ON_HIDE = "onHide";
function formatAppLog(type, filename, ...args) { function formatAppLog(type, filename, ...args) {
if (uni.__log__) { if (uni.__log__) {
uni.__log__(type, filename, ...args); uni.__log__(type, filename, ...args);
@ -38,6 +56,11 @@ if (uni.restoreGlobal) {
console[type].apply(console, [...args, filename]); console[type].apply(console, [...args, filename]);
} }
} }
const createHook = (lifecycle) => (hook, target = vue.getCurrentInstance()) => {
!vue.isInSSRComponentSetup && vue.injectHook(lifecycle, hook, target);
};
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
const onHide = /* @__PURE__ */ createHook(ON_HIDE);
const _export_sfc = (sfc, props) => { const _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc; const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) { for (const [key, val] of props) {
@ -45,6 +68,56 @@ if (uni.restoreGlobal) {
} }
return target; return target;
}; };
const _sfc_main$1 = {
__name: "index",
setup(__props) {
const networkStatusChange = (res) => {
if (res.isConnected) {
uni.redirectTo({
url: "/pages/index/index"
});
} else {
uni.showToast({
title: "网络无连接",
icon: "none"
});
}
};
const webViewObj = vue.ref(null);
onShow(() => {
uni.onNetworkStatusChange(networkStatusChange);
});
onHide(() => {
uni.offNetworkStatusChange(networkStatusChange);
});
const webLoad = (e2) => {
var _a, _b;
const h5SendString = (_b = (_a = e2.detail.data) == null ? void 0 : _a[0]) == null ? void 0 : _b.action;
switch (h5SendString) {
case "load-complete": {
const { statusBarHeight } = uni.getSystemInfoSync();
const currentWebview = getCurrentPages().pop().$getAppWebview();
webViewObj.value = currentWebview.children()[0];
webViewObj.value.setStyle({
top: statusBarHeight,
bottom: 0
});
}
}
};
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock("web-view", {
class: "webview",
onMessage: webLoad,
style: { "flex": "1" },
ref: "webViewRef",
src: vue.unref(config).h5Url
}, null, 40, ["src"]);
};
}
};
const PagesIndexIndex = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "D:/WebstormProjects/oa-base/pages/index/index.vue"]]);
__definePage("pages/index/index", PagesIndexIndex);
const _sfc_main = { const _sfc_main = {
onLaunch: function() { onLaunch: function() {
}, },

@ -38,10 +38,7 @@
"launchwebview": { "launchwebview": {
"render": "always", "render": "always",
"id": "1", "id": "1",
"kernel": "WKWebview", "kernel": "WKWebview"
"uniNView": {
"path": "pages/index/index.js"
}
}, },
"usingComponents": true, "usingComponents": true,
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler": "uni-app",
@ -172,5 +169,6 @@
"minUserAgentVersion": "49.0" "minUserAgentVersion": "49.0"
} }
} }
} },
"launch_path": "__uniappview.html"
} }
Loading…
Cancel
Save