outside-the-system
Phoenix 4 months ago
parent 81966f25fe
commit 2750c1d2ef

@ -1,4 +1,4 @@
const env = 'dev'; const env = 'prod';
const configs = { const configs = {
dev: { dev: {
apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend', apiBaseUrl: 'https://warehouse.szjixun.cn/oa_backend',

@ -1,5 +1,2 @@
Promise.resolve("./pages/index/index.js").then((res) => {
res.length;
});
Promise.resolve("./app.css.js").then(() => { Promise.resolve("./app.css.js").then(() => {
}); });

@ -1,128 +0,0 @@
import { isInSSRComponentSetup, injectHook, getCurrentInstance, ref, openBlock, createElementBlock, createElementVNode, unref } from "vue";
const ON_SHOW = "onShow";
const ON_HIDE = "onHide";
function formatAppLog(type, filename, ...args) {
if (uni.__log__) {
uni.__log__(type, filename, ...args);
} else {
console[type].apply(console, [...args, filename]);
}
}
const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
!isInSSRComponentSetup && injectHook(lifecycle, hook, target);
};
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
const onHide = /* @__PURE__ */ createHook(ON_HIDE);
const env = "dev";
const configs = {
dev: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://192.168.0.191:8080/#/"
},
test: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
h5Url: "http://114.218.158.24:9051/#/"
},
prod: {
apiBaseUrl: "https://oa- a.szjixun.cn/#/",
h5Url: "https://oa-a.szjixun.cn/#/"
}
};
const config = configs[env];
const sendWebWiew = (refValue, paramValue, callName = "onReceive") => {
if (!refValue) {
formatAppLog("error", "at utils/communicate/index.js:3", "evalJs: The reference to the webview is not provided or is null.");
return;
}
if (typeof refValue.evalJs !== "function") {
formatAppLog("error", "at utils/communicate/index.js:8", "evalJs: The evalJs method is not available on the provided reference.");
return;
}
try {
const jsonString = JSON.stringify(paramValue);
const jsCode = `window.${callName}(${jsonString})`;
refValue.evalJs(jsCode);
} catch (error) {
formatAppLog("error", "at utils/communicate/index.js:18", "evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.", error);
}
};
const receiveWebView = (e) => {
return e.detail.data[0];
};
uni;
const _sfc_main = {
__name: "index",
setup(__props) {
const webViewRef = ref(null);
uni.getSystemInfoSync();
const networkStatusChange = (res) => {
if (res.isConnected) {
uni.redirectTo({
url: "/pages/index/index"
});
} else {
uni.showToast({
title: "网络无连接",
icon: "none"
});
}
};
const handleBackButton = () => {
sendWebWiew(webViewRef.value, { turnBack: 1 });
};
onShow(() => {
plus.key.addEventListener("backbutton", handleBackButton, false);
uni.onNetworkStatusChange(networkStatusChange);
});
onHide(() => {
plus.key.removeEventListener("backbutton", handleBackButton, false);
uni.offNetworkStatusChange(networkStatusChange);
});
const webLoad = (e) => {
const m = receiveWebView(e);
switch (m.action) {
case "load-complete": {
const systemInfo = uni.getSystemInfoSync();
uni.getLocation({
type: "gcj02",
geocode: false,
isHighAccuracy: false,
success: async (res) => {
sendWebWiew(webViewRef.value, {
...res,
systemInfo,
webViewRef: webViewRef.value,
"latitude": 31.386561,
"longitude": 120.660274
});
},
fail: (e2) => {
formatAppLog("log", "at pages/index/index.nvue:89", e2);
}
});
}
}
};
return (_ctx, _cache) => {
return openBlock(), createElementBlock("scroll-view", {
scrollY: true,
showScrollbar: true,
enableBackToTop: true,
bubble: "true",
style: { flexDirection: "column" }
}, [
createElementVNode("u-web-view", {
class: "webview",
"on:onPostMessage": webLoad,
style: { "flex": "1" },
ref_key: "webViewRef",
ref: webViewRef,
src: unref(config).h5Url
}, null, 40, ["src"])
]);
};
}
};
export {
_sfc_main as default
};

@ -2,7 +2,7 @@
;(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":{"navigationBar":{},"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":{"navigationBar":{},"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,"titleNView":false,"navigationBar":{"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,"titleNView":false,"navigationBar":{"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()})}});

