diff --git a/src/components/UploadCover/index.scss b/src/components/UploadCover/index.scss index e16b3a0..cb89e60 100644 --- a/src/components/UploadCover/index.scss +++ b/src/components/UploadCover/index.scss @@ -88,6 +88,7 @@ height: 100%; aspect-ratio: 1/1; border-radius: 20px; + object-fit: cover; } .cover-image-item-delete { diff --git a/src/pages/detail/index.tsx b/src/pages/detail/index.tsx index f880582..ea2820a 100644 --- a/src/pages/detail/index.tsx +++ b/src/pages/detail/index.tsx @@ -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 ( 参与者 · - 剩余空位 3 + {leftCount > 0 ? `剩余空位 ${leftCount}` : '已满员'} {/* application */} - { - Taro.showToast({ title: "To be continued", icon: "none" }); + handleJoinGame() + // Taro.showToast({ title: "To be continued", icon: "none" }); }} > 申请加入 - + } {/* participants list */} {/* participants */} - + {/* supplemental notes */} {/* organizer and recommend games by organizer */} diff --git a/src/store/listStore.ts b/src/store/listStore.ts index 7de11ab..d48640e 100644 --- a/src/store/listStore.ts +++ b/src/store/listStore.ts @@ -1,4 +1,5 @@ import { create } from "zustand"; +import dayjs from "dayjs"; import { getGamesList, getGamesIntegrateList, @@ -19,9 +20,10 @@ import dateRangeUtils from '@/utils/dateRange' type TennisStore = ListState & ListActions; const toDate = dateRangeUtils?.formatDate(new Date()) +const defaultDateRange: [string, string] = [dayjs().format('YYYY-MM-DD'), dayjs().add(1, 'M').format('YYYY-MM-DD')] const defaultFilterOptions: IFilterOptions = { - dateRange: [toDate, toDate], // 日期区间 + dateRange: defaultDateRange, // 日期区间 timeSlot: "", // 时间段 ntrp: [1, 5], // NTRP 水平区间 venueType: "", // 场地类型