Explorar el Código

rememberme前端

danch hace 3 semanas
padre
commit
d217d36487
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      src/views/sys/login/LoginForm.vue

+ 7 - 1
src/views/sys/login/LoginForm.vue

@@ -40,7 +40,7 @@
       <ACol :span="12">
         <FormItem :style="{ 'text-align': 'right' }">
           <!-- No logic, you need to deal with it yourself -->
-          <Button type="link" size="small" @click="setLoginState(LoginStateEnum.RESET_PASSWORD)">
+          <Button type="link" size="small" @click="forgetPassword()">
             {{ t('sys.login.forgetPassword') }}
           </Button>
         </FormItem>
@@ -101,6 +101,7 @@
   import { getCodeInfo } from '/@/api/sys/user';
   //import { onKeyStroke } from '@vueuse/core';
 
+  const {createConfirm,createMessage} = useMessage();
   const ACol = Col;
   const ARow = Row;
   const FormItem = Form.Item;
@@ -147,6 +148,7 @@
         toRaw({
           password: data.password,
           username: data.account,
+          rememberMe: rememberMe.value,
           // captcha: data.inputCode,
           checkKey: randCodeData.checkKey,
           mode: 'none', //不要默认的错误提示
@@ -189,6 +191,10 @@
   function onThirdLogin(type) {
     thirdModalRef.value.onThirdLogin(type);
   }
+  function  forgetPassword(){
+    createMessage.info('请联系管理员重置密码');
+  }
+
   //初始化验证码
   // onMounted(() => {
   //   handleChangeCheckCode();