|
|
@@ -75,7 +75,8 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
socket: null,
|
|
|
- HOST: "wss://car.caner.top",
|
|
|
+ // HOST: "wss://car.caner.top",
|
|
|
+ HOST:'ws://127.0.0.1:10086',
|
|
|
Peer: null,
|
|
|
isLogin: false,
|
|
|
error: "",
|
|
|
@@ -257,15 +258,21 @@ export default {
|
|
|
|
|
|
// 登录
|
|
|
login(data) {
|
|
|
- if (this.socket) {
|
|
|
- this.socket.auth = {
|
|
|
- roomID: data.roomID,
|
|
|
- name: data.name,
|
|
|
- };
|
|
|
- this.socket.connect();
|
|
|
- } else {
|
|
|
- this.error = "服务器连接失败";
|
|
|
+ // if (this.socket) {
|
|
|
+ // this.socket.auth = {
|
|
|
+ // roomID: data.roomID,
|
|
|
+ // name: data.name,
|
|
|
+ // };
|
|
|
+ // this.socket.connect();
|
|
|
+ // } else {
|
|
|
+ // this.error = "服务器连接失败";
|
|
|
+ // }
|
|
|
+ const obj = {
|
|
|
+ roomID: data.roomID,
|
|
|
+ name: data.name
|
|
|
}
|
|
|
+ const socket = new WebSocket(this.HOST+'?test=123');
|
|
|
+ console.log(666,socket);
|
|
|
},
|
|
|
|
|
|
// 关闭
|
|
|
@@ -297,7 +304,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.intSoketRtc(this.HOST);
|
|
|
+ // this.intSoketRtc(this.HOST);
|
|
|
},
|
|
|
watch: {
|
|
|
// 静音
|