UNPKG

@yunzhijia/qing

Version:

> qingjs是为了方便前端人员在云之家环境调用native代码的工具类,兼容新版桌面端、老版桌面端、移动端、微信

2 lines 5.63 kB
/** Fri Sep 15 2023 13:31:58 GMT+0800 (中国标准时间) **/ (()=>{"use strict";var e={2037:(e,t,o)=>{function i(){if(i.apis)return i.apis;var e={both:{"0.9.0":"hideWebViewTitle,setWebViewTitle,gotoApp,getPersonInfo,getNetworkType,share,switchCompany,personInfo,chat,selectPerson,fetchAvatar,joinBandCallback,socialShare,localFunction,selectFile,showFile,selectOrg,selectPic,scanQRCode,selectPersons","0.9.3":"gotoMyFile","0.9.4":"getPersonDepartment,getAdminOpenId","0.9.5":"setWebViewTitleBar,closeWebView","0.9.6":"createPop,closePop,getLocation,selectLocation","0.9.11":"defback,setDepartmentHeader","0.9.12":"clipBoard,freeCall,validate,orgManage","0.9.13":"enterpriseAuth","0.9.14":"selectOrgs","0.9.16":"previewImage","0.9.17":"iAppRevision,selectCloudhubContact,selectMobileContact","0.9.18":"gotoLightApp","0.9.19":"recordScreenshotsInfo,companyRename","0.9.20":"selectPhoto,gotoOpenAppRangeView","0.9.21":"extPersonInfo,selectPersonsInGroup,startLightApp,rotateUI","0.9.22":"startSignFeedback","0.9.23":"startRecord,stopRecord,playVoice,pauseVoice,stopVoice,uploadVoice,downloadVoice","0.9.24":"scanBizCard","0.9.25":"groupAppSort,screenShare,getMobileContact","0.9.26":"shareFile","0.9.27":"selectGroups","0.9.28":"defTitleBar","0.9.29":"selectConcernPersons","0.9.30":"mergeMsgRecord","0.9.50":"invoice,voiceRecognize,projection,getProjectionState,savePic,addCalendarEvent,runtime.auth,runtime.jsReady,ui.toast","0.9.51":"chooseImage,uploadImage,downloadImage,cloudoffice.request,cloudoffice.clearCardNotify,cloudoffice.showCardNotify,cloudoffice.getRoleType,cloudoffice.textShareClosed,cloudoffice.checkAppAuth,cloudoffice.downloadPic","0.9.52":"dateTimePicker","0.9.55":"getWiFi,selectAnyLocation,bluetooth.openBluetoothAdapter,bluetooth.closeBluetoothAdapter,bluetooth.getBluetoothAdapterState,bluetooth.onBluetoothAdapterStateChange,bluetooth.startBluetoothDevicesDiscovery,bluetooth.stopBluetoothDevicesDiscovery,bluetooth.getBluetoothDevices,bluetooth.onBluetoothDeviceFound,bluetooth.getConnectedBluetoothDevices,bluetooth.createBLEConnection,bluetooth.closeBLEConnection,bluetooth.getBLEDeviceServices,bluetooth.getBLEDeviceCharacteristics,bluetooth.readBLECharacteristicValue,bluetooth.writeBLECharacteristicValue,bluetooth.notifyBLECharacteristicValueChange,bluetooth.onBLEConnectionStateChange,bluetooth.onBLECharacteristicValueChange,bluetooth.getBondDevice","0.9.56":"commonRoute","0.9.60":"video.startRecord,video.upload,video.download,video.play","0.9.62":"voidceChanger,bluetooth.BLEPrint","0.9.63":"voiceSynthesize,selectBusinessUnits,keepScreenOn,cloudoffice.dataReport,cloudoffice.checkWorkbenchUpdate","0.9.65":"selectRoles","0.9.66":"ui.navigate","0.9.67":"voiceAssistant","0.9.70":"defHomeMainTitleBar,reloadWebView","0.9.71":"ui.changeNavStyle,ui.webViewPaddingTop","0.9.72":"getCalenderEvent,showTopMenu","0.9.73":"startLocation,stopLocation","0.9.74":"startSpeechRecognize,stopSpeechRecognize","0.9.75":"shareMiniprogram,video.select","0.9.76":"selectPersonsInRole,setCallBackData,storage.getItem,storage.setItem,storage.removeItem,storage.clear,openDialog","0.9.77":"createLive,createVoiceMeeting","0.9.79":"queryCalenderAccounts,assist,setShortcuts","0.9.80":"todoList"},ios:{"0.9.27":"setBounce","0.9.51":"getLocalImgData","0.9.61":"showARView","0.9.63":"setWebBottomInset","0.9.79":"setShortcuts"},android:{"0.9.30":"selectLocalFile","0.9.60":"getPhoneOSInfo"}};return i.apis={},Object.keys(e).forEach(function(t){var o=e[t];Object.keys(o).forEach(function(e){!function(e,t,o){t.split(",").forEach(function(t){var c=i.apis[t]={version:e};"both"!==o&&"ios"!==o||(c.ios=1),"both"!==o&&"android"!==o||(c.android=1)})}(e,o[e],t)})}),i.apis}o.d(t,{Z:()=>i})}},t={};function o(i){var c=t[i];if(void 0!==c)return c.exports;var n=t[i]={exports:{}};return e[i](n,n.exports,o),n.exports}(()=>{o.d=((e,t)=>{for(var i in t)o.o(t,i)&&!o.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})})})(),(()=>{o.o=((e,t)=>Object.prototype.hasOwnProperty.call(e,t))})(),(()=>{var e=o(2037);window.qing.define("mobile-early",function(t,o){var i=this,c={index:1,map:{},register:function(e){this.index+=2;var t=""+this.index;return"function"==typeof e&&(this.map[t]=function(e){this.cb.call(null,e)}.bind({map:this.map,id:t,cb:e})),t},invoke:function(e,t){var o=this.map[e+""];"function"==typeof o&&o(t)}},n={invoke:function(e,t,o){var i;i="xuntong:"+e+":"+c.register(o)+":"+(t=void 0===t?"":encodeURIComponent(JSON.stringify(t)));var a=window.XTBridgeIframes=window.XTBridgeIframes||function(){var e,t,o=[];for(t=0;t<9;t++)(e=document.createElement("IFRAME")).setAttribute("height","1px"),e.setAttribute("width","1px"),e.style.display="none",document.documentElement.appendChild(e),o.push(e);return o}();n.callbackIndex=n.callbackIndex||0;var s=n.callbackIndex;n.callbackIndex+=1;var r=a[s%9];r.setAttribute("src",i),setTimeout(function(){r.removeAttribute("src")},10)},callback:function(e,t){if("string"==typeof t&&t.match(/^\s*\{/))try{(t=JSON.parse(t))&&"string"==typeof t.success&&(t.success="true"===t.success)}catch(e){console.error(e)}c.invoke(e,t)}};window.XuntongJSBridge=Object.assign({invoke:n.invoke,call:n.invoke,handleMessageFromXT:n.callback},window.XuntongJSBridge),t.call=function(e,t){var o=(t=t||{}).success;delete t.success,delete t.error,n.invoke(e,t,function(){"function"==typeof o&&o.apply(null,arguments)})},t.checkJsApi=function(t){var o=t.jsApiList,c={},n=(0,e.Z)();(o||[]).forEach(function(e){var t=n[e],o=i.isAndroid?"android":i.isIos?"ios":"other";t&&t[o]&&i.checkVersion(t.version)?c[e]=!0:c[e]=!1}),"function"==typeof t.success&&t.success({success:!0,data:c})}})})()})();