File diff suppressed because one or more lines are too long

@ -39,10 +39,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",
@ -200,5 +197,6 @@
"minUserAgentVersion": "49.0" "minUserAgentVersion": "49.0"
} }
} }
} },
"launch_path": "__uniappview.html"
} }

@ -1,32 +0,0 @@
"use weex:vue";
if (typeof Promise !== 'undefined' && !Promise.prototype.finally) {
Promise.prototype.finally = function(callback) {
const promise = this.constructor
return this.then(
value => promise.resolve(callback()).then(() => value),
reason => promise.resolve(callback()).then(() => {
throw reason
})
)
}
};
if (typeof uni !== 'undefined' && uni && uni.requireGlobal) {
const global = uni.requireGlobal()
ArrayBuffer = global.ArrayBuffer
Int8Array = global.Int8Array
Uint8Array = global.Uint8Array
Uint8ClampedArray = global.Uint8ClampedArray
Int16Array = global.Int16Array
Uint16Array = global.Uint16Array
Int32Array = global.Int32Array
Uint32Array = global.Uint32Array
Float32Array = global.Float32Array
Float64Array = global.Float64Array
BigInt64Array = global.BigInt64Array
BigUint64Array = global.BigUint64Array
};
(()=>{var j=Object.create;var f=Object.defineProperty,B=Object.defineProperties,C=Object.getOwnPropertyDescriptor,J=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertyNames,_=Object.getOwnPropertySymbols,H=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var h=(t,e,n)=>e in t?f(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v=(t,e)=>{for(var n in e||(e={}))g.call(e,n)&&h(t,n,e[n]);if(_)for(var n of _(e))N.call(e,n)&&h(t,n,e[n]);return t},m=(t,e)=>B(t,J(e));var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var U=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of I(e))!g.call(t,r)&&r!==n&&f(t,r,{get:()=>e[r],enumerable:!(s=C(e,r))||s.enumerable});return t};var A=(t,e,n)=>(n=t!=null?j(H(t)):{},U(e||!t||!t.__esModule?f(n,"default",{value:t,enumerable:!0}):n,t));var y=(t,e,n)=>new Promise((s,r)=>{var a=i=>{try{c(n.next(i))}catch(d){r(d)}},p=i=>{try{c(n.throw(i))}catch(d){r(d)}},c=i=>i.done?s(i.value):Promise.resolve(i.value).then(a,p);c((n=n.apply(t,e)).next())});var x=T((P,b)=>{b.exports=Vue});var o=A(x());var V="onShow",E="onHide";function l(t,e,...n){uni.__log__?uni.__log__(t,e,...n):console[t].apply(console,[...n,e])}var k=t=>(e,n=(0,o.getCurrentInstance)())=>{!o.isInSSRComponentSetup&&(0,o.injectHook)(t,e,n)},L=k(V),O=k(E),R="dev",W={dev:{apiBaseUrl:"https://warehouse.szjixun.cn/oa_backend",h5Url:"http://192.168.0.191:8080/#/"},test:{apiBaseUrl:"https://warehouse.szjixun.cn/oa_backend",h5Url:"http://114.218.158.24:9051/#/"},prod:{apiBaseUrl:"https://oa- a.szjixun.cn/#/",h5Url:"https://oa-a.szjixun.cn/#/"}},z=W[R],S=(t,e,n="onReceive")=>{if(!t){l("error","at utils/communicate/index.js:3","evalJs: The reference to the webview is not provided or is null.");return}if(typeof t.evalJs!="function"){l("error","at utils/communicate/index.js:8","evalJs: The evalJs method is not available on the provided reference.");return}try{let s=JSON.stringify(e),r=`window.${n}(${s})`;t.evalJs(r)}catch(s){l("error","at utils/communicate/index.js:18","evalJs: An error occurred while trying to stringify the parameter value or while invoking evalJs.",s)}},$=t=>t.detail.data[0];uni;var u={__name:"index",setup(t){let e=(0,o.ref)(null);uni.getSystemInfoSync();let n=a=>{a.isConnected?uni.redirectTo({url:"/pages/index/index"}):uni.showToast({title:"\u7F51\u7EDC\u65E0\u8FDE\u63A5",icon:"none"})},s=()=>{S(e.value,{turnBack:1})};L(()=>{plus.key.addEventListener("backbutton",s,!1),uni.onNetworkStatusChange(n)}),O(()=>{plus.key.removeEventListener("backbutton",s,!1),uni.offNetworkStatusChange(n)});let r=a=>{switch($(a).action){case"load-complete":{let c=uni.getSystemInfoSync();uni.getLocation({type:"gcj02",geocode:!1,isHighAccuracy:!1,success:i=>y(this,null,function*(){S(e.value,m(v({},i),{systemInfo:c,webViewRef:e.value,latitude:31.386561,longitude:120.660274}))}),fail:i=>{l("log","at pages/index/index.nvue:89",i)}})}}};return(a,p)=>((0,o.openBlock)(),(0,o.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,o.createElementVNode)("u-web-view",{class:"webview","on:onPostMessage":r,style:{flex:"1"},ref_key:"webViewRef",ref:e,src:(0,o.unref)(z).h5Url},null,40,["src"])]))}};var w=plus.webview.currentWebview();if(w){let t=parseInt(w.id),e="pages/index/index",n={};try{n=JSON.parse(w.__query__)}catch(r){}u.mpType="page";let s=Vue.createPageApp(u,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:n});s.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...u.styles||[]])),s.mount("#root")}})();

