From fee3b05c9ea1706acd873b30ea2929eacf123d1a Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Tue, 3 Mar 2026 21:32:04 +0800 Subject: [PATCH] fix: daily page --- pages/greeting/share.vue | 393 +++++++-------------------------------- pages/mine/help.vue | 2 +- 2 files changed, 71 insertions(+), 324 deletions(-) diff --git a/pages/greeting/share.vue b/pages/greeting/share.vue index 8528598..80cf894 100644 --- a/pages/greeting/share.vue +++ b/pages/greeting/share.vue @@ -23,8 +23,7 @@ - - - - + + + {{ content }} + {{ highlight }} - - - {{ content }} - {{ highlight }} - - - - - - SIGNATURE - —— {{ author || "专属问候" }} + + + —— {{ author ? ` ${author} 的专属问候` : "专属问候" }} - - - - - - - 大家都在送的温暖 - - - - - - {{ item.emoji }} - - - {{ item.text }} - {{ item.count }} 人已收藏 - - - - + + 愿每一天都充满阳光与希望 - - - - - - - - @@ -136,21 +78,6 @@ const author = ref("陈小明"); const highlight = ref(""); const backgroundUrl = ref(""); -const hotList = ref([ - { - text: "新的一年,愿灵马带走烦恼,留下...", - count: "3.2k", - emoji: "🌅", - bg: "#fff8e1", - }, - { - text: "星光不问赶路人,时光不负有心人。", - count: "1.8k", - emoji: "✨", - bg: "#e8f5e9", - }, -]); - onLoad(async (options) => { if (options.shareToken) { const detail = await getPageDetail(options.shareToken); @@ -172,39 +99,15 @@ onLoad(async (options) => { author.value = detail.signature || "专属问候"; backgroundUrl.value = detail.imageUrl || ""; } - } else { - // Fallback to query params if no shareToken (legacy support or direct link) - if (options.content) content.value = decodeURIComponent(options.content); - if (options.author) author.value = decodeURIComponent(options.author); - if (options.fromUser) fromUser.value = decodeURIComponent(options.fromUser); - if (options.fromAvatar) - fromAvatar.value = decodeURIComponent(options.fromAvatar); } }); const navToMake = () => { - uni.navigateTo({ - url: "/pages/make/index?scene=daily", - }); -}; - -const navToDaily = () => { uni.navigateTo({ url: "/pages/greeting/daily", }); }; -const useHotItem = (item) => { - uni.navigateTo({ - url: `/pages/make/index?scene=daily&content=${encodeURIComponent(item.text)}`, - }); -}; - -const savePoster = () => { - uni.showToast({ title: "海报生成功能开发中", icon: "none" }); - // Implementation for poster generation would go here -}; - onShareAppMessage(() => { return { title: `${fromUser.value || "好友"}给你发来了一份今日问候`, @@ -258,281 +161,125 @@ onShareAppMessage(() => { color: #999; } -/* Greeting Card */ +/* Greeting Card - Adapted from daily.vue quote-card */ .main-card-container { padding: 0 40rpx; - margin-bottom: 60rpx; + margin-bottom: 80rpx; } -.greeting-card { +.quote-card { background: #fff; border-radius: 40rpx; - padding: 60rpx 40rpx; + padding: 60rpx 40rpx 40rpx; + box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.08); + border: 4rpx solid #f5e6d3; /* Gold-ish border */ + position: relative; min-height: 700rpx; display: flex; flex-direction: column; align-items: center; justify-content: center; - box-shadow: 0 20rpx 60rpx rgba(0, 0, 0, 0.06); - border: 2rpx solid #fff; - position: relative; -} -.card-icon { - position: relative; - margin-bottom: 60rpx; - - .sparkle { + /* Inner Border Effect */ + &::after { + content: ""; position: absolute; - font-size: 24rpx; - } - - .s1 { - top: -10rpx; - right: -20rpx; - opacity: 0.8; - } - .s2 { - bottom: -10rpx; - left: -20rpx; - opacity: 0.6; - font-size: 20rpx; + inset: 12rpx; + border: 2rpx solid #f9f3e8; + border-radius: 32rpx; + pointer-events: none; } } -.card-content { - margin-bottom: 60rpx; +.quote-icon { + font-size: 80rpx; + color: #f5e6d3; + margin-bottom: 40rpx; + line-height: 1; +} + +.quote-content { text-align: center; + margin-bottom: 60rpx; } -.card-text { - font-size: 44rpx; +.quote-text { + font-size: 40rpx; color: #333; font-weight: bold; - line-height: 1.8; + line-height: 1.6; font-family: "Songti SC", serif; + display: block; white-space: pre-wrap; } -.card-highlight { +.quote-highlight { display: block; - font-size: 48rpx; + font-size: 44rpx; color: #d81e06; font-weight: 800; margin-top: 20rpx; font-family: "Songti SC", serif; } -.card-divider { - width: 60rpx; +.quote-divider { + width: 80rpx; height: 2rpx; - background: #f0f0f0; + background: #eee; margin-bottom: 30rpx; } -.card-footer { - display: flex; - flex-direction: column; - align-items: center; - gap: 12rpx; -} - -.footer-label { - font-size: 20rpx; - color: #d4a017; - letter-spacing: 2rpx; - font-weight: bold; - text-transform: uppercase; -} - -.footer-name { +.quote-author { font-size: 28rpx; - color: #666; + color: #999; font-style: italic; font-family: "Songti SC", serif; } -/* Action Buttons */ .action-buttons { - padding: 0 40rpx; - display: flex; - flex-direction: column; - gap: 24rpx; - margin-bottom: 60rpx; -} - -.btn { - height: 100rpx; - border-radius: 50rpx; - display: flex; - align-items: center; - justify-content: center; - font-size: 30rpx; - font-weight: bold; - border: none; - position: relative; - - &::after { - border: none; - } - &:active { - transform: scale(0.98); - } -} - -.btn.secondary { - background: #fff; - color: #333; - box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.03); - - .btn-icon { - width: 60rpx; - height: 60rpx; - border-radius: 50%; - background: #f5f5f5; - display: flex; - align-items: center; - justify-content: center; - margin-right: 20rpx; - - &.red-icon { - background: #ffebee; - } - } -} - -/* Hot List */ -.hot-list-section { - padding: 0 40rpx; + padding: 0 60rpx; margin-bottom: 40rpx; } -.section-header { +.btn { display: flex; align-items: center; - margin-bottom: 30rpx; -} - -.title-bar { - width: 8rpx; - height: 28rpx; - background: #d4a017; - border-radius: 4rpx; - margin-right: 16rpx; -} - -.section-title { - font-size: 30rpx; + justify-content: center; + gap: 12rpx; + height: 96rpx; + border-radius: 48rpx; + font-size: 32rpx; font-weight: bold; - color: #333; -} - -.hot-list { - display: flex; - flex-direction: column; - gap: 20rpx; -} - -.hot-item { - background: #fff; - padding: 24rpx; - border-radius: 24rpx; - display: flex; - align-items: center; - gap: 20rpx; - - &:active { - background: #f9f9f9; - } -} - -.item-icon-box { - width: 80rpx; - height: 80rpx; - border-radius: 16rpx; - display: flex; - align-items: center; - justify-content: center; -} - -.item-emoji { - font-size: 40rpx; -} - -.item-content { - flex: 1; - display: flex; - flex-direction: column; - gap: 8rpx; - overflow: hidden; -} - -.item-text { - font-size: 26rpx; - color: #333; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -.item-count { - font-size: 22rpx; - color: #999; -} - -/* Lucky Button */ -.lucky-btn-container { - position: fixed; - bottom: 40rpx; - left: 40rpx; - right: 40rpx; - z-index: 100; -} - -.lucky-btn { - background: linear-gradient(135deg, #a33b3b 0%, #8e0000 100%); - color: #fff; - height: 110rpx; - border-radius: 55rpx; border: none; - box-shadow: 0 10rpx 30rpx rgba(142, 0, 0, 0.3); - display: flex; - align-items: center; - justify-content: center; + transition: all 0.2s; &::after { border: none; } + &:active { transform: scale(0.98); } } -.btn-content { - display: flex; - align-items: center; - gap: 16rpx; - font-size: 32rpx; - font-weight: bold; +.primary-btn { + background: linear-gradient(135deg, #8e0000 0%, #600000 100%); + color: #fff; + box-shadow: 0 8rpx 24rpx rgba(142, 0, 0, 0.3); - .stars { - font-size: 36rpx; - } - - .badge { - background: #ffd700; - color: #8e0000; - font-size: 20rpx; - padding: 4rpx 12rpx; - border-radius: 20rpx; - font-weight: 800; - margin-left: 8rpx; + &:active { + box-shadow: 0 4rpx 12rpx rgba(142, 0, 0, 0.2); } } -.hidden-canvas { - position: fixed; - left: 9999px; - top: 0; +.footer-tip { + text-align: center; + padding: 40rpx 0; + + text { + font-size: 24rpx; + color: #ccc; + letter-spacing: 4rpx; + } } diff --git a/pages/mine/help.vue b/pages/mine/help.vue index d66b0d0..f66d79f 100644 --- a/pages/mine/help.vue +++ b/pages/mine/help.vue @@ -131,7 +131,7 @@