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

@@ -182,8 +182,8 @@
}
.location-map {
width: 100%;
padding: 20px 20px 0;
// width: 100%;
margin: 20px 20px 0;
box-sizing: border-box;
display: flex;
align-items: center;

View File

@@ -65,7 +65,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
start_time,
end_time,
location_name,
venue_image_list,
image_list,
} = detail || {};
const startTime = dayjs(start_time);
const endTime = dayjs(end_time);
@@ -82,7 +82,7 @@ export default forwardRef(({ id, from, detail, userInfo }, ref) => {
gameDate: `${startTime.format("M月D日")} (${dayofWeek})`,
gameTime: `${startTime.format("ah")}${gameLength}`,
venueName: location_name,
venueImages: venue_image_list ? venue_image_list.map((c) => c.url) : [],
venueImages: image_list ? image_list : [],
});
// console.log(res, "res");
return {

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]