Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
1eeefb2b
Commit
1eeefb2b
authored
May 24, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复
parent
67f6b381
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
+20
-13
src/modules/course-manage/offline-course/modal/QRCodeModal.jsx
+3
-1
No files found.
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
View file @
1eeefb2b
...
@@ -75,6 +75,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -75,6 +75,7 @@ class AddOfflineCourse extends React.Component {
showCutModal
:
false
,
// 是否显示截图弹窗
showCutModal
:
false
,
// 是否显示截图弹窗
studentModal
:
false
,
studentModal
:
false
,
categoryName
:
null
,
//分类名称
categoryName
:
null
,
//分类名称
categoryList
:
[],
courseCatalogList
:[],
//分类列表
courseCatalogList
:[],
//分类列表
categoryId
:
null
,
//分类的Id值
categoryId
:
null
,
//分类的Id值
whetherVisitorsJoin
:
'NO'
,
// 是否允许游客加入
whetherVisitorsJoin
:
'NO'
,
// 是否允许游客加入
...
@@ -132,6 +133,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -132,6 +133,7 @@ class AddOfflineCourse extends React.Component {
Service
.
Hades
(
'public/hades/queryCategoryTree'
,
{
source
:
0
,
tenantId
:
User
.
getStoreId
(),
count
:
false
,
userId
:
User
.
getUserId
()
}).
then
((
res
)
=>
{
Service
.
Hades
(
'public/hades/queryCategoryTree'
,
{
source
:
0
,
tenantId
:
User
.
getStoreId
(),
count
:
false
,
userId
:
User
.
getUserId
()
}).
then
((
res
)
=>
{
const
{
categoryList
=
[]
}
=
res
.
result
;
const
{
categoryList
=
[]
}
=
res
.
result
;
this
.
setState
({
this
.
setState
({
categoryList
,
courseCatalogList
:
this
.
renderTreeNodes
(
categoryList
),
courseCatalogList
:
this
.
renderTreeNodes
(
categoryList
),
})
})
});
});
...
@@ -139,11 +141,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -139,11 +141,7 @@ class AddOfflineCourse extends React.Component {
renderTreeNodes
=
(
data
)
=>
{
renderTreeNodes
=
(
data
)
=>
{
let
newTreeData
=
data
.
map
((
item
)
=>
{
let
newTreeData
=
data
.
map
((
item
)
=>
{
item
.
title
=
(
item
.
title
=
item
.
categoryName
;
<
span
>
{
item
.
categoryName
}
</
span
>
);
item
.
value
=
item
.
id
;
item
.
value
=
item
.
id
;
item
.
key
=
item
.
id
;
item
.
key
=
item
.
id
;
if
(
item
.
sonCategoryList
)
{
if
(
item
.
sonCategoryList
)
{
...
@@ -160,12 +158,13 @@ class AddOfflineCourse extends React.Component {
...
@@ -160,12 +158,13 @@ class AddOfflineCourse extends React.Component {
// 获取线下课详情
// 获取线下课详情
handleFetchScheudleDetail
=
(
courseId
)
=>
{
handleFetchScheudleDetail
=
(
courseId
)
=>
{
Service
.
Hades
(
'public/hades/getOfflineCourseDetail'
,{
return
Service
.
Hades
(
'public/hades/getOfflineCourseDetail'
,{
courseId
courseId
}).
then
((
res
)
=>
{
}).
then
((
res
)
=>
{
const
{
result
=
{}
}
=
res
||
{};
const
{
result
=
{}
}
=
res
||
{};
const
{
const
{
courseName
,
courseName
,
courseState
,
categoryId
,
categoryId
,
offlinePlace
,
offlinePlace
,
whetherVisitorsJoin
,
whetherVisitorsJoin
,
...
@@ -247,6 +246,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -247,6 +246,7 @@ class AddOfflineCourse extends React.Component {
signOutType
,
signOutType
,
isEditDisablie
:
whetherHaveApply
===
'YES'
,
isEditDisablie
:
whetherHaveApply
===
'YES'
,
});
});
return
courseState
===
'UN_START'
;
})
})
}
}
...
@@ -463,6 +463,11 @@ class AddOfflineCourse extends React.Component {
...
@@ -463,6 +463,11 @@ class AddOfflineCourse extends React.Component {
return
new
Blob
([
ab
],
{
type
:
"image/png"
});
return
new
Blob
([
ab
],
{
type
:
"image/png"
});
};
};
preSubmit
=
()
=>
{
const
{
courseId
}
=
this
.
state
;
courseId
?
this
.
handleFetchScheudleDetail
().
then
(
bool
=>
bool
&&
this
.
handleSubmit
())
:
this
.
handleSubmit
();
}
// 保存
// 保存
handleSubmit
=
()
=>
{
handleSubmit
=
()
=>
{
const
{
const
{
...
@@ -470,7 +475,6 @@ class AddOfflineCourse extends React.Component {
...
@@ -470,7 +475,6 @@ class AddOfflineCourse extends React.Component {
coverId
,
coverId
,
pageType
,
pageType
,
courseName
,
courseName
,
courseMedia
,
introduce
,
introduce
,
categoryId
,
categoryId
,
offlinePlace
,
offlinePlace
,
...
@@ -612,7 +616,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -612,7 +616,7 @@ class AddOfflineCourse extends React.Component {
message
.
warning
(
'上课时间不能早于现在'
);
message
.
warning
(
'上课时间不能早于现在'
);
resolve
(
false
);
resolve
(
false
);
}
else
if
(
data
.
startTime
>
data
.
endTime
){
}
else
if
(
data
.
startTime
>
data
.
endTime
){
message
.
warning
(
'上课结束时间
需大于报名
开始时间'
);
message
.
warning
(
'上课结束时间
不能早于上课
开始时间'
);
resolve
(
false
);
resolve
(
false
);
}
else
if
(
data
.
whetherSetApply
===
'YES'
&&
!
data
.
startTimeApply
){
}
else
if
(
data
.
whetherSetApply
===
'YES'
&&
!
data
.
startTimeApply
){
message
.
warning
(
'请选择报名时间'
);
message
.
warning
(
'请选择报名时间'
);
...
@@ -731,6 +735,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -731,6 +735,7 @@ class AddOfflineCourse extends React.Component {
coverUrl
,
coverUrl
,
introduce
,
introduce
,
categoryId
,
categoryId
,
categoryList
,
courseCatalogList
,
courseCatalogList
,
whetherVisitorsJoin
,
whetherVisitorsJoin
,
loadintroduce
,
loadintroduce
,
...
@@ -816,8 +821,10 @@ class AddOfflineCourse extends React.Component {
...
@@ -816,8 +821,10 @@ class AddOfflineCourse extends React.Component {
<
div
className=
"course-catalog"
>
<
div
className=
"course-catalog"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
课程分类:
</
span
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
课程分类:
</
span
>
<
TreeSelect
<
TreeSelect
showSearch
treeNodeFilterProp=
"title"
style=
{
{
width
:
240
}
}
style=
{
{
width
:
240
}
}
dropdownStyle=
{
{
maxHeight
:
24
0
,
overflow
:
"auto"
}
}
dropdownStyle=
{
{
maxHeight
:
30
0
,
overflow
:
"auto"
}
}
treeData=
{
courseCatalogList
}
treeData=
{
courseCatalogList
}
placeholder=
"请选择课程类型"
placeholder=
"请选择课程类型"
allowClear
allowClear
...
@@ -1096,7 +1103,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -1096,7 +1103,7 @@ class AddOfflineCourse extends React.Component {
this
.
setState
({
this
.
setState
({
whetherSetSignIn
:
value
?
'YES'
:
'NO'
,
whetherSetSignIn
:
value
?
'YES'
:
'NO'
,
signInType
:
'START_AGO'
,
signInType
:
'START_AGO'
,
signInTimeNum
:
1
,
signInTimeNum
:
null
,
signInTimeUnit
:
'MINUTE'
,
signInTimeUnit
:
'MINUTE'
,
})
})
}
}
}
}
...
@@ -1162,9 +1169,9 @@ class AddOfflineCourse extends React.Component {
...
@@ -1162,9 +1169,9 @@ class AddOfflineCourse extends React.Component {
this
.
setState
({
this
.
setState
({
whetherSetSignOut
:
value
?
'YES'
:
'NO'
,
whetherSetSignOut
:
value
?
'YES'
:
'NO'
,
signOutType
:
'START_LATER'
,
signOutType
:
'START_LATER'
,
signOutStartTimeNum
:
1
,
signOutStartTimeNum
:
null
,
signOutStartTimeUnit
:
'MINUTE'
,
signOutStartTimeUnit
:
'MINUTE'
,
signOutEndTimeNum
:
1
,
signOutEndTimeNum
:
null
,
signOutEndTimeUnit
:
'MINUTE'
,
signOutEndTimeUnit
:
'MINUTE'
,
})
})
}
}
}
}
...
@@ -1255,7 +1262,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -1255,7 +1262,7 @@ class AddOfflineCourse extends React.Component {
<
div
className=
"footer"
>
<
div
className=
"footer"
>
<
Button
onClick=
{
this
.
handleGoBack
}
>
取消
</
Button
>
<
Button
onClick=
{
this
.
handleGoBack
}
>
取消
</
Button
>
<
Button
onClick=
{
this
.
handleShowPreviewModal
}
>
预览
</
Button
>
<
Button
onClick=
{
this
.
handleShowPreviewModal
}
>
预览
</
Button
>
<
Button
type=
"primary"
onClick=
{
_
.
debounce
(()
=>
this
.
handl
eSubmit
(),
3000
,
true
)
}
>
保存
</
Button
>
<
Button
type=
"primary"
onClick=
{
_
.
debounce
(()
=>
this
.
pr
eSubmit
(),
3000
,
true
)
}
>
保存
</
Button
>
</
div
>
</
div
>
{
showSelectCoverModal
&&
{
showSelectCoverModal
&&
...
...
src/modules/course-manage/offline-course/modal/QRCodeModal.jsx
View file @
1eeefb2b
...
@@ -59,7 +59,9 @@ export default class QRCodeModal extends React.Component {
...
@@ -59,7 +59,9 @@ export default class QRCodeModal extends React.Component {
qrcodeWrapDom1
&&
qrcodeWrapDom1
.
appendChild
(
qrcodeNode1
);
qrcodeWrapDom1
&&
qrcodeWrapDom1
.
appendChild
(
qrcodeNode1
);
qrcodeWrapDom2
&&
qrcodeWrapDom2
.
childNodes
[
0
]
&&
qrcodeWrapDom2
.
removeChild
(
qrcodeWrapDom2
.
childNodes
[
0
]);
qrcodeWrapDom2
&&
qrcodeWrapDom2
.
childNodes
[
0
]
&&
qrcodeWrapDom2
.
removeChild
(
qrcodeWrapDom2
.
childNodes
[
0
]);
qrcodeWrapDom2
&&
qrcodeWrapDom2
.
appendChild
(
qrcodeNode2
);
qrcodeWrapDom2
&&
qrcodeWrapDom2
.
appendChild
(
qrcodeNode2
);
this
.
initQRCode
();
setTimeout
(()
=>
{
this
.
initQRCode
();
},
300
)
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment