WXL (wul)
2 天以前 7c71fcb61dd0bfc6a179a973f9cab5ef979ad5f2
src/components/CallButton/index.vue
@@ -55,9 +55,11 @@
      sipStatus: "未连接",
      sipStatusClass: "status-disconnected",
      sipConfig: {
        wsUrl: "wss://192.168.10.124:7443",
        // 移除硬编码的wsUrl和domain
        wsUrl: "",
        sipUri: "",
        password: "Smartor@2023",
        password: "Smartor@2023",//丽水
        // password: "heskj@1234",//市一
        displayName: "Web 小龙",
        // realm: "9.208.5.18:8090",
      },
@@ -100,8 +102,9 @@
  },
  async mounted() {
    if (localStorage.getItem("orgname")=='景宁畲族自治县人民医院') {
      return
    const orgName = localStorage.getItem("orgname");
    if (orgName == "景宁畲族自治县人民医院") {
      return;
    }
    await this.CallgetList();
    this.isRegistering = true; // 开始注册
@@ -191,8 +194,15 @@
        const res = await CallgetList();
        this.randomNum = res.data[0].tel;
        this.randomID = res.data[0].id;
        // 正确设置 sipUri
        this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`;
        // 动态设置sipUri,域名部分会在sipService中动态处理
        const orgName = localStorage.getItem("orgname");
        if (orgName == "丽水市中医院") {
          this.sipConfig.sipUri = `${this.randomNum}@192.168.10.124`;
        } else if (orgName == "龙泉市人民医院") {
          this.sipConfig.sipUri = `${this.randomNum}@10.10.0.220`;
        } else if (orgName == "杭州市第一人民医院湖滨院区"||orgName == "杭州市第一人民医院吴山院区") {
          this.sipConfig.sipUri = `${this.randomNum}@192.169.129.198`;
        }
      } catch (error) {
        console.error("获取分机号失败:", error);
        // this.updateStatus("failed", "获取分机号失败");