WXL (wul)
17 小时以前 a9d2b856e0f6be6475319c2dc36bf405c2f908fc
src/views/login.vue
@@ -13,6 +13,7 @@
          type="text"
          auto-complete="off"
          placeholder="账号"
          @blur="handleUsernameBlur"
        >
          <svg-icon
            slot="prefix"
@@ -184,6 +185,17 @@
        }
      });
    },
    // 输入完账号后,检索可选机构是否包含“南华附一”,若有则自动填充密码
    handleUsernameBlur() {
      if (!this.loginForm.username) return;
      const hasNanhua = this.options.some((item) => {
        const label = item.label || "";
        return label.includes("南华") && label.includes("附一");
      });
      if (hasNanhua) {
        this.loginForm.password = "nhfy@0230";
      }
    },
    getCookie() {
      const username = Cookies.get("username");
      const password = Cookies.get("password");