This commit is contained in:
2023-10-29 13:17:28 +08:00
parent dee9051652
commit 336bcc662b
29 changed files with 3077 additions and 169 deletions

View File

@@ -447,28 +447,45 @@
content: 'TRTC_VIDEO_START'
};
this.sendMsg(formdata,formdata.msgType)
// this.sendMsg(formdata,formdata.msgType)
const userId=localStorage.getItem("userId")
const roomId=userId
const roomInfo={
roomId:"call_room",//后面改成发起人的手机号或者id
roomName:"某某发起的视频聊天",
creatorId:"creatorId",
creatorName:"发起人的昵称",
roomId:userId,//后面改成发起人的手机号或者id
roomName:`${userId}发起的视频聊天`,
creatorId:userId,
creatorName:userId,
publishId:userId,
publishName:userId,
isOver:0,
webrtcUrl:config.getSRSUrl()+"/call_room/uid13",
webrtcUrl:config.getSRSUrl()+`/${roomId}/${userId}`,
type:"webrtc",
offline:0
offline:0,
invitedUserList:[this.talkTo.userId]
}
this.$store
.dispatch('createRoom', roomInfo)
.then(res => {
location.href=config.getVideoRoomUrl(roomInfo.roomId,roomInfo.creatorId,1,1)
customHttp.customHttp.post("/api/im/app/wsMsg",{
msgType:"10000",
msgId:JSON.stringify(roomInfo),
cmd:"",
msgTxt:""
},{
dataType: 'json',
custom: {target: "znzq"} ,
}).then((res1)=>{
location.href=config.getVideoRoomUrl(roomInfo.roomId,roomInfo.creatorId,1,1)
})
})
this.$http.request({
if(1>0){
return false;
}
this.$http.request({
url: '/chat/sendMsg',
method: 'POST',
data: JSON.stringify(formdata),