| | |
| | | }, |
| | | }, |
| | | data() { |
| | | const randomNum = Math.floor(Math.random() * 11) + 1000; // 内部定义 |
| | | const randomNum = Math.floor(Math.random() * 20) + 1000; // 内部定义 |
| | | return { |
| | | isCalling: false, |
| | | callStatus: "idle", // idle, calling, connected, ended |
| | | sipStatus: "未连接", |
| | | sipStatusClass: "status-disconnected", |
| | | sipConfig: { |
| | | wsUrl: "wss://192.168.10.124:7443", |
| | | sipUri: `${randomNum}` + "@192.168.10.124", |
| | | wsUrl: "wss://1192.170.66.107:7443", |
| | | sipUri: `${randomNum}` + "@1192.170.66.107", |
| | | password: "Smartor@2023", |
| | | displayName: "Web 小龙", |
| | | }, |
| | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | console.log('当前分机号',this.sipConfig); |
| | | |
| | | sipService.init(this.sipConfig); |
| | | sipService.onStatusChange = (status) => { |
| | | this.sipStatus = status.text; |