You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
oa-base/unpackage/cache/wgt/__UNI__4796942/app-service.js

2 lines
85 KiB
JavaScript

3 months ago
if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const t=this.constructor;return this.then((n=>t.resolve(e()).then((()=>n))),(n=>t.resolve(e()).then((()=>{throw n}))))}),"undefined"!=typeof uni&&uni&&uni.requireGlobal){const e=uni.requireGlobal();ArrayBuffer=e.ArrayBuffer,Int8Array=e.Int8Array,Uint8Array=e.Uint8Array,Uint8ClampedArray=e.Uint8ClampedArray,Int16Array=e.Int16Array,Uint16Array=e.Uint16Array,Int32Array=e.Int32Array,Uint32Array=e.Uint32Array,Float32Array=e.Float32Array,Float64Array=e.Float64Array,BigInt64Array=e.BigInt64Array,BigUint64Array=e.BigUint64Array}uni.restoreGlobal&&uni.restoreGlobal(Vue,weex,plus,setTimeout,clearTimeout,setInterval,clearInterval),function(e){"use strict";function t(e,t,...n){uni.__log__?uni.__log__(e,t,...n):console[e].apply(console,[...n,t])}const n=t=>(n,s=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,n,s)},s=n("onShow"),r=n("onHide"),o=n("onLaunch"),i=n("onLoad"),a={apiBaseUrl:"https://oa-a.szjixun.cn/#/",h5Url:"https://oa-a.szjixun.cn/#/"};uni;const c={__name:"index",setup(n){const o=e.ref(null);uni.getSystemInfoSync();const c=e=>{e.isConnected?uni.redirectTo({url:"/pages/index/index"}):uni.showToast({title:"网络无连接",icon:"none"})},u=e.ref(null);i((()=>{})),s((()=>{uni.onNetworkStatusChange(c)})),r((()=>{uni.offNetworkStatusChange(c)}));const l=e=>{const n=(e=>e.detail.data[0])(e);if("load-complete"===n.action){const e=getCurrentPages().at(-1).$getAppWebview();u.value=e.children()[0];let n=uni.getSystemInfoSync().statusBarHeight;u.value.setStyle({top:n,bottom:0});const s=uni.getSystemInfoSync();uni.getLocation({type:"gcj02",geocode:!1,isHighAccuracy:!1,success:async e=>{const t=JSON.stringify({...e,systemInfo:s,latitude:31.386561,longitude:120.660274});u.value.evalJS(`window.onReceive(${t})`)},fail:e=>{t("log","at pages/index/index.vue:112",e)}})}};return(t,n)=>(e.openBlock(),e.createElementBlock("web-view",{class:"webview",onMessage:l,style:{flex:"1"},ref_key:"webViewRef",ref:o,src:e.unref(a).h5Url},null,40,["src"]))}};__definePage("pages/index/index",c),uni.invokePushCallback({type:"enabled",offline:!0}),Promise.resolve().then((()=>{"undefined"!=typeof plus&&plus.push&&plus.globalEvent.addEventListener("newPath",(({path:e})=>{if(!e)return;const t=getCurrentPages(),n=t[t.length-1];n&&n.$page&&n.$page.fullPath===e||uni.navigateTo({url:e,fail(t){t.errMsg.indexOf("tabbar")>-1?uni.switchTab({url:e,fail(e){console.error(e.errMsg)}}):console.error(t.errMsg)}})})),plus.push.setAutoNotification&&plus.push.setAutoNotification(!1)}));const u={__name:"App",setup:e=>(o((()=>{})),s((()=>{})),r((()=>{plus.geolocation.clearWatch(LocationId),t("log","at App.vue:23","App Hide")})),uni.getPushClientId({success:e=>{t("log","at App.vue:28","客户端推送标识cid:",e.cid)},fail(e){t("log","at App.vue:31",e)}}),uni.onPushMessage((e=>{t("log","at App.vue:35",JSON.stringify(e))})),()=>{})},l={pages:[{path:"pages/index/index",style:{navigationStyle:"custom","app-plus":{titleNView:!1}}}],uniIdRouter:{}};function h(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var d=h((function(e,t){var n;e.exports=(n=n||function(e,t){var n=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),s={},r=s.lib={},o=r.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},i=r.WordArray=o.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringif