WXL
3 天以前 96681523c5bc39840abf9d73cd585044568d5aad
src/components/CallButton/index.vue
@@ -35,23 +35,29 @@
export default {
  data() {
    return {
      phoneNumber: "",
      // phoneNumber: "",
      isCalling: false,
      callStatus: "准备就绪",
      sipStatus: "未连接",
      sipStatusClass: "status-disconnected",
      sipConfig: {
        wsUrl: "wss://192.168.100.6:7443",
        sipUri: "1000@192.168.100.6",
        wsUrl: "wss://9.208.5.18:7443",
        sipUri: "1000@9.208.5.18",
        password: "Smartor@2023",
        displayName: "Web 小龙",
        // realm: "192.168.100.6:8090",
        // realm: "9.208.5.18:8090",
      },
    };
  },
  props: {
    phoneNumber: {
      type: String,
      default: ''
    }
  },
  mounted() {
    // 测试
    const ws = new WebSocket("wss://192.168.100.6:7443");
    const ws = new WebSocket("wss://9.208.5.18:7443");
    ws.onopen = () => console.log("WebSocket 连接成功");
    ws.onerror = (e) => console.error("WebSocket 错误:", e);