|
|
@@ -14,6 +14,19 @@ const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
const themeStore = useThemeStore()
|
|
|
|
|
|
+const activatedDialogState = ref()
|
|
|
+const activatedDialogRef = ref()
|
|
|
+const setPasswordDialogRef = ref()
|
|
|
+onMounted(() => {
|
|
|
+ if (route.query.state) {
|
|
|
+ activatedDialogState.value = route.query.state
|
|
|
+ setPasswordDialogRef.value.openDialog(activatedDialogState.value)
|
|
|
+ }
|
|
|
+})
|
|
|
+const handleSetPassword = () => {
|
|
|
+ activatedDialogRef.value.openDialog(activatedDialogState.value)
|
|
|
+}
|
|
|
+
|
|
|
// 手动获取url中的参数,直接获取route.query的参数时如果有+号会被转义成空格
|
|
|
const getQueryParams = (url: string) => {
|
|
|
const params = url.split('?')[1]
|
|
|
@@ -417,7 +430,7 @@ const firstLoginTipsRef = ref()
|
|
|
</el-card>
|
|
|
<el-card class="login-card" v-else-if="status === 'reset'">
|
|
|
<div class="card-title" :class="{ 'is-dark': themeStore.theme === 'dark' }">
|
|
|
- <span class="welcome">Password Retrieval</span>
|
|
|
+ <span class="welcome">Reset Password</span>
|
|
|
<span class="tips">We'll send your password to your email address.</span>
|
|
|
</div>
|
|
|
<div class="login-form">
|
|
|
@@ -457,7 +470,7 @@ const firstLoginTipsRef = ref()
|
|
|
<div class="error" v-if="loginError.email">Incorrect email. Please try again.</div>
|
|
|
|
|
|
<el-button @click="handleVerification" class="el-button--dark login-btn"
|
|
|
- >Send Password</el-button
|
|
|
+ >Send Reset Link</el-button
|
|
|
>
|
|
|
<div @click="backLogin(false)" class="back-text">
|
|
|
<span class="font_family icon-icon_back_b"></span>
|
|
|
@@ -478,8 +491,8 @@ const firstLoginTipsRef = ref()
|
|
|
></VSliderVerification>
|
|
|
<ErrorTips ref="errorTipsRef" @forget-password="status = 'reset'"></ErrorTips>
|
|
|
<FirstLoginTips ref="firstLoginTipsRef" @forget-password="status = 'reset'"></FirstLoginTips>
|
|
|
- <ActivatedDialog></ActivatedDialog>
|
|
|
- <SetPasswordDialog></SetPasswordDialog>
|
|
|
+ <ActivatedDialog ref="activatedDialogRef"></ActivatedDialog>
|
|
|
+ <SetPasswordDialog @submit="handleSetPassword" ref="setPasswordDialogRef"></SetPasswordDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|