修改提交
This commit is contained in:
@@ -5,7 +5,7 @@ import ActivityTypeSwitch, { type ActivityType } from '../../components/Activity
|
||||
import PublishForm from './publishForm'
|
||||
import { publishBallFormSchema } from '../../config/formSchema/publishBallFormSchema';
|
||||
import { PublishBallFormData } from '../../../types/publishBall';
|
||||
import './index.scss'
|
||||
import styles from './index.module.scss'
|
||||
|
||||
|
||||
const PublishBall: React.FC = () => {
|
||||
@@ -30,7 +30,7 @@ const PublishBall: React.FC = () => {
|
||||
|
||||
|
||||
// 更新表单数据
|
||||
const updateFormData = (key: keyof FormData, value: any) => {
|
||||
const updateFormData = (key: keyof PublishBallFormData, value: any) => {
|
||||
setFormData(prev => ({
|
||||
...prev,
|
||||
[key]: value
|
||||
@@ -66,25 +66,28 @@ const PublishBall: React.FC = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<View className='publish-ball'>
|
||||
<View className={styles['publish-ball']}>
|
||||
{/* 活动类型切换 */}
|
||||
<ActivityTypeSwitch
|
||||
value={formData.activityType}
|
||||
onChange={handleActivityTypeChange}
|
||||
/>
|
||||
<ScrollView className='publish-ball__scroll' scrollY>
|
||||
<View className={styles['activity-type-switch']}>
|
||||
<ActivityTypeSwitch
|
||||
value={formData.activityType}
|
||||
onChange={handleActivityTypeChange}
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View className={styles['publish-ball__scroll']}>
|
||||
<PublishForm formData={formData} onChange={updateFormData} optionsConfig={publishBallFormSchema} />
|
||||
</ScrollView>
|
||||
</View>
|
||||
|
||||
|
||||
{/* 完成按钮 */}
|
||||
<View className='submit-section'>
|
||||
<Button className='submit-btn' onClick={handleSubmit}>
|
||||
完成
|
||||
<View className={styles['submit-section']}>
|
||||
<Button className={styles['submit-btn']} onClick={handleSubmit}>
|
||||
发布
|
||||
</Button>
|
||||
<Text className='submit-tip'>
|
||||
<Text className={styles['submit-tip']}>
|
||||
点击确定发布约球,即表示已经同意条款
|
||||
<Text className='link'>《约球规则》</Text>
|
||||
<Text className={styles['link']}>《约球规则》</Text>
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user