BUG fix: login page background

This commit is contained in:
KUN1007 2023-10-20 22:53:47 +08:00
parent 61979bf250
commit c71e5bb3f0
3 changed files with 14 additions and 9 deletions

View file

@ -1,7 +1,6 @@
<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { ref } from 'vue'
import KUNGalgameFooter from '@/components/KUNGalgameFooter.vue'
import { getBackgroundURL } from '@/hooks/useBackgroundPicture'
//
import Login from './components/Login.vue'
@ -10,7 +9,11 @@ import Login from './components/Login.vue'
import Register from './components/Register.vue'
const isShowPanel = ref('')
const backgroundImage = ref('')
//
const backgroundImageUrl = `${
import.meta.env.VITE_API_BASE_URL
}/uploads/avatar/login.webp`
//
const handleClickSignIn = () => {
@ -21,10 +24,6 @@ const handleClickSignIn = () => {
const handleClickRegister = () => {
isShowPanel.value = 'active'
}
onMounted(async () => {
backgroundImage.value = await getBackgroundURL('login')
})
</script>
<template>
@ -32,7 +31,7 @@ onMounted(async () => {
<div
class="container"
:class="isShowPanel"
:style="{ backgroundImage: `url(${backgroundImage})` }"
:style="{ backgroundImage: `url(${backgroundImageUrl})` }"
>
<!-- 登陆注册切换 -->
<div class="switch">
@ -274,7 +273,7 @@ onMounted(async () => {
background: var(--kungalgame-trans-blue-0);
}
.container {
background-image: none;
background-image: none !important;
display: flex;
box-shadow: none;
}

View file

@ -26,6 +26,9 @@ const poolPageWidth = computed(() => {
<Tags />
<div class="topic-container">
<!-- TODO: -->
<h1 style="margin: auto">This page is under development.</h1>
<Topic
v-for="kun in topic"
class="item"

View file

@ -37,6 +37,9 @@ const techniquePageWidth = computed(() => {
<div class="article">
<!-- 所有文章的容器 -->
<div class="article-container">
<!-- TODO: -->
<h1 style="margin: auto">This page is under development.</h1>
<div class="topic" v-for="topic in topics" :key="topic.topicId">
<SingleTopic :data="topic" />
</div>