feat: fix
This commit is contained in:
@@ -60,6 +60,7 @@
|
||||
&-scroll {
|
||||
flex: 0 0 auto;
|
||||
width: calc(100% - 116px);
|
||||
height: 100%;
|
||||
|
||||
&-content {
|
||||
display: flex;
|
||||
|
||||
@@ -131,7 +131,7 @@ export default function Participants(props) {
|
||||
};
|
||||
|
||||
const matchNtrpReq = matchNtrpRequestment(
|
||||
ntrp_level,
|
||||
userInfo?.ntrp_level,
|
||||
skill_level_min,
|
||||
skill_level_max
|
||||
);
|
||||
@@ -224,35 +224,17 @@ export default function Participants(props) {
|
||||
}
|
||||
if (waiting_start) {
|
||||
return {
|
||||
text: () => (
|
||||
<>
|
||||
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
|
||||
{displayPrice}
|
||||
<Text className={styles.btnText}>已加入</Text>
|
||||
</>
|
||||
),
|
||||
text: "已加入",
|
||||
action: () => toast("您已参与了本次活动"),
|
||||
};
|
||||
} else if (is_substituting) {
|
||||
return {
|
||||
text: () => (
|
||||
<>
|
||||
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
|
||||
{displayPrice}
|
||||
<Text className={styles.btnText}>已加入候补</Text>
|
||||
</>
|
||||
),
|
||||
text: "已加入候补",
|
||||
action: () => toast("您已加入候补,候补失败会全额退款~"),
|
||||
};
|
||||
} else if (can_pay) {
|
||||
return {
|
||||
text: () => (
|
||||
<>
|
||||
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
|
||||
{displayPrice}
|
||||
<Text className={styles.btnText}>继续支付</Text>
|
||||
</>
|
||||
),
|
||||
text: "继续支付",
|
||||
action: checkPhoneAndExecute(async () => {
|
||||
const res = await OrderService.getUnpaidOrder(id);
|
||||
if (res.code === 0) {
|
||||
@@ -264,50 +246,24 @@ export default function Participants(props) {
|
||||
};
|
||||
} else if (!matchNtrpReq) {
|
||||
return {
|
||||
text: () => (
|
||||
<>
|
||||
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
|
||||
{displayPrice}
|
||||
<Text className={styles.btnText}>立即加入</Text>
|
||||
</>
|
||||
),
|
||||
text: "立即加入1",
|
||||
available: false,
|
||||
action: () =>
|
||||
toast("您当前不符合此球局NTRP水平要求,去看看其他活动吧~"),
|
||||
};
|
||||
} else if (can_substitute) {
|
||||
return {
|
||||
text: () => (
|
||||
<>
|
||||
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
|
||||
{displayPrice}
|
||||
<Text className={styles.btnText}>我要候补</Text>
|
||||
</>
|
||||
),
|
||||
text: "我要候补",
|
||||
action: checkPhoneAndExecute(handleJoinGame),
|
||||
};
|
||||
} else if (can_join) {
|
||||
return {
|
||||
text: () => {
|
||||
return (
|
||||
<>
|
||||
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
|
||||
{displayPrice}
|
||||
<Text className={styles.btnText}>立即加入</Text>
|
||||
</>
|
||||
);
|
||||
},
|
||||
text: "立即加入2",
|
||||
action: checkPhoneAndExecute(handleJoinGame),
|
||||
};
|
||||
} else if (can_assess) {
|
||||
return {
|
||||
text: () => (
|
||||
<>
|
||||
<Image className={styles.crrrencySymbol} src={RMB_ICON} />
|
||||
{displayPrice}
|
||||
<Text className={styles.btnText}>立即加入</Text>
|
||||
</>
|
||||
),
|
||||
text: "立即加入3",
|
||||
action: checkPhoneAndExecute(handleSelfEvaluate),
|
||||
};
|
||||
}
|
||||
@@ -349,7 +305,11 @@ export default function Participants(props) {
|
||||
</View>
|
||||
)}
|
||||
{/* participants list */}
|
||||
<ScrollView refresherBackground="#FAFAFA" className={styles["participants-list-scroll"]} scrollX>
|
||||
<ScrollView
|
||||
refresherBackground="#FAFAFA"
|
||||
className={styles["participants-list-scroll"]}
|
||||
scrollX
|
||||
>
|
||||
<View
|
||||
className={styles["participants-list-scroll-content"]}
|
||||
style={{
|
||||
|
||||
Reference in New Issue
Block a user