24 changed files with 214 additions and 47 deletions
@ -1,2 +1,2 @@ |
|||||
title abp-next-admin-vben |
title abp-next-admin-vben |
||||
npm run dev |
pnpm dev |
||||
@ -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> |
||||
@ -1,13 +1,9 @@ |
|||||
using System; |
using System.ComponentModel.DataAnnotations; |
||||
using System.ComponentModel.DataAnnotations; |
|
||||
|
|
||||
namespace LINGYUN.Abp.Account; |
namespace LINGYUN.Abp.Account; |
||||
|
|
||||
public class ConfirmEmailInput |
public class ConfirmEmailInput |
||||
{ |
{ |
||||
[Required] |
|
||||
public Guid UserId { get; set; } |
|
||||
|
|
||||
[Required] |
[Required] |
||||
public string ConfirmToken { get; set; } |
public string ConfirmToken { get; set; } |
||||
} |
} |
||||
|
|||||
Loading…
Reference in new issue