mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-12-29 17:00:57 +08:00
refactor: 适配系统配置
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="login-form-wrapper">
|
||||
<div class="login-form-title">{{ $t('login.form.title') }}</div>
|
||||
<div class="login-form-title">登录 {{ appStore.getTitle }}</div>
|
||||
<div class="login-form-sub-title">{{ $t('login.form.subTitle') }}</div>
|
||||
<a-form
|
||||
ref="formRef"
|
||||
@@ -71,7 +71,7 @@
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useStorage } from '@vueuse/core';
|
||||
import { useLoginStore } from '@/store';
|
||||
import { useLoginStore, useAppStore } from '@/store';
|
||||
import { encryptByRsa } from '@/utils/encrypt';
|
||||
// import debug from '@/utils/env';
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
|
||||
const captchaImgBase64 = ref('');
|
||||
const loginStore = useLoginStore();
|
||||
const appStore = useAppStore();
|
||||
const loading = ref(false);
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<img src="/logo.svg" alt="logo" />
|
||||
<div class="logo-text">{{ $t('title') }}</div>
|
||||
<img :src="getFile(appStore.getLogo)" alt="logo" height="33" />
|
||||
<div class="logo-text">{{ appStore.getTitle }}</div>
|
||||
</div>
|
||||
<LoginBanner />
|
||||
<div class="content">
|
||||
@@ -18,8 +18,12 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import Footer from '@/components/footer/index.vue';
|
||||
import { useAppStore } from '@/store';
|
||||
import getFile from '@/utils/file';
|
||||
import LoginBanner from './components/banner.vue';
|
||||
import LoginForm from './components/login-form.vue';
|
||||
|
||||
const appStore = useAppStore();
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
} from '@/api/system/config';
|
||||
import { upload } from '@/api/common';
|
||||
import getFile from '@/utils/file';
|
||||
import { useAppStore } from '@/store';
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
const dataList = ref<DataRecord[]>([]);
|
||||
@@ -180,6 +181,7 @@
|
||||
const siteCopyright = ref<DataRecord>();
|
||||
const siteLogo = ref<DataRecord>();
|
||||
const siteFavicon = ref<DataRecord>();
|
||||
const appStore = useAppStore();
|
||||
|
||||
const data = reactive({
|
||||
queryParams: {
|
||||
@@ -251,7 +253,7 @@
|
||||
}
|
||||
);
|
||||
save(optionList).then((res) => {
|
||||
// siteConfigStore().save(data.form);
|
||||
appStore.save(form.value);
|
||||
handleCancel();
|
||||
proxy.$message.success(res.msg);
|
||||
});
|
||||
@@ -360,6 +362,7 @@
|
||||
await resetValue(queryParams.value);
|
||||
proxy.$message.success('恢复成功');
|
||||
await getConfig();
|
||||
appStore.save(form.value);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user