调整背景和樱花

main
lee-zt 4 weeks ago
parent 3eaa20c803
commit 944b8f37f8

@ -23,11 +23,11 @@ function getRandomInt(min, max) {
onMounted(() => { onMounted(() => {
new Snow('#snow', new Snow('#snow',
{ {
num: getRandomInt(1,4), num: getRandomInt(1,2),
color: '#fff', color: '#fff',
maxR: 3, maxR: 3,
minR: 12, minR: 12,
maxSpeed: 0.4, maxSpeed: 0.3,
minSpeed: 0.1, minSpeed: 0.1,
swing: true, swing: true,
swingProbability: 0.1, swingProbability: 0.1,
@ -46,6 +46,21 @@ onMounted(() => {
text-align: center; text-align: center;
color: #2c3e50; color: #2c3e50;
margin-top: 60px; margin-top: 60px;
position: relative;
z-index: 1;
}
/* 背景图层 */
#app::before {
content: "";
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
width: 100vw;
height: 100vh;
z-index: -1;
background: url('./assets/background.jpg') no-repeat center center / cover;
opacity: 0.3; /* 不透明度,可调整 */
pointer-events: none;
} }
.snow { .snow {
position: fixed; position: fixed;

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 KiB

File diff suppressed because one or more lines are too long

@ -173,12 +173,14 @@ watch(() => userStore.userInfo, (newInfo) => {
align-items: center; align-items: center;
padding: 0 20px; /* 增加左右内边距,避免内容过于靠边 */ padding: 0 20px; /* 增加左右内边距,避免内容过于靠边 */
border-bottom: 2px solid #e0e0e0; border-bottom: 2px solid #e0e0e0;
background: white; background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(4px); /* 添加毛玻璃效果 */
position: fixed; position: fixed;
top: 0; top: 0;
width: 100%; width: 100%;
z-index: 1000; z-index: 1000;
box-sizing: border-box; /* 确保内边距不会影响宽度 */ box-sizing: border-box; /* 确保内边距不会影响宽度 */
} }
/* Logo 区域样式 */ /* Logo 区域样式 */

@ -81,6 +81,8 @@ initializeDate();
font-family: Arial, sans-serif; font-family: Arial, sans-serif;
padding: 20px; padding: 20px;
box-sizing: border-box; box-sizing: border-box;
background: rgba(255, 255, 255, 0.7); /* 半透明白色背景 */
backdrop-filter: blur(4px); /* 可选,增加毛玻璃效果 */
} }
.welcome-header { .welcome-header {

@ -65,6 +65,7 @@ export const usePostListStore = defineStore('postList', {
this.offset = newOffset; this.offset = newOffset;
this.pageSize = newSize; this.pageSize = newSize;
} }
console.log('获取帖子列表成功', this.posts);
if (!records || records.length < this.pageSize) { if (!records || records.length < this.pageSize) {
this.finished = true; // 没有更多数据 this.finished = true; // 没有更多数据
} }

Loading…
Cancel
Save