|
|
@@ -17,8 +17,9 @@ import { toast } from '@/utils/toast'
|
|
|
defineOptions({
|
|
|
name: 'ForgotPassword', // 忘记密码
|
|
|
})
|
|
|
+
|
|
|
+const userStore = useUserStore()
|
|
|
const isLogined = computed(() => {
|
|
|
- const userStore = useUserStore()
|
|
|
return !!userStore.token
|
|
|
})
|
|
|
|
|
|
@@ -31,12 +32,11 @@ const step = ref(1)
|
|
|
|
|
|
// 表单数据
|
|
|
const formData = ref({
|
|
|
- phone: '',
|
|
|
+ phone: isLogined.value ? userStore.userInfo.phoneNo : '',
|
|
|
verifyCode: '',
|
|
|
newPwd: '',
|
|
|
confirmPwd: '',
|
|
|
})
|
|
|
-
|
|
|
// 验证码倒计时
|
|
|
const countdown = ref(0)
|
|
|
const countdownTimer = ref<any>(null)
|
|
|
@@ -244,6 +244,7 @@ onUnmounted(() => {
|
|
|
prop="phone"
|
|
|
:placeholder="t('auth.forgotPassword.phone.placeholder')"
|
|
|
no-border
|
|
|
+ :readonly="isLogined"
|
|
|
type="number"
|
|
|
custom-class="flex-1"
|
|
|
/>
|