feat: 功能完善: 订单模块的button切边、评论自动跳转、详情页进入个人页前置判断、详情分享卡片取值问题以及部分样式问题

This commit is contained in:
2025-10-18 11:23:20 +08:00
parent 9ef35267cf
commit 2ba4586804
13 changed files with 131 additions and 42 deletions

View File

@@ -43,16 +43,14 @@ function Index() {
useEffect(() => {
updateLocation();
fetchUserInfo();
if (from === "publish") {
handleShare(true);
}
}, []);
useDidShow(async () => {
useDidShow(() => {
// await updateLocation();
// await fetchUserInfo();
if (id) {
await fetchDetail();
Taro.showLoading();
fetchDetail();
}
});
@@ -70,6 +68,9 @@ function Index() {
// 位置更新后,重新获取详情页数据(因为距离等信息可能发生变化)
await fetchDetail();
if (from === "publish") {
handleShare(true);
}
} catch (error) {
console.error("用户位置更新失败", error);
}
@@ -88,6 +89,7 @@ function Index() {
handleBack();
}
}
Taro.hideLoading();
};
const onUpdateUserInfo = () => {
@@ -135,7 +137,11 @@ function Index() {
}
function handleViewUserInfo(userId) {
navto(`/user_pages/other/index?userid=${userId}`);
navto(
isMyOwn
? "/user_pages/myself/index"
: `/user_pages/other/index?userid=${userId}`
);
}
const backgroundImage = detail?.image_list?.[0]