yach.open.jssdk 4.3.7 → 4.3.8
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/dist/yach_jssdk_4.3.8.js +1 -0
- package/es/api/app/custom/talYoungFilesUpload.js +2 -0
- package/es/api/biz/chat/chooseConversationByCorpId.js +2 -0
- package/es/api/biz/chat/openSingleChat.js +2 -0
- package/es/api/biz/chat/openSquad.js +2 -0
- package/es/api/biz/chat/openTeamChat.js +2 -0
- package/es/api/biz/chat/pickConversation.js +2 -0
- package/es/api/biz/chat/sendP2PMsg.js +2 -0
- package/es/api/biz/contact/complexPicker.js +2 -0
- package/es/api/biz/contact/departmentsPicker.js +2 -0
- package/es/api/biz/group/groupComplexPicker.js +2 -0
- package/es/api/biz/map/multipointView.js +2 -0
- package/es/api/biz/map/view.js +2 -0
- package/es/api/biz/navigation/close.js +2 -0
- package/es/api/biz/navigation/goBack.js +2 -0
- package/es/api/biz/navigation/quit.js +2 -0
- package/es/api/biz/navigation/replace.js +2 -0
- package/es/api/biz/navigation/setIcon.js +2 -0
- package/es/api/biz/navigation/setLeft.js +2 -0
- package/es/api/biz/navigation/setMenu.js +2 -0
- package/es/api/biz/navigation/setPanGestureEnable.js +2 -0
- package/es/api/biz/navigation/setRight.js +2 -0
- package/es/api/biz/navigation/setTitle.js +2 -0
- package/es/api/biz/navigation/setTitleExpandIcon.js +2 -0
- package/es/api/biz/navigation/setWindowBig.js +2 -0
- package/es/api/biz/navigation/tencentMeeting.js +2 -0
- package/es/api/biz/navigation/tencentMeetingBegin.js +2 -0
- package/es/api/biz/navigation/updateExpandTitle.js +2 -0
- package/es/api/biz/telephone/call.js +2 -0
- package/es/api/biz/telephone/showCallMenu.js +2 -0
- package/es/api/biz/util/addAppToNav.js +2 -0
- package/es/api/biz/util/assistantCreate.js +2 -0
- package/es/api/biz/util/authFinish.js +2 -0
- package/es/api/biz/util/authStart.js +2 -0
- package/es/api/biz/util/chosen.js +2 -0
- package/es/api/biz/util/clipboardFileUpload.js +2 -0
- package/es/api/biz/util/closeWindow.js +2 -0
- package/es/api/biz/util/complain.js +2 -0
- package/es/api/biz/util/createModifySchedule.js +2 -0
- package/es/api/biz/util/datepicker.js +2 -0
- package/es/api/biz/util/datetimepicker.js +2 -0
- package/es/api/biz/util/disableScreenCapture.js +2 -0
- package/es/api/biz/util/downloadFile.js +2 -0
- package/es/api/biz/util/entergroupCheck.js +2 -0
- package/es/api/biz/util/externalLinkPreviewFile.js +2 -0
- package/es/api/biz/util/feedback.js +2 -0
- package/es/api/biz/util/getSingleWebviewData.js +2 -0
- package/es/api/biz/util/getTogetherConfig.js +2 -0
- package/es/api/biz/util/getToken.js +2 -0
- package/es/api/biz/util/injectScript.js +2 -0
- package/es/api/biz/util/invoice.js +2 -0
- package/es/api/biz/util/mediaFileUpload.js +2 -0
- package/es/api/biz/util/onlineDocmentOpenTeamChat.js +2 -0
- package/es/api/biz/util/open.js +2 -0
- package/es/api/biz/util/openFutureGroup.js +2 -0
- package/es/api/biz/util/openLink.js +2 -0
- package/es/api/biz/util/openMediaFileDialog.js +2 -0
- package/es/api/biz/util/openSingleWebview.js +2 -0
- package/es/api/biz/util/openSlidePanel.js +2 -0
- package/es/api/biz/util/openTalYoungToTopic.js +2 -0
- package/es/api/biz/util/openTogetherEyeWebview.js +2 -0
- package/es/api/biz/util/openUserSchedule.js +2 -0
- package/es/api/biz/util/openVideoPlayer.js +2 -0
- package/es/api/biz/util/previewFile.js +2 -0
- package/es/api/biz/util/previewImage.js +2 -0
- package/es/api/biz/util/proxy.js +2 -0
- package/es/api/biz/util/pushWorkMsg.js +2 -0
- package/es/api/biz/util/remind.js +2 -0
- package/es/api/biz/util/resetSessionUnread.js +2 -0
- package/es/api/biz/util/rouseApp.js +2 -0
- package/es/api/biz/util/savePic.js +2 -0
- package/es/api/biz/util/scan.js +2 -0
- package/es/api/biz/util/selectDepartment.js +2 -0
- package/es/api/biz/util/share.js +2 -0
- package/es/api/biz/util/takePicture.js +2 -0
- package/es/api/biz/util/uploadAttachment.js +2 -0
- package/es/api/biz/util/yachEvent.js +2 -0
- package/es/api/biz/util/zfbAuth.js +2 -0
- package/es/api/biz/webViewMessage/send.js +2 -0
- package/es/api/device/audio/download.js +2 -0
- package/es/api/device/audio/onPlayEnd.js +2 -0
- package/es/api/device/audio/onRecordEnd.js +2 -0
- package/es/api/device/audio/onRecordEnd_v2.js +2 -0
- package/es/api/device/audio/pause.js +2 -0
- package/es/api/device/audio/play.js +2 -0
- package/es/api/device/audio/resume.js +2 -0
- package/es/api/device/audio/startRecord.js +2 -0
- package/es/api/device/audio/startRecord_v2.js +2 -0
- package/es/api/device/audio/stop.js +2 -0
- package/es/api/device/audio/stopRecord.js +2 -0
- package/es/api/device/audio/stopRecord_v2.js +2 -0
- package/es/api/device/base/checkStepPermission.js +2 -0
- package/es/api/device/base/getPhoneInfo.js +2 -0
- package/es/api/device/base/getUUID.js +2 -0
- package/es/api/device/connection/getNetworkType.js +2 -0
- package/es/api/device/connection/isAtTal.js +4 -2
- package/es/api/device/geolocation/get.js +2 -0
- package/es/api/device/geolocation/getSwitch.js +2 -0
- package/es/api/device/notification/actionSheet.js +2 -0
- package/es/api/device/notification/alert.js +2 -0
- package/es/api/device/notification/confirm.js +2 -0
- package/es/api/device/notification/hidePreloader.js +2 -0
- package/es/api/device/notification/showPreloader.js +2 -0
- package/es/api/device/notification/toast.js +2 -0
- package/es/api/device/notification/vibrate.js +2 -0
- package/es/api/device/system/getLang.js +2 -0
- package/es/api/device/system/setLight.js +2 -0
- package/es/api/initAPI.js +5 -3
- package/es/api/primary/createTab.js +2 -0
- package/es/api/primary/exitFullScreen.js +2 -0
- package/es/api/primary/fullScreen.js +2 -0
- package/es/api/primary/weeklyShare.js +2 -0
- package/es/api/runtime/permission/requestAuthCode.js +2 -0
- package/es/api/ui/pullToRefresh/disable.js +2 -0
- package/es/api/ui/pullToRefresh/enable.js +2 -0
- package/es/api/ui/pullToRefresh/stop.js +2 -0
- package/es/api/ui/webViewBounce/disable.js +2 -0
- package/es/api/util/domainStorage/getItem.js +2 -0
- package/es/api/util/domainStorage/removeItem.js +2 -0
- package/es/api/util/domainStorage/setItem.js +2 -0
- package/es/api/util/tool/flushLog.js +2 -0
- package/es/api/util/tool/log.js +2 -0
- package/es/index.js +25 -14
- package/es/lib/bridge/mobile.js +24 -8
- package/es/lib/bridge/pc.js +16 -8
- package/es/lib/helper/apiHelper.js +2 -0
- package/es/lib/helper/codeMap.js +2 -0
- package/es/lib/helper/event.js +13 -0
- package/es/lib/helper/pcIframe.js +45 -14
- package/es/lib/index.js +21 -7
- package/es/lib/sdk/index.js +35 -14
- package/es/lib/sdk/sdk.typings.js +1 -0
- package/es/utils/bpitLog.js +13 -4
- package/es/utils/compareVersions.js +50 -23
- package/es/utils/console.d.ts +1 -1
- package/es/utils/console.js +17 -2
- package/es/utils/env.js +19 -12
- package/es/utils/index.js +5 -0
- package/libs/api/app/custom/talYoungFilesUpload.js +6 -1
- package/libs/api/biz/chat/chooseConversationByCorpId.js +6 -0
- package/libs/api/biz/chat/openSingleChat.js +6 -0
- package/libs/api/biz/chat/openSquad.js +6 -0
- package/libs/api/biz/chat/openTeamChat.js +6 -0
- package/libs/api/biz/chat/pickConversation.js +6 -0
- package/libs/api/biz/chat/sendP2PMsg.js +6 -0
- package/libs/api/biz/contact/complexPicker.js +6 -0
- package/libs/api/biz/contact/departmentsPicker.js +6 -0
- package/libs/api/biz/group/groupComplexPicker.js +6 -0
- package/libs/api/biz/map/multipointView.js +6 -0
- package/libs/api/biz/map/view.js +6 -0
- package/libs/api/biz/navigation/close.js +6 -0
- package/libs/api/biz/navigation/goBack.js +6 -0
- package/libs/api/biz/navigation/quit.js +6 -0
- package/libs/api/biz/navigation/replace.js +6 -0
- package/libs/api/biz/navigation/setIcon.js +7 -0
- package/libs/api/biz/navigation/setLeft.js +7 -0
- package/libs/api/biz/navigation/setMenu.js +7 -0
- package/libs/api/biz/navigation/setPanGestureEnable.js +7 -0
- package/libs/api/biz/navigation/setRight.js +7 -0
- package/libs/api/biz/navigation/setTitle.js +6 -0
- package/libs/api/biz/navigation/setTitleExpandIcon.js +7 -0
- package/libs/api/biz/navigation/setWindowBig.js +6 -1
- package/libs/api/biz/navigation/tencentMeeting.js +6 -0
- package/libs/api/biz/navigation/tencentMeetingBegin.js +6 -0
- package/libs/api/biz/navigation/updateExpandTitle.js +6 -0
- package/libs/api/biz/telephone/call.js +6 -0
- package/libs/api/biz/telephone/showCallMenu.js +6 -0
- package/libs/api/biz/util/addAppToNav.js +6 -0
- package/libs/api/biz/util/assistantCreate.js +6 -0
- package/libs/api/biz/util/authFinish.js +6 -0
- package/libs/api/biz/util/authStart.js +6 -0
- package/libs/api/biz/util/chosen.js +6 -0
- package/libs/api/biz/util/clipboardFileUpload.js +6 -0
- package/libs/api/biz/util/closeWindow.js +6 -0
- package/libs/api/biz/util/complain.js +6 -0
- package/libs/api/biz/util/createModifySchedule.js +6 -0
- package/libs/api/biz/util/datepicker.js +6 -0
- package/libs/api/biz/util/datetimepicker.js +6 -0
- package/libs/api/biz/util/disableScreenCapture.js +6 -0
- package/libs/api/biz/util/downloadFile.js +6 -0
- package/libs/api/biz/util/entergroupCheck.js +6 -0
- package/libs/api/biz/util/externalLinkPreviewFile.js +6 -0
- package/libs/api/biz/util/feedback.js +6 -0
- package/libs/api/biz/util/getSingleWebviewData.js +6 -0
- package/libs/api/biz/util/getTogetherConfig.js +6 -0
- package/libs/api/biz/util/getToken.js +6 -0
- package/libs/api/biz/util/injectScript.js +6 -0
- package/libs/api/biz/util/invoice.js +6 -1
- package/libs/api/biz/util/mediaFileUpload.js +6 -1
- package/libs/api/biz/util/onlineDocmentOpenTeamChat.js +6 -0
- package/libs/api/biz/util/open.js +6 -0
- package/libs/api/biz/util/openFutureGroup.js +6 -0
- package/libs/api/biz/util/openLink.js +6 -0
- package/libs/api/biz/util/openMediaFileDialog.js +6 -1
- package/libs/api/biz/util/openSingleWebview.js +6 -0
- package/libs/api/biz/util/openSlidePanel.js +6 -0
- package/libs/api/biz/util/openTalYoungToTopic.js +6 -1
- package/libs/api/biz/util/openTogetherEyeWebview.js +6 -0
- package/libs/api/biz/util/openUserSchedule.js +6 -0
- package/libs/api/biz/util/openVideoPlayer.js +6 -0
- package/libs/api/biz/util/previewFile.js +6 -0
- package/libs/api/biz/util/previewImage.js +6 -0
- package/libs/api/biz/util/proxy.js +6 -0
- package/libs/api/biz/util/pushWorkMsg.js +6 -1
- package/libs/api/biz/util/remind.js +6 -0
- package/libs/api/biz/util/resetSessionUnread.js +6 -0
- package/libs/api/biz/util/rouseApp.js +6 -1
- package/libs/api/biz/util/savePic.js +6 -0
- package/libs/api/biz/util/scan.js +6 -0
- package/libs/api/biz/util/selectDepartment.js +6 -0
- package/libs/api/biz/util/share.js +6 -0
- package/libs/api/biz/util/takePicture.js +6 -0
- package/libs/api/biz/util/uploadAttachment.js +6 -0
- package/libs/api/biz/util/yachEvent.js +6 -0
- package/libs/api/biz/util/zfbAuth.js +6 -0
- package/libs/api/biz/webViewMessage/send.js +6 -0
- package/libs/api/device/audio/download.js +6 -0
- package/libs/api/device/audio/onPlayEnd.js +6 -0
- package/libs/api/device/audio/onRecordEnd.js +6 -0
- package/libs/api/device/audio/onRecordEnd_v2.js +6 -0
- package/libs/api/device/audio/pause.js +6 -0
- package/libs/api/device/audio/play.js +6 -0
- package/libs/api/device/audio/resume.js +6 -0
- package/libs/api/device/audio/startRecord.js +6 -0
- package/libs/api/device/audio/startRecord_v2.js +6 -0
- package/libs/api/device/audio/stop.js +6 -0
- package/libs/api/device/audio/stopRecord.js +6 -0
- package/libs/api/device/audio/stopRecord_v2.js +6 -0
- package/libs/api/device/base/checkStepPermission.js +6 -0
- package/libs/api/device/base/getPhoneInfo.js +6 -0
- package/libs/api/device/base/getUUID.js +6 -0
- package/libs/api/device/connection/getNetworkType.js +6 -0
- package/libs/api/device/connection/isAtTal.js +8 -2
- package/libs/api/device/geolocation/get.js +6 -0
- package/libs/api/device/geolocation/getSwitch.js +6 -0
- package/libs/api/device/notification/actionSheet.js +6 -0
- package/libs/api/device/notification/alert.js +6 -0
- package/libs/api/device/notification/confirm.js +6 -0
- package/libs/api/device/notification/hidePreloader.js +6 -0
- package/libs/api/device/notification/showPreloader.js +6 -0
- package/libs/api/device/notification/toast.js +6 -0
- package/libs/api/device/notification/vibrate.js +6 -0
- package/libs/api/device/system/getLang.js +6 -0
- package/libs/api/device/system/setLight.js +6 -0
- package/libs/api/initAPI.js +13 -4
- package/libs/api/primary/createTab.js +6 -0
- package/libs/api/primary/exitFullScreen.js +6 -0
- package/libs/api/primary/fullScreen.js +6 -0
- package/libs/api/primary/weeklyShare.js +6 -0
- package/libs/api/runtime/permission/requestAuthCode.js +6 -0
- package/libs/api/ui/pullToRefresh/disable.js +6 -0
- package/libs/api/ui/pullToRefresh/enable.js +6 -0
- package/libs/api/ui/pullToRefresh/stop.js +6 -0
- package/libs/api/ui/webViewBounce/disable.js +6 -0
- package/libs/api/util/domainStorage/getItem.js +6 -0
- package/libs/api/util/domainStorage/removeItem.js +6 -0
- package/libs/api/util/domainStorage/setItem.js +6 -0
- package/libs/api/util/tool/flushLog.js +6 -0
- package/libs/api/util/tool/log.js +6 -0
- package/libs/index.js +275 -15
- package/libs/lib/bridge/index.js +7 -0
- package/libs/lib/bridge/mobile.js +45 -11
- package/libs/lib/bridge/pc.js +31 -11
- package/libs/lib/helper/apiHelper.js +6 -0
- package/libs/lib/helper/codeMap.js +6 -0
- package/libs/lib/helper/event.js +22 -1
- package/libs/lib/helper/pcIframe.js +51 -13
- package/libs/lib/index.js +32 -8
- package/libs/lib/sdk/index.js +45 -15
- package/libs/lib/sdk/sdk.typings.js +4 -0
- package/libs/utils/bpitLog.js +16 -4
- package/libs/utils/compareVersions.js +72 -27
- package/libs/utils/console.d.ts +1 -1
- package/libs/utils/console.js +18 -2
- package/libs/utils/env.js +21 -12
- package/libs/utils/index.js +13 -0
- package/package.json +1 -1
- package/dist/yach_jssdk_4.3.7.js +0 -1
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import initAPI from '../../initAPI';
|
|
2
|
-
var apiName = 'device.connection.isAtTal';
|
|
3
|
-
// const ios = {
|
|
2
|
+
var apiName = 'device.connection.isAtTal'; // const ios = {
|
|
4
3
|
// vs: '0.0.0',
|
|
5
4
|
// };
|
|
6
5
|
// const android = {
|
|
7
6
|
// vs: '0.0.0',
|
|
8
7
|
// };
|
|
8
|
+
|
|
9
9
|
var pc = {
|
|
10
10
|
vs: '0.0.0'
|
|
11
11
|
};
|
|
12
12
|
var platform = {
|
|
13
13
|
pc: pc
|
|
14
14
|
};
|
|
15
|
+
|
|
15
16
|
function isAtTal(params) {
|
|
16
17
|
initAPI(apiName, {
|
|
17
18
|
params: params,
|
|
18
19
|
platform: platform
|
|
19
20
|
});
|
|
20
21
|
}
|
|
22
|
+
|
|
21
23
|
export { isAtTal };
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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;
|
package/es/api/util/tool/log.js
CHANGED
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';
|
|
@@ -51,6 +53,7 @@ import { resetSessionUnread } from './api/biz/util/resetSessionUnread';
|
|
|
51
53
|
import { disableScreenCapture } from './api/biz/util/disableScreenCapture';
|
|
52
54
|
import { openFutureGroup } from './api/biz/util/openFutureGroup';
|
|
53
55
|
/**navigation*/
|
|
56
|
+
|
|
54
57
|
import { setIcon } from './api/biz/navigation/setIcon';
|
|
55
58
|
import { setTitle } from './api/biz/navigation/setTitle';
|
|
56
59
|
import { setMenu } from './api/biz/navigation/setMenu';
|
|
@@ -67,11 +70,14 @@ import { tencentMeeting } from './api/biz/navigation/tencentMeeting';
|
|
|
67
70
|
import { tencentMeetingBegin } from './api/biz/navigation/tencentMeetingBegin';
|
|
68
71
|
import { setPanGestureEnable } from './api/biz/navigation/setPanGestureEnable';
|
|
69
72
|
/**contact*/
|
|
73
|
+
|
|
70
74
|
import { complexPicker } from './api/biz/contact/complexPicker';
|
|
71
75
|
import { departmentsPicker } from './api/biz/contact/departmentsPicker';
|
|
72
76
|
/** group*/
|
|
77
|
+
|
|
73
78
|
import { groupComplexPicker } from './api/biz/group/groupComplexPicker';
|
|
74
79
|
/** chat*/
|
|
80
|
+
|
|
75
81
|
import { chooseConversationByCorpId } from './api/biz/chat/chooseConversationByCorpId';
|
|
76
82
|
import { pickConversation } from './api/biz/chat/pickConversation';
|
|
77
83
|
import { openSingleChat } from './api/biz/chat/openSingleChat';
|
|
@@ -79,13 +85,16 @@ import { openTeamChat } from './api/biz/chat/openTeamChat';
|
|
|
79
85
|
import { openSquad } from './api/biz/chat/openSquad';
|
|
80
86
|
import { sendP2PMsg } from './api/biz/chat/sendP2PMsg';
|
|
81
87
|
/* primary*****************************/
|
|
88
|
+
|
|
82
89
|
import { createTab } from './api/primary/createTab';
|
|
83
90
|
import { weeklyShare } from './api/primary/weeklyShare';
|
|
84
91
|
import { fullScreen } from './api/primary/fullScreen';
|
|
85
92
|
import { exitFullScreen } from './api/primary/exitFullScreen';
|
|
86
93
|
/* runtime*****************************/
|
|
94
|
+
|
|
87
95
|
import { requestAuthCode } from './api/runtime/permission/requestAuthCode';
|
|
88
96
|
/** device */
|
|
97
|
+
|
|
89
98
|
import { showPreloader } from './api/device/notification/showPreloader';
|
|
90
99
|
import { hidePreloader } from './api/device/notification/hidePreloader';
|
|
91
100
|
import { vibrate } from './api/device/notification/vibrate';
|
|
@@ -115,18 +124,20 @@ import { startRecord_v2 } from './api/device/audio/startRecord_v2';
|
|
|
115
124
|
import { stopRecord_v2 } from './api/device/audio/stopRecord_v2';
|
|
116
125
|
import { setLight } from './api/device/system/setLight';
|
|
117
126
|
/** telephone */
|
|
127
|
+
|
|
118
128
|
import { showCallMenu } from './api/biz/telephone/showCallMenu';
|
|
119
129
|
import { call } from './api/biz/telephone/call';
|
|
120
130
|
/** ui */
|
|
131
|
+
|
|
121
132
|
import { disable as webViewBounceDisable } from './api/ui/webViewBounce/disable';
|
|
122
133
|
import { enable as pullToRefreshEnable } from './api/ui/pullToRefresh/enable';
|
|
123
134
|
import { stop as pullToRefreshStop } from './api/ui/pullToRefresh/stop';
|
|
124
|
-
import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable';
|
|
125
|
-
|
|
135
|
+
import { disable as pullToRefreshDisable } from './api/ui/pullToRefresh/disable'; // demainStorage
|
|
136
|
+
|
|
126
137
|
import { getItem } from './api/util/domainStorage/getItem';
|
|
127
138
|
import { setItem } from './api/util/domainStorage/setItem';
|
|
128
|
-
import { removeItem } from './api/util/domainStorage/removeItem';
|
|
129
|
-
|
|
139
|
+
import { removeItem } from './api/util/domainStorage/removeItem'; // log
|
|
140
|
+
|
|
130
141
|
import { writeLog } from './api/util/tool/log';
|
|
131
142
|
import { flushLog } from './api/util/tool/flushLog';
|
|
132
143
|
import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
|
|
@@ -134,16 +145,16 @@ import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
|
|
|
134
145
|
import { addAppToNav } from './api/biz/util/addAppToNav';
|
|
135
146
|
console.log('add rouseApp ------------>', rouseApp);
|
|
136
147
|
var _yachSdk$exportSdk = yachSdk.exportSdk,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
148
|
+
version = _yachSdk$exportSdk.version,
|
|
149
|
+
sdkVersion = _yachSdk$exportSdk.sdkVersion,
|
|
150
|
+
env = _yachSdk$exportSdk.env,
|
|
151
|
+
platform = _yachSdk$exportSdk.platform,
|
|
152
|
+
platformV2 = _yachSdk$exportSdk.platformV2,
|
|
153
|
+
config = _yachSdk$exportSdk.config,
|
|
154
|
+
ready = _yachSdk$exportSdk.ready,
|
|
155
|
+
error = _yachSdk$exportSdk.error,
|
|
156
|
+
on = _yachSdk$exportSdk.on,
|
|
157
|
+
off = _yachSdk$exportSdk.off;
|
|
147
158
|
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, resetSessionUnread, openFutureGroup, setLight, openUserSchedule, disableScreenCapture, setPanGestureEnable, addAppToNav };
|
|
148
159
|
export default {
|
|
149
160
|
version: version,
|
package/es/lib/bridge/mobile.js
CHANGED
|
@@ -6,25 +6,31 @@ import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
|
|
|
6
6
|
import Event from '../helper/event';
|
|
7
7
|
import { electronResCodeMap } from '../helper/codeMap';
|
|
8
8
|
import { log, bpitLog } from '../../utils';
|
|
9
|
+
|
|
9
10
|
function setupWebViewJavascriptBridge(callback) {
|
|
10
11
|
if (window.WebViewJavascriptBridge) {
|
|
11
12
|
return callback(WebViewJavascriptBridge);
|
|
12
13
|
}
|
|
14
|
+
|
|
13
15
|
if (window.WKWebViewJavascriptBridge) {
|
|
14
16
|
return callback(WKWebViewJavascriptBridge);
|
|
15
17
|
}
|
|
18
|
+
|
|
16
19
|
if (window.WVJBCallbacks) {
|
|
17
20
|
return window.WVJBCallbacks.push(callback);
|
|
18
21
|
}
|
|
22
|
+
|
|
19
23
|
window.WVJBCallbacks = [callback];
|
|
20
24
|
var WVJBIframe = document.createElement('iframe');
|
|
21
25
|
WVJBIframe.style.display = 'none';
|
|
22
26
|
WVJBIframe.src = 'https://__bridge_loaded__';
|
|
23
27
|
document.documentElement.appendChild(WVJBIframe);
|
|
28
|
+
|
|
24
29
|
_setTimeout(function () {
|
|
25
30
|
document.documentElement.removeChild(WVJBIframe);
|
|
26
31
|
}, 0);
|
|
27
32
|
}
|
|
33
|
+
|
|
28
34
|
var mobileBridgeInit = function mobileBridgeInit() {
|
|
29
35
|
return new _Promise(function (resolve, reject) {
|
|
30
36
|
setupWebViewJavascriptBridge(function (bridge) {
|
|
@@ -71,14 +77,17 @@ var mobileBridgeInit = function mobileBridgeInit() {
|
|
|
71
77
|
});
|
|
72
78
|
});
|
|
73
79
|
};
|
|
80
|
+
|
|
74
81
|
var mobileBridge = function mobileBridge(method, param) {
|
|
75
82
|
return new _Promise(function (resolve, reject) {
|
|
76
83
|
var p = _Object$assign({}, param);
|
|
84
|
+
|
|
77
85
|
setupWebViewJavascriptBridge(function (bridge) {
|
|
78
86
|
if (param.control) {
|
|
79
87
|
bridge.registerHandler(method, function (data) {
|
|
80
88
|
var onSuccess = param.onSuccess;
|
|
81
89
|
delete p.onSuccess;
|
|
90
|
+
|
|
82
91
|
if ('function' === typeof onSuccess) {
|
|
83
92
|
onSuccess(data);
|
|
84
93
|
resolve({
|
|
@@ -88,11 +97,14 @@ var mobileBridge = function mobileBridge(method, param) {
|
|
|
88
97
|
}
|
|
89
98
|
});
|
|
90
99
|
}
|
|
100
|
+
|
|
91
101
|
bridge.callHandler(method, param, function (e) {
|
|
92
102
|
var code = e.code,
|
|
93
|
-
|
|
94
|
-
|
|
103
|
+
message = e.message,
|
|
104
|
+
data = e.data;
|
|
105
|
+
|
|
95
106
|
var _code = _parseInt(code);
|
|
107
|
+
|
|
96
108
|
var callbackStr = electronResCodeMap(_code);
|
|
97
109
|
var callbackFun = p[callbackStr];
|
|
98
110
|
log("SDK\u6267\u884C\u540E\u56DE\u8C03\uFF0C\u76F8\u5173\u53C2\u6570 ", {
|
|
@@ -102,37 +114,40 @@ var mobileBridge = function mobileBridge(method, param) {
|
|
|
102
114
|
_code: _code,
|
|
103
115
|
message: message,
|
|
104
116
|
callbackFun: callbackFun
|
|
105
|
-
});
|
|
106
|
-
|
|
117
|
+
}); // 请求失败
|
|
118
|
+
|
|
107
119
|
if (callbackStr === 'onFail') {
|
|
108
120
|
bpitLog({
|
|
109
121
|
method: method,
|
|
110
122
|
errorcode: _code,
|
|
111
123
|
message: message || _JSON$stringify(data) || 'SDK执行失败回调,相关参数'
|
|
112
124
|
});
|
|
125
|
+
|
|
113
126
|
if ('function' === typeof callbackFun) {
|
|
114
127
|
message ? callbackFun({
|
|
115
128
|
code: code,
|
|
116
129
|
message: message
|
|
117
130
|
}) : callbackFun(data);
|
|
118
131
|
}
|
|
132
|
+
|
|
119
133
|
reject({
|
|
120
134
|
_code: _code,
|
|
121
135
|
message: message,
|
|
122
136
|
data: data
|
|
123
137
|
});
|
|
124
138
|
return;
|
|
125
|
-
}
|
|
126
|
-
|
|
139
|
+
} // 请求成功
|
|
140
|
+
|
|
141
|
+
|
|
127
142
|
if ('function' === typeof callbackFun) {
|
|
128
143
|
callbackFun(data || message);
|
|
129
144
|
}
|
|
145
|
+
|
|
130
146
|
resolve({
|
|
131
147
|
_code: _code,
|
|
132
148
|
message: message,
|
|
133
149
|
data: data
|
|
134
|
-
});
|
|
135
|
-
// if (_code === -2 || _code === 7) {
|
|
150
|
+
}); // if (_code === -2 || _code === 7) {
|
|
136
151
|
// bpitLog({
|
|
137
152
|
// method,
|
|
138
153
|
// errorcode: _code,
|
|
@@ -165,4 +180,5 @@ var mobileBridge = function mobileBridge(method, param) {
|
|
|
165
180
|
});
|
|
166
181
|
});
|
|
167
182
|
};
|
|
183
|
+
|
|
168
184
|
export { mobileBridge, mobileBridgeInit };
|