Showing
9 changed files
with
18 additions
and
6 deletions
| @@ -103,5 +103,8 @@ export default { | @@ -103,5 +103,8 @@ export default { | ||
| 103 | email: 'Email', | 103 | email: 'Email', |
| 104 | smsCode: 'SMS code', | 104 | smsCode: 'SMS code', |
| 105 | mobile: 'Mobile', | 105 | mobile: 'Mobile', |
| 106 | + | ||
| 107 | + goToAccountLogin: 'Go to account login', | ||
| 108 | + goToPhoneLogin: 'Go to mobile login', | ||
| 106 | }, | 109 | }, |
| 107 | }; | 110 | }; |
| @@ -6,4 +6,5 @@ export default { | @@ -6,4 +6,5 @@ export default { | ||
| 6 | enteredPasswordsDiffer: 'Entered passwords differ!', | 6 | enteredPasswordsDiffer: 'Entered passwords differ!', |
| 7 | passwordRegularization: | 7 | passwordRegularization: |
| 8 | 'Passwords must contain uppercase and lowercase letters, numbers, and special characters, with a minimum of 8 characters and a maximum of 30 characters', | 8 | 'Passwords must contain uppercase and lowercase letters, numbers, and special characters, with a minimum of 8 characters and a maximum of 30 characters', |
| 9 | + phone: 'Please enter the correct mobile number', | ||
| 9 | }; | 10 | }; |
| @@ -5,4 +5,5 @@ export default { | @@ -5,4 +5,5 @@ export default { | ||
| 5 | emptyPassword: '密码不能为空', | 5 | emptyPassword: '密码不能为空', |
| 6 | enteredPasswordsDiffer: '两次输入的密码不一致', | 6 | enteredPasswordsDiffer: '两次输入的密码不一致', |
| 7 | passwordRegularization: '密码中必须包含大小写 字母、数字、特称字符,至少8个字符,最多30个字符', | 7 | passwordRegularization: '密码中必须包含大小写 字母、数字、特称字符,至少8个字符,最多30个字符', |
| 8 | + phone: '请输入正确手机号码', | ||
| 8 | }; | 9 | }; |
| @@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
| 41 | import { useI18n } from '/@/hooks/web/useI18n'; | 41 | import { useI18n } from '/@/hooks/web/useI18n'; |
| 42 | import { useLoginState, useFormRules, LoginStateEnum } from './useLogin'; | 42 | import { useLoginState, useFormRules, LoginStateEnum } from './useLogin'; |
| 43 | import { passwordResetCode, forgetPasswordApi } from '/@/api/sys/user'; | 43 | import { passwordResetCode, forgetPasswordApi } from '/@/api/sys/user'; |
| 44 | + import { i18n } from '/@/locales/setupI18n'; | ||
| 44 | const FormItem = Form.Item; | 45 | const FormItem = Form.Item; |
| 45 | const { t } = useI18n(); | 46 | const { t } = useI18n(); |
| 46 | const { handleBackLogin, getLoginState, setLoginState } = useLoginState(); | 47 | const { handleBackLogin, getLoginState, setLoginState } = useLoginState(); |
| @@ -90,7 +91,7 @@ | @@ -90,7 +91,7 @@ | ||
| 90 | } | 91 | } |
| 91 | return false; | 92 | return false; |
| 92 | } else { | 93 | } else { |
| 93 | - message.error('请输入正确手机号码'); | 94 | + message.error(i18n.global.t('validator.phone')); |
| 94 | } | 95 | } |
| 95 | } | 96 | } |
| 96 | </script> | 97 | </script> |
| @@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
| 41 | import { SendLoginSmsCode } from '/@/api/sys/user'; | 41 | import { SendLoginSmsCode } from '/@/api/sys/user'; |
| 42 | import { useUserStore } from '/@/store/modules/user'; | 42 | import { useUserStore } from '/@/store/modules/user'; |
| 43 | import { useMessage } from '/@/hooks/web/useMessage'; | 43 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 44 | + import { i18n } from '/@/locales/setupI18n'; | ||
| 44 | const { notification } = useMessage(); | 45 | const { notification } = useMessage(); |
| 45 | 46 | ||
| 46 | const FormItem = Form.Item; | 47 | const FormItem = Form.Item; |
| @@ -67,7 +68,7 @@ | @@ -67,7 +68,7 @@ | ||
| 67 | } | 68 | } |
| 68 | return true; | 69 | return true; |
| 69 | } else { | 70 | } else { |
| 70 | - message.error('请输入正确手机号码'); | 71 | + message.error(i18n.global.t('validator.phone')); |
| 71 | } | 72 | } |
| 72 | } | 73 | } |
| 73 | 74 |
| @@ -41,6 +41,7 @@ | @@ -41,6 +41,7 @@ | ||
| 41 | import { useI18n } from '/@/hooks/web/useI18n'; | 41 | import { useI18n } from '/@/hooks/web/useI18n'; |
| 42 | import { useLoginState, useFormRules, LoginStateEnum } from './useLogin'; | 42 | import { useLoginState, useFormRules, LoginStateEnum } from './useLogin'; |
| 43 | import { passwordResetCode, forgetPasswordApi } from '/@/api/sys/user'; | 43 | import { passwordResetCode, forgetPasswordApi } from '/@/api/sys/user'; |
| 44 | + import { i18n } from '/@/locales/setupI18n'; | ||
| 44 | const FormItem = Form.Item; | 45 | const FormItem = Form.Item; |
| 45 | const { t } = useI18n(); | 46 | const { t } = useI18n(); |
| 46 | const { handleBackLogin, getLoginState, setLoginState } = useLoginState(); | 47 | const { handleBackLogin, getLoginState, setLoginState } = useLoginState(); |
| @@ -90,7 +91,7 @@ | @@ -90,7 +91,7 @@ | ||
| 90 | } | 91 | } |
| 91 | return false; | 92 | return false; |
| 92 | } else { | 93 | } else { |
| 93 | - message.error('请输入正确手机号码'); | 94 | + message.error(i18n.global.t('validator.phone')); |
| 94 | } | 95 | } |
| 95 | } | 96 | } |
| 96 | </script> | 97 | </script> |
| @@ -69,7 +69,7 @@ | @@ -69,7 +69,7 @@ | ||
| 69 | <!-- </ARow> --> | 69 | <!-- </ARow> --> |
| 70 | <Divider class="enter-x"> | 70 | <Divider class="enter-x"> |
| 71 | <Tooltip placement="bottom"> | 71 | <Tooltip placement="bottom"> |
| 72 | - <template #title>前往手机登录</template> | 72 | + <template #title>{{ t('sys.login.goToPhoneLogin') }}</template> |
| 73 | <div @click="setLoginState(LoginStateEnum.MOBILE)" class="flex justify-center icon-button"> | 73 | <div @click="setLoginState(LoginStateEnum.MOBILE)" class="flex justify-center icon-button"> |
| 74 | <img :src="mobildSvg" /> | 74 | <img :src="mobildSvg" /> |
| 75 | </div> | 75 | </div> |
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | </FormItem> | 30 | </FormItem> |
| 31 | <Divider class="enter-x"> | 31 | <Divider class="enter-x"> |
| 32 | <Tooltip placement="bottom"> | 32 | <Tooltip placement="bottom"> |
| 33 | - <template #title>前往账号登录</template> | 33 | + <template #title>{{ t('sys.login.goToAccountLogin') }}</template> |
| 34 | <div class="flex justify-center cursor-pointer"> | 34 | <div class="flex justify-center cursor-pointer"> |
| 35 | <div @click="handleBackLogin" class="flex justify-center icon-button"> | 35 | <div @click="handleBackLogin" class="flex justify-center icon-button"> |
| 36 | <img :src="accountSvg" /> | 36 | <img :src="accountSvg" /> |
| @@ -52,6 +52,7 @@ | @@ -52,6 +52,7 @@ | ||
| 52 | import { useUserStore } from '/@/store/modules/user'; | 52 | import { useUserStore } from '/@/store/modules/user'; |
| 53 | import { useMessage } from '/@/hooks/web/useMessage'; | 53 | import { useMessage } from '/@/hooks/web/useMessage'; |
| 54 | import accountSvg from '/@/assets/svg/account.svg'; | 54 | import accountSvg from '/@/assets/svg/account.svg'; |
| 55 | + import { i18n } from '/@/locales/setupI18n'; | ||
| 55 | const { notification } = useMessage(); | 56 | const { notification } = useMessage(); |
| 56 | 57 | ||
| 57 | const FormItem = Form.Item; | 58 | const FormItem = Form.Item; |
| @@ -78,7 +79,7 @@ | @@ -78,7 +79,7 @@ | ||
| 78 | } | 79 | } |
| 79 | return true; | 80 | return true; |
| 80 | } else { | 81 | } else { |
| 81 | - message.error('请输入正确手机号码'); | 82 | + message.error(i18n.global.t('validator.phone')); |
| 82 | } | 83 | } |
| 83 | } | 84 | } |
| 84 | 85 |