ym-jsbridge 22.10.24 → 22.11.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
2
|
-
var jsBridge=function(){var n=!1,e={isReady:function(){return!!window.WebViewJavascriptBridge},ready:function(n){p(n)},audioPlayer:{play:function(n,e){s("10.play","object"==typeof n?n:{},"function"==typeof n?n:e)},pause:function(n){s("10.pause",{},n)},resume:function(n){s("10.resume",{},n)},stop:function(n){s("10.stop",{},n)},add:function(n,e){s("10.add",n,e)},list:function(n){s("10.list",{},n)},remove:function(n,e){s("10.remove",n,e)},clear:function(n){s("10.clear",{},n)},setListener:function(n){i("10.setListener",{},function(e,t){if(n&&t){var i=JSON.parse(t);n(i.event,i.data)}})},removeListener:function(n){i("10.removeListener")}},audioRecorder:{startRecord:function(n,e){s("9.startRecord",n,e)},stopRecord:function(n){s("9.stopRecord",{},n)},play:function(n){s("9.play",{},n)},pause:function(n){s("9.pause",{},n)},resume:function(n){s("9.resume",{},n)},stop:function(n){s("9.stop",{},n)},duration:function(n){s("9.duration",{},n)},read:function(n){o("9.read",{},n)},remove:function(n){s("9.remove",{},n)},upload:function(n,e){s("9.upload",n,e)},setListener:function(n){i("9.setListener",{},function(e,t){if(n&&t){var i=JSON.parse(t);n(i.event,i.data)}})},removeListener:function(n){i("9.removeListener")}},umanalytics:{getDeviceInfo:function(n){u("8.getDeviceInfo",{},n)},onEvent:function(n,e){s("8.onEvent",n,e)}},txVideo:{play:function(n){i("7.play","string"==typeof n?{url:n}:n)},playList:function(n){i("7.playList",n)},addPlayer:function(n,e){n.e="function"==typeof n.onEvent,i("7.addPlayer",n,function(t,i){if(/^\d+$/.test(i))e&&e(parseInt(i));else if(n.e){var o=JSON.parse(i);n.onEvent(o.p,o.e,o.d?o.d:null)}})},removePlayer:function(n){i("7.removePlayer",{p:n})}},network:{wifiInfo:function(n){s("6.wifiInfo",{},n)},active:function(n){s("6.active",{},n)},setConnectionListener:function(n){u("6.scl",{},n)}},ble:{getState:function(n){a("5.getState",{},n)},requestPermission:function(n){r("5.requestPermission",{},n)},requestEnable:function(n){r("5.requestEnable",{},n)},getBondedDevices:function(n){u("5.getBondedDevices",{},n)},getName:function(n){o("5.getName",{},n)},getPeripheral:function(n){u("5.getPeripheral",{},n)},isScanning:function(n){r("5.isScanning",{},n)},isConnected:function(n,e){r("5.isConnected",n,e)},scan:function(n){s("5.scan",{},n)},stopScan:function(n){r("5.stopScan",{},n)},connect:function(n,e){i("5.connect",n,e)},disconnect:function(n,e){i("5.disconnect",n,e)},discoverServices:function(n,e){s("5.discoverServices",n,e)},discoverCharacteristics:function(n,e){s("5.discoverCharacteristics",n,e)},discoverDescriptors:function(n,e){s("5.discoverDescriptors",n,e)},setNotify:function(n,e){s("5.setNotify",n,e)},read:function(n,e){s("5.read",n,e)},write:function(n,e){s("5.write",n,e)}},fs:{exist:function(n,e){i("3.exist",{s:n},e)},mkdir:function(n,e){i("3.mkdir",{s:n},e)},list:function(n,e){s("3.list",{s:n},e)},size:function(n,e){i("3.size",{s:n},function(n,t){"function"==typeof e&&e(n,n?parseInt(t):t)})},delete:function(n,e){i("3.delete",{s:n},e)},copy:function(n,e,t){i("3.copy",{s:n,d:e},t)},writeText:function(n,e,t){i("3.writeText",{s:n,a:e},t)},appendText:function(n,e,t){i("3.appendText",{s:n,a:e},t)},readText:function(n,e){i("3.readText",{s:n},e)},writeBinary:function(n,e,t){i("3.writeBinary",{s:n,a:e},t)},appendBinary:function(n,e,t){i("3.appendBinary",{s:n,a:e},t)},readBinary:function(n,e){i("3.readBinary",{s:n},e)},toUri:function(n,e){i("3.toUri",{s:n},e)},toAbsolute:function(n,e){i("3.toAbsolute",{s:n},e)},share:function(n,e){i("3.share",{s:n},e)},open:function(n,e){i("3.open",{s:n},e)},unzip:function(n,e,t){i("3.unzip",{s:n,d:e},t)},md5:function(n,e){i("3.md5",{s:n},e)},sha1:function(n,e){i("3.sha1",{s:n},e)},sha256:function(n,e){i("3.sha256",{s:n},e)},download:function(n,e){o("3.download",n,function(t){var i=JSON.parse(t);0==i.a?"function"==typeof n.progress&&n.progress(i.t,i.d):"function"==typeof e&&e(1==i.a,i.m)})}},db:{tables:function(n){s("4.tables",{},n)},execSQL:function(n,e,t){s("4.execSQL",{s:n,a:e},t)},query:function(n,e,t){s("4.query",{s:n,a:e},t)}},rc:{init:function(n,e){r("s.init",n,e)},setUserInfoListener:function(n){o("s.setUserInfoListener",{},n)},setUserInfo:function(n){i("s.setUserInfo",n,null)},connect:function(n,e){i("s.connect",n,e)},disconnect:function(n){r("s.disconnect",{},n)},logout:function(n){r("s.logout",{},n)}},rcIM:{startConversationList:function(n,e){r("q.startConversationList",n,e)},startConversation:function(n,e){r("q.startConversation",n,e)},startSubConversationList:function(n,e){r("q.startSubConversationList",n,e)},unreadMessageCount:function(n){a("q.unreadMessageCount",{},n)}},rcCall:{startSingleCall:function(n,e){r("r.startSingleCall",n,e)},startMultiCall:function(n,e){r("r.startMultiCall",n,e)}},video:{play:function(n){i("x.play","string"==typeof n?{url:n}:n)},addPlayer:function(n,e){n.e="function"==typeof n.onEvent,i("x.addPlayer",n,function(t,i){if(/^\d+$/.test(i))e&&e(parseInt(i));else if(n.e){var o=JSON.parse(i);n.onEvent(o.p,o.e,o.d?o.d:null)}})},removePlayer:function(n){i("x.removePlayer",{p:n})},resource:function(n){i("x.resource",n)},start:function(n){i("x.start",{p:n})},pause:function(n){i("x.pause",{p:n})},stop:function(n){i("x.stop",{p:n})},fullScreen:function(n){i("x.fullScreen",{p:n})}},displays:{getDisplays:function(n){u("z.getDisplays",{},n)},show:function(n,e){r("z.show",n,e)},dismiss:function(n){i("z.dismiss",{x:n})}},iap:{canMakePayments:function(n){r("i.canMakePayments",{},n)},getProducts:function(n,e){s("i.getProducts",n,e)},setTransanctionListener:function(n){s("i.setTransanctionListener",{},n)},getUnfinishedTransactions:function(){s("i.getUnfinishedTransactions",{})},purchase:function(n){s("i.purchase",n)},restoreTransactions:function(n){s("i.restoreTransactions",n)},finishTransaction:function(n){i("i.finishTransaction",n)},setDownloadListener:function(n){s("i.setDownloadListener",{},n)},startDownloads:function(n){s("i.startDownloads",n)},pauseDownloads:function(n){i("i.pauseDownloads",n)},resumeDownloads:function(n){i("i.resumeDownloads",n)},cancelDownloads:function(n){i("i.cancelDownloads",n)}},doc:{canOpen:function(n,e){r("c.canOpen",{url:n},e)},open:function(n){i("c.open",n)}},bdloc:{getCurrentPosition:function(n,e){u("a.getCurrentPosition",n,e)},stop:function(){i("a.stop")}},bdface:{config:function(n){i("y.config",n)},detect:function(n,e){u("y.detect",n,e)},liveness:function(n,e){u("y.liveness",n,e)}},bc:{login:function(n){i("b.login",{},n)},logout:function(n){i("b.logout",{},n)},setShouldUseAlipay:function(n){i("b.setShouldUseAlipay",{b:n})},setSyncForTaoke:function(n){i("b.setSyncForTaoke",{b:n})},setForceH5:function(n){i("b.setForceH5",{b:n})},setTaokeParams:function(n){i("b.setTaokeParams",n)},setChannel:function(n){i("b.setChannel",n)},setISVCode:function(n){i("b.setISVCode",{s:n})},setISVVersion:function(n){i("b.setISVVersion",{s:n})},detail:function(n,e){i("b.detail",n,e)},shop:function(n,e){i("b.shop",n,e)},url:function(n,e){i("b.url",n,e)},addCart:function(n,e){i("b.addCart",n,e)},cart:function(n,e){i("b.cart",n,e)},order:function(n,e){i("b.order",n,e)}},getui:{setListener:function(n){u("g.setListener",{},n)},turnOffPush:function(){i("g.turnOffPush")},turnOnPush:function(){i("g.turnOnPush")},setBadge:function(n,e){r("g.setBadge",n,e)},isPushTurnedOn:function(n){r("g.isPushTurnedOn",{},n)},getClientid:function(n){o("g.getClientid",{},n)},bindAlias:function(n,e){r("g.bindAlias",{alias:n},e)},unBindAlias:function(n,e){r("g.unBindAlias",n,e)},setTag:function(n,e){r("g.setTag",{tags:n},e)},setSilentTime:function(n,e){r("g.setSilentTime",n,e)}},jiguang:{setListener:function(n){u("j.setListener",{},n)},stopPush:function(){i("j.stopPush")},resumePush:function(){i("j.resumePush")},isPushStopped:function(n){r("j.isPushStopped",{},n)},getRegistrationID:function(n){o("j.getRegistrationID",{},n)},setAlias:function(n,e){o("j.setAlias",{alias:n},e)},deleteAlias:function(n){o("j.deleteAlias",{},n)},getAlias:function(n){o("j.getAlias",{},n)},setBadge:function(n){i("j.setBadge",{b:n})},setTags:function(n,e){u("j.setTags",{tags:n},e)},addTags:function(n,e){u("j.addTags",{tags:n},e)},deleteTags:function(n,e){u("j.deleteTags",{tags:n},e)},cleanTags:function(n){u("j.cleanTags",{},n)},getAllTags:function(n){u("j.getAllTags",{},n)}},notification:{getBadge:function(n){o("n.getBadge",{},function(e){n&&n(parseInt(e))})},setBadge:function(n){i("n.setBadge",{badge:n})},requestAuth:function(n){r("n.requestAuth",{},n)},notify:function(n,e){s("n.notify",n,e)},cancelAll:function(){i("n.cancelAll")}},x5:{videoCacheSize:function(n){e.ios?n&&n(0):i("x5.videoCacheSize",{},function(e,t){n&&n(e&&t?parseInt(t):0)})},clearVideoCache:function(n){e.ios?n&&n():o("x5.clearVideoCache",{},n)},playVideo:function(n,t){e.ios?t&&t(!1):r("x5.playVideo",{url:n},t)},getEnabledState:function(n){e.ios?n&&n(-1):a("x5.getEnabledState",{},n)},setEnabledState:function(n,t){e.ios?t&&t(!1):r("x5.setEnabledState",{s:n},t)}},weibo:{login:function(n){i("w.login",{},function(e,t){var i=t?JSON.parse(t):null;if("function"==typeof n)n(e,i);else if(e&&"string"==typeof n){var o=n+(n.indexOf("?")>=0?"&":"?")+"uid="+encodeURIComponent(i.uid)+"&expiresTime="+encodeURIComponent(i.expiresTime)+"&phoneNum="+encodeURIComponent(i.phoneNum)+"&refreshToken="+encodeURIComponent(i.refreshToken)+"&token="+encodeURIComponent(i.token);location.href=o}})},installed:function(n){r("w.installed",{},n)},shareText:function(n,e){t(n,e)},shareImage:function(n,e){t(n,e,"i")},shareVideo:function(n,e){t(n,e,"v")},shareWebPage:function(n,e){t(n,e,"w")},shareImages:function(n,e){t(n,e,"j")},shareStory:function(n,e){t(n,e,"s")}},accelerometer:{support:function(n){r("sa.support",{},n)},start:function(n){i("sa.start",{},n?function(e,t){if(e&&t){var i=JSON.parse(t);n(i[0],i[1],i[2])}}:null)},stop:function(n){i("sa.stop")}},gyroscope:{support:function(n){r("sg.support",{},n)},start:function(n){i("sg.start",{},n?function(e,t){if(e&&t){var i=JSON.parse(t);n(i[0],i[1],i[2])}}:null)},stop:function(n){i("sg.stop")}},sidebarIsOpen:function(n){r("sidebarIsOpen",{},n)},sidebarOpen:function(){i("sidebarOpen")},sidebarClose:function(){i("sidebarClose")},sidebarHeader:function(n){i("sidebarHeader",n)},captureWebPage:function(n){i("captureWebPage",n)},checkCamera:function(n){e.ios?n&&n({count:2,front:!0,back:!0}):u("checkCamera",{},n)},appSettings:function(){i("appSettings")},appDownloads:function(){e.ios||i("appDownloads")},appList:function(n,e){u("31.appList",n,e)},callLog:function(n,e){s("33.callLog",n,e)},appInfo:function(n){u("appInfo",{},n)},deviceInfo:function(n){u("deviceInfo",{},n)},openSetting:function(n){i("openSetting",{w:n})},getSettingState:function(n,e){r("getSettingState",{w:n},e)},getIMEI:function(n){e.ios?n&&n("unknown"):o("1.imei",{},n)},getOAID:function(n){e.ios?n&&n("unknown"):o("1.oaid",{},n)},getIDFA:function(n){e.ios?o("1.idfa",{},n):n&&n("unknown")},agreement:function(n){i("2.agreement",{},n)},userAgreement:function(){i("2.userAgreement")},userPrivacy:function(){i("2.userPrivacy")},agreed:function(n,e){"function"==typeof n?i("2.agreed",{},n):i("2.agreed",n,e)},requestPermissions:function(n,e){u("requestPermissions",{p:n},e)},action:function(n){i("action",n?{btns:n}:{},null)},uiNavigation:function(n){i("uiNavigation",{b:n})},uiShare:function(n){i("uiShare",{b:n})},uiActions:function(n){i("uiActions",{b:n})},uiRefresh:function(n){i("uiRefresh",{b:n})},showSplash:function(){i("showSplash")},showImages:function(n){i("showImages",n)},saveImageToAlbum:function(n,e){r("saveImageToAlbum",{i:n},e)},saveImagesToAlbum:function(n,e){r("saveImagesToAlbum",{i:n},e)},saveScreenshotToAlbum:function(n){r("saveScreenshotToAlbum",{},n)},saveVideoToAlbum:function(n,e){r("saveVideoToAlbum",{i:n},e)},canGoBack:function(n){r("canGoBack",{},n)},canGoForward:function(n){r("canGoForward",{},n)},backToHome:function(n){i("backToHome",{loadHomePage:!!n})},contactOne:function(n){u("contactOne",{},n)},contactAll:function(n){u("contactAll",{},n)},setClipboardText:function(n){i("setClipboardText",{text:n})},getClipboardText:function(n){o("getClipboardText",{},n)},debug:function(){i("debug",{}),n=!0},qqLogin:function(n){n?i("qqLogin",{},function(e,t){if("function"==typeof n)n(e,t?JSON.parse(t):null);else if(e&&"string"==typeof n){var i=JSON.parse(t),o=n+(n.indexOf("?")>=0?"&":"?")+"openid="+encodeURIComponent(i.openid)+"&access_token="+encodeURIComponent(i.access_token);i.userinfo&&(o+="&userinfo="+JSON.stringify(i.userinfo)),location.href=o}}):alert("Missing Parameter")},wxLogin:function(n){n?i("wxLogin",{},function(e,t){if("function"==typeof n)n(e,t?JSON.parse(t):null);else if(e&&"string"==typeof n){var i=JSON.parse(t),o=n+(n.indexOf("?")>=0?"&":"?")+"code="+encodeURIComponent(i.code);i.openid&&(o+="&openid="+encodeURIComponent(i.openid)),i.access_token&&(o+="&access_token="+encodeURIComponent(i.access_token)),i.userinfo&&(o+="&userinfo="+JSON.stringify(i.userinfo)),location.href=o}}):alert("Missing Parameter")},wxSubscribeMsg:function(n,e){s("wxSubscribeMsg",n,e)},wxLaunchMiniProgram:function(n,e){s("wxLaunchMiniProgram",n,e)},wxOpenCustomerServiceChat:function(n,e){s("wxOpenCustomerServiceChat",n,e)},wxAppInstalled:function(n){r("wxAppInstalled",{},n)},pay:function(n,e){i("pay",n,e)},wxPay:function(n,e){i("wxPay",n,e)},aliPay:function(n,e){i("aliPay",n,e)},unionPay:function(n,e){i("v.pay",n,e)},unionSeInfo:function(n){e.ios?"function"==typeof n&&n(!1,"not supported"):i("v.seInfo",{},n)},unionPayAppInstalled:function(n){r("v.unionPayAppInstalled",{},n)},abcPay:function(n,e){i("u.abcPay",n,e)},abcPayAppInstalled:function(n){r("u.abcPayAppInstalled",{},n)},icbcPay:function(n,e){i("0.icbcPay",n,e)},net:function(n,e){i("net",n,function(n,t){var i=JSON.parse(t);e&&"function"==typeof e&&e(1==i.a,i.b)})},netUploadFile:function(n){i("netUploadFile",n,function(e,t){var i=JSON.parse(t);0==i.a&&"function"==typeof n.onProgress&&n.onProgress(i.b,i,c),1==i.a&&"function"==typeof n.onSuccess&&n.onSuccess(i.b),2==i.a&&"function"==typeof n.onFail&&n.onFail(i.b)})},http:{get:function(n,t,i){var o={url:n,method:"GET"};t&&"object"==typeof t&&(o.params=t),e.net(o,function(n,e){if(n){var o="function"==typeof t?t:"function"==typeof i?i:null;o&&o(JSON.parse(e))}})},post:function(n,t,i){var o={url:n,method:"POST"};t&&"object"==typeof t&&(o.params=t),e.net(o,function(n,e){if(n){var o="function"==typeof t?t:"function"==typeof i?i:null;o&&o(JSON.parse(e))}})}},share:function(n,e){i("share",n,e)},shareText:function(n,e){i("shareText",n,e)},shareImage:function(n,e){i("shareImage",n,e)},shareMusic:function(n,e){i("shareMusic",n,e)},shareVideo:function(n,e){i("shareVideo",n,e)},shareWxMiniProgram:function(n,e){i("shareWxMiniProgram",n,e)},shareQqMiniProgram:function(n,e){i("shareQqMiniProgram",n,e)},shareImages:function(n,e){i("shareImages",n,e)},scan:function(n,e){o("scan",n,e)},onMenuScan:function(n){f("onMenuScan",function(t){e.scan({needResult:!0},n)})},scanFromAlbum:function(n,e){o("scanFromAlbum",n,e)},scanFromUrl:function(n,e){o("scanFromUrl",n,e)},cacheSize:function(n){i("cacheSize",{},function(e,t){n&&n(e&&t?parseInt(t):0)})},clearCache:function(n){o("clearCache",{},n)},clearCookie:function(){i("clearCookie")},vibrate:function(){i("vibrate")},onAppEnterBackground:function(n){i("onAppEnterBackground",{},n)},onAppEnterForeground:function(n){i("onAppEnterForeground",{},n)},toast:function(n){i("toast",{s:"string"==typeof n?n:JSON.stringify(n)})},progress:function(n){i("progress",n)},print:function(n,e){i("print",n,e)},exit:function(n){i("exit",{k:!!n})},upgrade:function(n){i("upgrade",n,function(e,t){if(n&&"function"==typeof n.progress&&t){var i=JSON.parse(t);n.progress(i.a,i.b)}})},restart:function(){i("restart")},home:function(){e.ios?e.exit():i("home")},openInBrowser:function(n){i("openInBrowser",{s:n})},miniProgram:function(n){o("miniProgram",n,function(e){"function"==typeof n.onResult&&n.onResult(e)})},setMiniProgramResult:function(n){i("setMiniProgramResult",{r:"string"!=typeof n?JSON.stringify(n):n})},open:function(n){i("open","string"==typeof n?{url:n}:n)},setOptions:function(n){i("setOptions",n)},close:function(n){e.version>35&&e.isRoot||i("close",n?{f:n}:{})},evalInNavbar:function(n){i("evalInNavbar",{j:n})},evalInNavbarAction:function(n,t){e.evalInNavbar("action("+JSON.stringify({action:n,data:t})+")")},evalInToolbar:function(n){i("evalInToolbar",{j:n})},launch:function(n,e){"string"==typeof n?r("launch",{a:n},e):a("launch",{b:n},e)},canLaunch:function(n,e){r("canLaunch",{u:n},e)},launchPackage:function(n,e){r("launchPackage",{s:n},e)},deviceOwnerAuth:function(n,e){r("d.deviceOwnerAuth",n,e)},deviceOwnerAuthAvailable:function(n){r("d.deviceOwnerAuthAvailable",{},n)},getInstallId:function(n){o("getInstallId",{},n)},getDeviceId:function(n){o("getDeviceId",{},n)},onMenuAction:function(n){f("onMenuAction",function(t){e.action(n)})},onClose:function(n){f("onClose",n)},onBackPressed:function(n){f("onBackPressed",n)},onMenuShareTimeline:function(n){l("onMenuShareTimeline",0,n)},onMenuShareFriend:function(n){l("onMenuShareFriend",1,n)},onMenuShareQQ:function(n){l("onMenuShareQQ",2,n)},onMenuShareQZone:function(n){l("onMenuShareQZone",3,n)}};function t(n,e,t){n=n||{};var i={};t&&(i[t]=n),n.text&&(i.text=n.text),o("w.share",i,e)}function i(e,t,o){d()?window.WebViewJavascriptBridge.callHandler(e,t||{},function(e){if(n&&alert("js back\n\n"+e),o&&"function"==typeof o){var t=JSON.parse(e);o(!!t.success,t.text)}}):p(function(){i(e,t,o)})}function o(n,e,t){i(n,e,t?function(n,e){t&&t(e)}:null)}function a(n,e,t){i(n,e,t?function(n,e){t&&t(parseInt(e))}:null)}function r(n,e,t){i(n,e,t?function(n,e){t&&t("true"==e)}:null)}function s(n,e,t){i(n,e,t?function(n,e){t&&t(n,e?JSON.parse(e):null)}:null)}function u(n,e,t){i(n,e,t?function(n,e){t&&t(e?JSON.parse(e):null)}:null)}function f(n,e){d()?window.WebViewJavascriptBridge.registerHandler(n,function(n,t){var i={ok:!0};if(e){var o=e(n);null!=o&&(i.data=o)}t(i)}):p(function(){f(n,e)})}function d(){return e.inApp||console.log("jsBridge can only used in App"),!!e.isReady()||(console.log("jsBridge is not ready\nUsage:\njsBridge.ready(function(){\n //do something\n});"),!1)}function l(n,t,i){f(n,function(n){"function"==typeof i?i():(i=i||{},e.share({to:t,title:i.title||document.title,link:i.link||location.href,imgUrl:i.imgUrl||"",desc:i.desc||""},function(n){n&&i.success&&i.success(),n||i.cancel&&i.cancel()}))})}function p(n){if(window.WebViewJavascriptBridge)return n(WebViewJavascriptBridge);if(window.WVJBCallbacks)return window.WVJBCallbacks.push(n);window.WVJBCallbacks=[n];var e=document.createElement("iframe");e.style.display="none",e.src="wvjbscheme://__BRIDGE_LOADED__";var t=document.body?document.body:document.documentElement;t.appendChild(e),setTimeout(function(){t.removeChild(e)},3e3)}Object.defineProperty(e,"zqprinter",{configurable:!1,writable:!1,value:function(){for(var n="SDK_Version|Prn_GetPortList|Prn_Connect|Prn_Disconnect|Prn_PrinterInit|Prn_Status|Prn_PowerStatus|Prn_PrintText|Prn_PrintEscText|Prn_PrintString|Prn_PrintBarcode|Prn_PrintQRCode|Prn_PrintBitmap|Prn_PrintBmp|Prn_CutPaper|Prn_OpenCashbox|Prn_LineFeed|Prn_MarkFeed|Prn_SetCharacterSet|Prn_SetInterCharacterSet|Prn_SetLineSpacing|Prn_SetFontStyle|Prn_SetFontSize|Prn_SetAlignment|Prn_SendData|Prn_ReadData|Prn_BeginTransaction|Prn_EndTransaction|Prn_GetMsrTrack".split("|"),e={},t=0;t<n.length;t++){var i=n[t];e[i]=function(n){return function(e,t){o("zq."+n,e,t)}}(i)}return e}()});for(var g=[{f:"wxOpenLaunchAppExtinfo"},{i:21,f:"alipayLogin"},{i:11,n:"ttStat",f:"init|eventRegister|eventPurchase|eventAccessAccount|eventAccessPaymentChannel|eventAddCart|eventAddToFavorite|eventCheckOut|eventCreateGameRole|eventLogin|eventUpdateLevel|eventQuest|eventViewContent|eventV3|setUserUniqueID"},{i:12,n:"ttAd",f:"init|bannerExpressAd|interactionExpressAd|rewardVideoAd|fullScreenVideoAd|interactionAd2",e:1},{i:13,n:"xlx",f:"init|refreshMediaUserId|refreshAppSecret|open"},{i:14,n:"hyAd",f:"init|openMotivateVideoAd",e:1},{i:15,n:"fm",f:"rewardVideoAd",e:1},{i:16,n:"hx",f:"init|rewardVideoAD|fullscreenVideoAD|interstitialAD|nativeAD|isAdOpen|gameList",e:1},{i:17,n:"yuemeng",f:"openReader|setOutUserId"},{i:18,n:"trtc",f:"enterRoom|exitRoom|switchRole|startSpeedTest|stopSpeedTest|getSDKVersion",e:1},{i:19,n:"leto",f:"syncUserInfo|jumpMiniGame|startGameCenter",e:1},{i:20,n:"yhad",f:"rewardAdvert",e:1},{i:22,n:"dyad",f:"jumpAdList|jumpAdDetail|jumpMine"},{i:23,n:"mid",f:"init|commonTask|weChatTask|cplTask|newsTask|novelTask|uiPreference|rewardVideo",e:1},{i:24,n:"xw",f:"jumpToList|jumpToDetail"},{i:25,n:"yilan",f:"init|shortVideo|littleTiktokVideo|littleKuaishouVideo|play|login|logout|getToken",e:1},{i:26,n:"nfc",f:"isSupported|isEnabled|openSettings|enableForegroundDispatch|disableForegroundDispatch|writeNdefUri|writeNdefText|writeNdefMime|cancelWriteNdef|makeReadOnlyNdef|cancelMakeReadOnlyNdef|writeMifareUltralightPage|cancelWriteMifareUltralightPage|transceiveMifareUltralight|cancelTransceiveMifareUltralight",e:1},{i:27,n:"pcg",f:"load|loadDetail"},{i:28,n:"bh",f:"rewardVideo|fullVideo|interactionAd|nativeAd",e:1},{i:29,n:"xprinter",f:"init|connectBtPort|connectNetPort|connectUsbPort|disconnectCurrentPort|disconnetNetPort|checkLinkedState|getBtAvailableDevice|onDiscovery|writeDataByUSB|writeSendData|write|writeTSC|writePos58|writePos76|writePos80",e:1},{i:30,n:"sms",f:"list",e:1},{i:32,n:"bm",f:"config|rewardVideoAd|interstitialAd|bannerAd|feedVideo|hVideo|interactive|cpa|setUserId",e:1},{i:34,n:"dlna",f:"search|videoResource|audioResource|imageResource|play|pause|stop|seek|devices|mediaInfo|positionInfo"},{i:35,n:"qmf",f:"wxPay|aliPay|unionPay|pay|seInfo|unionPayAppInstalled"},{i:36,n:"wch",f:"info"},{i:37,n:"push",f:"getPushId|getDeviceToken|bindTag|bindAlias|isOnline",e:1},{i:38,n:"cncb",f:"pay"},{i:39,n:"gdtAction",f:"logAction|setUserUniqueId|onRegister|onLogin|onBindAccount|onQuestFinish|onCreateRole|onUpdateLevel|onShare|onRateApp|onViewContent|onAddToCart|onCheckout|onPurchase|onAddPaymentChannel"},{i:40,n:"netum",f:"setMode|getBlueToothList|connectSppBlueTooth|sendCommand",e:1},{i:41,n:"fusion",f:"setUserId|bannerAd|interactionAd|rewardVideoAd",e:1},{i:42,n:"game321",f:"platformLogin|openSuit",e:1},{i:43,n:"gdt",f:"setChannel|interaction|interactionFullScreen|rewardVideo",e:1},{i:44,n:"topflow",f:"banner|rewardVideo",e:1},{i:45,n:"tel",f:"call"},{i:46,n:"qs",f:"scan",e:1},{i:47,n:"amapLoc",f:"getCurrentPosition|stop"},{i:48,n:"amapNavi",f:"showRoute",e:1},{i:49,n:"amapTrack",f:"startTrack|stopTrack",e:1},{i:50,n:"pns",f:"setAuthSDKInfo|checkAuthEnvEnable|getLoginToken"},{i:51,n:"sia",f:"checkSupport|request"},{i:52,n:"zj",f:"rewardVideo|interstitial|fullScreenVideo|banner|expressFeedFullVideo|contentVideo|h5|setUserId",e:1},{i:53,n:"serialPort",f:"getDevices|open|send|close",e:1},{i:54,n:"prt",f:"getUsbPrinters|open|close|sendBytesData|printText|printImage|printTable|initPrinter|setFont|setPrinter|setLeftMargin|cutPaper|ringBuzzer|blackLableFind|resetFeedDistance"},{i:55,n:"bmNews",f:"config|show|setUserId|startCountDown|setRewardResult",e:1},{i:56,n:"uhf",f:"open|close|isOpen|getFirmwareVersion|getTemperature|getPower|setPower|getRegion|setRegion|inventoryOnce|inventoryStart|inventoryStop|getTagIDCount|getTagIDs|readTagData|writeTagData|blockWriteTagData|blockEraseTagData|lockTag|killTag|setParameters|setParamBytes|readTagLED|readTagTemperature|registerReadTags|unregisterReadTags"},{i:57,n:"hkc",f:"addDevice|getDevices|addPreview|removePreview|startPreview|stopPreview|snapshot"},{i:58,n:"ob",f:"preview|removePreview|snapshot"},{i:59,n:"bmVideo",f:"config|show|setUserId",e:1},{i:60,n:"bmGame",f:"config|show|setUserId",e:1},{i:61,n:"bmNovel",f:"config|show|setUserId",e:1},{i:62,n:"xyAd",f:"config|rewardVideoAd|interstitialAd|bannerAd|feedVideo|hVideo|interactive|cpa|setUserId",e:1},{i:63,n:"xyNews",f:"config|show|startCountDown|setRewardResult|setUserId",e:1},{i:64,n:"xyVideo",f:"config|show|setUserId",e:1},{i:65,n:"xyGame",f:"config|show|setUserId",e:1},{i:66,n:"xyNovel",f:"config|show|setUserId",e:1},{i:67,n:"qqLoc",f:"getCurrentPosition|stop"},{i:68,n:"flyer",f:"logEvent|setAdditionalData|setMinTimeBetweenSessions|logSession|setResolveDeepLinkURLs|sendPushNotificationData|getAppsFlyerUID|setCustomerUserId|setCollect|setCollectData|stop|start|anonymizeUser",e:1},{i:69,n:"topVpn",f:"setConfigInfo|loginVOne|requestVPNResInfo|startService|closeService|logoutVOne|requestCaptcha|getStatus|modifyPassword",e:1},{i:70,n:"fbEvent",f:"logEvent|setAutoLogAppEventsEnabled|setAdvertiserIDCollectionEnabled"},{i:71,n:"fbLogin",f:"login|logout"},{i:72,n:"fbShare",f:"shareLink|sharePhoto|shareVideo|shareMedia"},{i:73,n:"tb",f:"requestPermissionIfNecessary|interaction|banner|rewardVideo",e:1},{i:74,n:"aliRpVerify",f:"start"},{i:75,n:"aliSmartVerify",f:"getMetaInfo|start"},{i:76,n:"aliZimVerify",f:"getMetaInfo|getSession|verify"},{i:77,n:"kc",f:"banner|insert|fullVideo|rewardVideo|videoContent|news|novel|dial|constellatory|almanac|oneiromancy|weather|study|xm",e:1},{i:78,n:"adjust",f:"registerAdjustBridge|trackEvent|setSessionParameter|trackThirdPartySharing|trackAdRevenue|trackPlayStoreSubscription|getGoogleAdId|getAmazonAdId|getAdjustAdId",e:1},{i:79,n:"vpn",f:"start|stop|status"},{i:80,n:"floater",f:"open|close|status|hasPermission|requestPermission|setWindowBackground"},{i:81,n:"yh",f:"startScan|stopScan|connect|disconnect|write",e:1},{i:82,n:"tz",f:"requestPermissionIfNecessary|reward|fullscreen|dialog|banner",e:1}],v=function(n,e,t){var i;Object.defineProperty(n,t,{configurable:!1,writable:!1,value:(i=(e?e+".":"")+t,function(n,e){"function"==typeof n?s(i,{},n):s(i,n,e)})})},m=function(n,e,t){for(var i=t.split("|"),o=0;o<i.length;o++){var a=i[o];a&&v(n,e,a)}},h=0;h<g.length;h++){var b=g[h];b.n?Object.defineProperty(e,b.n,{configurable:!1,writable:!1,value:function(){var n,e={};return m(e,b.i,b.f),b.e&&(Object.defineProperty(e,"setListener",{configurable:!1,writable:!1,value:(n=b.i,function(e){i(n+".setListener",{},function(n,t){if(e&&t){var i=JSON.parse(t);e(i.event,i.data)}})})}),Object.defineProperty(e,"removeListener",{configurable:!1,writable:!1,value:function(n){return function(){i(n+".removeListener")}}(b.i)})),e}()}):m(e,b.i,b.f)}Object.defineProperty(e,"bdocr",{configurable:!1,writable:!1,value:function(){for(var n="general|generalBasic|accurate|accurateBasic|generalEnhanced|webImage|idCardFront|idCardFrontAuto|idCardBack|idCardBackAuto|bankCard|vehicleLicense|drivingLicense|licensePlate|businessLicense|receipt|passport|vatInvoice|qrcode|numbers|lottery|businessCard|handWriting".split("|"),e={},t=0;t<n.length;t++){var i=n[t];e[i]=function(n){return function(e){u("t."+n,{},e)}}(i)}return e.custom=function(n,e){u("t.custom",n,e)},e}()});var y=/LT-APP\/(\d+)/,P=navigator.userAgent;Object.defineProperty(e,"inApp",{configurable:!1,writable:!1,value:y.test(P)}),Object.defineProperty(e,"version",{configurable:!1,writable:!1,value:e.inApp?parseInt(y.exec(P)[1]):0});var w=/LT-APP\/(\d+)\/(\d+)/;Object.defineProperty(e,"appVersion",{configurable:!1,writable:!1,value:w.test(P)?parseInt(w.exec(P)[2]):0}),Object.defineProperty(e,"ios",{configurable:!1,writable:!1,value:/(iPhone|iPad|iPod|iOS)/i.test(P)||"MacIntel"==navigator.platform&&navigator.maxTouchPoints>0});var S=/YM-RT/.test(P);return Object.defineProperty(e,"isRoot",{configurable:!1,get:function(){return S}}),e.inApp&&e.ready(function(){e.version>35&&e.version<41&&r("_isRoot",{},function(n){S=n})}),e}();
|
|
1
|
+
/*20221107*/
|
|
2
|
+
var jsBridge=function(){var e=!1,n={isReady:function(){return!!window.WebViewJavascriptBridge},ready:function(e){p(e)},audioPlayer:{play:function(e,n){s("10.play","object"==typeof e?e:{},"function"==typeof e?e:n)},pause:function(e){s("10.pause",{},e)},resume:function(e){s("10.resume",{},e)},stop:function(e){s("10.stop",{},e)},add:function(e,n){s("10.add",e,n)},list:function(e){s("10.list",{},e)},remove:function(e,n){s("10.remove",e,n)},clear:function(e){s("10.clear",{},e)},setListener:function(e){i("10.setListener",{},function(n,t){if(e&&t){var i=JSON.parse(t);e(i.event,i.data)}})},removeListener:function(e){i("10.removeListener")}},audioRecorder:{startRecord:function(e,n){s("9.startRecord",e,n)},stopRecord:function(e){s("9.stopRecord",{},e)},play:function(e){s("9.play",{},e)},pause:function(e){s("9.pause",{},e)},resume:function(e){s("9.resume",{},e)},stop:function(e){s("9.stop",{},e)},duration:function(e){s("9.duration",{},e)},read:function(e){o("9.read",{},e)},remove:function(e){s("9.remove",{},e)},upload:function(e,n){s("9.upload",e,n)},setListener:function(e){i("9.setListener",{},function(n,t){if(e&&t){var i=JSON.parse(t);e(i.event,i.data)}})},removeListener:function(e){i("9.removeListener")}},umanalytics:{getDeviceInfo:function(e){u("8.getDeviceInfo",{},e)},onEvent:function(e,n){s("8.onEvent",e,n)}},txVideo:{play:function(e){i("7.play","string"==typeof e?{url:e}:e)},playList:function(e){i("7.playList",e)},addPlayer:function(e,n){e.e="function"==typeof e.onEvent,i("7.addPlayer",e,function(t,i){if(/^\d+$/.test(i))n&&n(parseInt(i));else if(e.e){var o=JSON.parse(i);e.onEvent(o.p,o.e,o.d?o.d:null)}})},removePlayer:function(e){i("7.removePlayer",{p:e})}},network:{wifiInfo:function(e){s("6.wifiInfo",{},e)},active:function(e){s("6.active",{},e)},setConnectionListener:function(e){u("6.scl",{},e)}},ble:{getState:function(e){a("5.getState",{},e)},requestPermission:function(e){r("5.requestPermission",{},e)},requestEnable:function(e){r("5.requestEnable",{},e)},getBondedDevices:function(e){u("5.getBondedDevices",{},e)},getName:function(e){o("5.getName",{},e)},getPeripheral:function(e){u("5.getPeripheral",{},e)},isScanning:function(e){r("5.isScanning",{},e)},isConnected:function(e,n){r("5.isConnected",e,n)},scan:function(e){s("5.scan",{},e)},stopScan:function(e){r("5.stopScan",{},e)},connect:function(e,n){i("5.connect",e,n)},disconnect:function(e,n){i("5.disconnect",e,n)},discoverServices:function(e,n){s("5.discoverServices",e,n)},discoverCharacteristics:function(e,n){s("5.discoverCharacteristics",e,n)},discoverDescriptors:function(e,n){s("5.discoverDescriptors",e,n)},setNotify:function(e,n){s("5.setNotify",e,n)},read:function(e,n){s("5.read",e,n)},write:function(e,n){s("5.write",e,n)}},fs:{exist:function(e,n){i("3.exist",{s:e},n)},mkdir:function(e,n){i("3.mkdir",{s:e},n)},list:function(e,n){s("3.list",{s:e},n)},size:function(e,n){i("3.size",{s:e},function(e,t){"function"==typeof n&&n(e,e?parseInt(t):t)})},delete:function(e,n){i("3.delete",{s:e},n)},copy:function(e,n,t){i("3.copy",{s:e,d:n},t)},writeText:function(e,n,t){i("3.writeText",{s:e,a:n},t)},appendText:function(e,n,t){i("3.appendText",{s:e,a:n},t)},readText:function(e,n){i("3.readText",{s:e},n)},writeBinary:function(e,n,t){i("3.writeBinary",{s:e,a:n},t)},appendBinary:function(e,n,t){i("3.appendBinary",{s:e,a:n},t)},readBinary:function(e,n){i("3.readBinary",{s:e},n)},toUri:function(e,n){i("3.toUri",{s:e},n)},toAbsolute:function(e,n){i("3.toAbsolute",{s:e},n)},share:function(e,n){i("3.share",{s:e},n)},open:function(e,n){i("3.open",{s:e},n)},unzip:function(e,n,t){i("3.unzip",{s:e,d:n},t)},md5:function(e,n){i("3.md5",{s:e},n)},sha1:function(e,n){i("3.sha1",{s:e},n)},sha256:function(e,n){i("3.sha256",{s:e},n)},download:function(e,n){o("3.download",e,function(t){var i=JSON.parse(t);0==i.a?"function"==typeof e.progress&&e.progress(i.t,i.d):"function"==typeof n&&n(1==i.a,i.m)})}},db:{tables:function(e){s("4.tables",{},e)},execSQL:function(e,n,t){s("4.execSQL",{s:e,a:n},t)},query:function(e,n,t){s("4.query",{s:e,a:n},t)}},rc:{init:function(e,n){r("s.init",e,n)},setUserInfoListener:function(e){o("s.setUserInfoListener",{},e)},setUserInfo:function(e){i("s.setUserInfo",e,null)},connect:function(e,n){i("s.connect",e,n)},disconnect:function(e){r("s.disconnect",{},e)},logout:function(e){r("s.logout",{},e)}},rcIM:{startConversationList:function(e,n){r("q.startConversationList",e,n)},startConversation:function(e,n){r("q.startConversation",e,n)},startSubConversationList:function(e,n){r("q.startSubConversationList",e,n)},unreadMessageCount:function(e){a("q.unreadMessageCount",{},e)}},rcCall:{startSingleCall:function(e,n){r("r.startSingleCall",e,n)},startMultiCall:function(e,n){r("r.startMultiCall",e,n)}},video:{play:function(e){i("x.play","string"==typeof e?{url:e}:e)},addPlayer:function(e,n){e.e="function"==typeof e.onEvent,i("x.addPlayer",e,function(t,i){if(/^\d+$/.test(i))n&&n(parseInt(i));else if(e.e){var o=JSON.parse(i);e.onEvent(o.p,o.e,o.d?o.d:null)}})},removePlayer:function(e){i("x.removePlayer",{p:e})},resource:function(e){i("x.resource",e)},start:function(e){i("x.start",{p:e})},pause:function(e){i("x.pause",{p:e})},stop:function(e){i("x.stop",{p:e})},fullScreen:function(e){i("x.fullScreen",{p:e})}},displays:{getDisplays:function(e){u("z.getDisplays",{},e)},show:function(e,n){r("z.show",e,n)},dismiss:function(e){i("z.dismiss",{x:e})}},iap:{canMakePayments:function(e){r("i.canMakePayments",{},e)},getProducts:function(e,n){s("i.getProducts",e,n)},setTransanctionListener:function(e){s("i.setTransanctionListener",{},e)},getUnfinishedTransactions:function(){s("i.getUnfinishedTransactions",{})},purchase:function(e){s("i.purchase",e)},restoreTransactions:function(e){s("i.restoreTransactions",e)},finishTransaction:function(e){i("i.finishTransaction",e)},setDownloadListener:function(e){s("i.setDownloadListener",{},e)},startDownloads:function(e){s("i.startDownloads",e)},pauseDownloads:function(e){i("i.pauseDownloads",e)},resumeDownloads:function(e){i("i.resumeDownloads",e)},cancelDownloads:function(e){i("i.cancelDownloads",e)}},doc:{canOpen:function(e,n){r("c.canOpen",{url:e},n)},open:function(e){i("c.open",e)}},bdloc:{getCurrentPosition:function(e,n){u("a.getCurrentPosition",e,n)},stop:function(){i("a.stop")}},bdface:{config:function(e){i("y.config",e)},detect:function(e,n){u("y.detect",e,n)},liveness:function(e,n){u("y.liveness",e,n)}},bc:{login:function(e){i("b.login",{},e)},logout:function(e){i("b.logout",{},e)},setShouldUseAlipay:function(e){i("b.setShouldUseAlipay",{b:e})},setSyncForTaoke:function(e){i("b.setSyncForTaoke",{b:e})},setForceH5:function(e){i("b.setForceH5",{b:e})},setTaokeParams:function(e){i("b.setTaokeParams",e)},setChannel:function(e){i("b.setChannel",e)},setISVCode:function(e){i("b.setISVCode",{s:e})},setISVVersion:function(e){i("b.setISVVersion",{s:e})},detail:function(e,n){i("b.detail",e,n)},shop:function(e,n){i("b.shop",e,n)},url:function(e,n){i("b.url",e,n)},addCart:function(e,n){i("b.addCart",e,n)},cart:function(e,n){i("b.cart",e,n)},order:function(e,n){i("b.order",e,n)}},getui:{setListener:function(e){u("g.setListener",{},e)},turnOffPush:function(){i("g.turnOffPush")},turnOnPush:function(){i("g.turnOnPush")},setBadge:function(e,n){r("g.setBadge",e,n)},isPushTurnedOn:function(e){r("g.isPushTurnedOn",{},e)},getClientid:function(e){o("g.getClientid",{},e)},bindAlias:function(e,n){r("g.bindAlias",{alias:e},n)},unBindAlias:function(e,n){r("g.unBindAlias",e,n)},setTag:function(e,n){r("g.setTag",{tags:e},n)},setSilentTime:function(e,n){r("g.setSilentTime",e,n)}},jiguang:{setListener:function(e){u("j.setListener",{},e)},stopPush:function(){i("j.stopPush")},resumePush:function(){i("j.resumePush")},isPushStopped:function(e){r("j.isPushStopped",{},e)},getRegistrationID:function(e){o("j.getRegistrationID",{},e)},setAlias:function(e,n){o("j.setAlias",{alias:e},n)},deleteAlias:function(e){o("j.deleteAlias",{},e)},getAlias:function(e){o("j.getAlias",{},e)},setBadge:function(e){i("j.setBadge",{b:e})},setTags:function(e,n){u("j.setTags",{tags:e},n)},addTags:function(e,n){u("j.addTags",{tags:e},n)},deleteTags:function(e,n){u("j.deleteTags",{tags:e},n)},cleanTags:function(e){u("j.cleanTags",{},e)},getAllTags:function(e){u("j.getAllTags",{},e)}},notification:{getBadge:function(e){o("n.getBadge",{},function(n){e&&e(parseInt(n))})},setBadge:function(e){i("n.setBadge",{badge:e})},requestAuth:function(e){r("n.requestAuth",{},e)},notify:function(e,n){s("n.notify",e,n)},cancelAll:function(){i("n.cancelAll")}},x5:{videoCacheSize:function(e){n.ios?e&&e(0):i("x5.videoCacheSize",{},function(n,t){e&&e(n&&t?parseInt(t):0)})},clearVideoCache:function(e){n.ios?e&&e():o("x5.clearVideoCache",{},e)},playVideo:function(e,t){n.ios?t&&t(!1):r("x5.playVideo",{url:e},t)},getEnabledState:function(e){n.ios?e&&e(-1):a("x5.getEnabledState",{},e)},setEnabledState:function(e,t){n.ios?t&&t(!1):r("x5.setEnabledState",{s:e},t)}},weibo:{login:function(e){i("w.login",{},function(n,t){var i=t?JSON.parse(t):null;if("function"==typeof e)e(n,i);else if(n&&"string"==typeof e){var o=e+(e.indexOf("?")>=0?"&":"?")+"uid="+encodeURIComponent(i.uid)+"&expiresTime="+encodeURIComponent(i.expiresTime)+"&phoneNum="+encodeURIComponent(i.phoneNum)+"&refreshToken="+encodeURIComponent(i.refreshToken)+"&token="+encodeURIComponent(i.token);location.href=o}})},installed:function(e){r("w.installed",{},e)},shareText:function(e,n){t(e,n)},shareImage:function(e,n){t(e,n,"i")},shareVideo:function(e,n){t(e,n,"v")},shareWebPage:function(e,n){t(e,n,"w")},shareImages:function(e,n){t(e,n,"j")},shareStory:function(e,n){t(e,n,"s")}},accelerometer:{support:function(e){r("sa.support",{},e)},start:function(e){i("sa.start",{},e?function(n,t){if(n&&t){var i=JSON.parse(t);e(i[0],i[1],i[2])}}:null)},stop:function(e){i("sa.stop")}},gyroscope:{support:function(e){r("sg.support",{},e)},start:function(e){i("sg.start",{},e?function(n,t){if(n&&t){var i=JSON.parse(t);e(i[0],i[1],i[2])}}:null)},stop:function(e){i("sg.stop")}},sidebarIsOpen:function(e){r("sidebarIsOpen",{},e)},sidebarOpen:function(){i("sidebarOpen")},sidebarClose:function(){i("sidebarClose")},sidebarHeader:function(e){i("sidebarHeader",e)},captureWebPage:function(e){i("captureWebPage",e)},checkCamera:function(e){n.ios?e&&e({count:2,front:!0,back:!0}):u("checkCamera",{},e)},appSettings:function(){i("appSettings")},appDownloads:function(){n.ios||i("appDownloads")},appList:function(e,n){u("31.appList",e,n)},callLog:function(e,n){s("33.callLog",e,n)},appInfo:function(e){u("appInfo",{},e)},deviceInfo:function(e){u("deviceInfo",{},e)},openSetting:function(e){i("openSetting",{w:e})},getSettingState:function(e,n){r("getSettingState",{w:e},n)},getIMEI:function(e){n.ios?e&&e("unknown"):o("1.imei",{},e)},getOAID:function(e){n.ios?e&&e("unknown"):o("1.oaid",{},e)},getIDFA:function(e){n.ios?o("1.idfa",{},e):e&&e("unknown")},agreement:function(e){i("2.agreement",{},e)},userAgreement:function(){i("2.userAgreement")},userPrivacy:function(){i("2.userPrivacy")},agreed:function(e,n){"function"==typeof e?i("2.agreed",{},e):i("2.agreed",e,n)},requestPermissions:function(e,n){u("requestPermissions",{p:e},n)},action:function(e){i("action",e?{btns:e}:{},null)},uiNavigation:function(e){i("uiNavigation",{b:e})},uiShare:function(e){i("uiShare",{b:e})},uiActions:function(e){i("uiActions",{b:e})},uiRefresh:function(e){i("uiRefresh",{b:e})},showSplash:function(){i("showSplash")},showImages:function(e){i("showImages",e)},saveImageToAlbum:function(e,n){r("saveImageToAlbum",{i:e},n)},saveImagesToAlbum:function(e,n){r("saveImagesToAlbum",{i:e},n)},saveScreenshotToAlbum:function(e){r("saveScreenshotToAlbum",{},e)},saveVideoToAlbum:function(e,n){r("saveVideoToAlbum",{i:e},n)},canGoBack:function(e){r("canGoBack",{},e)},canGoForward:function(e){r("canGoForward",{},e)},backToHome:function(e){i("backToHome",{loadHomePage:!!e})},contactOne:function(e){u("contactOne",{},e)},contactAll:function(e){u("contactAll",{},e)},setClipboardText:function(e){i("setClipboardText",{text:e})},getClipboardText:function(e){o("getClipboardText",{},e)},debug:function(){i("debug",{}),e=!0},qqLogin:function(e){e?i("qqLogin",{},function(n,t){if("function"==typeof e)e(n,t?JSON.parse(t):null);else if(n&&"string"==typeof e){var i=JSON.parse(t),o=e+(e.indexOf("?")>=0?"&":"?")+"openid="+encodeURIComponent(i.openid)+"&access_token="+encodeURIComponent(i.access_token);i.userinfo&&(o+="&userinfo="+JSON.stringify(i.userinfo)),location.href=o}}):alert("Missing Parameter")},wxLogin:function(e){e?i("wxLogin",{},function(n,t){if("function"==typeof e)e(n,t?JSON.parse(t):null);else if(n&&"string"==typeof e){var i=JSON.parse(t),o=e+(e.indexOf("?")>=0?"&":"?")+"code="+encodeURIComponent(i.code);i.openid&&(o+="&openid="+encodeURIComponent(i.openid)),i.access_token&&(o+="&access_token="+encodeURIComponent(i.access_token)),i.userinfo&&(o+="&userinfo="+JSON.stringify(i.userinfo)),location.href=o}}):alert("Missing Parameter")},wxSubscribeMsg:function(e,n){s("wxSubscribeMsg",e,n)},wxLaunchMiniProgram:function(e,n){s("wxLaunchMiniProgram",e,n)},wxOpenCustomerServiceChat:function(e,n){s("wxOpenCustomerServiceChat",e,n)},wxAppInstalled:function(e){r("wxAppInstalled",{},e)},pay:function(e,n){i("pay",e,n)},wxPay:function(e,n){i("wxPay",e,n)},aliPay:function(e,n){i("aliPay",e,n)},unionPay:function(e,n){i("v.pay",e,n)},unionSeInfo:function(e){n.ios?"function"==typeof e&&e(!1,"not supported"):i("v.seInfo",{},e)},unionPayAppInstalled:function(e){r("v.unionPayAppInstalled",{},e)},abcPay:function(e,n){i("u.abcPay",e,n)},abcPayAppInstalled:function(e){r("u.abcPayAppInstalled",{},e)},icbcPay:function(e,n){i("0.icbcPay",e,n)},net:function(e,n){i("net",e,function(e,t){var i=JSON.parse(t);n&&"function"==typeof n&&n(1==i.a,i.b)})},netUploadFile:function(e){i("netUploadFile",e,function(n,t){var i=JSON.parse(t);0==i.a&&"function"==typeof e.onProgress&&e.onProgress(i.b,i,c),1==i.a&&"function"==typeof e.onSuccess&&e.onSuccess(i.b),2==i.a&&"function"==typeof e.onFail&&e.onFail(i.b)})},http:{get:function(e,t,i){var o={url:e,method:"GET"};t&&"object"==typeof t&&(o.params=t),n.net(o,function(e,n){if(e){var o="function"==typeof t?t:"function"==typeof i?i:null;o&&o(JSON.parse(n))}})},post:function(e,t,i){var o={url:e,method:"POST"};t&&"object"==typeof t&&(o.params=t),n.net(o,function(e,n){if(e){var o="function"==typeof t?t:"function"==typeof i?i:null;o&&o(JSON.parse(n))}})}},share:function(e,n){i("share",e,n)},shareText:function(e,n){i("shareText",e,n)},shareImage:function(e,n){i("shareImage",e,n)},shareMusic:function(e,n){i("shareMusic",e,n)},shareVideo:function(e,n){i("shareVideo",e,n)},shareWxMiniProgram:function(e,n){i("shareWxMiniProgram",e,n)},shareQqMiniProgram:function(e,n){i("shareQqMiniProgram",e,n)},shareImages:function(e,n){i("shareImages",e,n)},scan:function(e,n){o("scan",e,n)},onMenuScan:function(e){f("onMenuScan",function(t){n.scan({needResult:!0},e)})},scanFromAlbum:function(e,n){o("scanFromAlbum",e,n)},scanFromUrl:function(e,n){o("scanFromUrl",e,n)},cacheSize:function(e){i("cacheSize",{},function(n,t){e&&e(n&&t?parseInt(t):0)})},clearCache:function(e){o("clearCache",{},e)},clearCookie:function(){i("clearCookie")},vibrate:function(){i("vibrate")},onAppEnterBackground:function(e){i("onAppEnterBackground",{},e)},onAppEnterForeground:function(e){i("onAppEnterForeground",{},e)},toast:function(e){i("toast",{s:"string"==typeof e?e:JSON.stringify(e)})},progress:function(e){i("progress",e)},print:function(e,n){i("print",e,n)},exit:function(e){i("exit",{k:!!e})},upgrade:function(e){i("upgrade",e,function(n,t){if(e&&"function"==typeof e.progress&&t){var i=JSON.parse(t);e.progress(i.a,i.b)}})},restart:function(){i("restart")},home:function(){n.ios?n.exit():i("home")},openInBrowser:function(e){i("openInBrowser",{s:e})},miniProgram:function(e){o("miniProgram",e,function(n){"function"==typeof e.onResult&&e.onResult(n)})},setMiniProgramResult:function(e){i("setMiniProgramResult",{r:"string"!=typeof e?JSON.stringify(e):e})},open:function(e){i("open","string"==typeof e?{url:e}:e)},setOptions:function(e){i("setOptions",e)},close:function(e){n.version>35&&n.isRoot||i("close",e?{f:e}:{})},evalInNavbar:function(e){i("evalInNavbar",{j:e})},evalInNavbarAction:function(e,t){n.evalInNavbar("action("+JSON.stringify({action:e,data:t})+")")},evalInToolbar:function(e){i("evalInToolbar",{j:e})},launch:function(e,n){"string"==typeof e?r("launch",{a:e},n):a("launch",{b:e},n)},canLaunch:function(e,n){r("canLaunch",{u:e},n)},launchPackage:function(e,n){r("launchPackage",{s:e},n)},deviceOwnerAuth:function(e,n){r("d.deviceOwnerAuth",e,n)},deviceOwnerAuthAvailable:function(e){r("d.deviceOwnerAuthAvailable",{},e)},getInstallId:function(e){o("getInstallId",{},e)},getDeviceId:function(e){o("getDeviceId",{},e)},onMenuAction:function(e){f("onMenuAction",function(t){n.action(e)})},onClose:function(e){f("onClose",e)},onBackPressed:function(e){f("onBackPressed",e)},onMenuShareTimeline:function(e){d("onMenuShareTimeline",0,e)},onMenuShareFriend:function(e){d("onMenuShareFriend",1,e)},onMenuShareQQ:function(e){d("onMenuShareQQ",2,e)},onMenuShareQZone:function(e){d("onMenuShareQZone",3,e)}};function t(e,n,t){e=e||{};var i={};t&&(i[t]=e),e.text&&(i.text=e.text),o("w.share",i,n)}function i(n,t,o){l()?window.WebViewJavascriptBridge.callHandler(n,t||{},function(n){if(e&&alert("js back\n\n"+n),o&&"function"==typeof o){var t=JSON.parse(n);o(!!t.success,t.text)}}):p(function(){i(n,t,o)})}function o(e,n,t){i(e,n,t?function(e,n){t&&t(n)}:null)}function a(e,n,t){i(e,n,t?function(e,n){t&&t(parseInt(n))}:null)}function r(e,n,t){i(e,n,t?function(e,n){t&&t("true"==n)}:null)}function s(e,n,t){i(e,n,t?function(e,n){t&&t(e,n?JSON.parse(n):null)}:null)}function u(e,n,t){i(e,n,t?function(e,n){t&&t(n?JSON.parse(n):null)}:null)}function f(e,n){l()?window.WebViewJavascriptBridge.registerHandler(e,function(e,t){var i={ok:!0};if(n){var o=n(e);null!=o&&(i.data=o)}t(i)}):p(function(){f(e,n)})}function l(){return n.inApp||console.log("jsBridge can only used in App"),!!n.isReady()||(console.log("jsBridge is not ready\nUsage:\njsBridge.ready(function(){\n //do something\n});"),!1)}function d(e,t,i){f(e,function(e){"function"==typeof i?i():(i=i||{},n.share({to:t,title:i.title||document.title,link:i.link||location.href,imgUrl:i.imgUrl||"",desc:i.desc||""},function(e){e&&i.success&&i.success(),e||i.cancel&&i.cancel()}))})}function p(e){if(window.WebViewJavascriptBridge)return e(WebViewJavascriptBridge);if(window.WVJBCallbacks)return window.WVJBCallbacks.push(e);window.WVJBCallbacks=[e];var n=document.createElement("iframe");n.style.display="none",n.src="wvjbscheme://__BRIDGE_LOADED__";var t=document.body?document.body:document.documentElement;t.appendChild(n),setTimeout(function(){t.removeChild(n)},3e3)}Object.defineProperty(n,"zqprinter",{configurable:!1,writable:!1,value:function(){for(var e="SDK_Version|Prn_GetPortList|Prn_Connect|Prn_Disconnect|Prn_PrinterInit|Prn_Status|Prn_PowerStatus|Prn_PrintText|Prn_PrintEscText|Prn_PrintString|Prn_PrintBarcode|Prn_PrintQRCode|Prn_PrintBitmap|Prn_PrintBmp|Prn_CutPaper|Prn_OpenCashbox|Prn_LineFeed|Prn_MarkFeed|Prn_SetCharacterSet|Prn_SetInterCharacterSet|Prn_SetLineSpacing|Prn_SetFontStyle|Prn_SetFontSize|Prn_SetAlignment|Prn_SendData|Prn_ReadData|Prn_BeginTransaction|Prn_EndTransaction|Prn_GetMsrTrack".split("|"),n={},t=0;t<e.length;t++){var i=e[t];n[i]=function(e){return function(n,t){o("zq."+e,n,t)}}(i)}return n}()});for(var g=[{f:"wxOpenLaunchAppExtinfo"},{i:21,f:"alipayLogin"},{i:11,n:"ttStat",f:"init|eventRegister|eventPurchase|eventAccessAccount|eventAccessPaymentChannel|eventAddCart|eventAddToFavorite|eventCheckOut|eventCreateGameRole|eventLogin|eventUpdateLevel|eventQuest|eventViewContent|eventV3|setUserUniqueID"},{i:12,n:"ttAd",f:"init|bannerExpressAd|interactionExpressAd|rewardVideoAd|fullScreenVideoAd|interactionAd2",e:1},{i:13,n:"xlx",f:"init|refreshMediaUserId|refreshAppSecret|open"},{i:14,n:"hyAd",f:"init|openMotivateVideoAd",e:1},{i:15,n:"fm",f:"rewardVideoAd",e:1},{i:16,n:"hx",f:"init|rewardVideoAD|fullscreenVideoAD|interstitialAD|nativeAD|isAdOpen|gameList",e:1},{i:17,n:"yuemeng",f:"openReader|setOutUserId"},{i:18,n:"txRtc",f:"login|logout|setUserInfo|requestPermission|setListener|removeListener|getSDKVersion|enableFloatWindow|enableMuteMode|setCallingBell|call|groupCall|setCallListener|removeCallListener|createChatRoom|enterChatRoom|destroyChatRoom|setChatRoomListener|removeChatRoomListener|createVideoLiveRoom|enterVideoLiveRoom|setVideoLiveRoomListener|removeVideoLiveRoomListener|enterRoom|startLocalAudio|stopLocalAudio|exitRoom"},{i:19,n:"leto",f:"syncUserInfo|jumpMiniGame|startGameCenter",e:1},{i:20,n:"yhad",f:"rewardAdvert",e:1},{i:22,n:"dyad",f:"jumpAdList|jumpAdDetail|jumpMine"},{i:23,n:"mid",f:"init|commonTask|weChatTask|cplTask|newsTask|novelTask|uiPreference|rewardVideo",e:1},{i:24,n:"xw",f:"jumpToList|jumpToDetail"},{i:25,n:"yilan",f:"init|shortVideo|littleTiktokVideo|littleKuaishouVideo|play|login|logout|getToken",e:1},{i:26,n:"nfc",f:"isSupported|isEnabled|openSettings|enableForegroundDispatch|disableForegroundDispatch|writeNdefUri|writeNdefText|writeNdefMime|cancelWriteNdef|makeReadOnlyNdef|cancelMakeReadOnlyNdef|writeMifareUltralightPage|cancelWriteMifareUltralightPage|transceiveMifareUltralight|cancelTransceiveMifareUltralight",e:1},{i:27,n:"pcg",f:"load|loadDetail"},{i:28,n:"bh",f:"rewardVideo|fullVideo|interactionAd|nativeAd",e:1},{i:29,n:"xprinter",f:"init|connectBtPort|connectNetPort|connectUsbPort|disconnectCurrentPort|disconnetNetPort|checkLinkedState|getBtAvailableDevice|onDiscovery|writeDataByUSB|writeSendData|write|writeTSC|writePos58|writePos76|writePos80",e:1},{i:30,n:"sms",f:"list",e:1},{i:32,n:"bm",f:"config|rewardVideoAd|interstitialAd|bannerAd|feedVideo|hVideo|interactive|cpa|setUserId",e:1},{i:34,n:"dlna",f:"search|videoResource|audioResource|imageResource|play|pause|stop|seek|devices|mediaInfo|positionInfo"},{i:35,n:"qmf",f:"wxPay|aliPay|unionPay|pay|seInfo|unionPayAppInstalled"},{i:36,n:"wch",f:"info"},{i:37,n:"push",f:"getPushId|getDeviceToken|bindTag|bindAlias|isOnline",e:1},{i:38,n:"cncb",f:"pay"},{i:39,n:"gdtAction",f:"logAction|setUserUniqueId|onRegister|onLogin|onBindAccount|onQuestFinish|onCreateRole|onUpdateLevel|onShare|onRateApp|onViewContent|onAddToCart|onCheckout|onPurchase|onAddPaymentChannel"},{i:40,n:"netum",f:"setMode|getBlueToothList|connectSppBlueTooth|sendCommand",e:1},{i:41,n:"fusion",f:"setUserId|bannerAd|interactionAd|rewardVideoAd",e:1},{i:42,n:"game321",f:"platformLogin|openSuit",e:1},{i:43,n:"gdt",f:"setChannel|interaction|interactionFullScreen|rewardVideo",e:1},{i:44,n:"topflow",f:"banner|rewardVideo",e:1},{i:45,n:"tel",f:"call"},{i:46,n:"qs",f:"scan",e:1},{i:47,n:"amapLoc",f:"getCurrentPosition|stop"},{i:48,n:"amapNavi",f:"showRoute",e:1},{i:49,n:"amapTrack",f:"startTrack|stopTrack",e:1},{i:50,n:"pns",f:"setAuthSDKInfo|checkAuthEnvEnable|getLoginToken"},{i:51,n:"sia",f:"checkSupport|request"},{i:52,n:"zj",f:"rewardVideo|interstitial|fullScreenVideo|banner|expressFeedFullVideo|contentVideo|h5|setUserId",e:1},{i:53,n:"serialPort",f:"getDevices|open|send|close",e:1},{i:54,n:"prt",f:"getUsbPrinters|open|close|sendBytesData|printText|printImage|printTable|initPrinter|setFont|setPrinter|setLeftMargin|cutPaper|ringBuzzer|blackLableFind|resetFeedDistance"},{i:55,n:"bmNews",f:"config|show|setUserId|startCountDown|setRewardResult",e:1},{i:56,n:"uhf",f:"open|close|isOpen|getFirmwareVersion|getTemperature|getPower|setPower|getRegion|setRegion|inventoryOnce|inventoryStart|inventoryStop|getTagIDCount|getTagIDs|readTagData|writeTagData|blockWriteTagData|blockEraseTagData|lockTag|killTag|setParameters|setParamBytes|readTagLED|readTagTemperature|registerReadTags|unregisterReadTags"},{i:57,n:"hkc",f:"addDevice|getDevices|addPreview|removePreview|startPreview|stopPreview|snapshot"},{i:58,n:"ob",f:"preview|removePreview|snapshot"},{i:59,n:"bmVideo",f:"config|show|setUserId",e:1},{i:60,n:"bmGame",f:"config|show|setUserId",e:1},{i:61,n:"bmNovel",f:"config|show|setUserId",e:1},{i:62,n:"xyAd",f:"config|rewardVideoAd|interstitialAd|bannerAd|feedVideo|hVideo|interactive|cpa|setUserId",e:1},{i:63,n:"xyNews",f:"config|show|startCountDown|setRewardResult|setUserId",e:1},{i:64,n:"xyVideo",f:"config|show|setUserId",e:1},{i:65,n:"xyGame",f:"config|show|setUserId",e:1},{i:66,n:"xyNovel",f:"config|show|setUserId",e:1},{i:67,n:"qqLoc",f:"getCurrentPosition|stop"},{i:68,n:"flyer",f:"logEvent|setAdditionalData|setMinTimeBetweenSessions|logSession|setResolveDeepLinkURLs|sendPushNotificationData|getAppsFlyerUID|setCustomerUserId|setCollect|setCollectData|stop|start|anonymizeUser",e:1},{i:69,n:"topVpn",f:"setConfigInfo|loginVOne|requestVPNResInfo|startService|closeService|logoutVOne|requestCaptcha|getStatus|modifyPassword",e:1},{i:70,n:"fbEvent",f:"logEvent|setAutoLogAppEventsEnabled|setAdvertiserIDCollectionEnabled"},{i:71,n:"fbLogin",f:"login|logout"},{i:72,n:"fbShare",f:"shareLink|sharePhoto|shareVideo|shareMedia"},{i:73,n:"tb",f:"requestPermissionIfNecessary|interaction|banner|rewardVideo",e:1},{i:74,n:"aliRpVerify",f:"start"},{i:75,n:"aliSmartVerify",f:"getMetaInfo|start"},{i:76,n:"aliZimVerify",f:"getMetaInfo|getSession|verify"},{i:77,n:"kc",f:"banner|insert|fullVideo|rewardVideo|videoContent|news|novel|dial|constellatory|almanac|oneiromancy|weather|study|xm",e:1},{i:78,n:"adjust",f:"registerAdjustBridge|trackEvent|setSessionParameter|trackThirdPartySharing|trackAdRevenue|trackPlayStoreSubscription|getGoogleAdId|getAmazonAdId|getAdjustAdId",e:1},{i:79,n:"vpn",f:"start|stop|status"},{i:80,n:"floater",f:"open|close|status|hasPermission|requestPermission|setWindowBackground"},{i:81,n:"yh",f:"startScan|stopScan|connect|disconnect|write",e:1},{i:82,n:"tz",f:"requestPermissionIfNecessary|reward|fullscreen|dialog|banner",e:1}],v=function(e,n,t){var i;Object.defineProperty(e,t,{configurable:!1,writable:!1,value:(i=(n?n+".":"")+t,function(e,n){"function"==typeof e?s(i,{},e):s(i,e,n)})})},m=function(e,n,t){for(var i=t.split("|"),o=0;o<i.length;o++){var a=i[o];a&&v(e,n,a)}},h=0;h<g.length;h++){var b=g[h];b.n?Object.defineProperty(n,b.n,{configurable:!1,writable:!1,value:function(){var e,n={};return m(n,b.i,b.f),b.e&&(Object.defineProperty(n,"setListener",{configurable:!1,writable:!1,value:(e=b.i,function(n){i(e+".setListener",{},function(e,t){if(n&&t){var i=JSON.parse(t);n(i.event,i.data)}})})}),Object.defineProperty(n,"removeListener",{configurable:!1,writable:!1,value:function(e){return function(){i(e+".removeListener")}}(b.i)})),n}()}):m(n,b.i,b.f)}Object.defineProperty(n,"bdocr",{configurable:!1,writable:!1,value:function(){for(var e="general|generalBasic|accurate|accurateBasic|generalEnhanced|webImage|idCardFront|idCardFrontAuto|idCardBack|idCardBackAuto|bankCard|vehicleLicense|drivingLicense|licensePlate|businessLicense|receipt|passport|vatInvoice|qrcode|numbers|lottery|businessCard|handWriting".split("|"),n={},t=0;t<e.length;t++){var i=e[t];n[i]=function(e){return function(n){u("t."+e,{},n)}}(i)}return n.custom=function(e,n){u("t.custom",e,n)},n}()});var y=/LT-APP\/(\d+)/,P=navigator?navigator.userAgent:"";Object.defineProperty(n,"inApp",{configurable:!1,writable:!1,value:y.test(P)}),Object.defineProperty(n,"version",{configurable:!1,writable:!1,value:n.inApp?parseInt(y.exec(P)[1]):0});var w=/LT-APP\/(\d+)\/(\d+)/;Object.defineProperty(n,"appVersion",{configurable:!1,writable:!1,value:w.test(P)?parseInt(w.exec(P)[2]):0}),Object.defineProperty(n,"ios",{configurable:!1,writable:!1,value:/(iPhone|iPad|iPod|iOS)/i.test(P)||navigator&&"MacIntel"==navigator.platform&&navigator.maxTouchPoints>0});var S=/YM-RT/.test(P);return Object.defineProperty(n,"isRoot",{configurable:!1,get:function(){return S}}),n.inApp&&n.ready(function(){n.version>35&&n.version<41&&r("_isRoot",{},function(e){S=e})}),n}();
|
|
3
3
|
|
|
4
4
|
export default jsBridge;
|