app-service.js 3.0 KB

1
  1. if("undefined"==typeof Promise||Promise.prototype.finally||(Promise.prototype.finally=function(e){const n=this.constructor;return this.then((t=>n.resolve(e()).then((()=>t))),(t=>n.resolve(e()).then((()=>{throw t}))))}),"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 n(e,n,...t){uni.__log__?uni.__log__(e,n,...t):console[e].apply(console,[...t,n])}var t;__definePage("pages/index/index",((e,n)=>{const t=e.__vccOpts||e;for(const[a,r]of n)t[a]=r;return t})({data:()=>({title:"jxst",url:"http://139.9.102.170:10023/#/",src:"",canBack:!1}),onBackPress(){return!(!t||!this.canBack)&&(t.back(),!0)},onReady(){var e=this,n=this.$scope.$getAppWebview();setTimeout((function(){(t=n.children()[0]).addEventListener("progressChanged",(function(n){t.canBack((function(n){e.canBack=n.canBack}))}),!1)}),500)},onLoad(){var e=0;uni.getSystemInfo({success:t=>{n("log","at pages/index/index.vue:55",t),e=t.windowHeight},complete:()=>{}});let t=uni.getSystemInfoSync(),a=t.statusBarHeight;n("log","at pages/index/index.vue:62",t,12312312312);var r=this.$scope.$getAppWebview();setTimeout((function(){r.children()[0].setStyle({top:a,height:e-a,scalable:!1})}),1e3),uni.$on("connectStatusChange",(e=>{if(e){var t=this.$scope.$getAppWebview().children()[0];jpushModule.getRegistrationID((e=>{n("log","at pages/index/index.vue:86",e,"注册ID....."),t.evalJS(`getVueMessage(${JSON.stringify(e.registerID)})`)}))}}))},onUnload(){uni.$off("connectStatusChange")},methods:{messageData(e){const n=e.detail.data;var t=this.$scope.$getAppWebview().children()[0];if("file"==n[0].type){let e=n[0].url;uni.downloadFile({url:e,success:function(e){200===e.statusCode&&uni.openDocument({filePath:e.tempFilePath,success:function(e){},fail:function(e){}})},fail:function(e){}})}else"scanCode"==n[0].type&&uni.scanCode({success:e=>{t.evalJS(`getVueMessage(${JSON.stringify(e.result)})`)}})}}},[["render",function(n,t,a,r,i,o){return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"status_bar"}),e.createElementVNode("web-view",{src:i.url,fullscreen:!1,onMessage:t[0]||(t[0]=(...e)=>o.messageData&&o.messageData(...e))},null,40,["src"])])}]]));const a={onLaunch:function(){n("log","at App.vue:4","onLaunch")},onShow:function(){n("log","at App.vue:7","App Show")},onHide:function(){n("log","at App.vue:10","App Hide")}};const{app:r,Vuex:i,Pinia:o}={app:e.createVueApp(a)};uni.Vuex=i,uni.Pinia=o,r.provide("__globalStyles",__uniConfig.styles),r._component.mpType="app",r._component.render=()=>{},r.mount("#app")}(Vue);