3.22医生

This commit is contained in:
zoujiandong
2024-03-22 16:10:50 +08:00
parent 2454bafd78
commit bdc8abf326
34 changed files with 437 additions and 137 deletions
+4 -4
View File
@@ -1,6 +1,4 @@
import { TUIStore, StoreName, NAME } from "../index";
import { TUICallKitServer } from "../TUICallService/index";
import { TUICallKitServer,TUIStore, StoreName, NAME } from "../index";
const {
CALL_STATUS,
CALL_ROLE,
@@ -207,6 +205,7 @@ Component({
lifetimes: {
attached() {
let that = this;
TUIStore.watch(
StoreName.CALL,
{
@@ -231,6 +230,7 @@ Component({
},
async detached() {
let that = this;
TUICallKitServer.getTUICallEngineInstance().handleExceptionExit();
TUIStore.unwatch(StoreName.CALL, {
[CALL_STATUS]: this.handleCallStatusChange.bind(that),
[IS_GROUP]: this.handleIsGroupChange.bind(that),
@@ -246,7 +246,7 @@ Component({
[PUSHER]: this.handlePusherChange.bind(that),
[PLAYER]: this.handlePlayerListChange.bind(that),
});
await TUICallKitServer.reject();
},
},
});
@@ -44,9 +44,8 @@ Component({
moved(){
//console.log('moved')
},
detached(){
//console.log('detached')
this.hangup()
async detached(){
}
},
pageLifetimes: {
@@ -54,7 +53,7 @@ Component({
},
hide() {
this.hangup()
// this.hangup()
},
},
data:{
@@ -69,7 +68,8 @@ Component({
IMG_CAMERA_FALSE:`${PATH}/doctor_camera_false.png`,
IMG_TRANS:`${PATH}/doctor_trans.png`,
IMG_SWITCH_CAMERA:`${PATH}/doctor_switch_camera.png`,
patient_avatar:wx.getStorageSync('patient_avatar')
patient_avatar:wx.getStorageSync('patient_avatar'),
patient_name:wx.getStorageSync('patientInfo')?wx.getStorageSync('patientInfo').patient_family_data.patient_name:''
},
methods: {
async accept() {
@@ -77,11 +77,9 @@ Component({
},
async hangup() {
await TUICallKitServer.hangup();
console.log(this.data.remoteUserInfoList)
},
async reject() {
await TUICallKitServer.reject();
//console.log(this.data.remoteUserInfoList)
},
async switchCamera() {
await TUICallKitServer.switchCamera();
@@ -20,7 +20,7 @@
<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>
<text>{{patient_name}}</text>
</view>
<view class="invite-calling-header-right">
@@ -87,9 +87,11 @@ class CallManager {
});
}
_handleCallStatusToCalling() {
console.log('isPageRedirected:'+this._isPageRedirected);
if (this._isPageRedirected)
return;
this._targetPagePath = this.getRoute().route;
console.log('videourl:'+`/${this._globalCallPagePath}`);
// @ts-ignore
wx.navigateTo({
url: `/${this._globalCallPagePath}`,
@@ -115,6 +117,7 @@ class CallManager {
this._isPageRedirected = false;
},
fail: () => {
this._isPageRedirected = false;
console.error(`${PREFIX} navigateBack fail!`);
},
complete: () => { },
@@ -95,6 +95,7 @@ export class CallManager {
this._isPageRedirected = false;
},
fail: () => {
this._isPageRedirected = false;
console.error(`${PREFIX} navigateBack fail!`);
},
complete: () => {},
@@ -1,9 +1,11 @@
import { TUICallKitServer } from "../../index";
Page({
data: {},
onShow() {
},
onHide(){
TUICallKitServer.getTUICallEngineInstance().handleExceptionExit();
console.log('接听页面隐藏');
}
});