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

View file

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

View file

@ -37,6 +37,9 @@ const techniquePageWidth = computed(() => {
<div class="article"> <div class="article">
<!-- 所有文章的容器 --> <!-- 所有文章的容器 -->
<div class="article-container"> <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"> <div class="topic" v-for="topic in topics" :key="topic.topicId">
<SingleTopic :data="topic" /> <SingleTopic :data="topic" />
</div> </div>