@ -49,7 +49,7 @@ if (uni.restoreGlobal) {
const onHide = /* @__PURE__ */ createHook(ON_HIDE); const onHide = /* @__PURE__ */ createHook(ON_HIDE);
const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH); const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
const onLoad = /* @__PURE__ */ createHook(ON_LOAD); const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
const env = "dev"; const env = "prod";
const configs = { const configs = {
dev: { dev: {
apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend", apiBaseUrl: "https://warehouse.szjixun.cn/oa_backend",
@ -521,7 +521,7 @@ if (uni.restoreGlobal) {
function I(e2) { function I(e2) {
return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2; return e2 && "string" == typeof e2 ? JSON.parse(e2) : e2;
} }
const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), P = b, T = I('{\n "address": [\n "127.0.0.1",\n "192.168.56.1",\n "192.168.0.191"\n ],\n "debugPort": 9001,\n "initialLaunchType": "local",\n "servePort": 7001,\n "skipFiles": [\n "<node_internals>/**",\n "C:/Users/37363/Downloads/HBuilderX.4.08.2024040127/HBuilderX/plugins/unicloud/**/*.js"\n ]\n}\n'), C = I('[{"provider":"aliyun","spaceName":"oabase","spaceId":"mp-edf38b0d-bc9a-4e81-9a15-f55995ccca70","clientSecret":"ty1X79FB2pMuAQUzaQBKXA==","endpoint":"https://api.next.bspapp.com"}]') || []; const S = true, b = "app", A = I(define_process_env_UNI_SECURE_NETWORK_CONFIG_default), P = b, T = I('{\n "address": [\n "127.0.0.1",\n "192.168.56.1",\n "172.20.10.6"\n ],\n "debugPort": 9000,\n "initialLaunchType": "local",\n "servePort": 7000,\n "skipFiles": [\n "<node_internals>/**",\n "C:/Users/37363/Downloads/HBuilderX.4.08.2024040127/HBuilderX/plugins/unicloud/**/*.js"\n ]\n}\n'), C = I('[{"provider":"aliyun","spaceName":"oabase","spaceId":"mp-edf38b0d-bc9a-4e81-9a15-f55995ccca70","clientSecret":"ty1X79FB2pMuAQUzaQBKXA==","endpoint":"https://api.next.bspapp.com"}]') || [];
let O = ""; let O = "";
try { try {
O = "__UNI__4796942"; O = "__UNI__4796942";

Loading…
Cancel
Save