Skip to content

Commit

Permalink
feat(web): update login page
Browse files Browse the repository at this point in the history
  • Loading branch information
jaronnie committed Oct 23, 2024
1 parent d6c1dac commit 81d2ffb
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions web/src/views/_builtin/login/modules/pwd-login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,40 +38,6 @@ async function handleSubmit() {
await validate();
await authStore.login(model.username, model.password);
}
type AccountKey = 'super' | 'admin' | 'user';
interface Account {
key: AccountKey;
label: string;
username: string;
password: string;
}
const accounts = computed<Account[]>(() => [
{
key: 'super',
label: $t('page.login.pwdLogin.superAdmin'),
username: 'Super',
password: '123456'
},
{
key: 'admin',
label: $t('page.login.pwdLogin.admin'),
username: 'jzero',
password: '123456'
},
{
key: 'user',
label: $t('page.login.pwdLogin.user'),
username: 'User',
password: '123456'
}
]);
async function handleAccountLogin(account: Account) {
await authStore.login(account.username, account.password);
}
</script>

<template>
Expand Down Expand Up @@ -105,12 +71,6 @@ async function handleAccountLogin(account: Account) {
{{ $t(loginModuleRecord.register) }}
</NButton>
</div>
<NDivider class="text-14px text-#666 !m-0">{{ $t('page.login.pwdLogin.otherAccountLogin') }}</NDivider>
<div class="flex-center gap-12px">
<NButton v-for="item in accounts" :key="item.key" type="primary" @click="handleAccountLogin(item)">
{{ item.label }}
</NButton>
</div>
</NSpace>
</NForm>
</template>
Expand Down

0 comments on commit 81d2ffb

Please sign in to comment.