Полная зачистка legacy + закрытие fix24.1/fix24.2 + обновление логотипа
This commit is contained in:
@@ -75,16 +75,18 @@ export default {
|
||||
import router from "@/router";
|
||||
import LangSelect from "@/components/LangSelect/index.vue";
|
||||
import SvgIcon from "@/components/SvgIcon/index.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
// Зависимость store
|
||||
import { useAccountStore } from "@/store/modules/account";
|
||||
import { useAdminStore } from "@/store/modules/admin";
|
||||
|
||||
// Зависимость API
|
||||
import { LocationQuery, LocationQueryValue, useRoute } from "vue-router";
|
||||
import { AccountLoginDto } from "@/api/account/types";
|
||||
import { AdminLoginDto } from "@/api/admin/types";
|
||||
|
||||
const accountStore = useAccountStore();
|
||||
const adminStore = useAdminStore();
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
/**
|
||||
* Состояние загрузки кнопки
|
||||
@@ -107,7 +109,7 @@ const loginFormRef = ref(ElForm);
|
||||
/**
|
||||
* Форма входа
|
||||
*/
|
||||
const loginForm = ref<AccountLoginDto>({
|
||||
const loginForm = ref<AdminLoginDto>({
|
||||
username: "",
|
||||
pass: "",
|
||||
});
|
||||
@@ -116,7 +118,7 @@ const loginRules = {
|
||||
username: [
|
||||
{
|
||||
required: true,
|
||||
message: "Required",
|
||||
message: t("common.required"),
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
{
|
||||
@@ -128,7 +130,7 @@ const loginRules = {
|
||||
pass: [
|
||||
{
|
||||
required: true,
|
||||
message: "Required",
|
||||
message: t("common.required"),
|
||||
trigger: ["change", "blur"],
|
||||
},
|
||||
{
|
||||
@@ -155,7 +157,7 @@ const handleLogin = () => {
|
||||
if (valid) {
|
||||
loading.value = true;
|
||||
const params = { ...loginForm.value };
|
||||
accountStore
|
||||
adminStore
|
||||
.login(params)
|
||||
.then(() => {
|
||||
const query: LocationQuery = route.query;
|
||||
@@ -238,5 +240,3 @@ const handleLogin = () => {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user