qx
9 天以前 38a40fefc0c7c6afb17958f6827304dbefda9873
src/views/login.vue
@@ -58,13 +58,14 @@
    <!--  底部  -->
    <div class="el-login-footer">
      <span>Copyright © 2023-2024 All Rights Reserved.</span>
      <span>Copyright © 2024-2025 All Rights Reserved.</span>
      <!-- <span>Copyright © 2022-2023龙美网络 All Rights Reserved.</span> -->
    </div>
  </div>
</template>
<script>
import { getCodeImg, getconfigKey } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt'
@@ -157,31 +158,57 @@
        this.loginForm.hospId = this.$route.query.hospId
        Cookies.set("hospId", this.loginForm.hospId);
      } else if (env === 'production') {
              // 获取当前URL的端口号
      const port = window.location.port;
        // 获取当前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;
          case '8095':
            this.loginForm.hospId = "jdczgzyy";
            break;
          case '8096':
            this.loginForm.hospId = "sqyy";
            break;
          case '8097':
            this.loginForm.hospId = "wbzxyy";
            break;
          case '8098':
            this.loginForm.hospId = "bjxjyy";
            break;
            case '8099':
            this.loginForm.hospId = "bjfhyy";
            break;
        }
        Cookies.set("hospId", this.loginForm.hospId);
      } else if (env === 'staging') {
        // 获取当前URL的端口号
        const port = window.location.port;
        switch (port) {
          case '9013':
            this.loginForm.hospId = "pbkwyy";
            break;
          case '9014':
            this.loginForm.hospId = "jdczgzyy";
            break;
          case '9015':
            this.loginForm.hospId = "sqyy";
            break;
          case '9016':
            this.loginForm.hospId = "wbzxyy";
            break;
          case '9017':
            this.loginForm.hospId = "bjxjyy";
            break;
        }
        Cookies.set("hospId", this.loginForm.hospId);
      }
      // 存储hospId到Cookie
      // 更新URL参数
      if (this.loginForm.hospId) {
        const query = { ...this.$route.query, hospId: this.loginForm.hospId };
@@ -272,6 +299,7 @@
                }
              }
              this.$router.push({ path: this.redirect || "/" }).catch(() => { });
              location.reload();
            }
          }).catch(() => {