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
49c5d2b4
Commit
49c5d2b4
authored
Aug 10, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/zhujian/0726/qwLiving' into dev
parents
96ebc795
c5e9fc45
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
src/common/js/axios.ts
+6
-0
src/modules/course-manage/components/CreateWorkWXCourse.jsx
+7
-8
No files found.
src/common/js/axios.ts
View file @
49c5d2b4
...
...
@@ -96,6 +96,12 @@ class Axios {
content
:
`当前企业购买的
${
window
.
brandName
}
服务已到期,如需继续使用学院功能,请尽快续费购买`
,
okText
:
"我知道了"
})
}
else
if
(
resultCode
===
"LIVE_START_FORBID_DEL"
)
{
Modal
.
warning
({
title
:
"提示"
,
content
:
"直播进行中,无法删除直播"
,
okText
:
"我知道了"
})
}
else
if
(
success
||
resultCode
===
0
)
{
return
response
;
}
else
if
(
!
options
.
reject
)
{
...
...
src/modules/course-manage/components/CreateWorkWXCourse.jsx
View file @
49c5d2b4
...
...
@@ -6,7 +6,7 @@
* @Description: 大班互动-添加/编辑直播课
*/
import
React
,
{
ReactElement
,
useEffect
,
useState
}
from
'react'
;
import
React
,
{
ReactElement
,
useEffect
,
use
Ref
,
use
State
}
from
'react'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
{
Button
,
message
,
Modal
}
from
'antd'
;
...
...
@@ -62,6 +62,7 @@ function CreateWorkWXCourse() {
const
[
getInfo
,
setGetInfo
]
=
useState
(
false
)
const
[
previewLiveCourseModal
,
setPreviewLiveCourseModal
]
=
useState
()
const
[
exItems
,
setExItems
]
=
useState
([])
const
[
enableSubmit
,
setEnableSubmit
]
=
useState
(
true
)
useEffect
(()
=>
{
routeHook
.
addSaveCase
();
...
...
@@ -244,11 +245,7 @@ function CreateWorkWXCourse() {
};
function
submitRemote
({
introduceId
,
id
})
{
if
(
type
===
'add'
)
{
}
else
{
}
console
.
log
(
'取消'
)
setEnableSubmit
(
false
)
routeHook
.
cancel
()
if
(
type
===
'add'
)
{
...
...
@@ -263,6 +260,7 @@ function CreateWorkWXCourse() {
...
basicInfo
};
CourseService
.
createWorkWXLiveCourse
(
params
).
then
((
res
)
=>
{
setEnableSubmit
(
true
)
if
(
res
.
success
)
{
message
.
success
(
'新建成功'
);
Bus
.
trigger
(
'freshCourseList'
)
...
...
@@ -284,6 +282,7 @@ function CreateWorkWXCourse() {
liveCourseId
:
id
};
CourseService
.
updateWorkWXLiveCourse
(
params
).
then
((
res
)
=>
{
setEnableSubmit
(
true
)
if
(
res
.
success
)
{
Bus
.
trigger
(
'freshCourseList'
)
message
.
success
(
'更新成功'
);
...
...
@@ -458,8 +457,8 @@ function CreateWorkWXCourse() {
<
div
className=
'footer shrink-footer'
>
<
Button
onClick=
{
handleGoBack
}
>
取消
</
Button
>
<
Button
onClick=
{
handleShowPreviewModal
}
>
预览
</
Button
>
<
Button
type=
'primary'
onClick=
{
_
.
debounce
(()
=>
handleSubmit
(),
3000
,
true
)
}
>
保存
<
Button
type=
'primary'
onClick=
{
_
.
debounce
(()
=>
handleSubmit
(),
3000
,
true
)
}
disabled=
{
!
enableSubmit
}
>
{
enableSubmit
?
"保存"
:
"正在提交"
}
</
Button
>
</
div
>
{
previewLiveCourseModal
}
...
...
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