小程序提交视频
This commit is contained in:
@@ -38,6 +38,7 @@ Component({
|
||||
methods: {
|
||||
// 监听通话状态变更回调
|
||||
handleCallStatusChange(value) {
|
||||
|
||||
this.setData({
|
||||
callStatus: value,
|
||||
});
|
||||
@@ -53,6 +54,9 @@ Component({
|
||||
this.setData({
|
||||
callMediaType: value,
|
||||
});
|
||||
console.log('111111111111111111111111111');
|
||||
console.log(this.data.callerUserInfo);
|
||||
console.log(this.data.localUserInfo);
|
||||
},
|
||||
// 监听通话角色变更回调
|
||||
handleCallRoleChange(value) {
|
||||
|
||||
@@ -45,6 +45,7 @@ Component({
|
||||
IMG_CAMERA_FALSE:`${PATH}/camera-false.png`,
|
||||
IMG_TRANS:`${PATH}/trans.png`,
|
||||
IMG_SWITCH_CAMERA:`${PATH}/switch_camera.png`,
|
||||
doctor_avatar:wx.getStorageSync('doctor_avatar')
|
||||
},
|
||||
methods: {
|
||||
async accept() {
|
||||
|
||||
@@ -12,22 +12,27 @@
|
||||
</view>
|
||||
<!-- 语言通话邀请信息 -->
|
||||
<view wx:if="{{callMediaType === 1}}" class="invite-calling-single">
|
||||
<image class="avatar" src="{{remoteUserInfoList[0].avatar || IMG_DEFAULT_AVATAR}}" id="{{remoteUserInfoList[0].userId}}" binderror="handleErrorImage" />
|
||||
<image class="avatar" src="{{doctor_avatar || IMG_DEFAULT_AVATAR}}" id="{{remoteUserInfoList[0].userId}}" binderror="handleErrorImage" />
|
||||
<view class="tips">{{remoteUserInfoList[0].displayUserInfo}}</view>
|
||||
<view wx:if="{{callRole === 'caller' && callStatus === 'calling' }}" class="tips-subtitle">等待对方接受</view>
|
||||
</view>
|
||||
<!-- 视频通话邀请信息 -->
|
||||
<view wx:if="{{callStatus === 'calling' && callMediaType === 2}}" class="invite-calling">
|
||||
<view class="invite-calling-header">
|
||||
<view class="other-view white" wx:if="{{callRole == 'caller'}}">
|
||||
<text>{{callDuration}}</text>
|
||||
</view>
|
||||
<view class="invite-calling-header-right">
|
||||
|
||||
<view class="invite-calling-header-message">
|
||||
<label class="tips">
|
||||
<text class="tips-subtitle" wx:if="{{callRole !== 'caller'}}" style="text-align: right;margin-bottom: 10rpx;">XXXX</text>
|
||||
<!-- <label class="tips">
|
||||
{{remoteUserInfoList[0].displayUserInfo}}
|
||||
</label>
|
||||
</label> -->
|
||||
<text class="tips-subtitle" wx:if="{{callRole !== 'caller'}}">邀请你视频通话</text>
|
||||
<text class="tips-subtitle" wx:else>等待对方接受</text>
|
||||
<!-- <text class="tips-subtitle" wx:else>等待对方接受</text> -->
|
||||
</view>
|
||||
<image class="avatar" src="{{remoteUserInfoList[0].avatar || IMG_DEFAULT_AVATAR}}" id="{{remoteUserInfoList[0].userId}}" binderror="handleErrorImage" />
|
||||
<image class="avatar" src="{{doctor_avatar || IMG_DEFAULT_AVATAR}}" id="{{remoteUserInfoList[0].userId}}" binderror="handleErrorImage" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -38,6 +43,7 @@
|
||||
<view class="call-operate" style="background-color: red" catch:tap="reject">
|
||||
<image src="{{IMG_HANGUP}}" />
|
||||
</view>
|
||||
|
||||
<view style="margin-top:10px">挂断</view>
|
||||
</view>
|
||||
<view class="button-container">
|
||||
@@ -57,8 +63,78 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 视频通话呼叫状态按钮 -->
|
||||
|
||||
<view wx:if="{{callStatus === 'calling' && callMediaType === 2}}" class="invite-calling">
|
||||
<view class="footer">
|
||||
<view class="handle-btns">
|
||||
|
||||
|
||||
<!-- <view class="btn-operate-item call-switch" catch:tap="switchCallMediaType">
|
||||
<view class="call-operate">
|
||||
<image src="{{IMG_TRANS}}" />
|
||||
</view>
|
||||
<text>切到语音通话</text>
|
||||
</view> -->
|
||||
<view class="btn-list">
|
||||
<view wx:if="{{localUserInfo.isVideoAvailable && callRole == 'caller'}}" class="button-container">
|
||||
<view class="btn-normal">
|
||||
<image class="btn-image" src="{{IMG_SWITCH_CAMERA}}" data-device="{{pusher.frontCamera}}" catch:tap="switchCamera" />
|
||||
</view>
|
||||
<view class="white">切换</view>
|
||||
</view>
|
||||
<view class="button-container" bindtap="switchCallMediaType" wx:if="{{callRole == 'caller'}}">
|
||||
<view class="btn-normal">
|
||||
<image class="btn-image" src="{{IMG_TRANS}} "></image>
|
||||
</view>
|
||||
<view class="white">切换至语音</view>
|
||||
</view>
|
||||
<view class="button-container" bindtap="microPhoneHandler" wx:if="{{callRole == 'caller'}}">
|
||||
<view class="btn-normal">
|
||||
<image class="btn-image" src="{{localUserInfo.isAudioAvailable? IMG_AUDIO_TRUE: IMG_AUDIO_FALSE}} "></image>
|
||||
</view>
|
||||
<view class="white">麦克风</view>
|
||||
</view>
|
||||
<!-- <view class="button-container" bindtap="toggleSoundMode">
|
||||
<view class="btn-normal">
|
||||
<image class="btn-image" src="{{isEarPhone ? IMG_SPEAKER_FALSE: IMG_SPEAKER_TRUE}} "></image>
|
||||
</view>
|
||||
<text class="white">扬声器</text>
|
||||
</view> -->
|
||||
<!-- <view class="button-container" bindtap="cameraHandler">
|
||||
<view class="btn-normal">
|
||||
<image class="btn-image" src="{{localUserInfo.isVideoAvailable ? IMG_CAMERA_TRUE: IMG_CAMERA_FALSE}} "></image>
|
||||
</view>
|
||||
<text class="white">摄像头</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="btn-list" style="justify-content: center;width:65%;margin:0 auto;">
|
||||
<view class="btn-list-item other-view" >
|
||||
<view class="btn-container">
|
||||
<view class="btn-hangup" bindtap="hangup">
|
||||
<image class="btn-image" src="{{IMG_HANGUP}}"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<text class="white">挂断</text>
|
||||
</view>
|
||||
<view class="btn-list-item other-view" >
|
||||
<view class="btn-container">
|
||||
<view class="btn-hangup" bindtap="accept">
|
||||
<image class="btn-image" src="{{IMG_ACCEPT}}"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<text class="white">接听</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view wx:if="{{callStatus === 'calling' && callMediaType === 2}}" class="invite-calling" >
|
||||
<view class="footer" style="display: flex;">
|
||||
<view class="btn-operate" wx:if="{{callRole === 'caller'}}">
|
||||
<view class="invite-calling-header-left">
|
||||
<image src="{{IMG_SWITCH_CAMERA}}" data-device="{{pusher.frontCamera}}" catch:tap="switchCamera" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-operate" wx:if="{{callRole === 'caller'}}">
|
||||
<view class="btn-operate-item call-switch" catch:tap="switchCallMediaType">
|
||||
<view class="call-operate">
|
||||
@@ -73,9 +149,7 @@
|
||||
<view class="call-operate" catch:tap="hangup">
|
||||
<image src="{{IMG_HANGUP}}" />
|
||||
</view>
|
||||
<view class="invite-calling-header-left">
|
||||
<image src="{{IMG_SWITCH_CAMERA}}" data-device="{{pusher.frontCamera}}" catch:tap="switchCamera" />
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<text>挂断</text>
|
||||
</view>
|
||||
@@ -95,7 +169,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view> -->
|
||||
<!-- 语音通话接通状态按钮 -->
|
||||
<view wx:if="{{callStatus === 'connected' && callMediaType === 1}}" class="handle-btns">
|
||||
<view class="other-view black">
|
||||
@@ -128,18 +203,18 @@
|
||||
<view class="other-view white">
|
||||
<text>{{callDuration}}</text>
|
||||
</view>
|
||||
<view class="btn-operate-item call-switch" catch:tap="switchCallMediaType">
|
||||
<!-- <view class="btn-operate-item call-switch" catch:tap="switchCallMediaType">
|
||||
<view class="call-operate">
|
||||
<image src="{{IMG_TRANS}}" />
|
||||
</view>
|
||||
<text>切到语音通话</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="btn-list">
|
||||
<view class="button-container" bindtap="microPhoneHandler">
|
||||
<view class="btn-normal">
|
||||
<image class="btn-image" src="{{localUserInfo.isAudioAvailable? IMG_AUDIO_TRUE: IMG_AUDIO_FALSE}} "></image>
|
||||
</view>
|
||||
<view class="white">麦克风</view>
|
||||
<view class="white">语音</view>
|
||||
</view>
|
||||
<view class="button-container" bindtap="toggleSoundMode">
|
||||
<view class="btn-normal">
|
||||
@@ -147,14 +222,14 @@
|
||||
</view>
|
||||
<text class="white">扬声器</text>
|
||||
</view>
|
||||
<view class="button-container" bindtap="cameraHandler">
|
||||
<view class="button-container" bindtap="switchCamera" wx:if="{{localUserInfo.isVideoAvailable}}">
|
||||
<view class="btn-normal">
|
||||
<image class="btn-image" src="{{localUserInfo.isVideoAvailable ? IMG_CAMERA_TRUE: IMG_CAMERA_FALSE}} "></image>
|
||||
<image class="btn-image" src="{{IMG_SWITCH_CAMERA}}" data-device="{{pusher.frontCamera}}" src="{{IMG_SWITCH_CAMERA}} "></image>
|
||||
</view>
|
||||
<text class="white">摄像头</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-list">
|
||||
<!-- <view class="btn-list">
|
||||
<view class="btn-list-item other-view">
|
||||
<view class="btn-container">
|
||||
<view class="btn-hangup" bindtap="hangup">
|
||||
@@ -166,7 +241,7 @@
|
||||
</view>
|
||||
<text class="white">挂断</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -1,4 +1,4 @@
|
||||
import LibGenerateTestUserSig from './lib-generate-test-usersig-es.min.js';
|
||||
//import LibGenerateTestUserSig from './lib-generate-test-usersig-es.min.js';
|
||||
|
||||
/**
|
||||
* 腾讯云 SDKAppId,需要替换为您自己账号下的 SDKAppId。
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@
|
||||
<view wx:if="{{renderDom[0].type === 'text_link'}}" class="message-body-span text-message">
|
||||
<view class="message-body-span-text">{{renderDom[0].text}}</view>
|
||||
<text class="message-body-span-link">查看详情>></text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view wx:if="{{renderDom[0].type ==='group_create'}}" class="custom-message {{isMine?'my-custom':''}}">
|
||||
<view class="custom-content-text">{{renderDom[0].text}}</view>
|
||||
</view>
|
||||
@@ -39,7 +39,7 @@
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='notSupport'}}" class="message-body-span text-message">
|
||||
<view class="message-body-span-text">{{renderDom[0].text}}</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view wx:if="{{renderDom[0].type ==='msg_tip'}}" class="message-body-span text-message custom-tip-message">
|
||||
<view class="message-body-span-text">{{renderDom[0].text}}</view>
|
||||
<view class="message-body-span-desc">{{renderDom[0].desc}}</view>
|
||||
|
||||
@@ -261,10 +261,23 @@ pageLifetimes:{
|
||||
*/
|
||||
methods: {
|
||||
async call() {
|
||||
console.log(this.data.doctor_user_id)
|
||||
await TUICallKitServer.setSelfInfo( "典韦222", "http://xxx"
|
||||
)
|
||||
await TUICallKitServer.call({
|
||||
userID: this.data.doctor_user_id,
|
||||
type: 2,
|
||||
timeout:60,
|
||||
offlinePushInfo:{
|
||||
title:'22222'
|
||||
},
|
||||
userData:JSON.stringify({
|
||||
order_inquiry_id:this.data.order_inquiry_id,
|
||||
inquiry_type:this.data.inquiry_type,
|
||||
inquiry_mode:this.data.inquiry_mode,
|
||||
message_rounds:this.data.msgData.msg_round,
|
||||
patient_family_data:this.data.patient_family_data,
|
||||
is_system:0
|
||||
}),
|
||||
});
|
||||
},
|
||||
showTooltip(){
|
||||
|
||||
@@ -441,6 +441,12 @@ Component({
|
||||
chatMsg(id).then(data => {
|
||||
// console.log("接口请求收到时间66666"+dayjs().format("YYYY-MM-DD HH:mm:ss:SSS"));
|
||||
// console.log(data);
|
||||
let promise=wx.$TUIKit.getUserProfile({
|
||||
userIDList: [data.doctor_user_id]
|
||||
});
|
||||
promise.then(function(imResponse) {
|
||||
wx.setStorageSync('doctor_avatar',imResponse.data[0].avatar);
|
||||
});
|
||||
let obj = this.data.doctorChatData;
|
||||
for (const key in obj) {
|
||||
let item = `doctorChatData.${key}`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import LibGenerateTestUserSig from './lib-generate-test-usersig-es.min.js';
|
||||
//import LibGenerateTestUserSig from './lib-generate-test-usersig-es.min.js';
|
||||
|
||||
/**
|
||||
* 腾讯云 SDKAppId,需要替换为您自己账号下的 SDKAppId。
|
||||
|
||||
Reference in New Issue
Block a user