新增 域名备案信息显示功能

This commit is contained in:
Suwings 2022-04-16 23:32:58 +08:00
parent 7719df55d3
commit 8158fe2fe2
3 changed files with 39 additions and 4 deletions

View File

@ -42,6 +42,7 @@ export const API_SEARCH = `${API_URL}/api/auth/search`;
export const API_USER_LIST = `${API_URL}/api/auth/overview`;
export const API_USER_REGISTER = `${API_URL}/api/auth/register`;
export const API_USER_LOGIN = `${API_URL}/api/auth/login`;
export const API_USER_LOGIN_INFO = `${API_URL}/api/auth/login_info`;
export const API_USER_TOKEN = `${API_URL}/api/auth/token`;
export const API_USER_LOGOUT = `${API_URL}/api/auth/logout`;
export const API_USER_DELETE = `${API_URL}/api/auth/delete`;

View File

@ -90,11 +90,16 @@
{{ loginText }}
</el-button>
</div>
<div class="login-info-wrapper row-mt" v-if="loginInfo">
<span class="color-gray">
{{ loginInfo }}
</span>
</div>
<div class="login-info-wrapper row-mt">
<div>
<span class="color-gray"
>版权所有 2022
<a target="black" href="https://github.com/Suwings">Suwings</a></span
>Powered by
<a target="black" href="https://github.com/Suwings">MCSManager</a></span
>
</div>
</div>
@ -132,7 +137,7 @@
import Panel from "../../components/Panel";
// eslint-disable-next-line no-unused-vars
// import router from "../router";
import { API_USER_LOGIN, sleep } from "../service/common";
import { API_USER_LOGIN, API_USER_LOGIN_INFO, sleep } from "../service/common";
import { request, setupUserInfo } from "../service/protocol";
export default {
@ -147,7 +152,8 @@ export default {
closeWindow: false,
loginText: "登录",
loading: false,
cause: ""
cause: "",
loginInfo: ""
};
},
methods: {
@ -211,11 +217,25 @@ export default {
await sleep(1500);
// router.push({ path: `/` });
window.location.href = "/";
},
async requestLoginInfo() {
const res = await request({
method: "POST",
url: API_USER_LOGIN_INFO,
data: {
username: this.form.username,
password: this.form.password
}
});
this.loginInfo = res?.loginInfo ?? "";
}
},
async mounted() {
console.log("Welcome use MCSManager.");
console.log("Copyright 2022 Suwings All rights reserved.");
//
this.requestLoginInfo();
// try {
// await setupUserInfo();
// if (this.$store.state?.userInfo?.uuid) {

View File

@ -69,6 +69,20 @@
</div>
<el-input placeholder="默认 0.0.0.0 | 可不填" v-model="settings.httpIp"> </el-input>
</div>
<div class="config-item">
<div class="sub-title">
<p class="sub-title-title">登录界面简单说明</p>
<p class="sub-title-info">
用于显示在登录界面公开简要说明文字可以用于管理员身份介绍备案信息介绍
</p>
</div>
<el-input
placeholder="请输入文案列如京ICP备00000001号"
v-model="settings.loginInfo"
>
</el-input>
</div>
</el-col>
<el-col :md="4"></el-col>