1 |
- !function(n){var e={};function o(t){if(e[t])return e[t].exports;var i=e[t]={i:t,l:!1,exports:{}};return n[t].call(i.exports,i,i.exports,o),i.l=!0,i.exports}o.m=n,o.c=e,o.d=function(n,e,t){o.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:t})},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.t=function(n,e){if(1&e&&(n=o(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(o.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)o.d(t,i,function(e){return n[e]}.bind(null,i));return t},o.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(e,"a",e),e},o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},o.p="",o(o.s=0)}([function(n,e){!function(n){const e=(n,e,o)=>{!function(n){window.bridge?n&&n():document.addEventListener("LSJSBridgeReady",n,!1)}((()=>{bridge.call(n,e,(n=>{o&&o(n)}))}))},o={},t={_func:{}},i={config:function(n){o.appId=n.appId,o.debug=!!n.hasOwnProperty("debug")&&n.debug,e("ls_check_initCode",{thirdAppId:n.appId,code:n.initCode},(function(n){200===(n=JSON.parse(n)).code?t._func.ready():t._func.error("初始化SDK失败")}))},ready:function(n){t._func.ready=n},error:function(n){t._func.error=n},userAuth:function(n,o){var t=this;e("ls_userAuth",{thirdAppId:n.appId},(function(n){t.debugLogger(n),o(JSON.parse(n))}))},qrCode:function(n){var o=this;e("ls_scan",{},(function(e){o.debugLogger(e),n(JSON.parse(e))}))},share:function(n,o){var t=this;e("ls_open_share",n,(function(n){t.debugLogger(n),o(JSON.parse(n))}))},checkIdentity:function(n,o){var t=this;e("ls_check_identity",n,(function(n){t.debugLogger(n);try{o(JSON.parse(n))}catch(e){o(n)}}))},location:function(n,o){var t=this;e("ls_location",n,(function(n){t.debugLogger(n),o(JSON.parse(n))}))},callNo:function(n){e("ls_call",n)},close:function(){e("ls_close_current_page",{})},goback:function(){e("ls_back",{})},getVersion:function(n){e("ls_get_version",{},(function(e){n(JSON.parse(e))}))},lsPay:function(n,o){var t=this;let i=!1;e("ls_get_version",{},(function(r){i=!0,e("ls_pay",n,(function(n){t.debugLogger(n),o(JSON.parse(n))}))})),setTimeout((function(){i||o({code:9999,msg:"请下载最新版本灵锡APP"})}),1e3)},lsMapNavi:function(n,o){e("ls_map_navi",n,(function(n){o(JSON.parse(n))}))},lsStartVoiceRecognizer:function(n){e("ls_start_voice_recognizer",{},(function(e){n(JSON.parse(e))}))},lsStopVoiceRecognizer:function(n){e("ls_stop_voice_recognizer",{},(function(e){n(JSON.parse(e))}))},lsSavePhoto:function(n,o){e("ls_save_photo",n,(function(n){o(JSON.parse(n))}))},previewFile:function(n,o){e("ls_preview_file",n,(function(n){o(JSON.parse(n))}))},openWxMini:function(n,o){e("ls_open_wx_mini_pro",n,(function(n){o(JSON.parse(n))}))},openSystemBroswer:function(n,o){e("ls_system_web",n,(function(n){o(JSON.parse(n))}))},lsGetVersion:function(n){var o=this;let t=!1;e("ls_get_version",{},(function(e){t=!0,o.debugLogger(e),n(JSON.parse(e))})),setTimeout((function(){t||n({code:9999,msg:"请下载最新版本灵锡APP"})}),1e3)},lsUploadPhotoCheck:n=>{e("ls_upload_photo_check",{},(function(e){n(e)}))},openScheme:function(n){e("ls_open_scheme",n)},clipboard:function(n){var o=this;e("ls_get_copy",{},(function(e){o.debugLogger(e),n(JSON.parse(e))}))},gohome:function(){e("ls_home",{},(function(n){}))},navigationStatus:function(n){n.navigationBarBackgroundColor&&(n.navigationBarBackgroundColor=n.navigationBarBackgroundColor.replace("#","#ff")),n.navigationBarTitleColor&&(n.navigationBarTitleColor=n.navigationBarTitleColor.replace("#","#ff")),(n.navigationBarBackgroundColor||n.navigationBarTitleText||n.navigationBarTitleColor||n.navigationBarBackText)&&(n.navigationShow=!0),e("ls_navigation_status",n)},lsRouter:function(n,o){var t=this;let i=!1;navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)?window.location.href=n.url:e("ls_router",n,(function(n){i=!0,t.debugLogger(n),o(JSON.parse(n))})),setTimeout((function(){i||o({code:9999,msg:"请下载最新版本灵锡APP"})}),2e3)},lxPrint:function(n,o){e("lx_print",n,(function(n){o(JSON.parse(n))}))},lxPrinterConnect:function(n){e("lx_printer_connect",{},(function(e){n(JSON.parse(e))}))},idCardOcr:function(n,o){e("ls_id_card_ocr",n,(function(n){o(JSON.parse(n))}))},lxCheckScheme:function(n,o){e("ls_check_scheme",n,(function(n){o(JSON.parse(n))}))},debugLogger:function(n){o.debug&&alert(n)},bankAbcPay:function(n,o){e("ls_bankabc_pay",n,(function(n){o(JSON.parse(n))}))},injectYySdk:function(n,o){e("ls_yy_inject",n,(function(n){o(JSON.parse(n))}))}};n.ls=i}(window)}]);
|