|
@@ -53,6 +53,12 @@ const createEditor = () => {
|
53
|
53
|
isHavePosition = false;
|
54
|
54
|
}
|
55
|
55
|
|
|
56
|
+ // if (data.contentType == 'h5' || data.contentType=='live') {
|
|
57
|
+ // isHaveActive = true;
|
|
58
|
+ // } else {
|
|
59
|
+ // isHaveActive = false;
|
|
60
|
+ // }
|
|
61
|
+
|
56
|
62
|
contentVisible = data.contentType === 'other';
|
57
|
63
|
activityVisible = data.contentType === 'activity';
|
58
|
64
|
newsVisible = data.contentType === 'news';
|
|
@@ -66,14 +72,20 @@ const createEditor = () => {
|
66
|
72
|
buildingId = data.buildingId
|
67
|
73
|
}
|
68
|
74
|
|
69
|
|
- const setExtraData1 = (data) => {
|
70
|
|
- console.log(data.buildingId, "data.buildingIddata.buildingId2")
|
71
|
|
- if ((data.contentType == 'h5' && data.buildingId == null) || data.contentType == '' || data.contentType == 'nothing' || (data.contentType == 'live' && data.buildingId == null)) {
|
|
75
|
+ const setExtraData1 = data => {
|
|
76
|
+ console.log(data, "data.buildingIddata.buildingId2")
|
|
77
|
+ if ((data.contentType === 'h5' && data.buildingId == null) || data.contentType === '' || data.contentType === 'nothing' || (data.contentType === 'live' && data.buildingId == null)) {
|
72
|
78
|
isHaveActive = false
|
73
|
79
|
} else {
|
74
|
80
|
isHaveActive = true
|
75
|
81
|
}
|
76
|
82
|
|
|
83
|
+ if (data.showPosition == 'index') {
|
|
84
|
+ isHavePosition = true;
|
|
85
|
+ } else {
|
|
86
|
+ isHavePosition = false;
|
|
87
|
+ }
|
|
88
|
+
|
77
|
89
|
contentVisible = data.contentType === 'other';
|
78
|
90
|
activityVisible = data.contentType === 'activity';
|
79
|
91
|
newsVisible = data.contentType === 'news';
|
|
@@ -92,7 +104,7 @@ const createEditor = () => {
|
92
|
104
|
const XForm = createForm({ onValuesChange: handleFormValueChange })
|
93
|
105
|
|
94
|
106
|
return (props) => {
|
95
|
|
- const [tab, changeTab] = useState('basic')
|
|
107
|
+ // const [tab, changeTab] = useState('basic')
|
96
|
108
|
const contentId = props.location.query.contentId
|
97
|
109
|
const [data, setData] = useState({})
|
98
|
110
|
const formRef = useRef(null);
|
|
@@ -129,7 +141,7 @@ const createEditor = () => {
|
129
|
141
|
props: {
|
130
|
142
|
onChange: () => {
|
131
|
143
|
const type = formRef.current.props.form.getFieldValue('contentType')
|
132
|
|
- if (formRef.current && (type !== 'live' && type !== 'h5' )) {
|
|
144
|
+ if (formRef.current && (type !== 'live' && type !== 'h5')) {
|
133
|
145
|
console.log(formRef.current.props.form.getFieldValue('contentType'), '2222')
|
134
|
146
|
formRef.current.props.form.resetFields(['contentType', []]);
|
135
|
147
|
}
|