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/dist/build/app-plus/pages/index/index.js

33 lines
3.9 KiB
JavaScript

"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 S=Object.create;var d=Object.defineProperty,J=Object.defineProperties,I=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,A=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable;var y=(t,e,o)=>e in t?d(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,m=(t,e)=>{for(var o in e||(e={}))g.call(e,o)&&y(t,o,e[o]);if(w)for(var o of w(e))$.call(e,o)&&y(t,o,e[o]);return t},v=(t,e)=>J(t,j(e));var T=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var V=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of k(e))!g.call(t,n)&&n!==o&&d(t,n,{get:()=>e[n],enumerable:!(s=I(e,n))||s.enumerable});return t};var W=(t,e,o)=>(o=t!=null?S(A(t)):{},V(e||!t||!t.__esModule?d(o,"default",{value:t,enumerable:!0}):o,t));var h=(t,e,o)=>new Promise((s,n)=>{var u=c=>{try{i(o.next(c))}catch(_){n(_)}},p=c=>{try{i(o.throw(c))}catch(_){n(_)}},i=c=>c.done?s(c.value):Promise.resolve(c.value).then(u,p);i((o=o.apply(t,e)).next())});var x=T((R,b)=>{b.exports=Vue});var r=W(x());function l(t,e,...o){uni.__log__?uni.__log__(t,e,...o):console[t].apply(console,[...o,e])}var B=(t,e,o="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),n=`window.${o}(${s})`;t.evalJs(n)}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)}},C=t=>t.detail.data[0],L={content:{"":{display:"flex",flex:1}}},N=(t,e)=>{let o=t.__vccOpts||t;for(let[s,n]of e)o[s]=n;return o},O={__name:"index",setup(t){let e=(0,r.ref)(null),o=uni.getSystemInfoSync(),s=n=>{switch(C(n).action){case"load-complete":{let p=uni.getSystemInfoSync();uni.getLocation({type:"gcj02",geocode:!1,isHighAccuracy:!1,success:i=>h(this,null,function*(){B(e.value,v(m({},i),{systemInfo:p}))}),fail:i=>{l("log","at pages/index/index.nvue:27",i)}})}}};return(n,u)=>((0,r.openBlock)(),(0,r.createElementBlock)("scroll-view",{scrollY:!0,showScrollbar:!0,enableBackToTop:!0,bubble:"true",style:{flexDirection:"column"}},[(0,r.createElementVNode)("div",{class:"content"},[(0,r.createElementVNode)("u-web-view",{class:"webview","on:onPostMessage":s,style:(0,r.normalizeStyle)({height:`${(0,r.unref)(o).windowHeight}px`,width:`${(0,r.unref)(o).windowWidth}`}),ref_key:"webViewRef",ref:e,src:"http://192.168.88.35:8080/#/"},null,36)])]))}},a=N(O,[["styles",[L]]]);var f=plus.webview.currentWebview();if(f){let t=parseInt(f.id),e="pages/index/index",o={};try{o=JSON.parse(f.__query__)}catch(n){}a.mpType="page";let s=Vue.createPageApp(a,{$store:getApp({allowDefault:!0}).$store,__pageId:t,__pagePath:e,__pageQuery:o});s.provide("__globalStyles",Vue.useCssStyles([...__uniConfig.styles,...a.styles||[]])),s.mount("#root")}})();