From 324db843282ae84085e52a7e8ad03d01a6fb52cc Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期四, 08 八月 2024 11:51:51 +0800
Subject: [PATCH] 配置上传图片bug页面修改

---
 src/views/login/components/login-form.vue |   53 ++++++++++++++++++++++++-----------------------------
 1 files changed, 24 insertions(+), 29 deletions(-)

diff --git a/src/views/login/components/login-form.vue b/src/views/login/components/login-form.vue
index 02b12da..583ef10 100644
--- a/src/views/login/components/login-form.vue
+++ b/src/views/login/components/login-form.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="login-form-wrapper">
     <div class="login-form-title">{{ $t('login.form.title') }}</div>
-<!--    <div class="login-form-sub-title">{{ $t('login.form.title') }}</div>-->
+    <!--    <div class="login-form-sub-title">{{ $t('login.form.title') }}</div>-->
     <div class="login-form-error-msg">{{ errorMessage }}</div>
     <a-form
       ref="loginForm"
@@ -16,10 +16,7 @@
         :validate-trigger="['change', 'blur']"
         hide-label
       >
-        <a-input
-          v-model="userInfo.email"
-          placeholder="璇疯緭鍏ラ偖绠�"
-        >
+        <a-input v-model="userInfo.email" placeholder="璇疯緭鍏ラ偖绠�">
           <template #prefix>
             <icon-user />
           </template>
@@ -43,28 +40,28 @@
       </a-form-item>
       <a-space :size="16" direction="vertical">
         <div class="login-form-password-actions">
-          <a-checkbox
+          <!-- <a-checkbox
             checked="rememberPassword"
             :model-value="loginConfig.rememberPassword"
             @change="setRememberPassword as any"
           >
             {{ $t('login.form.rememberPassword') }}
-          </a-checkbox>
-          <a-link>{{ $t('login.form.forgetPassword') }}</a-link>
+          </a-checkbox> -->
+          <!-- <a-link>{{ $t("login.form.forgetPassword") }}</a-link> -->
         </div>
         <a-button type="primary" html-type="submit" long :loading="loading">
           {{ $t('login.form.login') }}
         </a-button>
-        <a-button type="text" long class="login-form-register-btn">
+        <!-- <a-button type="text" long class="login-form-register-btn">
           {{ $t('login.form.register') }}
-        </a-button>
+        </a-button> -->
       </a-space>
     </a-form>
   </div>
 </template>
 
 <script lang="ts" setup>
-  import { ref, reactive } from 'vue';
+  import { reactive, ref } from 'vue';
   import { useRouter } from 'vue-router';
   import { Message } from '@arco-design/web-vue';
   import { ValidatedError } from '@arco-design/web-vue/es/form/interface';
@@ -83,12 +80,12 @@
 
   const loginConfig = useStorage('login-config', {
     rememberPassword: true,
-    email: '1750082535@qq.com', // 婕旂ず榛樿鍊�
-    password: 'basic2024', // demo default value
+    email: '', // 婕旂ず榛樿鍊�
+    password: '', // demo default value
   });
   const userInfo = reactive({
-    email: '1750082535@qq.com', // 婕旂ず榛樿鍊�
-    password: 'basic2024', // demo default value
+    email: '', // 婕旂ず榛樿鍊�
+    password: '', // demo default value
   });
 
   const handleSubmit = async ({
@@ -102,28 +99,26 @@
     if (!errors) {
       setLoading(true);
       try {
-        // const rsaPassWord = rsaPsw(values.password) as string;
-        // console.log(values,'鐧诲綍淇℃伅');
-        // await userStore.login({
-        //   email: values.email,
-        //   password: rsaPassWord,
-        // } as LoginData);
-        // const { redirect, ...othersQuery } = router.currentRoute.value.query;
+        const rsaPassWord = rsaPsw(values.password) as string;
+        console.log(values, '鐧诲綍淇℃伅');
+        let goto = await userStore.login({
+          email: values.email,
+          password: rsaPassWord,
+        } as LoginData);
+        const { redirect, ...othersQuery } = router.currentRoute.value.query;
         router.push({
-          name: 'knowledgeLib',
-          // query: {
-          //   ...othersQuery,
-          // },
+          name: goto,
+          query: {
+            ...othersQuery,
+          },
         });
-        Message.success(t('娆㈣繋鍥炴潵'));
+        Message.success(t('鐧诲綍鎴愬姛'));
         const { rememberPassword } = loginConfig.value;
         const { email, password } = values;
         // 瀹為檯鐢熶骇鐜闇�瑕佽繘琛屽姞瀵嗗瓨鍌ㄣ��
         // The actual production environment requires encrypted storage.
         loginConfig.value.email = rememberPassword ? email : '';
         loginConfig.value.password = rememberPassword ? password : '';
-
-
       } catch (err) {
         errorMessage.value = (err as Error).message;
       } finally {

--
Gitblit v1.8.0