From d5353f4437ef5e56a74d38ce719326bb635bb494 Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Wed, 25 Feb 2026 23:42:38 +0800 Subject: [PATCH] fix: rank --- pages/index/index.vue | 50 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 785fb9a..8d2b433 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -211,9 +211,10 @@ {{ item.usageCount }} 人在用 - - - + + + 去制作 + @@ -230,7 +231,7 @@ 分享今日运势 --> - + @@ -450,6 +451,28 @@ const navTo = (url) => { uni.navigateTo({ url }); }; +const handleCreate = (item) => { + uni.setStorageSync("RECOMMEND_CARD_DATA", { + recommendId: item.targetId, + imageUrl: item?.resourceInfo?.url, + }); + uni.navigateTo({ url: "/pages/make/index" }); + // uni.navigateTo({ + // url: "/pages/make/index", + // success: () => { + // // Pass the template ID to the make page via global event or storage since switchTab doesn't support query params directly + // // However, for better UX, we can use a global state or event bus. + // // Or simply navigate if it's just switching tabs. + // // Since the user wants to use the selected template, we should try to pass it. + // // Uni-app's switchTab doesn't support params. We can use a global variable or store. + // // Here we will use uni.$emit to notify the make page after switching. + // setTimeout(() => { + // uni.$emit("select-template", item.id); + // }, 100); + // }, + // }); +}; + const handleDownload = async (item) => { if (!isLoggedIn.value) { uni.$emit("show-login-popup"); @@ -1098,6 +1121,21 @@ onShareTimeline(() => { transform: scale(0.95); } } + + .create-btn { + padding: 8rpx 20rpx; + background: linear-gradient(135deg, #ff3b30, #ff1744); + color: #fff; + border-radius: 24rpx; + font-size: 22rpx; + font-weight: bold; + box-shadow: 0 4rpx 12rpx rgba(255, 23, 68, 0.2); + + &:active { + opacity: 0.9; + transform: scale(0.95); + } + } } } } @@ -1130,8 +1168,4 @@ onShareTimeline(() => { margin-left: 12rpx; } } - -.bottom-spacer { - height: 120rpx; -}