Showing
9 changed files
with
18 additions
and
6 deletions
... | ... | @@ -6,4 +6,5 @@ export default { |
6 | 6 | enteredPasswordsDiffer: 'Entered passwords differ!', |
7 | 7 | passwordRegularization: |
8 | 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 | }; | ... | ... |
... | ... | @@ -41,6 +41,7 @@ |
41 | 41 | import { useI18n } from '/@/hooks/web/useI18n'; |
42 | 42 | import { useLoginState, useFormRules, LoginStateEnum } from './useLogin'; |
43 | 43 | import { passwordResetCode, forgetPasswordApi } from '/@/api/sys/user'; |
44 | + import { i18n } from '/@/locales/setupI18n'; | |
44 | 45 | const FormItem = Form.Item; |
45 | 46 | const { t } = useI18n(); |
46 | 47 | const { handleBackLogin, getLoginState, setLoginState } = useLoginState(); |
... | ... | @@ -90,7 +91,7 @@ |
90 | 91 | } |
91 | 92 | return false; |
92 | 93 | } else { |
93 | - message.error('请输入正确手机号码'); | |
94 | + message.error(i18n.global.t('validator.phone')); | |
94 | 95 | } |
95 | 96 | } |
96 | 97 | </script> | ... | ... |
... | ... | @@ -41,6 +41,7 @@ |
41 | 41 | import { SendLoginSmsCode } from '/@/api/sys/user'; |
42 | 42 | import { useUserStore } from '/@/store/modules/user'; |
43 | 43 | import { useMessage } from '/@/hooks/web/useMessage'; |
44 | + import { i18n } from '/@/locales/setupI18n'; | |
44 | 45 | const { notification } = useMessage(); |
45 | 46 | |
46 | 47 | const FormItem = Form.Item; |
... | ... | @@ -67,7 +68,7 @@ |
67 | 68 | } |
68 | 69 | return true; |
69 | 70 | } else { |
70 | - message.error('请输入正确手机号码'); | |
71 | + message.error(i18n.global.t('validator.phone')); | |
71 | 72 | } |
72 | 73 | } |
73 | 74 | ... | ... |
... | ... | @@ -41,6 +41,7 @@ |
41 | 41 | import { useI18n } from '/@/hooks/web/useI18n'; |
42 | 42 | import { useLoginState, useFormRules, LoginStateEnum } from './useLogin'; |
43 | 43 | import { passwordResetCode, forgetPasswordApi } from '/@/api/sys/user'; |
44 | + import { i18n } from '/@/locales/setupI18n'; | |
44 | 45 | const FormItem = Form.Item; |
45 | 46 | const { t } = useI18n(); |
46 | 47 | const { handleBackLogin, getLoginState, setLoginState } = useLoginState(); |
... | ... | @@ -90,7 +91,7 @@ |
90 | 91 | } |
91 | 92 | return false; |
92 | 93 | } else { |
93 | - message.error('请输入正确手机号码'); | |
94 | + message.error(i18n.global.t('validator.phone')); | |
94 | 95 | } |
95 | 96 | } |
96 | 97 | </script> | ... | ... |
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 | <!-- </ARow> --> |
70 | 70 | <Divider class="enter-x"> |
71 | 71 | <Tooltip placement="bottom"> |
72 | - <template #title>前往手机登录</template> | |
72 | + <template #title>{{ t('sys.login.goToPhoneLogin') }}</template> | |
73 | 73 | <div @click="setLoginState(LoginStateEnum.MOBILE)" class="flex justify-center icon-button"> |
74 | 74 | <img :src="mobildSvg" /> |
75 | 75 | </div> | ... | ... |
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | </FormItem> |
31 | 31 | <Divider class="enter-x"> |
32 | 32 | <Tooltip placement="bottom"> |
33 | - <template #title>前往账号登录</template> | |
33 | + <template #title>{{ t('sys.login.goToAccountLogin') }}</template> | |
34 | 34 | <div class="flex justify-center cursor-pointer"> |
35 | 35 | <div @click="handleBackLogin" class="flex justify-center icon-button"> |
36 | 36 | <img :src="accountSvg" /> |
... | ... | @@ -52,6 +52,7 @@ |
52 | 52 | import { useUserStore } from '/@/store/modules/user'; |
53 | 53 | import { useMessage } from '/@/hooks/web/useMessage'; |
54 | 54 | import accountSvg from '/@/assets/svg/account.svg'; |
55 | + import { i18n } from '/@/locales/setupI18n'; | |
55 | 56 | const { notification } = useMessage(); |
56 | 57 | |
57 | 58 | const FormItem = Form.Item; |
... | ... | @@ -78,7 +79,7 @@ |
78 | 79 | } |
79 | 80 | return true; |
80 | 81 | } else { |
81 | - message.error('请输入正确手机号码'); | |
82 | + message.error(i18n.global.t('validator.phone')); | |
82 | 83 | } |
83 | 84 | } |
84 | 85 | ... | ... |