hookehuyr

refactor(StarryBackground): 设置默认背景图片并移除重复代码

将背景图片URL设为StarryBackground组件的默认值
移除多个视图组件中重复的背景图片变量
......@@ -23,7 +23,7 @@ const props = defineProps({
// 背景图片 URL
bgImage: {
type: String,
default: ''
default: 'https://cdn.ipadbiz.cn/mlaj/recall/img/bg01@2x.png'
},
// 星星数量
starCount: {
......
<template>
<div class="points-page h-screen bg-cover bg-center bg-no-repeat relative overflow-hidden flex flex-col">
<!-- Starry Background Effect -->
<StarryBackground :bg-image="bgImg" />
<StarryBackground />
<!-- 头部积分球区域 -->
<div class="header-bubbles relative h-48 w-full pt-6 flex-shrink-0">
......@@ -121,7 +121,6 @@ import { ref, onMounted } from 'vue'
import { getPointsListAPI } from '@/api/points'
const bgImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/bg01@2x.png'
const ppImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/pp@2x.png'
const jbImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/jb@2x.png'
const pzImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/pz@2x.png'
......
<template>
<div class="recall-boot w-full min-h-screen relative overflow-hidden flex flex-col items-center">
<!-- Starry Background Effect -->
<StarryBackground :bg-image="bgImg" />
<StarryBackground />
<!-- Title Section -->
<div class="mt-16 flex flex-col items-center z-10 w-full px-8">
......@@ -54,7 +54,6 @@ import { useRouter, useRoute } from 'vue-router'
import { useTitle } from '@vueuse/core'
const titleImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/title02@2x.png'
const bgImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/bg01@2x.png'
const starImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/xing@2x.png'
const router = useRouter()
......
<template>
<div class="recall-login w-full min-h-screen relative overflow-hidden flex flex-col items-center">
<!-- Starry Background Effect -->
<StarryBackground :bg-image="bgImg" />
<StarryBackground />
<!-- Title Section -->
<div class="mt-10 flex flex-col items-center z-10 w-full px-8">
......@@ -94,7 +94,6 @@ import { loginAPI, userInfoAPI } from '@/api/recall_users'
import { useTracking } from '@/composables/useTracking'
// 导入图片
const titleImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/title01@2x.png'
const bgImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/bg01@2x.png'
// 路由相关
const $route = useRoute()
......
<template>
<div class="timeline-page w-full h-screen relative overflow-hidden">
<!-- Shared Background -->
<StarryBackground :bg-image="bgImg" class="absolute inset-0 z-0" />
<StarryBackground />
<!-- Swiper -->
<swiper :direction="'vertical'" :modules="[Mousewheel]" :mousewheel="true" :speed="800"
......@@ -97,7 +97,6 @@ import 'swiper/css'
import { userInfoAPI, searchOldActivityAPI } from '@/api/recall_users'
const bgImg = 'https://cdn.ipadbiz.cn/mlaj/recall/img/bg01@2x.png'
const title03 = 'https://cdn.ipadbiz.cn/mlaj/recall/img/title03@2x.png'
const title04 = 'https://cdn.ipadbiz.cn/mlaj/recall/img/title04@2x.png'
const arrowDown = 'https://cdn.ipadbiz.cn/mlaj/recall/img/xia@2x.png'
......