diff --git a/api/wallpaper.js b/api/wallpaper.js
index 381dd0a..2f4ac74 100644
--- a/api/wallpaper.js
+++ b/api/wallpaper.js
@@ -13,3 +13,10 @@ export const getWallpaperCategoryList = async () => {
method: "GET",
});
};
+
+export const getWallpaperRecommendList = async () => {
+ return request({
+ url: `/api/blessing/wallpaper/recommend/list`,
+ method: "get",
+ });
+};
diff --git a/pages/wallpaper/detail.vue b/pages/wallpaper/detail.vue
index 87175e1..618f6b0 100644
--- a/pages/wallpaper/detail.vue
+++ b/pages/wallpaper/detail.vue
@@ -13,109 +13,107 @@
-
-
-
-
-
-
- {{
- detailData.from.nickname || "神秘好友"
- }}
- 给你分享了一张2026新春精美壁纸
- ★ 2026 且马贺岁
-
-
-
-
-
- PREVIEW
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.title || "新春壁纸" }}
-
-
-
-
-
-
-
-
- 🏮
-
-
- 去抽取新年运势
- 每日一签,开启你的新年好运
-
- ›
-
-
-
- 🧧
-
-
- 去制作新年贺卡
- 定制专属祝福,传递浓浓年味
-
- ›
-
-
-
- 🖼
-
-
- 去挑选新年头像
- 精选新年头像,让手机也过年
-
- ›
-
-
-
-
+
+
+
+ PREVIEW
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.title || "新春壁纸" }}
+
+
+
+
+
+
+
+
+ 🏮
+
+
+ 去抽取新年运势
+ 每日一签,开启你的新年好运
+
+ ›
+
+
+
+ 🧧
+
+
+ 去制作新年贺卡
+ 定制专属祝福,传递浓浓年味
+
+ ›
+
+
+
+ 🖼
+
+
+ 去挑选新年头像
+ 精选新年头像,让手机也过年
+
+ ›
+
+
+
+
+
@@ -124,7 +122,7 @@ import { ref } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { getBavBarHeight } from "@/utils/system";
import { getPageDetail } from "@/api/system";
-import { getWallpaperList } from "@/api/wallpaper";
+import { getWallpaperRecommendList } from "@/api/wallpaper";
import { saveViewRequest } from "@/utils/common.js";
const navHeight = getBavBarHeight();
@@ -162,13 +160,8 @@ const fetchDetail = async () => {
const fetchRecommend = async () => {
try {
- // Try to get wallpapers. Assuming empty category returns a default list or we use a known category if available.
- // For now, passing empty string as categoryId.
- const res = await getWallpaperList("", 1);
- if (res && res.list) {
- // Take first 3 items
- recommendList.value = res.list.slice(0, 3);
- }
+ const res = await getWallpaperRecommendList();
+ recommendList.value = res;
} catch (e) {
console.error("Failed to fetch recommendations", e);
}
@@ -198,22 +191,15 @@ const goToFortune = () => {
};
const previewImage = () => {
- if (detailData.value.imageUrl) {
- uni.previewImage({
- urls: [detailData.value.imageUrl],
- });
- }
+ // if (detailData.value.imageUrl) {
+ // uni.previewImage({
+ // urls: [detailData.value.imageUrl],
+ // });
+ // }
};
-const onRecommendClick = (item) => {
- // If clicking a recommended item, maybe we just preview it or go to wallpaper list?
- // Since this is a "detail" page for a specific share, clicking another wallpaper
- // might normally go to its detail, but we don't have a generic detail page logic
- // (unless we reuse this page with a new token, but these items might not have tokens).
- // Best fallback: Preview it.
- uni.previewImage({
- urls: [item.imageUrl],
- });
+const onRecommendClick = () => {
+ goToIndex();
};
const goToGreeting = () => {
@@ -232,8 +218,6 @@ const goToAvatar = () => {
min-height: 100vh;
background: #ffffff;
box-sizing: border-box;
- display: flex;
- flex-direction: column;
}
.nav-bar {
@@ -242,7 +226,7 @@ const goToAvatar = () => {
left: 0;
width: 100%;
z-index: 100;
- background-color: transparent; // Make it transparent as per design
+ background-color: #ffffff;
.nav-content {
height: 44px; // Standard nav height
@@ -274,11 +258,6 @@ const goToAvatar = () => {
}
}
-.content-scroll {
- flex: 1;
- height: 0; // Important for scroll-view in flex container
-}
-
.content-container {
padding: 20px;
padding-bottom: 40px;