@yunzhijia/qing
Version:
> qingjs是为了方便前端人员在云之家环境调用native代码的工具类,兼容新版桌面端、老版桌面端、移动端、微信
2 lines • 1.32 kB
JavaScript
/** Fri Sep 15 2023 13:31:58 GMT+0800 (中国标准时间) **/
(self.qingJsonpFunction=self.qingJsonpFunction||[]).push([[905,144],{8905:(e,t,s)=>{window.qing.define("desktop-le3",function(e,t){var n=s(5593);for(var c in n)e[c]=n[c]})},5593:(e,t,s)=>{"use strict";s.r(t),s.d(t,{call:()=>o,checkJsApi:()=>r});var n={},c=0,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=t.success;delete t.success,delete t.error;var o=++c;n[o]=function(e){"true"===e.success?e.success=!0:"false"===e.success&&(e.success=!1),s&&s(e,{code:200,data:e})};var i=document.createElement("IFRAME");i.setAttribute("src","xuntong:"+e+":"+o+":"+encodeURIComponent(JSON.stringify(t))),i.setAttribute("height","1px"),i.setAttribute("width","1px"),document.documentElement.appendChild(i),i.parentNode.removeChild(i),i=null},i={share:!0,chat:!0,personInfo:!0,getPersonInfo:!0,gotoLightApp:!0,selectPersons:!0,setWebViewTitle:!0,closeWebView:!0,close:!0,hideWebViewTitle:!0,defback:!0,showOptionMenu:!0,hideOptionMenu:!0,selectOrgs:!0,closePop:!0,createPop:!0},r=function(e){var t=e.jsApiList,s=e.success,n={};(t||[]).forEach(function(e){n[e]=!!i[e]}),s&&s({success:!0,data:n})};window.XuntongJSBridge.handleMessageFromXT=function(e,t){try{var s=n[e];if(!s)return;s.apply(null,[JSON.parse(t)])}catch(e){alert(e)}}}}]);