允许配置登录注册页面的自定义 Logo

This commit is contained in:
RockYang
2025-01-07 15:13:34 +08:00
parent 9f98491368
commit 8250e876a5
5 changed files with 24 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
VUE_APP_API_HOST=http://geekai.me:6004 VUE_APP_API_HOST=http:/localhost:5678
VUE_APP_WS_HOST=ws://localhost:5678 VUE_APP_WS_HOST=ws://localhost:5678
VUE_APP_USER=18888888888 VUE_APP_USER=18888888888
VUE_APP_PASS=12345678 VUE_APP_PASS=12345678

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="right flex-center"> <div class="right flex-center">
<div class="logo"> <div class="logo">
<img src="@/assets/img/logo.png" alt="" /> <el-image :src="logo" alt="" style="max-width: 300px; max-height: 300px" />
</div> </div>
<div>welcome</div> <div>welcome</div>
<footer-bar /> <footer-bar />
@@ -10,6 +10,22 @@
<script setup> <script setup>
import FooterBar from "@/components/FooterBar.vue"; import FooterBar from "@/components/FooterBar.vue";
import { getSystemInfo } from "@/store/cache";
import { ref } from "vue";
const logo = ref("");
const title = ref("");
getSystemInfo()
.then((res) => {
logo.value = res.data.logo;
title.value = res.data.title;
})
.catch((err) => {
console.log(err);
logo.value = "/images/logo.png";
title.value = "Geek-AI";
});
</script> </script>
<style lang="stylus" scoped> <style lang="stylus" scoped>

View File

@@ -1,7 +1,7 @@
<template> <template>
<el-container class="captcha-box"> <el-container class="captcha-box">
<el-dialog v-model="show" :close-on-click-modal="true" :show-close="isMobileInternal" style="width: 360px; --el-dialog-padding-primary: 5px 15px 15px 15px"> <el-dialog v-model="show" :close-on-click-modal="true" :show-close="isMobileInternal" style="width: 360px; --el-dialog-padding-primary: 5px 15px 15px 15px">
<template #title> <template #header>
<div class="text-center p-3" style="color: var(--el-text-color-primary)" v-if="isMobileInternal"> <div class="text-center p-3" style="color: var(--el-text-color-primary)" v-if="isMobileInternal">
<span>人机验证</span> <span>人机验证</span>
</div> </div>

View File

@@ -42,7 +42,9 @@
<div class="c-login flex justify-center"> <div class="c-login flex justify-center">
<div class="p-2 w-full"> <div class="p-2 w-full">
<a :href="wechatLoginURL"> <a :href="wechatLoginURL">
<el-button type="success" class="w-full" size="large" :href="wechatLoginURL"><i class="iconfont icon-wechat mr-2"></i> 微信登录 </el-button> <el-button type="success" class="w-full" size="large" @click="setRoute(router.currentRoute.value.path)"
><i class="iconfont icon-wechat mr-2"></i> 微信登录
</el-button>
</a> </a>
</div> </div>
</div> </div>

View File

@@ -53,7 +53,7 @@ import AccountTop from "@/components/AccountTop.vue";
import Captcha from "@/components/Captcha.vue"; import Captcha from "@/components/Captcha.vue";
const router = useRouter(); const router = useRouter();
const title = ref("Geek-AI"); const title = ref("");
const logo = ref(""); const logo = ref("");
const licenseConfig = ref({}); const licenseConfig = ref({});
@@ -79,6 +79,7 @@ onMounted(() => {
}) })
.catch((e) => { .catch((e) => {
showMessageError("获取系统配置失败:" + e.message); showMessageError("获取系统配置失败:" + e.message);
title.value = "Geek-AI";
}); });
getLicenseInfo() getLicenseInfo()