修改满员判定条件
This commit is contained in:
@@ -229,12 +229,18 @@ function toast(message) {
|
|||||||
Taro.showToast({ title: message, icon: "none" });
|
Taro.showToast({ title: message, icon: "none" });
|
||||||
}
|
}
|
||||||
|
|
||||||
function isFull (counts) {
|
function isFull(counts) {
|
||||||
const { max_players, current_players, max_substitute_players, current_substitute_count, is_substitute_supported } = counts
|
const { max_players, current_players, max_substitute_players, current_substitute_count, is_substitute_supported } = counts
|
||||||
if (is_substitute_supported === IsSubstituteSupported.SUPPORT) {
|
if (max_players === current_players) {
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (is_substitute_supported === IsSubstituteSupported.SUPPORT) {
|
||||||
return max_substitute_players === current_substitute_count
|
return max_substitute_players === current_substitute_count
|
||||||
}
|
}
|
||||||
return max_players === current_players
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// 底部操作栏
|
// 底部操作栏
|
||||||
@@ -353,7 +359,7 @@ function StickyButton(props) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const { text, available = true, action = () => {} } = generateTextAndAction(user_action_status)!;
|
const { text, available = true, action = () => { } } = generateTextAndAction(user_action_status)!;
|
||||||
|
|
||||||
let ActionText: React.FC | string = text;
|
let ActionText: React.FC | string = text;
|
||||||
|
|
||||||
@@ -548,7 +554,7 @@ function GameInfo(props) {
|
|||||||
{ latitude: c_latitude, longitude: c_longitude },
|
{ latitude: c_latitude, longitude: c_longitude },
|
||||||
]}
|
]}
|
||||||
includePadding={{ left: 50, right: 50, top: 50, bottom: 50 }}
|
includePadding={{ left: 50, right: 50, top: 50, bottom: 50 }}
|
||||||
onError={() => {}}
|
onError={() => { }}
|
||||||
// hide business msg
|
// hide business msg
|
||||||
showLocation
|
showLocation
|
||||||
theme="dark"
|
theme="dark"
|
||||||
@@ -749,9 +755,8 @@ function Participants(props) {
|
|||||||
<View
|
<View
|
||||||
className="participants-list-scroll-content"
|
className="participants-list-scroll-content"
|
||||||
style={{
|
style={{
|
||||||
width: `${
|
width: `${participants.length * 103 + (participants.length - 1) * 8
|
||||||
participants.length * 103 + (participants.length - 1) * 8
|
}px`,
|
||||||
}px`,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{participants.map((participant) => {
|
{participants.map((participant) => {
|
||||||
@@ -860,8 +865,8 @@ function genRecommendGames(games, location, avatar) {
|
|||||||
skill_level_max !== skill_level_min
|
skill_level_max !== skill_level_min
|
||||||
? `${skill_level_min || "-"}至${skill_level_max || "-"}`
|
? `${skill_level_min || "-"}至${skill_level_max || "-"}`
|
||||||
: skill_level_min === "1"
|
: skill_level_min === "1"
|
||||||
? "无要求"
|
? "无要求"
|
||||||
: `${skill_level_min}以上`,
|
: `${skill_level_min}以上`,
|
||||||
playType: play_type,
|
playType: play_type,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@@ -871,7 +876,7 @@ function OrganizerInfo(props) {
|
|||||||
const {
|
const {
|
||||||
userInfo,
|
userInfo,
|
||||||
currentLocation: location,
|
currentLocation: location,
|
||||||
onUpdateUserInfo = () => {},
|
onUpdateUserInfo = () => { },
|
||||||
handleViewUserInfo,
|
handleViewUserInfo,
|
||||||
} = props;
|
} = props;
|
||||||
const {
|
const {
|
||||||
|
|||||||
Reference in New Issue
Block a user