监管人参会
This commit is contained in:
@ -97,3 +97,13 @@ export function getMeetingSetting() {
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 监管参会
|
||||
export function superviseJoinMeeting(params) {
|
||||
return request({
|
||||
url: `/app/superviseJoinMeeting`,
|
||||
method: "post",
|
||||
// headers: { "Content-Type": "application/json" },
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ import {
|
||||
registerJoinUser,
|
||||
visitorJoinUser,
|
||||
panelistJoinMeeting,
|
||||
superviseJoinMeeting,
|
||||
} from "@/api/meeting";
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
@ -47,6 +48,11 @@ const router = createRouter({
|
||||
name: "Host",
|
||||
component: () => import("@/views/meeting.vue"),
|
||||
},
|
||||
{
|
||||
path: "/supervisor/:meetingId/:username",
|
||||
name: "Supervisor",
|
||||
component: () => import("@/views/meeting.vue"),
|
||||
},
|
||||
{
|
||||
path: "/:pathMatch(.*)*",
|
||||
name: "NotFound",
|
||||
@ -77,7 +83,7 @@ router.beforeEach(async (to) => {
|
||||
return true;
|
||||
}
|
||||
// 如果要前往参会页面
|
||||
if (to.name === "Meeting") {
|
||||
else if (to.name === "Meeting") {
|
||||
// 如果要去的页面会议号于 vuex中的不一样,则清除数据
|
||||
if (to.params.meetingId !== store.state.joinUser.meetingId) {
|
||||
store.commit("setJoinUser", {});
|
||||
@ -145,8 +151,7 @@ router.beforeEach(async (to) => {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (to.name === "Panelist") {
|
||||
} else if (to.name === "Panelist") {
|
||||
// 如果要去的页面会议号于 vuex中的不一样,则清除数据
|
||||
if (to.params.meetingId !== store.state.joinUser.meetingId) {
|
||||
store.commit("setJoinUser", {});
|
||||
@ -173,6 +178,23 @@ router.beforeEach(async (to) => {
|
||||
store.commit("setJoinUser", {});
|
||||
return `/panelist-verify/${to.params.meetingId}`;
|
||||
}
|
||||
} else if (to.name === "Supervisor") {
|
||||
// 监管参会
|
||||
if (to.params.meetingId !== store.state.joinUser.meetingId) {
|
||||
store.commit("setMessagesList", []);
|
||||
}
|
||||
const { email, meetingPassword } = await superviseJoinMeeting({
|
||||
icCard: to.params.username,
|
||||
meetingId: to.params.meetingId,
|
||||
});
|
||||
store.commit("setJoinUser", {
|
||||
meetingId: to.params.meetingId,
|
||||
icCard: to.params.username,
|
||||
email: email.email,
|
||||
token: email.token,
|
||||
});
|
||||
store.commit("setPassword", meetingPassword);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user