import { GET_SIG, GET_ARGOA_SIG, GET_COMMON_SIG } from '../utils/apiList' import { request, Response } from '../utils/http' interface SingResType { expire: number | string, sdkAppId: number | string, sign: string, operatorType: number } type RoomDetailRes = Response & { data: SingResType } // export const getRTCSig = async (userId: string): Promise => { // const res = await request.get(GET_SIG, { // userId // }) // return res.data // } export const getRTCSig = async (userId: string | number, roleId: string | number, channelName: string): Promise => { const res = await request.get(GET_COMMON_SIG, { userId, roleId, channelName }) return res.code === 0 ? res.data : { sdkAppId: '', expire: '', sign: '', operatorType: -1 } }