增加获取场馆、字典

This commit is contained in:
筱野
2025-08-24 16:04:31 +08:00
parent c6f4f11259
commit bb6ec8c183
29 changed files with 1217 additions and 414 deletions

View File

@@ -15,12 +15,13 @@ export enum FieldType {
NUMBERINTERVAL = 'numberinterval',
RANGE = 'range',
TEXTAREATAG = 'textareaTag',
ACTIVITYINFO = 'activityInfo'
ACTIVITYINFO = 'activityInfo',
WECHATCONTACT = 'wechatContact'
}
// 表单字段配置接口
export interface FormFieldConfig {
key: string
prop: string
label: string
type: FieldType
placeholder?: string
@@ -43,7 +44,7 @@ export interface FormFieldConfig {
// 发布球局表单配置
export const publishBallFormSchema: FormFieldConfig[] = [
{
key: 'image_list',
prop: 'image_list',
label: '活动封页',
type: FieldType.UPLOADIMAGE,
placeholder: '请选择活动类型',
@@ -53,7 +54,7 @@ export const publishBallFormSchema: FormFieldConfig[] = [
}
},
{
key: 'title',
prop: 'title',
label: '',
type: FieldType.TEXT,
placeholder: '好的标题更吸引人哦',
@@ -63,89 +64,84 @@ export const publishBallFormSchema: FormFieldConfig[] = [
}
},
{
key: 'timeRange',
prop: 'timeRange',
label: '',
type: FieldType.TIMEINTERVAL,
placeholder: '请选择活动日期',
required: true
},
// {
// key: 'activityInfo',
// label: '活动信息',
// type: FieldType.ACTIVITYINFO,
// placeholder: '请选择活动时间',
// required: true,
// rules: [
// { required: true, message: '请选择活动时间' }
// ],
// children: [
// {
// key: 'price',
// label: '费用',
// iconType: 'ICON_COST',
// type: FieldType.NUMBER,
// placeholder: '请输入活动费用(元)',
// defaultValue: 0,
// rules: [
// { min: 0, message: '费用不能为负数' },
// { max: 1000, message: '费用不能超过1000元' }
// ],
// },
// {
// key: 'location',
// label: '地点',
// iconType: 'ICON_LOCATION',
// type: FieldType.LOCATION,
// placeholder: '请选择活动地点',
// required: true,
// },
// {
// key: 'play_type',
// label: '玩法',
// iconType: 'ICON_GAMEPLAY',
// type: FieldType.SELECT,
// placeholder: '请选择玩法',
// required: true,
// options: [
// { label: '篮球', value: 'basketball' },
// { label: '足球', value: 'football' },
// { label: '羽毛球', value: 'badminton' },
// { label: '网球', value: 'tennis' },
// { label: '乒乓球', value: 'pingpong' },
// { label: '排球', value: 'volleyball' }
// ],
// }
// ]
// },
// {
// key: 'players',
// label: '人数要求',
// type: FieldType.NUMBERINTERVAL,
// placeholder: '请输入最少参与人数',
// defaultValue: 1,
// props: {
// showSummary: true,
// summary: '最少1人最多4人',
// }
// },
// {
// key: 'skill_level',
// label: 'NTRP 水平要求',
// type: FieldType.RANGE,
// placeholder: '请选择开始时间',
// required: true,
// props: {
// showTitle: false,
// showSummary: true,
// className: 'ntrp-range',
// step: 0.5,
// min: 1.0,
// max: 5.0,
// }
// },
{
key: 'descriptionInfo',
prop: 'activityInfo',
label: '活动信息',
type: FieldType.ACTIVITYINFO,
placeholder: '请选择活动时间',
required: true,
children: [
{
prop: 'price',
label: '费用',
iconType: 'ICON_COST',
type: FieldType.NUMBER,
placeholder: '请输入活动费用(元)',
defaultValue: 0,
rules: [
{ min: 0, message: '费用不能为负数' },
{ max: 1000, message: '费用不能超过1000元' }
],
},
{
prop: 'location_name',
label: '地点',
iconType: 'ICON_LOCATION',
type: FieldType.LOCATION,
placeholder: '请选择活动地点',
required: true,
},
{
prop: 'play_type',
label: '玩法',
iconType: 'ICON_GAMEPLAY',
type: FieldType.SELECT,
placeholder: '请选择玩法',
required: true,
options: [
{ label: '不限', value: '不限' },
{ label: '单打', value: '单打' },
{ label: '双打', value: '双打' },
{ label: '拉球', value: '拉球' }
],
}
]
},
{
prop: 'players',
label: '人数要求',
type: FieldType.NUMBERINTERVAL,
placeholder: '请输入最少参与人数',
defaultValue: 1,
props: {
showSummary: true,
summary: '最少1人最多4人',
}
},
{
prop: 'skill_level',
label: 'NTRP 水平要求',
type: FieldType.RANGE,
placeholder: '请选择开始时间',
required: true,
props: {
showTitle: false,
showSummary: true,
className: 'ntrp-range',
step: 0.5,
min: 1.0,
max: 5.0,
}
},
{
prop: 'descriptionInfo',
label: '补充要求(选填)',
type: FieldType.TEXTAREATAG,
placeholder: '补充性别偏好、特殊要求和注意事项等信息',
@@ -157,7 +153,7 @@ export const publishBallFormSchema: FormFieldConfig[] = [
]
},
{
key: 'autoDegrade',
prop: 'is_substitute_supported',
label: '',
type: FieldType.CHECKBOX,
placeholder: '开启自动候补逻辑',
@@ -167,5 +163,14 @@ export const publishBallFormSchema: FormFieldConfig[] = [
showToast: true,
description: '开启后,当活动人数不足时,系统会自动将活动状态改为“候补”,并通知用户。',
}
},
{
prop: 'is_wechat_contact',
label: '',
type: FieldType.WECHATCONTACT,
required: true,
props:{
subTitle: '允许球友微信联系我',
}
}
]