feat: 球局详情完善 & 球局列表默认查一个月
This commit is contained in:
@@ -625,22 +625,26 @@ function GamePlayAndRequirement(props) {
|
||||
|
||||
// 参与者
|
||||
function Participants(props) {
|
||||
const { detail = {} } = props;
|
||||
const { detail = {}, handleJoinGame } = props;
|
||||
const participants = detail.participants || [];
|
||||
const { participant_count, max_participants, user_action_status = {} } = detail
|
||||
const { can_join } = user_action_status
|
||||
const leftCount = max_participants - participant_count
|
||||
const organizer_id = Number(detail.publisher_id);
|
||||
return (
|
||||
<View className="detail-page-content-participants">
|
||||
<View className="participants-title">
|
||||
<Text>参与者</Text>
|
||||
<Text>·</Text>
|
||||
<Text>剩余空位 3</Text>
|
||||
<Text>{leftCount > 0 ? `剩余空位 ${leftCount}` : '已满员'}</Text>
|
||||
</View>
|
||||
<View className="participants-list">
|
||||
{/* application */}
|
||||
<View
|
||||
{can_join && <View
|
||||
className="participants-list-application"
|
||||
onClick={() => {
|
||||
Taro.showToast({ title: "To be continued", icon: "none" });
|
||||
handleJoinGame()
|
||||
// Taro.showToast({ title: "To be continued", icon: "none" });
|
||||
}}
|
||||
>
|
||||
<Image
|
||||
@@ -648,7 +652,7 @@ function Participants(props) {
|
||||
src={img.ICON_DETAIL_APPLICATION_ADD}
|
||||
/>
|
||||
<Text className="participants-list-application-text">申请加入</Text>
|
||||
</View>
|
||||
</View>}
|
||||
{/* participants list */}
|
||||
<ScrollView className="participants-list-scroll" scrollX>
|
||||
<View
|
||||
@@ -957,7 +961,7 @@ function Index() {
|
||||
{/* gameplay requirements */}
|
||||
<GamePlayAndRequirement detail={detail} />
|
||||
{/* participants */}
|
||||
<Participants detail={detail} />
|
||||
<Participants detail={detail} handleJoinGame={handleJoinGame} />
|
||||
{/* supplemental notes */}
|
||||
<SupplementalNotes detail={detail} />
|
||||
{/* organizer and recommend games by organizer */}
|
||||
|
||||
Reference in New Issue
Block a user