修改导入样式及增加我也参与此球局
This commit is contained in:
@@ -13,12 +13,27 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
padding-bottom: 12px;
|
||||||
|
&:last-child{
|
||||||
|
padding-bottom: 0;
|
||||||
|
}
|
||||||
.control-label {
|
.control-label {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
color: theme.$primary-color;
|
color: theme.$primary-color;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
|
.participant-control-checkbox-wrapper{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
.participant-control-checkbox {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.control-buttons {
|
.control-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -54,12 +54,14 @@ const NumberInterval: React.FC<NumberIntervalProps> = ({
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<View className='participant-control'>
|
<View className='participant-control'>
|
||||||
|
<View className='participant-control-checkbox-wrapper'>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
className=''
|
className='participant-control-checkbox'
|
||||||
checked={is_participate}
|
checked={is_participate}
|
||||||
onChange={(checked) => handleChange({ min: minParticipants, max: maxParticipants, is_participate: checked })}
|
onChange={(checked) => handleChange({ min: minParticipants, max: maxParticipants, is_participate: checked })}
|
||||||
/>
|
/>
|
||||||
我也参与此球局
|
我也参与此球局
|
||||||
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -89,23 +89,23 @@ const PublishMenu: React.FC<PublishMenuProps> = () => {
|
|||||||
<Image src={images.ICON_GROUP} />
|
<Image src={images.ICON_GROUP} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{/* <View
|
<View
|
||||||
className={`${styles.menuItem} ${styles.aiItem}`}
|
className={`${styles.menuItem} ${styles.aiItem}`}
|
||||||
onClick={() => handleMenuItemClick('ai')}
|
onClick={() => handleMenuItemClick('ai')}
|
||||||
>
|
>
|
||||||
<View className={styles.menuContent}>
|
<View className={styles.menuContent}>
|
||||||
<View className={styles.menuTitle}>智能导入球局信息
|
<View className={styles.menuTitle}>智能发布球局
|
||||||
<View className={styles.menuArrow}>
|
<View className={styles.menuArrow}>
|
||||||
<Image src={images.ICON_ARROW_RIGHT_WHITE} className={styles.img} />
|
<Image src={images.ICON_ARROW_RIGHT_WHITE} className={styles.img} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
<Text className={styles.menuDesc}>识别文本,快速导入球局信息</Text>
|
<Text className={styles.menuDesc}>识别文本/图片,快速导入球局信息</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View className={styles.menuIcon}>
|
<View className={styles.menuIcon}>
|
||||||
<Image src={images.ICON_IMPORTANT_BTN} />
|
<Image src={images.ICON_IMPORTANT_BTN} />
|
||||||
</View>
|
</View>
|
||||||
</View> */}
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export default {
|
|||||||
ICON_LIST_SEARCH_SUGGESTION: require('@/static/search/icon-search-suggestion.svg'),
|
ICON_LIST_SEARCH_SUGGESTION: require('@/static/search/icon-search-suggestion.svg'),
|
||||||
ICON_LIST_INPUT_LOGO: require('@/static/list/icon-input-logo.svg'),
|
ICON_LIST_INPUT_LOGO: require('@/static/list/icon-input-logo.svg'),
|
||||||
ICON_IMPORTANT_BTN: require('@/static/publishBall/icon-important-btn.svg'),
|
ICON_IMPORTANT_BTN: require('@/static/publishBall/icon-important-btn.svg'),
|
||||||
|
ICON_IMPORTANT_BLACK: require('@/static/publishBall/icon-important-black.svg'),
|
||||||
ICON_ARROW_RIGHT_WHITE: require('@/static/publishBall/icon-arrow-right-white.svg'),
|
ICON_ARROW_RIGHT_WHITE: require('@/static/publishBall/icon-arrow-right-white.svg'),
|
||||||
ICON_ARROW_RIGHT_BLACK: require('@/static/publishBall/icon-arrow-right-black.svg'),
|
ICON_ARROW_RIGHT_BLACK: require('@/static/publishBall/icon-arrow-right-black.svg'),
|
||||||
ICON_EXAMINATION: require('@/static/userInfo/examination.svg'),
|
ICON_EXAMINATION: require('@/static/userInfo/examination.svg'),
|
||||||
@@ -64,4 +65,5 @@ export default {
|
|||||||
ICON_COPY: require('@/static/publishBall/icon-copy.svg'),
|
ICON_COPY: require('@/static/publishBall/icon-copy.svg'),
|
||||||
ICON_UPLOAD_IMG: require('@/static/publishBall/icon-upload-img.svg'),
|
ICON_UPLOAD_IMG: require('@/static/publishBall/icon-upload-img.svg'),
|
||||||
ICON_UPLOAD_SUCCESS: require('@/static/publishBall/icon-upload-success.svg'),
|
ICON_UPLOAD_SUCCESS: require('@/static/publishBall/icon-upload-success.svg'),
|
||||||
|
ICON_CLOSE: require('@/static/publishBall/icon-close.svg'),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,11 +203,11 @@ const AiImportPopup: React.FC<AiImportPopupProps> = ({
|
|||||||
{/* 头部 */}
|
{/* 头部 */}
|
||||||
<View className={styles.header}>
|
<View className={styles.header}>
|
||||||
<View className={styles.titleContainer}>
|
<View className={styles.titleContainer}>
|
||||||
<Image src={images.ICON_STARK} className={styles.lightningIcon} />
|
<Image src={images.ICON_IMPORTANT_BLACK} className={styles.lightningIcon} />
|
||||||
<Text className={styles.title}>智能导入球局信息</Text>
|
<Text className={styles.title}>智能导入球局信息</Text>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.closeButton} onClick={onClose}>
|
<View className={styles.closeButton} onClick={onClose}>
|
||||||
<Text className={styles.closeIcon}>×</Text>
|
<Image src={images.ICON_CLOSE} className={styles.lightningIcon} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,12 @@
|
|||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
||||||
.lightningIcon {
|
.lightningIcon {
|
||||||
width: 16px;
|
width: 24px;
|
||||||
height: 16px;
|
height: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 16px;
|
font-size: 22px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #1f2329;
|
color: #1f2329;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const defaultFormData: PublishBallFormData = {
|
|||||||
players: {
|
players: {
|
||||||
min: 1,
|
min: 1,
|
||||||
max: 1,
|
max: 1,
|
||||||
is_participate: true
|
organizer_joined: true
|
||||||
},
|
},
|
||||||
skill_level: [1.0, 5.0],
|
skill_level: [1.0, 5.0],
|
||||||
descriptionInfo: {
|
descriptionInfo: {
|
||||||
@@ -262,7 +262,7 @@ const PublishBall: React.FC = () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { activityInfo, descriptionInfo, timeRange, players, skill_level, image_list, wechat, ...rest } = formData[0];
|
const { activityInfo, descriptionInfo, timeRange, players, skill_level, image_list, wechat, ...rest } = formData[0];
|
||||||
const { min, max, is_participate } = players;
|
const { min, max, organizer_joined } = players;
|
||||||
const options = {
|
const options = {
|
||||||
...rest,
|
...rest,
|
||||||
...activityInfo,
|
...activityInfo,
|
||||||
@@ -270,7 +270,7 @@ const PublishBall: React.FC = () => {
|
|||||||
...timeRange,
|
...timeRange,
|
||||||
max_players: max,
|
max_players: max,
|
||||||
min_players: min,
|
min_players: min,
|
||||||
is_participate: is_participate,
|
organizer_joined,
|
||||||
skill_level_min: skill_level[0],
|
skill_level_min: skill_level[0],
|
||||||
skill_level_max: skill_level[1],
|
skill_level_max: skill_level[1],
|
||||||
image_list: image_list.map(item => item.url),
|
image_list: image_list.map(item => item.url),
|
||||||
@@ -311,7 +311,7 @@ const PublishBall: React.FC = () => {
|
|||||||
}
|
}
|
||||||
const options = formData.map((item) => {
|
const options = formData.map((item) => {
|
||||||
const { activityInfo, descriptionInfo, timeRange, players, skill_level, ...rest } = item;
|
const { activityInfo, descriptionInfo, timeRange, players, skill_level, ...rest } = item;
|
||||||
const { min, max, is_participate } = players;
|
const { min, max, organizer_joined } = players;
|
||||||
return {
|
return {
|
||||||
...rest,
|
...rest,
|
||||||
...activityInfo,
|
...activityInfo,
|
||||||
@@ -319,7 +319,7 @@ const PublishBall: React.FC = () => {
|
|||||||
...timeRange,
|
...timeRange,
|
||||||
max_players: max,
|
max_players: max,
|
||||||
min_players: min,
|
min_players: min,
|
||||||
is_participate: is_participate,
|
organizer_joined,
|
||||||
skill_level_min: skill_level[0],
|
skill_level_min: skill_level[0],
|
||||||
skill_level_max: skill_level[1],
|
skill_level_max: skill_level[1],
|
||||||
image_list: item.image_list.map(img => img.url)
|
image_list: item.image_list.map(img => img.url)
|
||||||
@@ -390,7 +390,7 @@ const PublishBall: React.FC = () => {
|
|||||||
...(description_tag ? { description_tag } : {}),
|
...(description_tag ? { description_tag } : {}),
|
||||||
},
|
},
|
||||||
...(skill_level_max && skill_level_min ? { skill_level: [skill_level_min, skill_level_max] } : {}),
|
...(skill_level_max && skill_level_min ? { skill_level: [skill_level_min, skill_level_max] } : {}),
|
||||||
...(max_players && min_players ? { players: { min: min_players, max: max_players, is_participate: true } } : {}),
|
...(max_players && min_players ? { players: { min: min_players, max: max_players, organizer_joined: true } } : {}),
|
||||||
wechat: { ...defaultFormData.wechat, default_wechat_contact: userPhone }
|
wechat: { ...defaultFormData.wechat, default_wechat_contact: userPhone }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -128,14 +128,14 @@ const PublishForm: React.FC<{
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
const getPlayersText = (players: [number, number] | any) => {
|
const getPlayersText = (players: { min: number, max: number, is_participate: boolean } | any) => {
|
||||||
// 检查 players 是否为数组
|
// 检查 players 是否为数组
|
||||||
if (!Array.isArray(players) || players.length !== 2) {
|
if (!players.min || !players.max) {
|
||||||
console.warn('getPlayersText: players 不是有效的数组格式:', players);
|
console.warn('getPlayersText: players 不是有效的数组格式:', players);
|
||||||
return '未设置';
|
return '未设置';
|
||||||
}
|
}
|
||||||
|
|
||||||
const [min, max] = players;
|
const { min, max } = players;
|
||||||
|
|
||||||
// 检查 min 和 max 是否为有效数字
|
// 检查 min 和 max 是否为有效数字
|
||||||
if (typeof min !== 'number' || typeof max !== 'number') {
|
if (typeof min !== 'number' || typeof max !== 'number') {
|
||||||
@@ -188,8 +188,7 @@ const PublishForm: React.FC<{
|
|||||||
return <>
|
return <>
|
||||||
<View className={styles['activity-description']}>
|
<View className={styles['activity-description']}>
|
||||||
<Text className={styles['description-text']}>
|
<Text className={styles['description-text']}>
|
||||||
活动开始前2小时未达到最低人数,活动自动取消;活动
|
活动开始前2小时未达到最低人数,活动自动取消;活动结束后,报名者累计到达最低人数时,一旦到达期即有序。
|
||||||
结束后,报名者累计到达最低人数时,一旦到达期即有序。
|
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
|
|||||||
3
src/static/publishBall/icon-important-black.svg
Normal file
3
src/static/publishBall/icon-important-black.svg
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M9.5 1.99998H18.5L13 8.99998H20.5L8.5 22L11 12.5H4L9.5 1.99998Z" stroke="black" stroke-width="2" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 235 B |
Reference in New Issue
Block a user