|
@@ -169,11 +169,22 @@ export const shareRoom = async (roomId: string, userId: string) => {
|
|
|
// if (roomId) {
|
|
|
// shopAxios.get('/takelook/roomAddView', { params: { roomId } });
|
|
|
// }
|
|
|
-
|
|
|
-export const getSign = async (userId: string): Promise<getSignType> => {
|
|
|
- const res = await shopAxios.get<AxiosResponse>('/takelook/tencentYun/getSign', {
|
|
|
+export const GET_COMMON_SIG = '/takelook/rtcMedia/getToken';
|
|
|
+
|
|
|
+export const getSign = async (
|
|
|
+ userId: string,
|
|
|
+ channelName: string,
|
|
|
+ roleId: string,
|
|
|
+): Promise<getSignType> => {
|
|
|
+ let role = 0;
|
|
|
+ if (roleId === 'leader') {
|
|
|
+ role = 1;
|
|
|
+ }
|
|
|
+ const res = await shopAxios.get<AxiosResponse>(GET_COMMON_SIG, {
|
|
|
params: {
|
|
|
userId,
|
|
|
+ roleId: role,
|
|
|
+ channelName,
|
|
|
},
|
|
|
});
|
|
|
return res.data.data;
|