wwl
2025-02-15 5b4e348267b5541d54fffcc75c7b307ad514a692
src/views/login.vue
@@ -152,8 +152,41 @@
    },
    loadAll(){
      const env = process.env.VUE_APP_ENV
      if (env === 'development') {
      this.loginForm.hospId = this.$route.query.hospId
      Cookies.set("hospId", this.loginForm.hospId);
      } else if (env === 'production') {
              // 获取当前URL的端口号
      const port = window.location.port;
        switch (port) {
          case '9011':
            this.loginForm.hospId = "chkwyy";
            break;
          case '9012':
            this.loginForm.hospId = "xamjyy";
            break;
          case '8094':
            this.loginForm.hospId = "pbkwyy";
            break;
        }
        Cookies.set("hospId", this.loginForm.hospId);
      }
      // 存储hospId到Cookie
      // 更新URL参数
      if (this.loginForm.hospId) {
        const query = { ...this.$route.query, hospId: this.loginForm.hospId };
        this.$router.replace({ query });
      }
    },
    hide() {