From 763053ad6dedde2fad84d69d68de03419d523f1a Mon Sep 17 00:00:00 2001 From: "34701892@qq.com" <34701892@qq.com> Date: Mon, 5 Jan 2026 18:21:27 +0800 Subject: [PATCH] =?UTF-8?q?fix(RankListMini):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E8=AF=A6=E6=83=85=E9=A1=B5=E6=97=B6userType?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复在跳转详情页时直接使用userType.value导致的问题,改为使用props.userParams.userType。同时添加了调试日志便于追踪userType的值。 --- src/components/RankListMini.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/RankListMini.vue b/src/components/RankListMini.vue index bfaf663..ee4eab2 100644 --- a/src/components/RankListMini.vue +++ b/src/components/RankListMini.vue @@ -158,6 +158,11 @@ function goDetail(item) { let phone = props.userParams.phone || ""; let userType = props.userParams.userType || ""; + console.log("🚀 ~ goDetail ~ userType:", userType); + + uni.navigateTo({ + url: `/pages/detail/indexNewsInfo?id=${item.news_id}&phone=${phone}&userType=${userType}`, + }); // if (judgeRuntimeEnv().isWxMiniWebview) { let shareUrl = @@ -167,7 +172,7 @@ function goDetail(item) { "&phone=" + uni.getStorageSync("token") + "&userType=" + - userType.value; + props.userParams.userType; wx.miniProgram.navigateTo({ url: "/pages/webView/index?url=" + encodeURIComponent(shareUrl),