fix: 修复走查样式问题
This commit is contained in:
@@ -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 : "评论"}
|
||||
|
||||
Reference in New Issue
Block a user