diff --git a/src/page/Home/Index/index.tsx b/src/page/Home/Index/index.tsx index c676f52..0eca984 100644 --- a/src/page/Home/Index/index.tsx +++ b/src/page/Home/Index/index.tsx @@ -64,10 +64,11 @@ const Index: React.FC = () => { } }) } - const postRefresh = async (): Promise => { + const postRefresh = async (callBack: Function): Promise => { await PostRefresh(user.refresh_token).then(res => { if (res.code === 200) { storage.setItem('user', JSON.stringify(res.data)) + callBack(res.data) } }) } @@ -126,19 +127,20 @@ const Index: React.FC = () => { {/* */} - diff --git a/src/page/Meeting/index.tsx b/src/page/Meeting/index.tsx index bfec6b1..ad1c212 100644 --- a/src/page/Meeting/index.tsx +++ b/src/page/Meeting/index.tsx @@ -330,10 +330,12 @@ const Meeting: React.FC = () => { } } // 退出房间 - const leaveChannel = async (): Promise => { - await onInvoke('levelChannel', { - roomNum: state.channelId - }) + const leaveChannel = async (bool?: boolean): Promise => { + if (!bool) { + await onInvoke('levelChannel', { + roomNum: state.channelId + }) + } agora.leaveChannel() navigate('/home/index') } @@ -734,7 +736,7 @@ const Meeting: React.FC = () => { roomNum: state.channelId, type: 1, }) - leaveChannel() + leaveChannel(true) }}>全员结束会议
leaveChannel()}>仅自己离开
{ setOpen(false) }}>取消