-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #868 from colinin/fix-email-confirm
fix: fix email confirm link
- Loading branch information
Showing
24 changed files
with
225 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
title abp-next-admin-vben | ||
npm run dev | ||
pnpm dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<div class="container"> | ||
<BasicForm @register="registerForm" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { onMounted } from 'vue'; | ||
import { useRoute } from "vue-router"; | ||
import { useI18n } from "/@/hooks/web/useI18n"; | ||
import { BasicForm, useForm } from '/@/components/Form/index'; | ||
import { confirmEmail } from '/@/api/account/profiles'; | ||
const route = useRoute(); | ||
const { t } = useI18n(); | ||
const [registerForm, { setFieldsValue, getFieldsValue }] = useForm({ | ||
labelWidth: 120, | ||
showResetButton: false, | ||
showSubmitButton: true, | ||
submitButtonOptions: { | ||
text: t('common.okText'), | ||
}, | ||
submitFunc: handleSubmit, | ||
showAdvancedButton: false, | ||
showActionButtonGroup: true, | ||
schemas: [ | ||
{ | ||
field: 'userId', | ||
component: 'Input', | ||
label: 'userId', | ||
show: false | ||
}, | ||
{ | ||
field: 'confirmToken', | ||
component: 'Input', | ||
label: 'confirmToken', | ||
show: false | ||
}, | ||
{ | ||
field: 'returnUrl', | ||
component: 'Input', | ||
label: 'returnUrl', | ||
show: false | ||
}, | ||
], | ||
}); | ||
onMounted(() => { | ||
setFieldsValue(route.query); | ||
}); | ||
function handleSubmit(): Promise<void> { | ||
var input = getFieldsValue(); | ||
return confirmEmail({ | ||
userId: input.userId, | ||
confirmToken: input.confirmToken, | ||
}).then(() => { | ||
if (input.returnUrl) { | ||
window.location.href = input.returnUrl; | ||
} | ||
}); | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 1 addition & 5 deletions
6
...nt/LINGYUN.Abp.Account.Application.Contracts/LINGYUN/Abp/Account/Dto/ConfirmEmailInput.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
using System; | ||
using System.ComponentModel.DataAnnotations; | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace LINGYUN.Abp.Account; | ||
|
||
public class ConfirmEmailInput | ||
{ | ||
[Required] | ||
public Guid UserId { get; set; } | ||
|
||
[Required] | ||
public string ConfirmToken { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.