| | |
| | | |
| | | 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 ({ |
| | |
| | | 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,'登录信息'); |
| | | await userStore.login({ |
| | | email: values.email, |
| | | password: rsaPassWord, |
| | | } as LoginData); |
| | | const { redirect, ...othersQuery } = router.currentRoute.value.query; |
| | | router.push({ |
| | | name: 'knowledgeLib', |
| | | // query: { |
| | | // ...othersQuery, |
| | | // }, |
| | | query: { |
| | | ...othersQuery, |
| | | }, |
| | | }); |
| | | Message.success(t('欢迎回来')); |
| | | const { rememberPassword } = loginConfig.value; |