app-service.js 4.0 KB

1
  1. 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])}var n;__definePage("pages/index/index",((e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n})({data:()=>({title:"wdly",url:"http://139.9.102.170:10012/#/",src:"",canBack:!1}),onBackPress(){return!(!n||!this.canBack)&&(n.back(),!0)},onReady(){var e=this,t=this.$scope.$getAppWebview();setTimeout((function(){(n=t.children()[0]).addEventListener("progressChanged",(function(t){n.canBack((function(t){e.canBack=t.canBack}))}),!1)}),500)},onLoad(){var e=0;uni.getSystemInfo({success:n=>{t("log","at pages/index/index.vue:57",n),e=n.windowHeight},complete:()=>{}});let n=uni.getSystemInfoSync(),o=n.statusBarHeight;t("log","at pages/index/index.vue:64",n,12312312312);var i=this.$scope.$getAppWebview();let a=i.children()[0],r={text:getApp().globalData.text};a.evalJS(`getVueMessage(${JSON.stringify(r)})`),setTimeout((function(){i.children()[0].setStyle({top:o,height:e-o,scalable:!1})}),1e3)}},[["render",function(t,n,o,i,a,r){return e.openBlock(),e.createElementBlock("view",{class:"content"},[e.createElementVNode("view",{class:"status_bar"}),e.createElementVNode("web-view",{src:a.url,fullscreen:!1},null,8,["src"])])}]]));const o=(i="JG-JPush",weex.requireModule(i));var i;t("log","at App.vue:3",o.getRegistrationID,"jpushModule");const a={globalData:{text:"text"},onLaunch:function(){if(t("log","at App.vue:10","App Launch"),"ios"==uni.getSystemInfoSync().platform){let e=o.locationServicesEnabled(),n=o.getLocationAuthorizationStatus();t("log","at App.vue:15","locationAuthorizationStatus",n),1==e&&n<3&&o.requestLocationAuthorization((e=>{t("log","at App.vue:18","定位权限",e.status)})),o.requestNotificationAuthorization((e=>{e.status<2&&uni.showToast({icon:"none",title:"您还没有打开通知权限",duration:3e3})}))}o.getRegistrationID((e=>{t("log","at App.vue:34",e,"注册ID....."),getApp().globalData.text=e.registerID,uni.showToast({title:e.registerID,icon:"success",duration:3e4})})),o.initJPushService(),o.setLoggerEnable(!0),o.addConnectEventListener((e=>{t("log","at App.vue:47",e);let n=e.connectEnable;uni.$emit("connectStatusChange",n)})),o.addNotificationListener((e=>{t("log","at App.vue:54",e),"notificationOpened"==e.notificationEventType&&uni.navigateTo({url:"/pages/home/warningCenter/warningCenter",complete(e){t("log","at App.vue:60",e)}})})),o.addCustomMessageListener((e=>{e.type,e.messageType,e.content,uni.showToast({icon:"none",title:JSON.stringify(e),duration:3e3})})),o.addLocalNotificationListener((e=>{e.messageID,e.title,e.content,e.extras,uni.showToast({icon:"none",title:JSON.stringify(e),duration:3e3})})),o.addGeofenceListener((e=>{e.code,e.type,e.geofenceId,e.userInfo,uni.showToast({icon:"none",title:"触发地理围栏",duration:3e3})})),o.setIsAllowedInMessagePop(!0),o.pullInMessage((e=>{t("log","at App.vue:105",e.code)})),o.addInMessageListener((e=>{t("log","at App.vue:112","inMessageListener",e.eventType,e.messageType,e.content),uni.showToast({icon:"none",title:JSON.stringify(e),duration:3e3})}))},onShow:function(){t("log","at App.vue:122","App Show")},onHide:function(){t("log","at App.vue:125","App Hide")}};const{app:r,Vuex:s,Pinia:u}={app:e.createVueApp(a)};uni.Vuex=s,uni.Pinia=u,r.provide("__globalStyles",__uniConfig.styles),r._component.mpType="app",r._component.render=()=>{},r.mount("#app")}(Vue);