调整字典及发布
This commit is contained in:
12
src/app.ts
12
src/app.ts
@@ -2,7 +2,6 @@ import { Component, ReactNode } from "react";
|
|||||||
import "./nutui-theme.scss";
|
import "./nutui-theme.scss";
|
||||||
import "./app.scss";
|
import "./app.scss";
|
||||||
import "qweather-icons/font/qweather-icons.css";
|
import "qweather-icons/font/qweather-icons.css";
|
||||||
import { useDictionaryStore } from "./store/dictionaryStore";
|
|
||||||
import { useGlobalStore } from "./store/global";
|
import { useGlobalStore } from "./store/global";
|
||||||
|
|
||||||
interface AppProps {
|
interface AppProps {
|
||||||
@@ -17,7 +16,6 @@ class App extends Component<AppProps> {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
// 初始化字典数据
|
// 初始化字典数据
|
||||||
this.initDictionaryData();
|
|
||||||
this.getNavBarHeight();
|
this.getNavBarHeight();
|
||||||
// this.getLocation()
|
// this.getLocation()
|
||||||
}
|
}
|
||||||
@@ -26,15 +24,7 @@ class App extends Component<AppProps> {
|
|||||||
|
|
||||||
componentDidHide() {}
|
componentDidHide() {}
|
||||||
|
|
||||||
// 初始化字典数据
|
|
||||||
private async initDictionaryData() {
|
|
||||||
try {
|
|
||||||
const { fetchDictionary } = useDictionaryStore.getState();
|
|
||||||
await fetchDictionary();
|
|
||||||
} catch (error) {
|
|
||||||
console.error("初始化字典数据失败:", error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取导航高度
|
// 获取导航高度
|
||||||
getNavBarHeight = () => {
|
getNavBarHeight = () => {
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export const publishBallFormSchema: FormFieldConfig[] = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'is_wechat_contact',
|
prop: 'wechat',
|
||||||
label: '',
|
label: '',
|
||||||
type: FieldType.WECHATCONTACT,
|
type: FieldType.WECHATCONTACT,
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import ListContainer from "@/container/listContainer";
|
|||||||
import DistanceQuickFilter from "@/components/DistanceQuickFilter";
|
import DistanceQuickFilter from "@/components/DistanceQuickFilter";
|
||||||
import { withAuth } from "@/components";
|
import { withAuth } from "@/components";
|
||||||
import { updateUserLocation } from "@/services/userService";
|
import { updateUserLocation } from "@/services/userService";
|
||||||
|
import { useDictionaryStore } from "@/store/dictionaryStore";
|
||||||
|
|
||||||
const ListPage = () => {
|
const ListPage = () => {
|
||||||
|
|
||||||
@@ -227,6 +228,20 @@ const ListPage = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 初始化字典数据
|
||||||
|
const initDictionaryData = async () => {
|
||||||
|
try {
|
||||||
|
const { fetchDictionary } = useDictionaryStore.getState();
|
||||||
|
await fetchDictionary();
|
||||||
|
} catch (error) {
|
||||||
|
console.error("初始化字典数据失败:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
initDictionaryData()
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* 自定义导航 */}
|
{/* 自定义导航 */}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ const AiImportPopup: React.FC<AiImportPopupProps> = ({
|
|||||||
if (Array.isArray(data) && data.length > 0) {
|
if (Array.isArray(data) && data.length > 0) {
|
||||||
setPublishData(data)
|
setPublishData(data)
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
url: '/publish_pages/publishBall/pages/publishBall?type=ai'
|
url: '/publish_pages/publishBall/index?type=ai'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -110,11 +110,13 @@ const AiImportPopup: React.FC<AiImportPopupProps> = ({
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('选择图片失败:', error)
|
console.error('选择图片失败:', error)
|
||||||
setUploadFailCount(prev => prev + 1)
|
if (!(typeof error === 'object' && error.errMsg && error.errMsg.includes('fail cancel'))) {
|
||||||
Taro.showToast({
|
setUploadFailCount(prev => prev + 1)
|
||||||
title: '上传失败',
|
Taro.showToast({
|
||||||
icon: 'error'
|
title: '上传失败',
|
||||||
})
|
icon: 'error'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,8 +96,8 @@ const FormBasicInfo: React.FC<FormBasicInfoProps> = ({
|
|||||||
onChange({...value, [key]: ''});
|
onChange({...value, [key]: ''});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (numValue < 0) {
|
if (numValue <= 0) {
|
||||||
onChange({...value, [key]: '0'});
|
onChange({...value, [key]: '1'});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (numValue > 9999.99) {
|
if (numValue > 9999.99) {
|
||||||
|
|||||||
@@ -1,50 +1,74 @@
|
|||||||
import React, { useCallback, useState } from 'react'
|
import React, { useCallback, useState, useEffect } from 'react'
|
||||||
import { View, Text, Input } from '@tarojs/components'
|
import { View, Text, Input } from '@tarojs/components'
|
||||||
import { Checkbox } from '@nutui/nutui-react-taro'
|
import { Checkbox } from '@nutui/nutui-react-taro'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
interface FormSwitchProps {
|
|
||||||
value: boolean
|
type WechatContactValue = {
|
||||||
onChange: (checked: boolean) => void
|
is_wechat_contact: boolean
|
||||||
subTitle: string
|
wechat_contact: string
|
||||||
wechatId?: string
|
default_wechat_contact: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const FormSwitch: React.FC<FormSwitchProps> = ({ value, onChange, subTitle, wechatId }) => {
|
interface FormSwitchProps {
|
||||||
|
value: WechatContactValue
|
||||||
|
wechatId: string
|
||||||
|
onChange: (val: WechatContactValue) => void
|
||||||
|
subTitle: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const FormSwitch: React.FC<FormSwitchProps> = ({ value, onChange, subTitle }) => {
|
||||||
const [editWechat, setEditWechat] = useState(false)
|
const [editWechat, setEditWechat] = useState(false)
|
||||||
const [wechatIdValue, setWechatIdValue] = useState('')
|
const [wechatIdValue, setWechatIdValue] = useState('')
|
||||||
const [wechat, setWechat] = useState(wechatId)
|
const [defaultWechat, setDefaultWechat] = useState('')
|
||||||
|
const [isWechatContact, setIsWechatContact] = useState(false)
|
||||||
const editWechatId = () => {
|
const editWechatId = () => {
|
||||||
setEditWechat(true)
|
setEditWechat(true)
|
||||||
}
|
}
|
||||||
const setWechatId = useCallback((e: any) => {
|
const setWechatId = useCallback((e: any) => {
|
||||||
const value = e.target.value
|
const valueStr = e.target.value
|
||||||
onChange && onChange(value)
|
onChange && onChange({ is_wechat_contact: isWechatContact, wechat_contact: valueStr, default_wechat_contact: defaultWechat })
|
||||||
setWechatIdValue(value)
|
setWechatIdValue(valueStr)
|
||||||
}, [onChange])
|
}, [onChange, isWechatContact])
|
||||||
|
|
||||||
const fillWithPhone = () => {
|
const fillWithPhone = () => {
|
||||||
if (wechat) {
|
if (defaultWechat) {
|
||||||
setWechatIdValue(wechat)
|
setWechatIdValue(defaultWechat)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const handleChange = (checked: boolean) => {
|
||||||
|
setIsWechatContact(checked)
|
||||||
|
onChange({ is_wechat_contact: checked, wechat_contact: wechatIdValue, default_wechat_contact: defaultWechat })
|
||||||
|
}
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const { is_wechat_contact, default_wechat_contact } = value || {} as any
|
||||||
|
if (is_wechat_contact) {
|
||||||
|
setIsWechatContact(is_wechat_contact)
|
||||||
|
}
|
||||||
|
if (default_wechat_contact) {
|
||||||
|
setDefaultWechat(default_wechat_contact)
|
||||||
|
}
|
||||||
|
}, [value])
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<View className={styles['wechat-contact-section']}>
|
<View className={styles['wechat-contact-section']}>
|
||||||
<View className={styles['wechat-contact-item']}>
|
<View className={styles['wechat-contact-item']}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
className={styles['wechat-contact-checkbox']}
|
className={styles['wechat-contact-checkbox']}
|
||||||
checked={value}
|
checked={isWechatContact}
|
||||||
onChange={onChange}
|
onChange={(checked) => handleChange(checked)}
|
||||||
/>
|
/>
|
||||||
<View className={styles['wechat-contact-content']}>
|
<View className={styles['wechat-contact-content']}>
|
||||||
<Text className={styles['wechat-contact-text']}>{subTitle}</Text>
|
<Text className={styles['wechat-contact-text']}>{subTitle}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{
|
{
|
||||||
!editWechat && wechatId && (
|
!editWechat && (
|
||||||
<View className={styles['wechat-contact-id']}>
|
<View className={styles['wechat-contact-id']}>
|
||||||
<Text className={styles['wechat-contact-text']}>微信号: {wechatId.replace(/(\d{3})(\d{4})(\d{4})/, '$1 $2 $3')}</Text>
|
<Text className={styles['wechat-contact-text']}>微信号: {defaultWechat.replace(/(\d{3})(\d{4})(\d{4})/, '$1 $2 $3')}</Text>
|
||||||
<View className={styles['wechat-contact-edit']} onClick={editWechatId}>修改</View>
|
<View className={styles['wechat-contact-edit']} onClick={editWechatId}>修改</View>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
@@ -55,7 +79,9 @@ const FormSwitch: React.FC<FormSwitchProps> = ({ value, onChange, subTitle, wech
|
|||||||
<View className={styles['wechat-contact-edit-input']}>
|
<View className={styles['wechat-contact-edit-input']}>
|
||||||
<Input value={wechatIdValue} onInput={setWechatId} placeholder='请输入正确微信号' />
|
<Input value={wechatIdValue} onInput={setWechatId} placeholder='请输入正确微信号' />
|
||||||
</View>
|
</View>
|
||||||
<View className={styles['wechat-contact-edit']} onClick={fillWithPhone}>手机号填入:{wechat}</View>
|
{defaultWechat && (
|
||||||
|
<View className={styles['wechat-contact-edit']} onClick={fillWithPhone}>手机号填入:{defaultWechat}</View>
|
||||||
|
)}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import images from '@/config/images'
|
|||||||
import { useUserInfo } from '@/store/userStore'
|
import { useUserInfo } from '@/store/userStore'
|
||||||
import styles from './index.module.scss'
|
import styles from './index.module.scss'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import { usePublishBallData, usePublishBallActions } from '@/store/publishBallStore'
|
import { usePublishBallData } from '@/store/publishBallStore'
|
||||||
|
|
||||||
const defaultFormData: PublishBallFormData = {
|
const defaultFormData: PublishBallFormData = {
|
||||||
title: '',
|
title: '',
|
||||||
@@ -44,8 +44,12 @@ const defaultFormData: PublishBallFormData = {
|
|||||||
description_tag: [],
|
description_tag: [],
|
||||||
},
|
},
|
||||||
is_substitute_supported: true,
|
is_substitute_supported: true,
|
||||||
is_wechat_contact: true,
|
wechat: {
|
||||||
wechat_contact: ''
|
is_wechat_contact: true,
|
||||||
|
wechat_contact: '',
|
||||||
|
default_wechat_contact: ''
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const PublishBall: React.FC = () => {
|
const PublishBall: React.FC = () => {
|
||||||
@@ -53,7 +57,6 @@ const PublishBall: React.FC = () => {
|
|||||||
const [isSubmitDisabled, setIsSubmitDisabled] = useState(false)
|
const [isSubmitDisabled, setIsSubmitDisabled] = useState(false)
|
||||||
const userInfo = useUserInfo();
|
const userInfo = useUserInfo();
|
||||||
const publishAiData = usePublishBallData()
|
const publishAiData = usePublishBallData()
|
||||||
const { clearPublishData } = usePublishBallActions()
|
|
||||||
|
|
||||||
// 获取页面参数并设置导航标题
|
// 获取页面参数并设置导航标题
|
||||||
const [optionsConfig, setOptionsConfig] = useState<FormFieldConfig[]>(publishBallFormSchema)
|
const [optionsConfig, setOptionsConfig] = useState<FormFieldConfig[]>(publishBallFormSchema)
|
||||||
@@ -251,17 +254,19 @@ const PublishBall: React.FC = () => {
|
|||||||
if (!isValid) {
|
if (!isValid) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { activityInfo, descriptionInfo, timeRange, players, skill_level,image_list, ...rest } = formData[0];
|
const { activityInfo, descriptionInfo, timeRange, players, skill_level,image_list,wechat, ...rest } = formData[0];
|
||||||
const options = {
|
const options = {
|
||||||
...rest,
|
...rest,
|
||||||
...activityInfo,
|
...activityInfo,
|
||||||
...descriptionInfo,
|
...descriptionInfo,
|
||||||
...timeRange,
|
...timeRange,
|
||||||
max_players: players[1],
|
max_players: players[1],
|
||||||
current_players: players[0],
|
min_players: players[0],
|
||||||
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),
|
||||||
|
is_wechat_contact: wechat.is_wechat_contact,
|
||||||
|
wechat_contact: wechat.wechat_contact || wechat.default_wechat_contact,
|
||||||
}
|
}
|
||||||
const res = await PublishService.createPersonal(options);
|
const res = await PublishService.createPersonal(options);
|
||||||
if (res.code === 0 && res.data) {
|
if (res.code === 0 && res.data) {
|
||||||
@@ -274,7 +279,7 @@ const PublishBall: React.FC = () => {
|
|||||||
// 如果是畅打,则跳转第一个球局详情页,并自动分享 @刘杰
|
// 如果是畅打,则跳转第一个球局详情页,并自动分享 @刘杰
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
// @ts-expect-error: id
|
// @ts-expect-error: id
|
||||||
url: `/pages/detail/index?id=${(res as any).data?.id || 1}&from=publish&autoShare=1`
|
url: `/game_pages/detail/index?id=${(res as any).data?.id || 1}&from=publish&autoShare=1`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
@@ -303,7 +308,7 @@ const PublishBall: React.FC = () => {
|
|||||||
...descriptionInfo,
|
...descriptionInfo,
|
||||||
...timeRange,
|
...timeRange,
|
||||||
max_players: players[1],
|
max_players: players[1],
|
||||||
current_players: players[0],
|
min_players: players[0],
|
||||||
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)
|
||||||
@@ -320,7 +325,7 @@ const PublishBall: React.FC = () => {
|
|||||||
// 如果是畅打,则跳转第一个球局详情页,并自动分享 @刘杰
|
// 如果是畅打,则跳转第一个球局详情页,并自动分享 @刘杰
|
||||||
Taro.navigateTo({
|
Taro.navigateTo({
|
||||||
// @ts-expect-error: id
|
// @ts-expect-error: id
|
||||||
url: `/pages/detail/index?id=${(res as any).data?.[0]?.id || 1}&from=publish&autoShare=1`
|
url: `/game_pages/detail/index?id=${(res as any).data?.[0]?.id || 1}&from=publish&autoShare=1`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Taro.showToast({
|
Taro.showToast({
|
||||||
@@ -330,17 +335,66 @@ const PublishBall: React.FC = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const mergeWithDefault = (data: any): PublishBallFormData => {
|
||||||
|
const userPhone = (userInfo as any)?.phone || ''
|
||||||
|
const { start_time, end_time, play_type, price, venue_id, location_name, location, latitude,
|
||||||
|
longitude, court_type, court_surface, venue_description_tag, venue_description, venue_image_list,
|
||||||
|
description, description_tag, max_players, min_players, skill_level_max, skill_level_min,
|
||||||
|
venueDtl
|
||||||
|
} = data;
|
||||||
|
let activityInfo = {};
|
||||||
|
if (venueDtl) {
|
||||||
|
const { latitude, longitude } = venueDtl;
|
||||||
|
activityInfo = {
|
||||||
|
latitude,
|
||||||
|
longitude,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
...defaultFormData,
|
||||||
|
...data,
|
||||||
|
timeRange: {
|
||||||
|
...defaultFormData.timeRange,
|
||||||
|
start_time,
|
||||||
|
end_time,
|
||||||
|
},
|
||||||
|
activityInfo: {
|
||||||
|
...defaultFormData.activityInfo,
|
||||||
|
...(play_type ? { play_type } : {}),
|
||||||
|
...((price) ? { price } : {}),
|
||||||
|
...(venue_id ? { venue_id } : {}),
|
||||||
|
...(location_name ? { location_name } : {}),
|
||||||
|
...(location ? { location } : {}),
|
||||||
|
...(latitude ? { latitude } : {}),
|
||||||
|
...(longitude ? { longitude } : {}),
|
||||||
|
...(court_type ? { court_type } : {}),
|
||||||
|
...(court_surface ? { court_surface } : {}),
|
||||||
|
...(venue_description_tag ? { venue_description_tag } : {}),
|
||||||
|
...(venue_description ? { venue_description } : {}),
|
||||||
|
...(venue_image_list ? { venue_image_list } : {}),
|
||||||
|
},
|
||||||
|
descriptionInfo: {
|
||||||
|
...defaultFormData.descriptionInfo,
|
||||||
|
...(description ? { description } : {}),
|
||||||
|
...(description_tag ? { description_tag } : {}),
|
||||||
|
},
|
||||||
|
...(skill_level_max && skill_level_min ? { skill_level: [skill_level_min, skill_level_max] } : {}),
|
||||||
|
...(max_players && min_players ? { players: [min_players, max_players] } : {}),
|
||||||
|
wechat: { ...defaultFormData.wechat, default_wechat_contact: userPhone }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const initFormData = () => {
|
const initFormData = () => {
|
||||||
const currentInstance = Taro.getCurrentInstance()
|
const currentInstance = Taro.getCurrentInstance()
|
||||||
const params = currentInstance.router?.params
|
const params = currentInstance.router?.params
|
||||||
|
const userPhone = (userInfo as any)?.phone || ''
|
||||||
if (params?.type) {
|
if (params?.type) {
|
||||||
const type = params.type as ActivityType
|
const type = params.type as ActivityType
|
||||||
if (type === 'individual' || type === 'group') {
|
if (type === 'individual' || type === 'group') {
|
||||||
setActivityType(type)
|
setActivityType(type)
|
||||||
if (type === 'group') {
|
if (type === 'group') {
|
||||||
const newFormSchema = publishBallFormSchema.reduce((acc, item) => {
|
const newFormSchema = publishBallFormSchema.reduce((acc, item) => {
|
||||||
if (item.prop === 'is_wechat_contact') {
|
if (item.prop === 'wechat') {
|
||||||
return acc
|
return acc
|
||||||
}
|
}
|
||||||
if (item.prop === 'image_list') {
|
if (item.prop === 'image_list') {
|
||||||
@@ -365,29 +419,11 @@ const PublishBall: React.FC = () => {
|
|||||||
Taro.setNavigationBarTitle({
|
Taro.setNavigationBarTitle({
|
||||||
title: '发布'
|
title: '发布'
|
||||||
})
|
})
|
||||||
const userPhone = (userInfo as any)?.phone || ''
|
setFormData([{...defaultFormData, wechat: { ...defaultFormData.wechat, default_wechat_contact: userPhone } }])
|
||||||
setFormData([{...defaultFormData, wechat_contact: userPhone }])
|
|
||||||
}
|
}
|
||||||
} else if (type === 'ai') {
|
} else if (type === 'ai') {
|
||||||
// 从 Store 注入 AI 生成的表单 JSON
|
// 从 Store 注入 AI 生成的表单 JSON
|
||||||
const mergeWithDefault = (data: PublishBallFormData): PublishBallFormData => {
|
|
||||||
return {
|
|
||||||
...defaultFormData,
|
|
||||||
...data,
|
|
||||||
timeRange: {
|
|
||||||
...defaultFormData.timeRange,
|
|
||||||
...(data?.timeRange || {}),
|
|
||||||
},
|
|
||||||
activityInfo: {
|
|
||||||
...defaultFormData.activityInfo,
|
|
||||||
...(data?.activityInfo || {}),
|
|
||||||
},
|
|
||||||
descriptionInfo: {
|
|
||||||
...defaultFormData.descriptionInfo,
|
|
||||||
...(data?.descriptionInfo || {}),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (publishAiData) {
|
if (publishAiData) {
|
||||||
if (Array.isArray(publishAiData)) {
|
if (Array.isArray(publishAiData)) {
|
||||||
@@ -399,6 +435,9 @@ const PublishBall: React.FC = () => {
|
|||||||
} else {
|
} else {
|
||||||
setFormData([defaultFormData])
|
setFormData([defaultFormData])
|
||||||
}
|
}
|
||||||
|
Taro.setNavigationBarTitle({
|
||||||
|
title: '发布畅打活动'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -419,7 +458,6 @@ const PublishBall: React.FC = () => {
|
|||||||
initFormData()
|
initFormData()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
console.log(formData, 'formDataformDataformData');
|
|
||||||
return (
|
return (
|
||||||
<View className={styles['publish-ball']}>
|
<View className={styles['publish-ball']}>
|
||||||
{/* 活动类型切换 */}
|
{/* 活动类型切换 */}
|
||||||
@@ -497,7 +535,7 @@ const PublishBall: React.FC = () => {
|
|||||||
activityType === 'individual' && (
|
activityType === 'individual' && (
|
||||||
<Text className={styles['submit-tip']}>
|
<Text className={styles['submit-tip']}>
|
||||||
点击确定发布约球,即表示已经同意条款
|
点击确定发布约球,即表示已经同意条款
|
||||||
<Text className={styles['link']} onClick={() => Taro.navigateTo({url: '/pages/publishBall/footballRules/index'})}>《约球规则》</Text>
|
<Text className={styles['link']} onClick={() => Taro.navigateTo({url: '/publish_pages/publishBall/footballRules/index'})}>《约球规则》</Text>
|
||||||
</Text>
|
</Text>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ const PublishForm: React.FC<{
|
|||||||
...item.props,
|
...item.props,
|
||||||
...(item.type === FieldType.TEXTAREATAG ? { options: item.options } : {}),
|
...(item.type === FieldType.TEXTAREATAG ? { options: item.options } : {}),
|
||||||
...(item.props?.className ? { className: styles[item.props.className] } : {}),
|
...(item.props?.className ? { className: styles[item.props.className] } : {}),
|
||||||
...(item.type === FieldType.WECHATCONTACT ? { wechatId: formData.wechat_contact } : {})
|
// ...(item.type === FieldType.WECHATCONTACT ? { wechatId: formData.wechat.wechat_contact } : {})
|
||||||
}
|
}
|
||||||
if (item.type === FieldType.UPLOADIMAGE) {
|
if (item.type === FieldType.UPLOADIMAGE) {
|
||||||
/* 活动封面 */
|
/* 活动封面 */
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export interface PublishBallData {
|
|||||||
venue_description?: string // 场地描述
|
venue_description?: string // 场地描述
|
||||||
venue_image_list?: string[] // 场地图片
|
venue_image_list?: string[] // 场地图片
|
||||||
max_players: number // 人数要求
|
max_players: number // 人数要求
|
||||||
current_players: number // 人数要求
|
min_players: number // 人数要求
|
||||||
skill_level_min: number // 水平要求(NTRP)
|
skill_level_min: number // 水平要求(NTRP)
|
||||||
skill_level_max: number // 水平要求(NTRP)
|
skill_level_max: number // 水平要求(NTRP)
|
||||||
description: string // 备注
|
description: string // 备注
|
||||||
|
|||||||
Reference in New Issue
Block a user