2024-08-28 06:07:51 +00:00
|
|
|
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";var t,n,i,o,s,r,a,c,u,l;const d={apiBaseUrl:"https://oa-a.szjixun.cn/api",h5Url:"https://oa-a.szjixun.cn/#/"};function h(e,t,...n){uni.__log__?uni.__log__(e,t,...n):console[e].apply(console,[...n,t])}function p(e,t){return"string"==typeof e?t:e}const f=(t=>(n,i=e.getCurrentInstance())=>{!e.isInSSRComponentSetup&&e.injectHook(t,n,i)})("onExit");class g{constructor(){this.webViewObj=null,this.messageHandlers={}}setWebView(e){this.webViewObj=e}sendToH5(e,t={}){if(!this.webViewObj)return void h("error","at utils/communication.js:13","webViewObj is not initialized");const n=JSON.stringify({action:e,data:t});this.webViewObj.evalJS(`window.handleMessage(${JSON.stringify(n)})`)}registerHandler(e,t){this.messageHandlers[e]=t}handleMessage(e){const{action:t,data:n={}}=e;this.messageHandlers[t]?this.messageHandlers[t](n):h("warn","at utils/communication.js:30","Unknown action:",t)}}const{registerUTSInterface:m,initUTSProxyClass:y,initUTSProxyFunction:A,initUTSPackageName:v,initUTSIndexClassName:w,initUTSClassName:S}=uni,b="uniRegisterRequestPermissionTips",k="uni-registerRequestPermissionTips",E=v(b,true),I=w(b,true),P=A(!1,{moduleName:k,moduleType:"",errMsg:"",main:!0,package:E,class:I,name:"unregisterRequestPermissionTipsListenerByJs",params:[{name:"listener",type:"UTSSDKModulesUniRegisterRequestPermissionTipsRequestPermissionTipsListenerJSONObject",default:"UTSNull"}],return:""}),T=A(!1,{moduleName:k,moduleType:"",errMsg:"",main:!0,package:E,class:I,name:"registerRequestPermissionTipsListenerByJs",params:[{name:"listener",type:"UTSSDKModulesUniRegisterRequestPermissionTipsRequestPermissionTipsListenerJSONObject",default:"UTSNull"}],return:""}),x=A(!1,{moduleName:k,moduleType:"",errMsg:"",main:!0,package:E,class:I,name:"setRequestPermissionTipsByJs",params:[{name:"tips",type:"UTSJSONObject"}],return:""}),B={__name:"index",setup(t){const n=new g,i={"android.permission.CAMERA":'<h4 style="font-size:40px;">正在读取通讯录权限</h4><font color=#cccccc>通讯录权限不会获取任何信息,请注意</font>',"android.permission.READ_PHONE_STATE":'<h4 style="font-size:40px;">正在读取网络状态权限</h4><font color=#cccccc>通讯录权限不会获取任何信息,请注意通讯录权限不会获取任何信息,请注意通讯录权限不会获取任何信息,请注意</font>'};f((()=>{P()}));const o=uni.getSystemInfoSync().deviceBrand;x(i),T({onRequest:e=>{},onConfirm:e=>{n.sendToH5("permission-application",{action:"open-permission",data:e})},onComplete:e=>{if(n.sendToH5("permission-application",{action:"close-permission",data:e}),"huawei"===o.toLowerCase()){const t={};let n=!1;for(let o in i)"denied"!==e[o]?t[o]=i[o]:n=!0;x(t),n&&uni.showModal({content:"权限已经被拒绝,请前往设置中开启"})}}}),n.registerHandler("load-complete",(()=>{!function(){const e=getCurrentPages().pop().$getAppWebview();n.setWebView(e.children()[0])}();const{statusBarHeight:e}=uni.getSystemInfoSync();n.webViewObj.setStyle({top:e,bottom:0})}));const s=e=>{var t;const i=(null==(t=e.detail.data)?void 0:t[0])||"";n.handleMessage(i)};return(t,n)=>(e.openBlock(),e.createElementBlock("web-view",{class:"webview",onMessage:s,style:{flex:"1"},src:e.unref(d).h5Url},null,40,["src"]))}},C={};function U(e){return/^[\+-]?(\d+\.?\d*|\.\d+|\d\.\d+e\+\d+)$/.test(e)}function O(e){switch(typeof e){case"undef
|