fix: 修复走查样式问题

This commit is contained in:
2025-10-26 18:00:32 +08:00
parent 753b6b0c2c
commit 6dc9c7eff2
12 changed files with 213 additions and 43 deletions

View File

@@ -8,6 +8,7 @@ import { EvaluateCallback, EvaluateScene } from "@/store/evaluateStore";
import { MATCH_STATUS, IsSubstituteSupported } from "@/services/detailService";
import { GameManagePopup, NTRPEvaluatePopup } from "@/components";
import img from "@/config/images";
import RMB_ICON from "@/static/detail/rmb.svg";
import { toast, navto } from "../../utils/helper";
import styles from "./index.module.scss";
@@ -87,7 +88,18 @@ export default function StickyButton(props) {
if (!user_action_status) {
return;
}
const displayPrice = is_organizer ? 0 : price;
const priceStrArr = price.toString().split(".");
const displayPrice = is_organizer ? (
<>
<Text className={styles.integer}>0</Text>
{/* <Text className={styles.decimalPart}>.00</Text> */}
</>
) : (
<>
<Text className={styles.integer}>{priceStrArr[0]}</Text>
<Text className={styles.decimalPart}>.{priceStrArr[1]}</Text>
</>
);
// user_action_status.can_assess = true;
// user_action_status.can_join = false;
// console.log(user_action_status, "user_action");
@@ -132,17 +144,35 @@ export default function StickyButton(props) {
}
if (waiting_start) {
return {
text: () => <Text>¥{displayPrice} </Text>,
text: () => (
<>
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
{displayPrice}
<Text className={styles.btnText}></Text>
</>
),
action: () => toast("已加入"),
};
} else if (is_substituting) {
return {
text: () => <Text>¥{displayPrice} </Text>,
text: () => (
<>
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
{displayPrice}
<Text className={styles.btnText}></Text>
</>
),
action: () => toast("已加入候补"),
};
} else if (can_pay) {
return {
text: () => <Text>¥{price} </Text>,
text: () => (
<>
<Image src={RMB_ICON} />
{price}
<Text className={styles.btnText}></Text>
</>
),
action: async () => {
const res = await OrderService.getUnpaidOrder(id);
if (res.code === 0) {
@@ -154,19 +184,37 @@ export default function StickyButton(props) {
};
} else if (can_substitute) {
return {
text: () => <Text>¥{displayPrice} </Text>,
text: () => (
<>
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
{displayPrice}
<Text className={styles.btnText}></Text>
</>
),
action: handleJoinGame,
};
} else if (can_join) {
return {
text: () => {
return <Text>¥{displayPrice} </Text>;
return (
<>
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
{displayPrice}
<Text className={styles.btnText}></Text>
</>
);
},
action: handleJoinGame,
};
} else if (can_assess) {
return {
text: () => <Text>¥{displayPrice} </Text>,
text: () => (
<>
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
{displayPrice}
<Text className={styles.btnText}></Text>
</>
),
action: handleSelfEvaluate,
};
}
@@ -190,7 +238,7 @@ export default function StickyButton(props) {
if (typeof ActionText === "string") {
ActionText = () => {
return <Text>{text as string}</Text>;
return <Text className={styles.btnText}>{text as string}</Text>;
};
}
@@ -220,7 +268,7 @@ export default function StickyButton(props) {
>
<Image
className={styles["sticky-bottom-bar-comment-icon"]}
src={img.ICON_DETAIL_COMMENT_DARK}
src={img.ICON_DETAIL_COMMENT_LIGHT}
/>
<Text className={styles["sticky-bottom-bar-comment-text"]}>
{commentCount > 0 ? commentCount : "评论"}