This commit is contained in:
Your Name
2026-03-06 14:27:24 +08:00
parent 9a1b67ca18
commit 52bb80e2f1
134 changed files with 5337 additions and 401 deletions
+1
View File
@@ -0,0 +1 @@
<view><t-u-i-call-kit u-i="30f71843-0" bind:__l="__l"></t-u-i-call-kit></view>
+3 -1
View File
@@ -1,5 +1,7 @@
{
"navigationBarTitleText": "uni-app",
"navigationBarTitleText": "视频面诊",
"navigationBarHidden": true,
"navigationStyle": "custom",
"usingComponents": {
"t-u-i-call-kit": "../src/Components/TUICallKit"
}
@@ -1,247 +1,4 @@
"use strict";
const common_vendor = require("../../../common/vendor.js");
const TUICallKit_src_TUICallService_index = require("../TUICallService/index.js");
const TUICallKit_src_Components_context_CallInfoContext = require("./context/CallInfoContext.js");
const TUICallKit_src_Components_context_CallerUserInfoContext = require("./context/CallerUserInfoContext.js");
const TUICallKit_src_Components_context_UserInfoContextExcludeVolume = require("./context/UserInfoContextExcludeVolume.js");
const TUICallKit_src_Components_context_FloatWindowContext = require("./context/FloatWindowContext.js");
const TUICallKit_src_Components_context_CustomUIConfigContext = require("./context/CustomUIConfigContext.js");
const TUICallKit_src_Components_context_TranslateContext = require("./context/TranslateContext.js");
const TUICallKit_src_Components_util_isEmpty = require("./util/isEmpty.js");
const TUICallKit_src_TUICallService_CallService_index = require("../TUICallService/CallService/index.js");
const TUICallKit_src_TUICallService_const_index = require("../TUICallService/const/index.js");
const TUICallKit_src_TUICallService_const_call = require("../TUICallService/const/call.js");
if (!Array) {
const _component_AISubtitle = common_vendor.resolveComponent("AISubtitle");
_component_AISubtitle();
}
if (!Math) {
(SingleCall + GroupCall)();
}
const SingleCall = () => "./components/SingleCall/SingleCall.js";
const GroupCall = () => "./components/GroupCall/GroupCall.js";
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "TUICallKit",
props: {
beforeCalling: {},
afterCalling: {},
onMinimized: {},
onMessageSentByMe: {},
kickedOut: {},
statusChanged: {},
allowedMinimized: { type: Boolean, default: false },
allowedFullScreen: { type: Boolean, default: true },
videoDisplayMode: { default: TUICallKit_src_TUICallService_const_call.VideoDisplayMode.COVER },
videoResolution: { default: TUICallKit_src_TUICallService_const_call.VideoResolution.RESOLUTION_720P }
},
setup(__props) {
const isMobile = !TUICallKit_src_TUICallService_CallService_index.TUIGlobal.isPC;
const bodyStyle = isMobile ? "TUICallKit-mobile transition-animation" : "TUICallKit-desktop";
const miniMizedDeskStyle = common_vendor.ref("");
const mobileAudioStyle = common_vendor.ref("");
const mobileVideoStyle = common_vendor.ref("");
const isShowFloatWindow = common_vendor.ref(false);
const props = __props;
const callStatus = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALL_STATUS));
const callRole = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALL_ROLE));
const callType = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALL_MEDIA_TYPE));
const isGroupCall = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_GROUP));
const isEarPhone = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_EAR_PHONE));
const focusElement = common_vendor.ref(null);
const localUserInfoExcludeVolume = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.LOCAL_USER_INFO_EXCLUDE_VOLUMN));
const remoteUserListExcludeVolume = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST));
const callerUserInfo = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALLER_USER_INFO));
const isFloatWindow = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_MINIMIZED));
const enableVirtualBackground = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.ENABLE_VIRTUAL_BACKGROUND));
const isShowEnableVirtualBackground = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND));
const customUIConfigContextValue = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CUSTOM_UI_CONFIG));
const isMuteSpeaker = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_MUTE_SPEAKER));
const translate = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.TRANSLATE));
const callInfoContextValue = common_vendor.reactive({
callStatus,
callRole,
callType,
isGroupCall,
isEarPhone,
focusElement,
allowedFullScreen: props.allowedFullScreen,
enableVirtualBackground,
isShowEnableVirtualBackground,
isMuteSpeaker
});
const callerUserInfoValue = common_vendor.reactive({ callerUserInfo });
const userInfoExcludeVolumeContextValue = common_vendor.reactive({
localUserInfoExcludeVolume,
remoteUserListExcludeVolume
});
const floatWindowContextValue = common_vendor.reactive({ isFloatWindow });
const translateContextValue = common_vendor.ref(translate);
const {
beforeCalling,
afterCalling,
onMinimized,
onMessageSentByMe,
videoDisplayMode,
videoResolution,
kickedOut,
statusChanged,
allowedMinimized
} = common_vendor.toRefs(props);
const handleCallStatusChange = (value) => {
callInfoContextValue.callStatus = value;
};
const handleIsGroupChange = (value) => {
callInfoContextValue.isGroupCall = value;
};
const handleToastInfoChange = (value) => {
if (typeof value === "object") {
const { content, type = "info" } = value;
!TUICallKit_src_Components_util_isEmpty.isEmpty(content) && showToast(translate.value(content), type);
}
};
const handleCallMediaTypeChange = (value) => {
callInfoContextValue.callType = value;
if (isMobile && isShowFloatWindow.value) {
mobileVideoStyle.value = "miniMized-mobile-audio";
mobileAudioStyle.value = "";
}
if (isMobile && !isShowFloatWindow.value) {
mobileAudioStyle.value = "mobile-audio";
}
};
const handleIsMinimizedChange = (value) => {
floatWindowContextValue.isFloatWindow = value;
if (value) {
if (!isMobile) {
miniMizedDeskStyle.value = "miniMized";
} else {
if (callInfoContextValue.callType === TUICallKit_src_TUICallService_const_call.CallMediaType.AUDIO) {
mobileAudioStyle.value = "miniMized-mobile-audio";
} else {
mobileVideoStyle.value = "miniMized-mobile-video";
}
}
} else {
mobileAudioStyle.value = "mobile-audio";
miniMizedDeskStyle.value = "";
mobileVideoStyle.value = "";
}
};
const handlePermissionErrorTipChange = (data) => {
};
const handleCallRoleChange = (value) => {
callInfoContextValue.callRole = value;
};
const handleLocalUserInfoChange = (value) => {
userInfoExcludeVolumeContextValue.localUserInfoExcludeVolume = value;
};
const handleRemoteUserInfoListChange = (value) => {
userInfoExcludeVolumeContextValue.remoteUserListExcludeVolume = [...value];
};
const handleCallerUserInfoChange = (value) => {
callerUserInfoValue.callerUserInfo = value;
};
const handEarPhoneChange = (value) => {
callInfoContextValue.isEarPhone = value;
};
const handleEnableVirtualBackgroundChange = (value) => {
callInfoContextValue.enableVirtualBackground = value;
};
const handleIsShowEnableVirtualBackgroundChange = (value) => {
callInfoContextValue.isShowEnableVirtualBackground = value;
};
const handleCustomUIConfigChange = (value) => {
customUIConfigContextValue.value = value;
};
const handleMuteSpeakerChange = (value) => {
callInfoContextValue.isMuteSpeaker = value;
};
const handleTranslateChange = (value) => {
translate.value = value;
};
common_vendor.watchEffect(() => {
TUICallKit_src_TUICallService_index.TUICallKitAPI.setCallback({
beforeCalling: beforeCalling && beforeCalling.value,
afterCalling: afterCalling && afterCalling.value,
onMinimized: onMinimized && onMinimized.value,
onMessageSentByMe: onMessageSentByMe && onMessageSentByMe.value,
kickedOut: kickedOut && kickedOut.value,
statusChanged: statusChanged && statusChanged.value
});
});
const watchOptions = {
[TUICallKit_src_TUICallService_const_index.NAME.CALL_STATUS]: handleCallStatusChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_GROUP]: handleIsGroupChange,
[TUICallKit_src_TUICallService_const_index.NAME.TOAST_INFO]: handleToastInfoChange,
[TUICallKit_src_TUICallService_const_index.NAME.CALL_MEDIA_TYPE]: handleCallMediaTypeChange,
[TUICallKit_src_TUICallService_const_index.NAME.SHOW_PERMISSION_TIP]: handlePermissionErrorTipChange,
[TUICallKit_src_TUICallService_const_index.NAME.CALL_ROLE]: handleCallRoleChange,
[TUICallKit_src_TUICallService_const_index.NAME.LOCAL_USER_INFO_EXCLUDE_VOLUMN]: handleLocalUserInfoChange,
[TUICallKit_src_TUICallService_const_index.NAME.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST]: handleRemoteUserInfoListChange,
[TUICallKit_src_TUICallService_const_index.NAME.CALLER_USER_INFO]: handleCallerUserInfoChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_EAR_PHONE]: handEarPhoneChange,
[TUICallKit_src_TUICallService_const_index.NAME.ENABLE_VIRTUAL_BACKGROUND]: handleEnableVirtualBackgroundChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND]: handleIsShowEnableVirtualBackgroundChange,
[TUICallKit_src_TUICallService_const_index.NAME.CUSTOM_UI_CONFIG]: handleCustomUIConfigChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_MUTE_SPEAKER]: handleMuteSpeakerChange,
[TUICallKit_src_TUICallService_const_index.NAME.TRANSLATE]: handleTranslateChange
};
common_vendor.onMounted(() => {
if (allowedMinimized.value) {
TUICallKit_src_TUICallService_index.TUICallKitAPI.enableFloatWindow(allowedMinimized.value);
}
TUICallKit_src_TUICallService_index.TUICallKitAPI.setVideoDisplayMode(videoDisplayMode.value);
TUICallKit_src_TUICallService_index.TUICallKitAPI.setVideoResolution(videoResolution.value);
TUICallKit_src_TUICallService_CallService_index.TUIStore.watch(
TUICallKit_src_TUICallService_const_call.StoreName.CALL,
watchOptions,
{
notifyRangeWhenWatch: TUICallKit_src_TUICallService_const_index.NAME.MYSELF
}
);
TUICallKit_src_TUICallService_CallService_index.TUIStore.watch(TUICallKit_src_TUICallService_const_call.StoreName.CALL, {
[TUICallKit_src_TUICallService_const_index.NAME.IS_MINIMIZED]: handleIsMinimizedChange
});
});
function showToast(value, type) {
switch (type) {
case "info":
common_vendor.index.showToast({
title: value,
icon: "none"
});
break;
}
}
common_vendor.onUnmounted(async () => {
TUICallKit_src_TUICallService_CallService_index.TUIStore.unwatch(TUICallKit_src_TUICallService_const_call.StoreName.CALL, {
...watchOptions,
[TUICallKit_src_TUICallService_const_index.NAME.IS_MINIMIZED]: handleIsMinimizedChange
});
await TUICallKit_src_TUICallService_index.TUICallKitAPI.handleExceptionExit();
});
common_vendor.provide(TUICallKit_src_Components_context_CallInfoContext.CallInfoContextKey, callInfoContextValue);
common_vendor.provide(TUICallKit_src_Components_context_CallerUserInfoContext.CallerUserInfoContextKey, callerUserInfoValue);
common_vendor.provide(TUICallKit_src_Components_context_UserInfoContextExcludeVolume.UserInfoExcludeVolumeContextKey, userInfoExcludeVolumeContextValue);
common_vendor.provide(TUICallKit_src_Components_context_FloatWindowContext.FloatWindowContextKey, floatWindowContextValue);
common_vendor.provide(TUICallKit_src_Components_context_CustomUIConfigContext.CustomUIConfigContextKey, customUIConfigContextValue);
common_vendor.provide(TUICallKit_src_Components_context_TranslateContext.translateContextKey, translateContextValue);
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(callInfoContextValue).callStatus !== common_vendor.unref(TUICallKit_src_TUICallService_const_call.CallStatus).IDLE
}, common_vendor.unref(callInfoContextValue).callStatus !== common_vendor.unref(TUICallKit_src_TUICallService_const_call.CallStatus).IDLE ? common_vendor.e({
b: !common_vendor.unref(callInfoContextValue).isGroupCall
}, !common_vendor.unref(callInfoContextValue).isGroupCall ? {} : {}, {
c: common_vendor.s({
visibility: common_vendor.unref(floatWindowContextValue).isFloatWindow ? "hidden" : ""
}),
d: common_vendor.n(common_vendor.unref(bodyStyle)),
e: common_vendor.n(common_vendor.unref(miniMizedDeskStyle)),
f: common_vendor.n(common_vendor.unref(mobileVideoStyle)),
g: common_vendor.n(common_vendor.unref(mobileAudioStyle))
}) : {});
};
}
});
wx.createComponent(_sfc_main);
const app = require("../../../main.js");
wx.createComponent(app._sfc_main);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/TUICallKit/src/Components/TUICallKit.js.map
+3 -24
View File
@@ -1,27 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const common_vendor = require("./common/vendor.js");
if (!Math) {
"./pages/index/index.js";
"./TUICallKit/pages/call.js";
}
const _sfc_main = {
onLaunch: function() {
common_vendor.index.__f__("log", "at App.vue:4", "App Launch");
},
onShow: function() {
common_vendor.index.__f__("log", "at App.vue:7", "App Show");
},
onHide: function() {
common_vendor.index.__f__("log", "at App.vue:10", "App Hide");
}
};
function createApp() {
const app = common_vendor.createSSRApp(_sfc_main);
return {
app
};
}
createApp().app.mount("#app");
exports.createApp = createApp;
require("./common/vendor.js");
const app = require("./main.js");
exports.createApp = app.createApp;
//# sourceMappingURL=../.sourcemap/mp-weixin/app.js.map
+22 -1
View File
@@ -1,6 +1,7 @@
{
"pages": [
"pages/index/index"
"pages/index/index",
"pages/user/user"
],
"subPackages": [
{
@@ -16,5 +17,25 @@
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [
{
"pagePath": "pages/index/index",
"iconPath": "/static/user/home.png",
"selectedIconPath": "/static/user/home_no.png",
"text": "首页"
},
{
"pagePath": "pages/user/user",
"iconPath": "/static/user/user.png",
"selectedIconPath": "/static/user/user_no.png",
"text": "我的"
}
]
},
"usingComponents": {}
}
+86
View File
@@ -1,3 +1,89 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
.TUICallKit-mobile {
width: 100vw;
height: 100vh;
}
.TUICallKit-mobile .singCall {
width: 100vw;
height: 100vh;
}
.transition-animation {
transform: translateY(-100%);
animation: slideInDown 0.5s ease forwards;
}
@keyframes slideInDown {
from {
transform: translateY(-100%);
}
to {
transform: translateY(0);
}
}
.TUICallKit-desktop {
margin: 0 auto;
position: relative;
position: relative;
border-radius: inherit;
width: 100%;
height: 100%;
color: white;
display: flex;
flex-direction: column;
justify-content: center;
overflow: hidden;
z-index: 12;
border-radius: 16px;
}
.TUICallKit-desktop .singCall {
width: 100%;
height: 100%;
}
.mobile-audio {
background-color: white;
}
.miniMized {
width: 168px !important;
height: 56px !important;
overflow: visible !important;
}
.miniMized-mobile-audio {
width: 72px;
height: 72px;
position: fixed;
top: 40px;
right: 40px;
}
.miniMized-mobile-video {
width: 40%;
height: 30%;
position: fixed;
top: 40px;
right: 40px;
}
/*每个页面公共css */
page{--status-bar-height:25px;--top-window-height:0px;--window-top:0px;--window-bottom:0px;--window-left:0px;--window-right:0px;--window-magin:0px}[data-c-h="true"]{display: none !important;}
+2 -2
View File
@@ -7149,9 +7149,9 @@ function isConsoleWritable() {
return isWritable;
}
function initRuntimeSocketService() {
const hosts = "192.168.19.102,127.0.0.1";
const hosts = "192.168.124.167,127.0.0.1";
const port = "8090";
const id = "mp-weixin__GLL47";
const id = "mp-weixin_f0meSk";
const lazy = typeof swan !== "undefined";
let restoreError = lazy ? () => {
} : initOnError();
+279
View File
@@ -0,0 +1,279 @@
"use strict";
const common_vendor = require("./common/vendor.js");
const TUICallKit_src_TUICallService_index = require("./TUICallKit/src/TUICallService/index.js");
const TUICallKit_src_Components_context_CallInfoContext = require("./TUICallKit/src/Components/context/CallInfoContext.js");
const TUICallKit_src_Components_context_CallerUserInfoContext = require("./TUICallKit/src/Components/context/CallerUserInfoContext.js");
const TUICallKit_src_Components_context_UserInfoContextExcludeVolume = require("./TUICallKit/src/Components/context/UserInfoContextExcludeVolume.js");
const TUICallKit_src_Components_context_FloatWindowContext = require("./TUICallKit/src/Components/context/FloatWindowContext.js");
const TUICallKit_src_Components_context_CustomUIConfigContext = require("./TUICallKit/src/Components/context/CustomUIConfigContext.js");
const TUICallKit_src_Components_context_TranslateContext = require("./TUICallKit/src/Components/context/TranslateContext.js");
const TUICallKit_src_Components_util_isEmpty = require("./TUICallKit/src/Components/util/isEmpty.js");
const TUICallKit_src_TUICallService_CallService_index = require("./TUICallKit/src/TUICallService/CallService/index.js");
const TUICallKit_src_TUICallService_const_index = require("./TUICallKit/src/TUICallService/const/index.js");
const TUICallKit_src_TUICallService_const_call = require("./TUICallKit/src/TUICallService/const/call.js");
if (!Math) {
"./pages/index/index.js";
"./pages/user/user.js";
"./TUICallKit/pages/call.js";
}
if (!Array) {
const _component_AISubtitle = common_vendor.resolveComponent("AISubtitle");
_component_AISubtitle();
}
if (!Math) {
(SingleCall + GroupCall)();
}
const SingleCall = () => "./TUICallKit/src/Components/components/SingleCall/SingleCall.js";
const GroupCall = () => "./TUICallKit/src/Components/components/GroupCall/GroupCall.js";
const _sfc_main$1 = /* @__PURE__ */ common_vendor.defineComponent({
__name: "TUICallKit",
props: {
beforeCalling: {},
afterCalling: {},
onMinimized: {},
onMessageSentByMe: {},
kickedOut: {},
statusChanged: {},
allowedMinimized: { type: Boolean, default: false },
allowedFullScreen: { type: Boolean, default: true },
videoDisplayMode: { default: TUICallKit_src_TUICallService_const_call.VideoDisplayMode.COVER },
videoResolution: { default: TUICallKit_src_TUICallService_const_call.VideoResolution.RESOLUTION_720P }
},
setup(__props) {
const isMobile = !TUICallKit_src_TUICallService_CallService_index.TUIGlobal.isPC;
const bodyStyle = isMobile ? "TUICallKit-mobile transition-animation" : "TUICallKit-desktop";
const miniMizedDeskStyle = common_vendor.ref("");
const mobileAudioStyle = common_vendor.ref("");
const mobileVideoStyle = common_vendor.ref("");
const isShowFloatWindow = common_vendor.ref(false);
const props = __props;
const callStatus = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALL_STATUS));
const callRole = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALL_ROLE));
const callType = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALL_MEDIA_TYPE));
const isGroupCall = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_GROUP));
const isEarPhone = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_EAR_PHONE));
const focusElement = common_vendor.ref(null);
const localUserInfoExcludeVolume = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.LOCAL_USER_INFO_EXCLUDE_VOLUMN));
const remoteUserListExcludeVolume = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST));
const callerUserInfo = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CALLER_USER_INFO));
const isFloatWindow = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_MINIMIZED));
const enableVirtualBackground = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.ENABLE_VIRTUAL_BACKGROUND));
const isShowEnableVirtualBackground = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND));
const customUIConfigContextValue = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.CUSTOM_UI_CONFIG));
const isMuteSpeaker = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.IS_MUTE_SPEAKER));
const translate = common_vendor.ref(TUICallKit_src_TUICallService_CallService_index.TUIStore.getData(TUICallKit_src_TUICallService_const_call.StoreName.CALL, TUICallKit_src_TUICallService_const_index.NAME.TRANSLATE));
const callInfoContextValue = common_vendor.reactive({
callStatus,
callRole,
callType,
isGroupCall,
isEarPhone,
focusElement,
allowedFullScreen: props.allowedFullScreen,
enableVirtualBackground,
isShowEnableVirtualBackground,
isMuteSpeaker
});
const callerUserInfoValue = common_vendor.reactive({ callerUserInfo });
const userInfoExcludeVolumeContextValue = common_vendor.reactive({
localUserInfoExcludeVolume,
remoteUserListExcludeVolume
});
const floatWindowContextValue = common_vendor.reactive({ isFloatWindow });
const translateContextValue = common_vendor.ref(translate);
const {
beforeCalling,
afterCalling,
onMinimized,
onMessageSentByMe,
videoDisplayMode,
videoResolution,
kickedOut,
statusChanged,
allowedMinimized
} = common_vendor.toRefs(props);
const handleCallStatusChange = (value) => {
callInfoContextValue.callStatus = value;
};
const handleIsGroupChange = (value) => {
callInfoContextValue.isGroupCall = value;
};
const handleToastInfoChange = (value) => {
if (typeof value === "object") {
const { content, type = "info" } = value;
!TUICallKit_src_Components_util_isEmpty.isEmpty(content) && showToast(translate.value(content), type);
}
};
const handleCallMediaTypeChange = (value) => {
callInfoContextValue.callType = value;
if (isMobile && isShowFloatWindow.value) {
mobileVideoStyle.value = "miniMized-mobile-audio";
mobileAudioStyle.value = "";
}
if (isMobile && !isShowFloatWindow.value) {
mobileAudioStyle.value = "mobile-audio";
}
};
const handleIsMinimizedChange = (value) => {
floatWindowContextValue.isFloatWindow = value;
if (value) {
if (!isMobile) {
miniMizedDeskStyle.value = "miniMized";
} else {
if (callInfoContextValue.callType === TUICallKit_src_TUICallService_const_call.CallMediaType.AUDIO) {
mobileAudioStyle.value = "miniMized-mobile-audio";
} else {
mobileVideoStyle.value = "miniMized-mobile-video";
}
}
} else {
mobileAudioStyle.value = "mobile-audio";
miniMizedDeskStyle.value = "";
mobileVideoStyle.value = "";
}
};
const handlePermissionErrorTipChange = (data) => {
};
const handleCallRoleChange = (value) => {
callInfoContextValue.callRole = value;
};
const handleLocalUserInfoChange = (value) => {
userInfoExcludeVolumeContextValue.localUserInfoExcludeVolume = value;
};
const handleRemoteUserInfoListChange = (value) => {
userInfoExcludeVolumeContextValue.remoteUserListExcludeVolume = [...value];
};
const handleCallerUserInfoChange = (value) => {
callerUserInfoValue.callerUserInfo = value;
};
const handEarPhoneChange = (value) => {
callInfoContextValue.isEarPhone = value;
};
const handleEnableVirtualBackgroundChange = (value) => {
callInfoContextValue.enableVirtualBackground = value;
};
const handleIsShowEnableVirtualBackgroundChange = (value) => {
callInfoContextValue.isShowEnableVirtualBackground = value;
};
const handleCustomUIConfigChange = (value) => {
customUIConfigContextValue.value = value;
};
const handleMuteSpeakerChange = (value) => {
callInfoContextValue.isMuteSpeaker = value;
};
const handleTranslateChange = (value) => {
translate.value = value;
};
common_vendor.watchEffect(() => {
TUICallKit_src_TUICallService_index.TUICallKitAPI.setCallback({
beforeCalling: beforeCalling && beforeCalling.value,
afterCalling: afterCalling && afterCalling.value,
onMinimized: onMinimized && onMinimized.value,
onMessageSentByMe: onMessageSentByMe && onMessageSentByMe.value,
kickedOut: kickedOut && kickedOut.value,
statusChanged: statusChanged && statusChanged.value
});
});
const watchOptions = {
[TUICallKit_src_TUICallService_const_index.NAME.CALL_STATUS]: handleCallStatusChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_GROUP]: handleIsGroupChange,
[TUICallKit_src_TUICallService_const_index.NAME.TOAST_INFO]: handleToastInfoChange,
[TUICallKit_src_TUICallService_const_index.NAME.CALL_MEDIA_TYPE]: handleCallMediaTypeChange,
[TUICallKit_src_TUICallService_const_index.NAME.SHOW_PERMISSION_TIP]: handlePermissionErrorTipChange,
[TUICallKit_src_TUICallService_const_index.NAME.CALL_ROLE]: handleCallRoleChange,
[TUICallKit_src_TUICallService_const_index.NAME.LOCAL_USER_INFO_EXCLUDE_VOLUMN]: handleLocalUserInfoChange,
[TUICallKit_src_TUICallService_const_index.NAME.REMOTE_USER_INFO_EXCLUDE_VOLUMN_LIST]: handleRemoteUserInfoListChange,
[TUICallKit_src_TUICallService_const_index.NAME.CALLER_USER_INFO]: handleCallerUserInfoChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_EAR_PHONE]: handEarPhoneChange,
[TUICallKit_src_TUICallService_const_index.NAME.ENABLE_VIRTUAL_BACKGROUND]: handleEnableVirtualBackgroundChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_SHOW_ENABLE_VIRTUAL_BACKGROUND]: handleIsShowEnableVirtualBackgroundChange,
[TUICallKit_src_TUICallService_const_index.NAME.CUSTOM_UI_CONFIG]: handleCustomUIConfigChange,
[TUICallKit_src_TUICallService_const_index.NAME.IS_MUTE_SPEAKER]: handleMuteSpeakerChange,
[TUICallKit_src_TUICallService_const_index.NAME.TRANSLATE]: handleTranslateChange
};
common_vendor.onMounted(() => {
if (allowedMinimized.value) {
TUICallKit_src_TUICallService_index.TUICallKitAPI.enableFloatWindow(allowedMinimized.value);
}
TUICallKit_src_TUICallService_index.TUICallKitAPI.setVideoDisplayMode(videoDisplayMode.value);
TUICallKit_src_TUICallService_index.TUICallKitAPI.setVideoResolution(videoResolution.value);
TUICallKit_src_TUICallService_CallService_index.TUIStore.watch(
TUICallKit_src_TUICallService_const_call.StoreName.CALL,
watchOptions,
{
notifyRangeWhenWatch: TUICallKit_src_TUICallService_const_index.NAME.MYSELF
}
);
TUICallKit_src_TUICallService_CallService_index.TUIStore.watch(TUICallKit_src_TUICallService_const_call.StoreName.CALL, {
[TUICallKit_src_TUICallService_const_index.NAME.IS_MINIMIZED]: handleIsMinimizedChange
});
});
function showToast(value, type) {
switch (type) {
case "info":
common_vendor.index.showToast({
title: value,
icon: "none"
});
break;
}
}
common_vendor.onUnmounted(async () => {
TUICallKit_src_TUICallService_CallService_index.TUIStore.unwatch(TUICallKit_src_TUICallService_const_call.StoreName.CALL, {
...watchOptions,
[TUICallKit_src_TUICallService_const_index.NAME.IS_MINIMIZED]: handleIsMinimizedChange
});
await TUICallKit_src_TUICallService_index.TUICallKitAPI.handleExceptionExit();
});
common_vendor.provide(TUICallKit_src_Components_context_CallInfoContext.CallInfoContextKey, callInfoContextValue);
common_vendor.provide(TUICallKit_src_Components_context_CallerUserInfoContext.CallerUserInfoContextKey, callerUserInfoValue);
common_vendor.provide(TUICallKit_src_Components_context_UserInfoContextExcludeVolume.UserInfoExcludeVolumeContextKey, userInfoExcludeVolumeContextValue);
common_vendor.provide(TUICallKit_src_Components_context_FloatWindowContext.FloatWindowContextKey, floatWindowContextValue);
common_vendor.provide(TUICallKit_src_Components_context_CustomUIConfigContext.CustomUIConfigContextKey, customUIConfigContextValue);
common_vendor.provide(TUICallKit_src_Components_context_TranslateContext.translateContextKey, translateContextValue);
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.unref(callInfoContextValue).callStatus !== common_vendor.unref(TUICallKit_src_TUICallService_const_call.CallStatus).IDLE
}, common_vendor.unref(callInfoContextValue).callStatus !== common_vendor.unref(TUICallKit_src_TUICallService_const_call.CallStatus).IDLE ? common_vendor.e({
b: !common_vendor.unref(callInfoContextValue).isGroupCall
}, !common_vendor.unref(callInfoContextValue).isGroupCall ? {} : {}, {
c: common_vendor.s({
visibility: common_vendor.unref(floatWindowContextValue).isFloatWindow ? "hidden" : ""
}),
d: common_vendor.n(common_vendor.unref(bodyStyle)),
e: common_vendor.n(common_vendor.unref(miniMizedDeskStyle)),
f: common_vendor.n(common_vendor.unref(mobileVideoStyle)),
g: common_vendor.n(common_vendor.unref(mobileAudioStyle))
}) : {});
};
}
});
const _sfc_main = {
onLaunch: function() {
common_vendor.index.__f__("log", "at App.vue:10", "App Launch");
},
onShow: function() {
common_vendor.index.__f__("log", "at App.vue:13", "App Show");
},
onHide: function() {
common_vendor.index.__f__("log", "at App.vue:16", "App Hide");
}
};
if (!Array) {
const _component_TUICallKit = common_vendor.resolveComponent("TUICallKit");
_component_TUICallKit();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {};
}
const App = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
function createApp() {
const app = common_vendor.createSSRApp(App);
return {
app
};
}
createApp().app.mount("#app");
exports._sfc_main = _sfc_main$1;
exports.createApp = createApp;
//# sourceMappingURL=../.sourcemap/mp-weixin/main.js.map
+17
View File
@@ -0,0 +1,17 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
methods: {
jumpUrl() {
common_vendor.index.navigateTo({ url: "/TUICallKit/pages/call" });
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.o((...args) => $options.jumpUrl && $options.jumpUrl(...args))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/user/user.js.map
+4
View File
@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "uni-app",
"usingComponents": {}
}
+1
View File
@@ -0,0 +1 @@
<view><button bindtap="{{a}}">跳转分包</button></view>
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB