|
@@ -534,19 +534,6 @@ export const useClassroom = ({ user }:{ user : User }) => {
|
|
|
|
|
|
|
|
const joinClass = async (classId: string): Promise<void> => {
|
|
const joinClass = async (classId: string): Promise<void> => {
|
|
|
if (!imEngine.current || !aliRtcEngine.current) return;
|
|
if (!imEngine.current || !aliRtcEngine.current) return;
|
|
|
-
|
|
|
|
|
- // // 优先使用URL参数中的classId和role
|
|
|
|
|
- // const { id: pathClassId, role: pathRole } = useParams();
|
|
|
|
|
- // const finalClassId = (classId || pathClassId) as string;
|
|
|
|
|
- // if (pathRole && ['teacher', 'student'].includes(pathRole)) {
|
|
|
|
|
- // setRole(pathRole === 'teacher' ? Role.Teacher : Role.Student);
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
- // if (!finalClassId) {
|
|
|
|
|
- // setErrorMessage('课堂ID不能为空');
|
|
|
|
|
- // showToast('error', '请输入有效的课堂ID');
|
|
|
|
|
- // return;
|
|
|
|
|
- // }
|
|
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
const gm = imEngine.current.getGroupManager();
|
|
const gm = imEngine.current.getGroupManager();
|