|
@@ -114,14 +114,15 @@ export const initialRoom = async () => {
|
|
};
|
|
};
|
|
|
|
|
|
export const enterRoom = async () => {
|
|
export const enterRoom = async () => {
|
|
- if (!isLeader) return;
|
|
|
|
|
|
+ // if (!isLeader) return;
|
|
const rtcStore = useRtcStore();
|
|
const rtcStore = useRtcStore();
|
|
const userID = rtcStore.userId || browser.getURLParam('vruserId');
|
|
const userID = rtcStore.userId || browser.getURLParam('vruserId');
|
|
|
|
+ const role = rtcStore.role || browser.getURLParam('role');
|
|
console.log('111', room.value);
|
|
console.log('111', room.value);
|
|
await shopAxios.get('/takelook/inOrOutRoom', {
|
|
await shopAxios.get('/takelook/inOrOutRoom', {
|
|
params: {
|
|
params: {
|
|
type: 0,
|
|
type: 0,
|
|
- role: 'leader',
|
|
|
|
|
|
+ role: role,
|
|
roomId,
|
|
roomId,
|
|
userId: userID,
|
|
userId: userID,
|
|
},
|
|
},
|
|
@@ -129,13 +130,14 @@ export const enterRoom = async () => {
|
|
};
|
|
};
|
|
|
|
|
|
export const leaveRoom = async () => {
|
|
export const leaveRoom = async () => {
|
|
- if (!isLeader) return;
|
|
|
|
|
|
+ // if (!isLeader) return;
|
|
const rtcStore = useRtcStore();
|
|
const rtcStore = useRtcStore();
|
|
const userID = rtcStore.userId || browser.getURLParam('vruserId');
|
|
const userID = rtcStore.userId || browser.getURLParam('vruserId');
|
|
|
|
+ const role = rtcStore.role || browser.getURLParam('role');
|
|
await shopAxios.get('/takelook/inOrOutRoom', {
|
|
await shopAxios.get('/takelook/inOrOutRoom', {
|
|
params: {
|
|
params: {
|
|
type: 1,
|
|
type: 1,
|
|
- role: 'leader',
|
|
|
|
|
|
+ role: role,
|
|
roomId,
|
|
roomId,
|
|
userId: userID,
|
|
userId: userID,
|
|
},
|
|
},
|