添加加入房间钱的loading
This commit is contained in:
parent
a913c6520b
commit
ef932fd3a8
|
|
@ -68,7 +68,11 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
|
||||||
await GetCheckoutRoomNum(roomNum).then(res => {
|
await GetCheckoutRoomNum(roomNum).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
callBack(res.data)
|
callBack(res.data)
|
||||||
|
} else {
|
||||||
|
storage.setItem('loading', false)
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
storage.setItem('loading', false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const getRoomRtcToken = async (roomNum: string, callBack: Function): Promise<void> => {
|
const getRoomRtcToken = async (roomNum: string, callBack: Function): Promise<void> => {
|
||||||
|
|
@ -78,7 +82,11 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
|
||||||
token: res[0].data,
|
token: res[0].data,
|
||||||
tokenA: res[1].data,
|
tokenA: res[1].data,
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
storage.setItem('loading', false)
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
storage.setItem('loading', false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const postRefresh = async (callBack: Function): Promise<void> => {
|
const postRefresh = async (callBack: Function): Promise<void> => {
|
||||||
|
|
@ -87,7 +95,11 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
|
||||||
storage.setItem('user', JSON.stringify(res.data))
|
storage.setItem('user', JSON.stringify(res.data))
|
||||||
storage.setItem('userLogin', true)
|
storage.setItem('userLogin', true)
|
||||||
callBack(res.data)
|
callBack(res.data)
|
||||||
|
} else {
|
||||||
|
storage.setItem('loading', false)
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
storage.setItem('loading', false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
|
|
@ -172,6 +184,7 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
|
||||||
message.error('请输入会议号!')
|
message.error('请输入会议号!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
storage.setItem('loading', true)
|
||||||
isGetCheckoutRoomNum(roomNumber, (bool: boolean) => {
|
isGetCheckoutRoomNum(roomNumber, (bool: boolean) => {
|
||||||
if (bool) {
|
if (bool) {
|
||||||
getRoomRtcToken(roomNumber, (options: any) => {
|
getRoomRtcToken(roomNumber, (options: any) => {
|
||||||
|
|
@ -194,6 +207,8 @@ const JoinSetting = forwardRef((_props: any, ref: any) => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
storage.setItem('loading', false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,8 @@ const Index: React.FC = () => {
|
||||||
tokenA: res[1].data,
|
tokenA: res[1].data,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
storage.setItem('loading', false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const postRefresh = async (callBack: Function): Promise<void> => {
|
const postRefresh = async (callBack: Function): Promise<void> => {
|
||||||
|
|
@ -95,7 +97,11 @@ const Index: React.FC = () => {
|
||||||
storage.setItem('user', JSON.stringify(res.data))
|
storage.setItem('user', JSON.stringify(res.data))
|
||||||
storage.setItem('userLogin', true)
|
storage.setItem('userLogin', true)
|
||||||
callBack(res.data)
|
callBack(res.data)
|
||||||
|
} else {
|
||||||
|
storage.setItem('loading', false)
|
||||||
}
|
}
|
||||||
|
}).catch(() => {
|
||||||
|
storage.setItem('loading', false)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -206,7 +212,7 @@ const Index: React.FC = () => {
|
||||||
<img src={ImageUrl.icon10} alt="" />
|
<img src={ImageUrl.icon10} alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{role.ID.includes(userInfo.roleId) ? <Popover
|
{role.ID.includes(userInfo.roleId) ? <Popover
|
||||||
content={
|
content={
|
||||||
<div className='meetingContentFooterPopover'>
|
<div className='meetingContentFooterPopover'>
|
||||||
{userInfo.roleId === '1' ? <Popconfirm
|
{userInfo.roleId === '1' ? <Popconfirm
|
||||||
|
|
@ -254,6 +260,7 @@ const Index: React.FC = () => {
|
||||||
if (role.ID.includes(userInfo.roleId)) {
|
if (role.ID.includes(userInfo.roleId)) {
|
||||||
joinSettingRef.current.changeModal(item.roomNum)
|
joinSettingRef.current.changeModal(item.roomNum)
|
||||||
} else {
|
} else {
|
||||||
|
storage.setItem('loading', true)
|
||||||
postRefresh(() => {
|
postRefresh(() => {
|
||||||
getRoomRtcToken(item.roomNum, (options: any) => {
|
getRoomRtcToken(item.roomNum, (options: any) => {
|
||||||
if (options) {
|
if (options) {
|
||||||
|
|
|
||||||
|
|
@ -381,3 +381,7 @@ $pagination-hover-background-color: #5575F2;
|
||||||
.ant-message {
|
.ant-message {
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-spin-fullscreen {
|
||||||
|
z-index: 10000;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue