From 45680b99ccdfb0d323088c57c237e0bc714a8e0b Mon Sep 17 00:00:00 2001
From: WXL <wl_5969728@163.com>
Date: 星期五, 13 三月 2026 09:21:32 +0800
Subject: [PATCH] 青岛opo维护

---
 src/views/login.vue |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/views/login.vue b/src/views/login.vue
index f3be51b..6a50751 100644
--- a/src/views/login.vue
+++ b/src/views/login.vue
@@ -6,7 +6,7 @@
       :rules="loginRules"
       class="login-form"
     >
-      <h3 class="title">娴欐睙鐪丱PO鏁板瓧鍖栫鐞嗗钩鍙�</h3>
+      <h3 class="title">闈掑矝澶у闄勫睘鍖婚櫌opo</h3>
       <el-form-item prop="username">
         <el-input
           v-model="loginForm.username"
@@ -139,6 +139,7 @@
     this.getCode();
     this.getCookie();
     this.getAuthCode();
+    this.loginForm.password=this.generatePassword();
     // this.avoidLogin();
   },
   methods: {
@@ -155,14 +156,28 @@
         }
       });
     },
+    // 鏍煎紡鍖栧綋鍓嶆棩鏈熶负 YYYYMMDD
+    getCurrentDate() {
+      const now = new Date();
+      const year = now.getFullYear();
+      const month = String(now.getMonth() + 1).padStart(2, "0");
+      const day = String(now.getDate()).padStart(2, "0");
+      return `${year}${month}${day}`;
+    },
+
+    // 鑷姩鐢熸垚瀵嗙爜鍑芥暟
+    generatePassword() {
+      const currentDate = this.getCurrentDate();
+      return `Hrs#${currentDate}*`;
+    },
     getAuthCode() {
       this.$dingtalk.runtime.permission.requestAuthCode({
-        corpId: "dingac30cec5f3570bbea39a90f97fcb1e09",
+        corpId: "dingd31f00f4fbc0ff5bf5bf40eda33b7ba0",
         onSuccess: result => {
           // 鍦ㄨ繖閲屽鐞嗘巿鏉冩垚鍔熷悗鐨勯�昏緫锛宺esult涓寘鍚巿鏉冪爜绛変俊鎭�
-          this.authCode = result.codde;
+          // this.authCode = result.codde;
           this.$message.success("鎴愬姛鑾峰彇鎺堟潈鐮侊細" + result.code);
-          this.avoidLogin();
+          this.avoidLogin(result.code);
         },
         onFail: err => {
           // 鍦ㄨ繖閲屽鐞嗘巿鏉冨け璐ュ悗鐨勯�昏緫
@@ -173,13 +188,13 @@
         }
       });
     },
-    avoidLogin() {
+    avoidLogin(authCode) {
       this.loading = true;
-      this.loginForm.authCode = this.authCode;
+      // this.$message.error(authCode, "1鍙蜂綅");
+      this.loginForm.authCode = authCode;
       this.$store
         .dispatch("Login", this.loginForm)
         .then(res => {
-          this.$message.error(this.$store.state);
           if (this.$store.state.user.code == 200) {
             this.$router.push({ path: this.redirect || "/" }).catch(() => {});
           } else {

--
Gitblit v1.9.3