yach.open.jssdk 4.3.0-beta2 → 4.3.1-beta

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.
Files changed (276) hide show
  1. package/dist/yach_jssdk_4.1.32-bata.1.js +1 -0
  2. package/es/api/app/custom/talYoungFilesUpload.js +2 -0
  3. package/es/api/biz/chat/chooseConversationByCorpId.js +2 -0
  4. package/es/api/biz/chat/openSingleChat.js +2 -0
  5. package/es/api/biz/chat/openSquad.js +2 -0
  6. package/es/api/biz/chat/openTeamChat.js +2 -0
  7. package/es/api/biz/chat/pickConversation.js +2 -0
  8. package/es/api/biz/chat/sendP2PMsg.js +2 -0
  9. package/es/api/biz/contact/complexPicker.js +2 -0
  10. package/es/api/biz/contact/departmentsPicker.js +2 -0
  11. package/es/api/biz/group/groupComplexPicker.js +2 -0
  12. package/es/api/biz/map/multipointView.js +2 -0
  13. package/es/api/biz/map/view.js +2 -0
  14. package/es/api/biz/navigation/close.js +2 -0
  15. package/es/api/biz/navigation/goBack.js +2 -0
  16. package/es/api/biz/navigation/quit.js +2 -0
  17. package/es/api/biz/navigation/replace.js +2 -0
  18. package/es/api/biz/navigation/setIcon.js +2 -0
  19. package/es/api/biz/navigation/setLeft.js +2 -0
  20. package/es/api/biz/navigation/setMenu.js +2 -0
  21. package/es/api/biz/navigation/setRight.js +2 -0
  22. package/es/api/biz/navigation/setTitle.js +2 -0
  23. package/es/api/biz/navigation/setTitleExpandIcon.js +2 -0
  24. package/es/api/biz/navigation/setWindowBig.js +2 -0
  25. package/es/api/biz/navigation/tencentMeeting.js +2 -0
  26. package/es/api/biz/navigation/tencentMeetingBegin.js +2 -0
  27. package/es/api/biz/navigation/updateExpandTitle.js +2 -0
  28. package/es/api/biz/telephone/call.js +2 -0
  29. package/es/api/biz/telephone/showCallMenu.js +2 -0
  30. package/es/api/biz/util/authFinish.js +2 -0
  31. package/es/api/biz/util/authStart.js +2 -0
  32. package/es/api/biz/util/chosen.js +2 -0
  33. package/es/api/biz/util/clipboardFileUpload.js +2 -0
  34. package/es/api/biz/util/closeWindow.js +2 -0
  35. package/es/api/biz/util/complain.js +2 -0
  36. package/es/api/biz/util/createModifySchedule.js +2 -0
  37. package/es/api/biz/util/datepicker.js +2 -0
  38. package/es/api/biz/util/datetimepicker.js +2 -0
  39. package/es/api/biz/util/downloadFile.js +2 -0
  40. package/es/api/biz/util/entergroupCheck.js +3 -1
  41. package/es/api/biz/util/externalLinkPreviewFile.js +2 -0
  42. package/es/api/biz/util/feedback.js +2 -0
  43. package/es/api/biz/util/getSingleWebviewData.js +2 -0
  44. package/es/api/biz/util/getTogetherConfig.js +2 -0
  45. package/es/api/biz/util/getToken.js +2 -0
  46. package/es/api/biz/util/injectScript.js +2 -0
  47. package/es/api/biz/util/invoice.js +2 -0
  48. package/es/api/biz/util/mediaFileUpload.js +2 -0
  49. package/es/api/biz/util/onlineDocmentOpenTeamChat.js +2 -0
  50. package/es/api/biz/util/open.js +2 -0
  51. package/es/api/biz/util/openLink.js +2 -0
  52. package/es/api/biz/util/openMediaFileDialog.js +2 -0
  53. package/es/api/biz/util/openSingleWebview.js +2 -0
  54. package/es/api/biz/util/openSlidePanel.js +2 -0
  55. package/es/api/biz/util/openTalYoungToTopic.js +2 -0
  56. package/es/api/biz/util/openTogetherEyeWebview.js +2 -0
  57. package/es/api/biz/util/openUserSchedule.js +2 -0
  58. package/es/api/biz/util/openVideoPlayer.js +2 -0
  59. package/es/api/biz/util/previewFile.js +2 -0
  60. package/es/api/biz/util/previewImage.js +2 -0
  61. package/es/api/biz/util/proxy.js +2 -0
  62. package/es/api/biz/util/pushWorkMsg.js +2 -0
  63. package/es/api/biz/util/remind.js +2 -0
  64. package/es/api/biz/util/rouseApp.js +2 -0
  65. package/es/api/biz/util/savePic.js +2 -0
  66. package/es/api/biz/util/scan.js +2 -0
  67. package/es/api/biz/util/selectDepartment.js +2 -0
  68. package/es/api/biz/util/share.js +2 -0
  69. package/es/api/biz/util/takePicture.js +2 -0
  70. package/es/api/biz/util/uploadAttachment.js +2 -0
  71. package/es/api/biz/util/zfbAuth.js +2 -0
  72. package/es/api/biz/webViewMessage/send.js +2 -0
  73. package/es/api/device/audio/download.js +2 -0
  74. package/es/api/device/audio/onPlayEnd.js +2 -0
  75. package/es/api/device/audio/onRecordEnd.js +2 -0
  76. package/es/api/device/audio/onRecordEnd_v2.js +2 -0
  77. package/es/api/device/audio/pause.js +2 -0
  78. package/es/api/device/audio/play.js +2 -0
  79. package/es/api/device/audio/resume.js +2 -0
  80. package/es/api/device/audio/startRecord.js +2 -0
  81. package/es/api/device/audio/startRecord_v2.js +2 -0
  82. package/es/api/device/audio/stop.js +2 -0
  83. package/es/api/device/audio/stopRecord.js +2 -0
  84. package/es/api/device/audio/stopRecord_v2.js +2 -0
  85. package/es/api/device/base/checkStepPermission.js +2 -0
  86. package/es/api/device/base/getPhoneInfo.js +2 -0
  87. package/es/api/device/base/getUUID.js +3 -5
  88. package/es/api/device/connection/getNetworkType.js +2 -0
  89. package/es/api/device/connection/isAtTal.js +4 -2
  90. package/es/api/device/geolocation/get.js +2 -0
  91. package/es/api/device/geolocation/getSwitch.js +2 -0
  92. package/es/api/device/notification/actionSheet.js +2 -0
  93. package/es/api/device/notification/alert.js +2 -0
  94. package/es/api/device/notification/confirm.js +2 -0
  95. package/es/api/device/notification/hidePreloader.js +2 -0
  96. package/es/api/device/notification/showPreloader.js +2 -0
  97. package/es/api/device/notification/toast.js +2 -0
  98. package/es/api/device/notification/vibrate.js +2 -0
  99. package/es/api/device/system/getLang.js +2 -0
  100. package/es/api/device/system/setLight.js +2 -0
  101. package/es/api/initAPI.js +5 -3
  102. package/es/api/primary/createTab.js +2 -0
  103. package/es/api/primary/exitFullScreen.js +2 -0
  104. package/es/api/primary/fullScreen.js +2 -0
  105. package/es/api/primary/weeklyShare.js +2 -0
  106. package/es/api/runtime/permission/requestAuthCode.js +2 -0
  107. package/es/api/ui/pullToRefresh/disable.js +2 -0
  108. package/es/api/ui/pullToRefresh/enable.js +2 -0
  109. package/es/api/ui/pullToRefresh/stop.js +2 -0
  110. package/es/api/ui/webViewBounce/disable.js +2 -0
  111. package/es/api/util/domainStorage/getItem.js +2 -0
  112. package/es/api/util/domainStorage/removeItem.js +2 -0
  113. package/es/api/util/domainStorage/setItem.js +2 -0
  114. package/es/api/util/tool/flushLog.js +2 -0
  115. package/es/api/util/tool/log.js +2 -0
  116. package/es/index.d.ts +1 -7
  117. package/es/index.js +27 -22
  118. package/es/lib/bridge/mobile.js +19 -4
  119. package/es/lib/bridge/pc.js +11 -2
  120. package/es/lib/helper/apiHelper.js +2 -0
  121. package/es/lib/helper/codeMap.js +2 -0
  122. package/es/lib/helper/event.js +13 -0
  123. package/es/lib/helper/pcIframe.js +43 -12
  124. package/es/lib/index.js +21 -7
  125. package/es/lib/sdk/index.js +37 -18
  126. package/es/lib/sdk/sdk.typings.js +1 -0
  127. package/es/utils/bpitLog.js +13 -4
  128. package/es/utils/compareVersions.js +50 -23
  129. package/es/utils/console.js +15 -0
  130. package/es/utils/env.js +18 -11
  131. package/es/utils/index.js +5 -0
  132. package/libs/api/app/custom/talYoungFilesUpload.js +6 -1
  133. package/libs/api/biz/chat/chooseConversationByCorpId.js +6 -0
  134. package/libs/api/biz/chat/openSingleChat.js +6 -0
  135. package/libs/api/biz/chat/openSquad.js +6 -0
  136. package/libs/api/biz/chat/openTeamChat.js +6 -0
  137. package/libs/api/biz/chat/pickConversation.js +6 -0
  138. package/libs/api/biz/chat/sendP2PMsg.js +6 -0
  139. package/libs/api/biz/contact/complexPicker.js +6 -0
  140. package/libs/api/biz/contact/departmentsPicker.js +6 -0
  141. package/libs/api/biz/group/groupComplexPicker.js +6 -0
  142. package/libs/api/biz/map/multipointView.js +6 -0
  143. package/libs/api/biz/map/view.js +6 -0
  144. package/libs/api/biz/navigation/close.js +6 -0
  145. package/libs/api/biz/navigation/goBack.js +6 -0
  146. package/libs/api/biz/navigation/quit.js +6 -0
  147. package/libs/api/biz/navigation/replace.js +6 -0
  148. package/libs/api/biz/navigation/setIcon.js +7 -0
  149. package/libs/api/biz/navigation/setLeft.js +7 -0
  150. package/libs/api/biz/navigation/setMenu.js +7 -0
  151. package/libs/api/biz/navigation/setRight.js +7 -0
  152. package/libs/api/biz/navigation/setTitle.js +6 -0
  153. package/libs/api/biz/navigation/setTitleExpandIcon.js +7 -0
  154. package/libs/api/biz/navigation/setWindowBig.js +6 -1
  155. package/libs/api/biz/navigation/tencentMeeting.js +6 -0
  156. package/libs/api/biz/navigation/tencentMeetingBegin.js +6 -0
  157. package/libs/api/biz/navigation/updateExpandTitle.js +6 -0
  158. package/libs/api/biz/telephone/call.js +6 -0
  159. package/libs/api/biz/telephone/showCallMenu.js +6 -0
  160. package/libs/api/biz/util/authFinish.js +6 -0
  161. package/libs/api/biz/util/authStart.js +6 -0
  162. package/libs/api/biz/util/chosen.js +6 -0
  163. package/libs/api/biz/util/clipboardFileUpload.js +6 -0
  164. package/libs/api/biz/util/closeWindow.js +6 -0
  165. package/libs/api/biz/util/complain.js +6 -0
  166. package/libs/api/biz/util/createModifySchedule.js +6 -0
  167. package/libs/api/biz/util/datepicker.js +6 -0
  168. package/libs/api/biz/util/datetimepicker.js +6 -0
  169. package/libs/api/biz/util/downloadFile.js +6 -0
  170. package/libs/api/biz/util/entergroupCheck.js +7 -1
  171. package/libs/api/biz/util/externalLinkPreviewFile.js +6 -0
  172. package/libs/api/biz/util/feedback.js +6 -0
  173. package/libs/api/biz/util/getSingleWebviewData.js +6 -0
  174. package/libs/api/biz/util/getTogetherConfig.js +6 -0
  175. package/libs/api/biz/util/getToken.js +6 -0
  176. package/libs/api/biz/util/injectScript.js +6 -0
  177. package/libs/api/biz/util/invoice.js +6 -1
  178. package/libs/api/biz/util/mediaFileUpload.js +6 -1
  179. package/libs/api/biz/util/onlineDocmentOpenTeamChat.js +6 -0
  180. package/libs/api/biz/util/open.js +6 -0
  181. package/libs/api/biz/util/openLink.js +6 -0
  182. package/libs/api/biz/util/openMediaFileDialog.js +6 -1
  183. package/libs/api/biz/util/openSingleWebview.js +6 -0
  184. package/libs/api/biz/util/openSlidePanel.js +6 -0
  185. package/libs/api/biz/util/openTalYoungToTopic.js +6 -1
  186. package/libs/api/biz/util/openTogetherEyeWebview.js +6 -0
  187. package/libs/api/biz/util/openUserSchedule.js +6 -0
  188. package/libs/api/biz/util/openVideoPlayer.js +6 -0
  189. package/libs/api/biz/util/previewFile.js +6 -0
  190. package/libs/api/biz/util/previewImage.js +6 -0
  191. package/libs/api/biz/util/proxy.js +6 -0
  192. package/libs/api/biz/util/pushWorkMsg.js +6 -1
  193. package/libs/api/biz/util/remind.js +6 -0
  194. package/libs/api/biz/util/rouseApp.js +6 -1
  195. package/libs/api/biz/util/savePic.js +6 -0
  196. package/libs/api/biz/util/scan.js +6 -0
  197. package/libs/api/biz/util/selectDepartment.js +6 -0
  198. package/libs/api/biz/util/share.js +6 -0
  199. package/libs/api/biz/util/takePicture.js +6 -0
  200. package/libs/api/biz/util/uploadAttachment.js +6 -0
  201. package/libs/api/biz/util/zfbAuth.js +6 -0
  202. package/libs/api/biz/webViewMessage/send.js +6 -0
  203. package/libs/api/device/audio/download.js +6 -0
  204. package/libs/api/device/audio/onPlayEnd.js +6 -0
  205. package/libs/api/device/audio/onRecordEnd.js +6 -0
  206. package/libs/api/device/audio/onRecordEnd_v2.js +6 -0
  207. package/libs/api/device/audio/pause.js +6 -0
  208. package/libs/api/device/audio/play.js +6 -0
  209. package/libs/api/device/audio/resume.js +6 -0
  210. package/libs/api/device/audio/startRecord.js +6 -0
  211. package/libs/api/device/audio/startRecord_v2.js +6 -0
  212. package/libs/api/device/audio/stop.js +6 -0
  213. package/libs/api/device/audio/stopRecord.js +6 -0
  214. package/libs/api/device/audio/stopRecord_v2.js +6 -0
  215. package/libs/api/device/base/checkStepPermission.js +6 -0
  216. package/libs/api/device/base/getPhoneInfo.js +6 -0
  217. package/libs/api/device/base/getUUID.js +7 -5
  218. package/libs/api/device/connection/getNetworkType.js +6 -0
  219. package/libs/api/device/connection/isAtTal.js +8 -2
  220. package/libs/api/device/geolocation/get.js +6 -0
  221. package/libs/api/device/geolocation/getSwitch.js +6 -0
  222. package/libs/api/device/notification/actionSheet.js +6 -0
  223. package/libs/api/device/notification/alert.js +6 -0
  224. package/libs/api/device/notification/confirm.js +6 -0
  225. package/libs/api/device/notification/hidePreloader.js +6 -0
  226. package/libs/api/device/notification/showPreloader.js +6 -0
  227. package/libs/api/device/notification/toast.js +6 -0
  228. package/libs/api/device/notification/vibrate.js +6 -0
  229. package/libs/api/device/system/getLang.js +6 -0
  230. package/libs/api/device/system/setLight.js +6 -0
  231. package/libs/api/initAPI.js +13 -4
  232. package/libs/api/primary/createTab.js +6 -0
  233. package/libs/api/primary/exitFullScreen.js +6 -0
  234. package/libs/api/primary/fullScreen.js +6 -0
  235. package/libs/api/primary/weeklyShare.js +6 -0
  236. package/libs/api/runtime/permission/requestAuthCode.js +6 -0
  237. package/libs/api/ui/pullToRefresh/disable.js +6 -0
  238. package/libs/api/ui/pullToRefresh/enable.js +6 -0
  239. package/libs/api/ui/pullToRefresh/stop.js +6 -0
  240. package/libs/api/ui/webViewBounce/disable.js +6 -0
  241. package/libs/api/util/domainStorage/getItem.js +6 -0
  242. package/libs/api/util/domainStorage/removeItem.js +6 -0
  243. package/libs/api/util/domainStorage/setItem.js +6 -0
  244. package/libs/api/util/tool/flushLog.js +6 -0
  245. package/libs/api/util/tool/log.js +6 -0
  246. package/libs/index.d.ts +1 -7
  247. package/libs/index.js +271 -37
  248. package/libs/lib/bridge/index.js +7 -0
  249. package/libs/lib/bridge/mobile.js +39 -7
  250. package/libs/lib/bridge/pc.js +25 -5
  251. package/libs/lib/helper/apiHelper.js +6 -0
  252. package/libs/lib/helper/codeMap.js +6 -0
  253. package/libs/lib/helper/event.js +22 -1
  254. package/libs/lib/helper/pcIframe.js +49 -11
  255. package/libs/lib/index.js +32 -8
  256. package/libs/lib/sdk/index.js +47 -19
  257. package/libs/lib/sdk/sdk.typings.js +4 -0
  258. package/libs/utils/bpitLog.js +16 -4
  259. package/libs/utils/compareVersions.js +72 -27
  260. package/libs/utils/console.js +16 -0
  261. package/libs/utils/env.js +20 -11
  262. package/libs/utils/index.js +13 -0
  263. package/package.json +1 -1
  264. package/dist/yach_jssdk_4.3.0-beta2.js +0 -1
  265. package/es/api/biz/util/assistantCreate.d.ts +0 -11
  266. package/es/api/biz/util/assistantCreate.js +0 -23
  267. package/es/api/biz/util/disableScreenCapture.d.ts +0 -8
  268. package/es/api/biz/util/disableScreenCapture.js +0 -19
  269. package/es/api/biz/util/yachEvent.d.ts +0 -12
  270. package/es/api/biz/util/yachEvent.js +0 -27
  271. package/libs/api/biz/util/assistantCreate.d.ts +0 -11
  272. package/libs/api/biz/util/assistantCreate.js +0 -30
  273. package/libs/api/biz/util/disableScreenCapture.d.ts +0 -8
  274. package/libs/api/biz/util/disableScreenCapture.js +0 -26
  275. package/libs/api/biz/util/yachEvent.d.ts +0 -12
  276. package/libs/api/biz/util/yachEvent.js +0 -34
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function actionSheet(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { actionSheet };
@@ -14,10 +14,12 @@ var platform = {
14
14
  android: android,
15
15
  pc: pc
16
16
  };
17
+
17
18
  function alert(params) {
18
19
  initAPI(apiName, {
19
20
  params: params,
20
21
  platform: platform
21
22
  });
22
23
  }
24
+
23
25
  export { alert };
@@ -14,10 +14,12 @@ var platform = {
14
14
  android: android,
15
15
  pc: pc
16
16
  };
17
+
17
18
  function confirm(params) {
18
19
  initAPI(apiName, {
19
20
  params: params,
20
21
  platform: platform
21
22
  });
22
23
  }
24
+
23
25
  export { confirm };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function hidePreloader(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { hidePreloader };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function showPreloader(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { showPreloader };
@@ -1,8 +1,10 @@
1
1
  import initAPI from '../../initAPI';
2
2
  var apiName = 'device.notification.toast';
3
+
3
4
  function toast(params) {
4
5
  initAPI(apiName, {
5
6
  params: params
6
7
  });
7
8
  }
9
+
8
10
  export { toast };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function vibrate(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { vibrate };
@@ -1,8 +1,10 @@
1
1
  import initAPI from '../../initAPI';
2
2
  var apiName = 'device.system.getLang';
3
+
3
4
  function getLang(params) {
4
5
  initAPI(apiName, {
5
6
  params: params
6
7
  });
7
8
  }
9
+
8
10
  export { getLang };
@@ -10,10 +10,12 @@ var platform = {
10
10
  android: android
11
11
  };
12
12
  var apiName = 'device.system.setLight';
13
+
13
14
  function setLight(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { setLight };
package/es/api/initAPI.js CHANGED
@@ -11,12 +11,14 @@ var defaultPlatform = {
11
11
  vs: defaultVersion
12
12
  }
13
13
  };
14
+
14
15
  function initAPI(apiName, config) {
15
16
  var _config$params = config.params,
16
- params = _config$params === void 0 ? {} : _config$params,
17
- _config$platform = config.platform,
18
- platform = _config$platform === void 0 ? defaultPlatform : _config$platform;
17
+ params = _config$params === void 0 ? {} : _config$params,
18
+ _config$platform = config.platform,
19
+ platform = _config$platform === void 0 ? defaultPlatform : _config$platform;
19
20
  yachSdk.setAPI(apiName, platform);
20
21
  yachSdk.invokeAPI(apiName, params);
21
22
  }
23
+
22
24
  export default initAPI;
@@ -6,10 +6,12 @@ var pc = {
6
6
  var platform = {
7
7
  pc: pc
8
8
  };
9
+
9
10
  function createTab(params) {
10
11
  initAPI(apiName, {
11
12
  params: params,
12
13
  platform: platform
13
14
  });
14
15
  }
16
+
15
17
  export { createTab };
@@ -6,10 +6,12 @@ var pc = {
6
6
  var platform = {
7
7
  pc: pc
8
8
  };
9
+
9
10
  function exitFullScreen(params) {
10
11
  initAPI(apiName, {
11
12
  params: params,
12
13
  platform: platform
13
14
  });
14
15
  }
16
+
15
17
  export { exitFullScreen };
@@ -6,10 +6,12 @@ var pc = {
6
6
  var platform = {
7
7
  pc: pc
8
8
  };
9
+
9
10
  function fullScreen(params) {
10
11
  initAPI(apiName, {
11
12
  params: params,
12
13
  platform: platform
13
14
  });
14
15
  }
16
+
15
17
  export { fullScreen };
@@ -6,10 +6,12 @@ var pc = {
6
6
  var platform = {
7
7
  pc: pc
8
8
  };
9
+
9
10
  function weeklyShare(params) {
10
11
  initAPI(apiName, {
11
12
  params: params,
12
13
  platform: platform
13
14
  });
14
15
  }
16
+
15
17
  export { weeklyShare };
@@ -1,8 +1,10 @@
1
1
  import initAPI from '../../initAPI';
2
2
  var apiName = 'runtime.permission.requestAuthCode';
3
+
3
4
  function requestAuthCode(params) {
4
5
  initAPI(apiName, {
5
6
  params: params
6
7
  });
7
8
  }
9
+
8
10
  export { requestAuthCode };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function disable(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { disable };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function enable(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { enable };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function stop(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { stop };
@@ -6,10 +6,12 @@ var ios = {
6
6
  var platform = {
7
7
  ios: ios
8
8
  };
9
+
9
10
  function disable(params) {
10
11
  initAPI(apiName, {
11
12
  params: params,
12
13
  platform: platform
13
14
  });
14
15
  }
16
+
15
17
  export { disable };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function getItem(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { getItem };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function removeItem(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { removeItem };
@@ -10,10 +10,12 @@ var platform = {
10
10
  ios: ios,
11
11
  android: android
12
12
  };
13
+
13
14
  function setItem(params) {
14
15
  initAPI(apiName, {
15
16
  params: params,
16
17
  platform: platform
17
18
  });
18
19
  }
20
+
19
21
  export { setItem };
@@ -6,10 +6,12 @@ var pc = {
6
6
  var platform = {
7
7
  pc: pc
8
8
  };
9
+
9
10
  function flushLog(params) {
10
11
  initAPI(apiName, {
11
12
  params: params,
12
13
  platform: platform
13
14
  });
14
15
  }
16
+
15
17
  export { flushLog };
@@ -6,10 +6,12 @@ var pc = {
6
6
  var platform = {
7
7
  pc: pc
8
8
  };
9
+
9
10
  function writeLog(params) {
10
11
  initAPI(apiName, {
11
12
  params: params,
12
13
  platform: platform
13
14
  });
14
15
  }
16
+
15
17
  export { writeLog };
package/es/index.d.ts CHANGED
@@ -31,8 +31,6 @@ import { openTalYoungToTopic } from './api/biz/util/openTalYoungToTopic';
31
31
  import { getToken } from './api/biz/util/getToken';
32
32
  import { authStart } from './api/biz/util/authStart';
33
33
  import { authFinish } from './api/biz/util/authFinish';
34
- import { assistantCreate } from './api/biz/util/assistantCreate';
35
- import { yachEvent } from './api/biz/util/yachEvent';
36
34
  import { openTogetherEyeWebview } from './api/biz/util/openTogetherEyeWebview';
37
35
  import { getTogetherConfig } from './api/biz/util/getTogetherConfig';
38
36
  import { rouseApp } from './api/biz/util/rouseApp';
@@ -45,7 +43,6 @@ import { createModifySchedule } from './api/biz/util/createModifySchedule';
45
43
  import { openUserSchedule } from './api/biz/util/openUserSchedule';
46
44
  import { onlineDocmentOpenTeamChat } from './api/biz/util/onlineDocmentOpenTeamChat';
47
45
  import { entergroupCheck } from './api/biz/util/entergroupCheck';
48
- import { disableScreenCapture } from './api/biz/util/disableScreenCapture';
49
46
  /**navigation*/
50
47
  import { setIcon } from './api/biz/navigation/setIcon';
51
48
  import { setTitle } from './api/biz/navigation/setTitle';
@@ -123,7 +120,7 @@ import { flushLog } from './api/util/tool/flushLog';
123
120
  import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
124
121
  import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
125
122
  declare const version: string, sdkVersion: string, env: import("./lib/sdk/sdk.typings").IENV, platform: import("./lib/sdk/sdk.typings").ENV_ENUM, platformV2: import("./lib/sdk/sdk.typings").PlatformV2Props, config: (configParams: import("./lib/sdk/sdk.typings").IConfigParams) => void, ready: (readyCallback: () => void) => void, error: (callback: (err: any) => void) => void, on: (methodName: string, listener: (e: any) => void) => void, off: (methodName: string, listener: (e: any) => void) => void;
126
- export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, assistantCreate, yachEvent, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, setLight, openUserSchedule, disableScreenCapture, };
123
+ export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, setLight, openUserSchedule, };
127
124
  declare const _default: {
128
125
  version: string;
129
126
  sdkVersion: string;
@@ -169,8 +166,6 @@ declare const _default: {
169
166
  getToken: typeof getToken;
170
167
  authStart: typeof authStart;
171
168
  authFinish: typeof authFinish;
172
- assistantCreate: typeof assistantCreate;
173
- yachEvent: typeof yachEvent;
174
169
  openTogetherEyeWebview: typeof openTogetherEyeWebview;
175
170
  getTogetherConfig: typeof getTogetherConfig;
176
171
  rouseApp: typeof rouseApp;
@@ -181,7 +176,6 @@ declare const _default: {
181
176
  selectDepartment: typeof selectDepartment;
182
177
  createModifySchedule: typeof createModifySchedule;
183
178
  openUserSchedule: typeof openUserSchedule;
184
- disableScreenCapture: typeof disableScreenCapture;
185
179
  };
186
180
  telephone: {
187
181
  showCallMenu: typeof showCallMenu;
package/es/index.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import { yachSdk } from './lib';
2
2
  /*biz*****************************/
3
+
3
4
  /**util*/
5
+
4
6
  import { openLink } from './api/biz/util/openLink';
5
7
  import { feedback } from './api/biz/util/feedback';
6
8
  import { open } from './api/biz/util/open';
@@ -33,8 +35,6 @@ import { openTalYoungToTopic } from './api/biz/util/openTalYoungToTopic';
33
35
  import { getToken } from './api/biz/util/getToken';
34
36
  import { authStart } from './api/biz/util/authStart';
35
37
  import { authFinish } from './api/biz/util/authFinish';
36
- import { assistantCreate } from './api/biz/util/assistantCreate';
37
- import { yachEvent } from './api/biz/util/yachEvent';
38
38
  import { openTogetherEyeWebview } from './api/biz/util/openTogetherEyeWebview';
39
39
  import { getTogetherConfig } from './api/biz/util/getTogetherConfig';
40
40
  import { rouseApp } from './api/biz/util/rouseApp';
@@ -47,8 +47,8 @@ import { createModifySchedule } from './api/biz/util/createModifySchedule';
47
47
  import { openUserSchedule } from './api/biz/util/openUserSchedule';
48
48
  import { onlineDocmentOpenTeamChat } from './api/biz/util/onlineDocmentOpenTeamChat';
49
49
  import { entergroupCheck } from './api/biz/util/entergroupCheck';
50
- import { disableScreenCapture } from './api/biz/util/disableScreenCapture';
51
50
  /**navigation*/
51
+
52
52
  import { setIcon } from './api/biz/navigation/setIcon';
53
53
  import { setTitle } from './api/biz/navigation/setTitle';
54
54
  import { setMenu } from './api/biz/navigation/setMenu';
@@ -64,11 +64,14 @@ import { setWindowBig } from './api/biz/navigation/setWindowBig';
64
64
  import { tencentMeeting } from './api/biz/navigation/tencentMeeting';
65
65
  import { tencentMeetingBegin } from './api/biz/navigation/tencentMeetingBegin';
66
66
  /**contact*/
67
+
67
68
  import { complexPicker } from './api/biz/contact/complexPicker';
68
69
  import { departmentsPicker } from './api/biz/contact/departmentsPicker';
69
70
  /** group*/
71
+
70
72
  import { groupComplexPicker } from './api/biz/group/groupComplexPicker';
71
73
  /** chat*/
74
+
72
75
  import { chooseConversationByCorpId } from './api/biz/chat/chooseConversationByCorpId';
73
76
  import { pickConversation } from './api/biz/chat/pickConversation';
74
77
  import { openSingleChat } from './api/biz/chat/openSingleChat';
@@ -76,13 +79,16 @@ import { openTeamChat } from './api/biz/chat/openTeamChat';
76
79
  import { openSquad } from './api/biz/chat/openSquad';
77
80
  import { sendP2PMsg } from './api/biz/chat/sendP2PMsg';
78
81
  /* primary*****************************/
82
+
79
83
  import { createTab } from './api/primary/createTab';
80
84
  import { weeklyShare } from './api/primary/weeklyShare';
81
85
  import { fullScreen } from './api/primary/fullScreen';
82
86
  import { exitFullScreen } from './api/primary/exitFullScreen';
83
87
  /* runtime*****************************/
88
+
84
89
  import { requestAuthCode } from './api/runtime/permission/requestAuthCode';
85
90
  /** device */
91
+
86
92
  import { showPreloader } from './api/device/notification/showPreloader';
87
93
  import { hidePreloader } from './api/device/notification/hidePreloader';
88
94
  import { vibrate } from './api/device/notification/vibrate';
@@ -112,35 +118,37 @@ import { startRecord_v2 } from './api/device/audio/startRecord_v2';
112
118
  import { stopRecord_v2 } from './api/device/audio/stopRecord_v2';
113
119
  import { setLight } from './api/device/system/setLight';
114
120
  /** telephone */
121
+
115
122
  import { showCallMenu } from './api/biz/telephone/showCallMenu';
116
123
  import { call } from './api/biz/telephone/call';
117
124
  /** ui */
125
+
118
126
  import { disable as webViewBounceDisable } from './api/ui/webViewBounce/disable';
119
127
  import { enable as pullToRefreshEnable } from './api/ui/pullToRefresh/enable';
120
128
  import { stop as pullToRefreshStop } from './api/ui/pullToRefresh/stop';
121
- import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable';
122
- // demainStorage
129
+ import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable'; // demainStorage
130
+
123
131
  import { getItem } from './api/util/domainStorage/getItem';
124
132
  import { setItem } from './api/util/domainStorage/setItem';
125
- import { removeItem } from './api/util/domainStorage/removeItem';
126
- // log
133
+ import { removeItem } from './api/util/domainStorage/removeItem'; // log
134
+
127
135
  import { writeLog } from './api/util/tool/log';
128
136
  import { flushLog } from './api/util/tool/flushLog';
129
137
  import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
130
138
  import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
131
139
  console.log('add rouseApp ------------>', rouseApp);
132
140
  var _yachSdk$exportSdk = yachSdk.exportSdk,
133
- version = _yachSdk$exportSdk.version,
134
- sdkVersion = _yachSdk$exportSdk.sdkVersion,
135
- env = _yachSdk$exportSdk.env,
136
- platform = _yachSdk$exportSdk.platform,
137
- platformV2 = _yachSdk$exportSdk.platformV2,
138
- config = _yachSdk$exportSdk.config,
139
- ready = _yachSdk$exportSdk.ready,
140
- error = _yachSdk$exportSdk.error,
141
- on = _yachSdk$exportSdk.on,
142
- off = _yachSdk$exportSdk.off;
143
- export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, assistantCreate, yachEvent, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, setLight, openUserSchedule, disableScreenCapture };
141
+ version = _yachSdk$exportSdk.version,
142
+ sdkVersion = _yachSdk$exportSdk.sdkVersion,
143
+ env = _yachSdk$exportSdk.env,
144
+ platform = _yachSdk$exportSdk.platform,
145
+ platformV2 = _yachSdk$exportSdk.platformV2,
146
+ config = _yachSdk$exportSdk.config,
147
+ ready = _yachSdk$exportSdk.ready,
148
+ error = _yachSdk$exportSdk.error,
149
+ on = _yachSdk$exportSdk.on,
150
+ off = _yachSdk$exportSdk.off;
151
+ export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, hidePreloader, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, setLight, openUserSchedule };
144
152
  export default {
145
153
  version: version,
146
154
  sdkVersion: sdkVersion,
@@ -186,8 +194,6 @@ export default {
186
194
  getToken: getToken,
187
195
  authStart: authStart,
188
196
  authFinish: authFinish,
189
- assistantCreate: assistantCreate,
190
- yachEvent: yachEvent,
191
197
  openTogetherEyeWebview: openTogetherEyeWebview,
192
198
  getTogetherConfig: getTogetherConfig,
193
199
  rouseApp: rouseApp,
@@ -197,8 +203,7 @@ export default {
197
203
  complain: complain,
198
204
  selectDepartment: selectDepartment,
199
205
  createModifySchedule: createModifySchedule,
200
- openUserSchedule: openUserSchedule,
201
- disableScreenCapture: disableScreenCapture
206
+ openUserSchedule: openUserSchedule
202
207
  },
203
208
  telephone: {
204
209
  showCallMenu: showCallMenu,
@@ -5,25 +5,31 @@ import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
5
5
  import Event from '../helper/event';
6
6
  import { electronResCodeMap } from '../helper/codeMap';
7
7
  import { log, bpitLog } from '../../utils';
8
+
8
9
  function setupWebViewJavascriptBridge(callback) {
9
10
  if (window.WebViewJavascriptBridge) {
10
11
  return callback(WebViewJavascriptBridge);
11
12
  }
13
+
12
14
  if (window.WKWebViewJavascriptBridge) {
13
15
  return callback(WKWebViewJavascriptBridge);
14
16
  }
17
+
15
18
  if (window.WVJBCallbacks) {
16
19
  return window.WVJBCallbacks.push(callback);
17
20
  }
21
+
18
22
  window.WVJBCallbacks = [callback];
19
23
  var WVJBIframe = document.createElement('iframe');
20
24
  WVJBIframe.style.display = 'none';
21
25
  WVJBIframe.src = 'https://__bridge_loaded__';
22
26
  document.documentElement.appendChild(WVJBIframe);
27
+
23
28
  _setTimeout(function () {
24
29
  document.documentElement.removeChild(WVJBIframe);
25
30
  }, 0);
26
31
  }
32
+
27
33
  var mobileBridgeInit = function mobileBridgeInit() {
28
34
  return new _Promise(function (resolve, reject) {
29
35
  setupWebViewJavascriptBridge(function (bridge) {
@@ -70,14 +76,17 @@ var mobileBridgeInit = function mobileBridgeInit() {
70
76
  });
71
77
  });
72
78
  };
79
+
73
80
  var mobileBridge = function mobileBridge(method, param) {
74
81
  return new _Promise(function (resolve, reject) {
75
82
  var p = _Object$assign({}, param);
83
+
76
84
  setupWebViewJavascriptBridge(function (bridge) {
77
85
  if (param.control) {
78
86
  bridge.registerHandler(method, function (data) {
79
87
  var onSuccess = param.onSuccess;
80
88
  delete p.onSuccess;
89
+
81
90
  if ('function' === typeof onSuccess) {
82
91
  onSuccess(data);
83
92
  resolve({
@@ -87,12 +96,16 @@ var mobileBridge = function mobileBridge(method, param) {
87
96
  }
88
97
  });
89
98
  }
99
+
90
100
  bridge.callHandler(method, param, function (e) {
91
101
  var code = e.code,
92
- message = e.message,
93
- data = e.data;
102
+ message = e.message,
103
+ data = e.data;
104
+
94
105
  var _code = _parseInt(code);
106
+
95
107
  var callbackStr = electronResCodeMap(_code);
108
+
96
109
  if (_code === -2 || _code === 7) {
97
110
  bpitLog({
98
111
  method: method,
@@ -109,8 +122,7 @@ var mobileBridge = function mobileBridge(method, param) {
109
122
  reject({
110
123
  _code: _code,
111
124
  message: message
112
- });
113
- // return;
125
+ }); // return;
114
126
  }
115
127
 
116
128
  var callbackFun = p[callbackStr];
@@ -122,9 +134,11 @@ var mobileBridge = function mobileBridge(method, param) {
122
134
  message: message,
123
135
  callbackFun: callbackFun
124
136
  });
137
+
125
138
  if ('function' === typeof callbackFun) {
126
139
  callbackFun(data || message);
127
140
  }
141
+
128
142
  resolve({
129
143
  _code: _code,
130
144
  message: message,
@@ -134,4 +148,5 @@ var mobileBridge = function mobileBridge(method, param) {
134
148
  });
135
149
  });
136
150
  };
151
+
137
152
  export { mobileBridge, mobileBridgeInit };
@@ -3,17 +3,22 @@ import _parseInt from "@babel/runtime-corejs3/core-js/parse-int";
3
3
  import PcIframe from '../helper/pcIframe';
4
4
  import { electronResCodeMap } from '../helper/codeMap';
5
5
  import { log, bpitLog } from '../../utils';
6
+
6
7
  var PcBridgeInit = function PcBridgeInit() {
7
8
  PcIframe.init();
8
9
  };
10
+
9
11
  var pcBridge = function pcBridge(method, param) {
10
12
  return new _Promise(function (resolve) {
11
13
  return PcIframe.invokeAPI(method, param, function (_ref) {
12
14
  var data = _ref.data,
13
- code = _ref.code,
14
- message = _ref.message;
15
+ code = _ref.code,
16
+ message = _ref.message;
17
+
15
18
  var _code = _parseInt(code);
19
+
16
20
  var callbackStr = electronResCodeMap(_code);
21
+
17
22
  if (_code === -2) {
18
23
  bpitLog({
19
24
  method: method,
@@ -21,6 +26,7 @@ var pcBridge = function pcBridge(method, param) {
21
26
  message: message || 'SDK执行失败回调,相关参数'
22
27
  });
23
28
  }
29
+
24
30
  var callbackFun = param[callbackStr];
25
31
  log("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
26
32
  method: method,
@@ -30,9 +36,11 @@ var pcBridge = function pcBridge(method, param) {
30
36
  message: message,
31
37
  callbackFun: callbackFun
32
38
  });
39
+
33
40
  if ('function' === typeof callbackFun) {
34
41
  callbackFun(data || message);
35
42
  }
43
+
36
44
  resolve({
37
45
  _code: _code,
38
46
  message: message,
@@ -41,4 +49,5 @@ var pcBridge = function pcBridge(method, param) {
41
49
  });
42
50
  });
43
51
  };
52
+
44
53
  export { pcBridge, PcBridgeInit };