Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
38a99787
Commit
38a99787
authored
Mar 25, 2020
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp营销页
parent
1a418bf6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
684 additions
and
1157 deletions
+684
-1157
api.js
src/common/api.js
+3
-1
createtheme.js
src/models/createtheme.js
+77
-7
webapp.js
src/models/webapp.js
+25
-4
AddMarkeModal.js
src/pages/newtheme/components/AddMarkeModal.js
+108
-0
ChooseClass.js
src/pages/newtheme/components/ChooseClass.js
+119
-0
ChooseClass.less
src/pages/newtheme/components/ChooseClass.less
+0
-0
MarketingListModal.js
src/pages/newtheme/components/MarketingListModal.js
+100
-0
MarketingListModal.less
src/pages/newtheme/components/MarketingListModal.less
+76
-0
ContentSetting.js
src/pages/newtheme/emigratedclock/ContentSetting.js
+0
-414
ContentSetting.less
src/pages/newtheme/emigratedclock/ContentSetting.less
+0
-128
Unclock.js
src/pages/newtheme/emigratedclock/Unclock.js
+0
-272
Unclock.less
src/pages/newtheme/emigratedclock/Unclock.less
+0
-88
index.js
src/pages/newtheme/emigratedclock/index.js
+0
-95
index.less
src/pages/newtheme/emigratedclock/index.less
+0
-90
index.js
src/pages/newtheme/index.js
+0
-1
index.js
src/pages/newtheme/jobclock/index.js
+145
-57
index.less
src/pages/newtheme/jobclock/index.less
+13
-0
router.js
src/router.js
+1
-0
createtheme.js
src/services/createtheme.js
+17
-0
No files found.
src/common/api.js
View file @
38a99787
...
...
@@ -12,7 +12,7 @@ if (ENVIRONMENT == 'pro') {
// api = 'https://wx.m.shangjiadao.cn/v2/api/';
// dakaapi = 'https://qxapi.qingxiao.online/daka/v3/';
api
=
'http://test.wp53.cn/v2/api/'
;
dakaapi
=
'http
s:
clock.wp53.cn/v3/'
;
dakaapi
=
'http
://
clock.wp53.cn/v3/'
;
}
else
if
(
ENVIRONMENT
==
'testenv'
)
{
api
=
'https://test.wp53.cn/v2/api/'
;
dakaapi
=
'https:clock.wp53.cn/v3/'
;
...
...
@@ -182,6 +182,8 @@ export default {
unlockSubjectDetail
:
`
${
dakaapi
}
member/unlock_subject/detail`
,
unlockAddSubjectCount
:
`
${
dakaapi
}
member/unlock_subject/add_subject_count`
,
unlock_student_export
:
`
${
dakaapi
}
member/erp/student/unlock_student_export`
,
classList
:
`
${
dakaapi
}
member/erp/courses`
,
landing_pages
:
`
${
dakaapi
}
member/erp/landing_pages`
,
},
getschooluuid
:
`
${
dakaapi
}
member/school_uuid`
,
analyzeCenter
:
{
...
...
src/models/createtheme.js
View file @
38a99787
...
...
@@ -52,6 +52,7 @@ export default {
audio_require_num
:
0
,
force_status
:
2
,
force_num
:
0
,
content_id
:
0
,
},
calendarText
:
''
,
calendarParams
:
{
...
...
@@ -171,12 +172,21 @@ export default {
subjectList
:
[],
storeImg
:
''
,
progressRate
:
0
,
themeAdInfo
:
{
id
:
0
,
title
:
''
,
},
// 打卡营销页
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
},
},
effects
:
{
*
queryInfo
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'queryLandingList'
,
});
},
*
tabChange
({
payload
},
{
call
,
put
,
select
})
{
const
{
tabIndex
}
=
payload
;
yield
put
({
...
...
@@ -540,13 +550,9 @@ export default {
},
*
goTheme
({
payload
},
{
call
,
put
,
select
})
{
const
{
index
}
=
payload
;
yield
put
(
routerRedux
.
push
(
'/sjd/newtheme'
));
yield
put
({
type
:
'updateState'
,
payload
:
{
tabIndex
:
index
,
},
});
if
(
index
==
1
)
{
yield
put
(
routerRedux
.
push
(
'/sjd/newtheme/jobclock'
));
}
},
*
jobMoveContent
({
payload
},
{
call
,
put
,
select
})
{
const
{
index
,
direction
}
=
payload
;
...
...
@@ -2251,6 +2257,65 @@ export default {
});
}
},
// 查询班级列表
*
queryMyClassList
({
payload
},
{
call
,
put
,
select
})
{
const
{
params
}
=
payload
;
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
classListData
=
yield
call
(
themeAjax
.
getClassList
,
Object
.
assign
({
school_id
:
sid
,
// page: 1,
// perPage: 1000,
extra
:
'class'
,
},
params
));
if
(
classListData
.
code
==
200
)
{
yield
put
({
type
:
'updateState'
,
payload
:
{
classList
:
(
classListData
.
data
&&
classListData
.
data
.
list
)
||
[],
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
:
classListData
,
},
});
}
},
// 获取营销页列表
*
queryLandingList
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
themeAjax
.
getlandingList
,
{
school_id
:
sid
,
});
if
(
data
.
code
==
200
)
{
data
.
data
.
list
.
forEach
((
ele
)
=>
{
let
content
=
[];
try
{
content
=
JSON
.
parse
(
ele
.
content
);
}
catch
(
e
)
{
content
=
[];
}
const
textobj
=
content
.
find
(
ele
=>
ele
.
type
==
'text'
&&
ele
.
value
!=
''
);
// eslint-disable-next-line no-param-reassign
ele
.
desc
=
textobj
?
textobj
.
value
:
''
;
});
yield
put
({
type
:
'updateState'
,
payload
:
{
landingList
:
(
data
.
data
&&
data
.
data
.
list
)
||
[],
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
pageInit
({
payload
},
{
call
,
put
,
select
})
{
yield
put
({
type
:
'updateState'
,
...
...
@@ -2283,6 +2348,7 @@ export default {
audio_require_num
:
0
,
force_status
:
2
,
force_num
:
0
,
content_id
:
0
,
},
calendarText
:
''
,
calendarParams
:
{
...
...
@@ -2402,6 +2468,10 @@ export default {
storeImg
:
''
,
progressRate
:
0
,
},
themeAdInfo
:
{
id
:
0
,
title
:
''
,
},
});
},
},
...
...
src/models/webapp.js
View file @
38a99787
...
...
@@ -573,21 +573,42 @@ export default {
},
});
}
if
(
pathname
===
'/sjd/newtheme/jobclock'
)
{
dispatch
({
type
:
'createtheme/pageInit'
,
payload
:
{
},
});
dispatch
({
type
:
'createtheme/queryInfo'
,
payload
:
{
},
});
dispatch
({
type
:
'updateState'
,
payload
:
{
breadcrumbList
:
[{
path
:
pathname
,
name
:
'新建作业打卡'
,
}],
},
});
}
const
jobClockActive
=
pathToRegexp
(
'/sjd/newtheme/jobclock/:id'
).
exec
(
pathname
);
if
(
jobClockActive
)
{
dispatch
({
type
:
'createtheme/
createThemeModalFind
'
,
type
:
'createtheme/
pageInit
'
,
payload
:
{
id
:
jobClockActive
[
1
],
},
});
dispatch
({
type
:
'createtheme/
queryClassList
'
,
type
:
'createtheme/
createThemeModalFind
'
,
payload
:
{
id
:
jobClockActive
[
1
],
},
});
dispatch
({
type
:
'createtheme/
pageIni
t'
,
type
:
'createtheme/
queryClassLis
t'
,
payload
:
{
},
});
...
...
src/pages/newtheme/components/AddMarkeModal.js
0 → 100644
View file @
38a99787
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Form
,
Input
,
Modal
,
Checkbox
,
}
from
'antd'
;
import
pageStyle
from
'./ChooseClass.less'
;
import
{
pageIn
,
hasBtnPower
,
imagify
,
ossVideofy
}
from
'../../../utils/index'
;
const
FormItem
=
Form
.
Item
;
const
{
TextArea
}
=
Input
;
class
AddMarkeModal
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
};
}
componentDidMount
()
{
// 挂载
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
close
=
()
=>
{
const
{
close
,
form
}
=
this
.
props
;
close
();
form
.
resetFields
();
}
save
=
(
e
)
=>
{
const
{
save
,
form
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
{
is_encrypt
,
password
,
}
=
values
;
save
({
is_encrypt
,
password
,
},
()
=>
{
form
.
resetFields
();
});
}
});
}
render
()
{
const
{
visible
,
form
:
{
getFieldDecorator
,
getFieldValue
},
replyLoading
,
}
=
this
.
props
;
const
formItemModalLineLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
3
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
},
};
return
(
<
Modal
visible
=
{
visible
}
maskClosable
=
{
false
}
zIndex
=
{
110
}
width
=
{
600
}
bodyStyle
=
{{
padding
:
'10px 20px'
,
}}
title
=
"打卡营销页设置"
closable
=
{
false
}
onCancel
=
{
this
.
close
}
okText
=
"保存"
cancelText
=
"取消"
confirmLoading
=
{
replyLoading
}
onOk
=
{
this
.
save
}
>
<
Form
className
=
{
pageStyle
.
modalform
}
labelAlign
=
"left"
onSubmit
=
{
this
.
save
}
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"模板名称"
>
{
getFieldDecorator
(
'title'
,
{
initialValue
:
''
,
rules
:
[
{
required
:
true
,
message
:
'请输入模板名称'
,
},
],
})(
<
Input
maxLength
=
{
40
}
placeholder
=
"请输入模板名称"
style
=
{{
width
:
435
}}
/>
,
)}
<
span
className
=
"ant-form-text"
>
模板名称不会在打卡营销页展示
<
/span
>
<
/FormItem
>
<
/Form
>
<
/Modal
>
);
}
}
AddMarkeModal
.
propTypes
=
{
};
const
AddMarkeModalForm
=
Form
.
create
()(
AddMarkeModal
);
export
default
connect
()(
AddMarkeModalForm
);
src/pages/newtheme/components/ChooseClass.js
0 → 100644
View file @
38a99787
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Form
,
Input
,
Modal
,
Checkbox
,
}
from
'antd'
;
import
pageStyle
from
'./ChooseClass.less'
;
import
{
pageIn
,
hasBtnPower
,
imagify
,
ossVideofy
}
from
'../../../utils/index'
;
const
FormItem
=
Form
.
Item
;
const
{
TextArea
}
=
Input
;
class
ChooseClassModal
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
};
}
componentDidMount
()
{
// 挂载
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
close
=
()
=>
{
const
{
close
,
form
}
=
this
.
props
;
close
();
form
.
resetFields
();
}
save
=
(
e
)
=>
{
const
{
save
,
form
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
{
is_encrypt
,
password
,
}
=
values
;
save
({
is_encrypt
,
password
,
},
()
=>
{
form
.
resetFields
();
});
}
});
}
render
()
{
const
{
visible
,
form
:
{
getFieldDecorator
,
getFieldValue
},
record
,
replyLoading
,
info
,
}
=
this
.
props
;
const
formItemModalLineLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
3
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
20
},
},
};
return
(
<
Modal
visible
=
{
visible
}
maskClosable
=
{
false
}
zIndex
=
{
110
}
width
=
{
600
}
bodyStyle
=
{{
padding
:
'40px 20px'
,
}}
title
=
"修改密码"
closable
=
{
false
}
onCancel
=
{
this
.
close
}
okText
=
"保存"
cancelText
=
"取消"
confirmLoading
=
{
replyLoading
}
onOk
=
{
this
.
save
}
>
<
Form
className
=
{
pageStyle
.
modalform
}
labelAlign
=
"left"
onSubmit
=
{
this
.
save
}
>
<
FormItem
>
{
getFieldDecorator
(
'is_encrypt'
,
{
valuePropName
:
'checked'
,
initialValue
:
info
.
is_encrypt
==
1
,
})(
<
Checkbox
><
span
className
=
{
pageStyle
.
tip
}
>
设置密码
<
/span></
Checkbox
>
)}
<
/FormItem
>
{
Number
(
getFieldValue
(
'is_encrypt'
))
===
1
?
<
FormItem
{...
formItemModalLineLayout
}
>
{
getFieldDecorator
(
'password'
,
{
initialValue
:
info
.
password
,
rules
:
[
{
required
:
true
,
message
:
'请输入4-8位数字密码'
,
pattern
:
new
RegExp
(
/^
\d{4,8}
$/
,
'g'
),
},
],
})(
<
Input
style
=
{{
width
:
200
}}
maxLength
=
{
8
}
placeholder
=
"请输入4-8位数字密码"
/>
,
)}
<
/FormItem> : '
'
}
<
/Form
>
<
/Modal
>
);
}
}
ChooseClassModal
.
propTypes
=
{
};
const
ChooseClassModalForm
=
Form
.
create
()(
ChooseClassModal
);
export
default
connect
()(
ChooseClassModalForm
);
src/pages/newtheme/components/ChooseClass.less
0 → 100644
View file @
38a99787
src/pages/newtheme/components/MarketingListModal.js
0 → 100644
View file @
38a99787
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Form
,
Input
,
Modal
,
Checkbox
,
}
from
'antd'
;
import
pageStyle
from
'./MarketingListModal.less'
;
import
{
pageIn
,
hasBtnPower
,
imagify
,
ossVideofy
}
from
'../../../utils/index'
;
const
FormItem
=
Form
.
Item
;
const
{
TextArea
}
=
Input
;
class
MarketingListModal
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
};
}
componentDidMount
()
{
// 挂载
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
close
=
()
=>
{
const
{
close
}
=
this
.
props
;
close
();
}
getID
=
(
item
)
=>
{
const
{
getID
}
=
this
.
props
;
getID
(
item
);
}
createMarke
=
()
=>
{
const
{
createMarke
}
=
this
.
props
;
createMarke
();
}
render
()
{
const
{
visible
,
form
:
{
getFieldDecorator
,
getFieldValue
},
list
,
id
,
}
=
this
.
props
;
console
.
log
(
list
);
return
(
<
Modal
visible
=
{
visible
}
maskClosable
=
{
false
}
zIndex
=
{
110
}
width
=
{
600
}
bodyStyle
=
{{
padding
:
'10px 20px'
,
}}
title
=
"营销模板"
onCancel
=
{
this
.
close
}
footer
=
{
null
}
>
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
list
}
>
{
list
.
length
>
0
&&
list
.
map
((
item
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
item
}
>
<
div
className
=
{
pageStyle
.
itemLeft
}
>
<
img
src
=
{
imagify
(
item
.
cover
)}
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
itemRight
}
>
<
div
className
=
{
pageStyle
.
itemTitle
}
>
{
item
.
title
}
<
/div
>
<
div
className
=
{
pageStyle
.
itemDesc
}
>
{
item
.
desc
}
<
/div
>
<
div
className
=
{
pageStyle
.
itemFlex
}
>
<
div
className
=
{
pageStyle
.
now
}
>
{
item
.
id
==
id
?
'当前使用'
:
''
}
<
/div
>
<
div
>
<
span
className
=
{
pageStyle
.
nowBtn
}
onClick
=
{()
=>
this
.
getID
(
item
)}
>
立即使用
<
/span
>
<
span
className
=
{
pageStyle
.
lookBtn
}
>
查看模板
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
})
}
<
/div
>
<
div
className
=
{
pageStyle
.
footer
}
onClick
=
{
this
.
createMarke
}
>
新建打卡营销页
<
/div
>
<
/div
>
<
/Modal
>
);
}
}
MarketingListModal
.
propTypes
=
{
};
const
MarketingListModalForm
=
Form
.
create
()(
MarketingListModal
);
export
default
connect
()(
MarketingListModalForm
);
src/pages/newtheme/components/MarketingListModal.less
0 → 100644
View file @
38a99787
.list {
.item {
display: flex;
align-items: center;
margin-bottom: 15px;
.itemLeft {
width: 128px;
height: 100px;
margin-right: 15px;
&>img {
width: 100%;
height: 100%;
}
}
.itemRight {
width: 72%;
.itemTitle {
font-size: 13px;
color: #222222;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
margin-bottom: 5px;
word-break: break-all;
}
.itemDesc {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
font-size: 12px;
margin-bottom: 10px;
word-break: break-all;
color: #666666
}
.itemFlex {
display: flex;
align-items: center;
justify-content: space-between;
.now {
color: #FEA917;
font-size: 12px;
}
.nowBtn {
font-size: 12px;
color: #1890ff;
border-radius: 2px;
display: inline-block;
width: 52px;
height: 20px;
text-align: center;
line-height: 20px;
margin-right: 20px;
cursor: pointer;
}
.lookBtn {
font-size: 12px;
color: #1890ff;
display: inline-block;
width: 52px;
height: 20px;
text-align: center;
line-height: 20px;
cursor: pointer;
}
}
}
}
}
.footer {
text-align: center;
line-height: 45px;
color: #16B0FD;
cursor: pointer;
}
src/pages/newtheme/emigratedclock/ContentSetting.js
deleted
100644 → 0
View file @
1a418bf6
This diff is collapsed.
Click to expand it.
src/pages/newtheme/emigratedclock/ContentSetting.less
deleted
100644 → 0
View file @
1a418bf6
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
margin-top: 40px;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
.stepsContent {
width: 400px;
margin-left: 140px;
}
.customs {
display: flex;
align-items: center;
:global {
.ant-tabs {
height: 60px !important;
width: 410px;
.ant-tabs-bar {
border-bottom: transparent;
}
.ant-tabs-nav .ant-tabs-tab {
width: 40px;
height: 40px;
border-radius: 50%;
text-align: center;
line-height: 40px;
border:1px solid rgba(217,217,217,1);
padding: 0;
margin: 0 10px 0 0;
}
.ant-tabs-nav .ant-tabs-tab-active {
width: 40px;
height: 40px;
border-radius: 50%;
text-align: center;
line-height: 40px;
background-color: #1890FF;
color: #fff;
border: none;
}
.ant-tabs-nav-scroll {
padding-right: 0;
border-right: none;
}
}
}
}
src/pages/newtheme/emigratedclock/Unclock.js
deleted
100644 → 0
View file @
1a418bf6
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Form
,
Icon
,
Button
,
Tabs
,
Modal
,
Row
,
Col
,
Steps
,
Divider
,
Switch
,
TimePicker
,
Collapse
,
DatePicker
,
Select
,
Radio
,
InputNumber
,
Input
,
message
,
}
from
'antd'
;
import
pageStyle
from
'./Unclock.less'
;
import
{
hasBtnPower
,
imagify
}
from
'../../../utils'
;
import
ThemeEditor
from
'../ThemeEditor'
;
const
{
TabPane
}
=
Tabs
;
const
FormItem
=
Form
.
Item
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
class
UnClockForm
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
isShow
:
true
,
title
:
''
,
current
:
0
,
};
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
handleSubmit
=
(
e
)
=>
{
const
{
dispatch
,
form
,
handleScoreCancel
}
=
this
.
props
;
e
.
preventDefault
();
this
.
props
.
form
.
validateFields
((
err
,
values
)
=>
{
if
(
!
err
)
{
const
{
title
,
push_status
,
push_time
,
class_id
,
password
,
join_rule_type
,
subject_count
,
unlock_limit
,
}
=
values
;
dispatch
({
type
:
'createtheme/createThemeModalAddEmigrated'
,
payload
:
{
title
,
push_status
,
push_time
:
push_status
==
1
?
push_time
.
format
(
'HH:mm'
)
:
'18:00'
,
class_id
,
unlock_rule_type
:
1
,
password
,
join_rule_type
,
clock_start_time
:
'00:00'
,
clock_end_time
:
'23:59'
,
max_clock_count
:
1
,
subject_count
,
unlock_limit
,
callBack
:
()
=>
{
form
.
resetFields
();
this
.
setState
({
title
:
''
,
});
},
},
});
}
});
}
titleChange
=
(
e
)
=>
{
this
.
setState
({
title
:
e
.
target
.
value
,
});
}
render
()
{
const
{
isShow
,
title
,
current
}
=
this
.
state
;
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
unClockLoading
,
classList
,
}
=
this
.
props
;
const
formItemModalLineLayout
=
{
labelCol
:
{
xs
:
{
span
:
3
},
md
:
{
span
:
3
},
},
wrapperCol
:
{
xs
:
{
span
:
21
},
md
:
{
span
:
21
},
},
};
const
formItemverticalLayout
=
{
labelCol
:
{
xs
:
{
span
:
5
},
sm
:
{
span
:
5
},
},
wrapperCol
:
{
xs
:
{
span
:
19
},
sm
:
{
span
:
19
},
},
};
const
formItemModaltypeLayout
=
{
labelCol
:
{
xs
:
{
span
:
3
},
sm
:
{
span
:
3
},
},
wrapperCol
:
{
xs
:
{
span
:
21
},
sm
:
{
span
:
21
},
},
};
const
submitFormLayout
=
{
wrapperCol
:
{
xs
:
{
span
:
24
,
offset
:
0
},
sm
:
{
span
:
10
,
offset
:
7
},
},
};
const
selectBefore
=
(
<
div
>
{
title
.
length
||
0
}
/20</
div
>
);
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
title
}
>
闯关打卡基本设置
<
/div
>
<
Form
labelAlign
=
"left"
onSubmit
=
{
this
.
handleSubmit
}
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"闯关标题"
>
{
getFieldDecorator
(
'title'
,
{
rules
:
[
{
required
:
true
,
message
:
'请输入标题'
,
},
],
})(
<
Input
maxLength
=
{
20
}
onChange
=
{
e
=>
this
.
titleChange
(
e
)}
addonAfter
=
{
selectBefore
}
placeholder
=
"请输入标题"
style
=
{{
width
:
435
}}
/>
,
)}
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"选择班级"
>
{
getFieldDecorator
(
'class_id'
,
{
rules
:
[
{
required
:
true
,
message
:
'请选择班级'
,
},
],
})(
<
Select
placeholder
=
"请选择班级"
style
=
{{
width
:
174
}}
showSearch
onChange
=
{
this
.
handleStudentChange
}
>
{
classList
.
map
(
ele
=>
<
Option
value
=
{
ele
.
id
}
>
{
ele
.
title
}
<
/Option>
)
}
<
/Select>
,
)}
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"关卡时长设置"
>
<
span
className
=
"ant-form-text"
>
共
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
&
nbsp
;
<
/span
>
{
getFieldDecorator
(
'subject_count'
,
{
initialValue
:
1
,
rules
:
[
{
required
:
true
,
message
:
'请输入关卡时长设置'
,
},
],
})(
<
InputNumber
max
=
{
199
}
min
=
{
0
}
style
=
{{
width
:
100
}}
/>
,
)}
<
span
className
=
"ant-form-text"
>
关卡
<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"每天闯关次数"
>
<
span
className
=
"ant-form-text"
>
每天可闯
<
/span
>
{
getFieldDecorator
(
'unlock_limit'
,
{
initialValue
:
1
,
rules
:
[
{
required
:
true
,
message
:
'请输入每天闯关次数'
,
},
],
})(
<
InputNumber
min
=
{
0
}
style
=
{{
width
:
100
}}
/>
,
)}
<
span
className
=
"ant-form-text"
>
关卡
<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"参与规则"
>
{
getFieldDecorator
(
'join_rule_type'
,
{
initialValue
:
1
},
)(
<
Radio
.
Group
>
<
Radio
value
=
{
1
}
>
任何人加入
<
/Radio
>
<
Radio
value
=
{
2
}
>
密码加入
<
/Radio
>
<
/Radio.Group>
,
)}
<
div
style
=
{{
display
:
'inline-block'
}}
>
{
getFieldValue
(
'join_rule_type'
)
===
2
?
(
<
FormItem
style
=
{{
marginBottom
:
0
}}
>
{
getFieldDecorator
(
'password'
,
{
rules
:
[
{
required
:
true
,
message
:
'请输入6位正整数的密码'
,
pattern
:
new
RegExp
(
/^
[
1-9
]\d
*$/
,
'g'
),
},
],
})(
<
Input
maxLength
=
{
6
}
style
=
{{
width
:
100
,
marginRight
:
5
}}
placeholder
=
"请输入密码"
/>
)}
<
span
className
=
"ant-form-text"
>
(
6
位纯数字
)
<
/span
>
<
/FormItem
>
)
:
(
''
)}
<
/div
>
<
/FormItem
>
<
div
className
=
{
pageStyle
.
pushlocation
}
>
<
FormItem
{...
formItemModalLineLayout
}
label
=
"定时提醒"
>
{
getFieldDecorator
(
'push_status'
,
{
initialValue
:
2
},
)(
<
Radio
.
Group
>
<
Radio
value
=
{
2
}
>
关闭提醒
<
/Radio
>
<
Radio
value
=
{
1
}
>
开启提醒
<
/Radio
>
<
/Radio.Group>
,
)}
<
div
style
=
{{
display
:
'inline-block'
}}
>
{
getFieldValue
(
'push_status'
)
===
1
?
(
<
FormItem
style
=
{{
marginBottom
:
0
}}
>
{
getFieldDecorator
(
'push_time'
,
{
rules
:
[
{
required
:
true
,
message
:
'请选择时间'
,
},
],
})(
<
TimePicker
style
=
{{
width
:
150
}}
format
=
"HH:mm"
/>
)}
<
/FormItem
>
)
:
(
''
)}
<
/div
>
<
/FormItem
>
<
/div
>
<
Divider
/>
<
FormItem
style
=
{{
marginTop
:
32
}}
>
<
Button
type
=
"primary"
htmlType
=
"submit"
loading
=
{
unClockLoading
}
>
下一步
<
/Button
>
<
/FormItem
>
<
/Form
>
<
/div
>
);
}
}
UnClockForm
.
propTypes
=
{
};
const
UnClock
=
Form
.
create
()(
UnClockForm
);
function
mapStateToProps
(
state
)
{
const
{
unClockLoading
,
classList
,
}
=
state
.
createtheme
;
return
{
unClockLoading
,
classList
,
};
}
export
default
connect
(
mapStateToProps
)(
UnClock
);
src/pages/newtheme/emigratedclock/Unclock.less
deleted
100644 → 0
View file @
1a418bf6
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
margin-top: 40px;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
src/pages/newtheme/emigratedclock/index.js
deleted
100644 → 0
View file @
1a418bf6
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
{
Form
,
Tabs
,
Steps
,
Divider
,
DatePicker
,
Select
,
Radio
,
InputNumber
,
Input
,
message
,
}
from
'antd'
;
import
pageStyle
from
'./index.less'
;
import
{
hasBtnPower
,
imagify
}
from
'../../../utils'
;
import
ThemeEditor
from
'../ThemeEditor'
;
import
Unclock
from
'./Unclock'
;
import
ContentSetting
from
'./ContentSetting'
;
const
{
TabPane
}
=
Tabs
;
const
FormItem
=
Form
.
Item
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
const
{
Step
}
=
Steps
;
const
steps
=
[
{
id
:
1
,
title
:
'新建打卡'
,
},
{
id
:
2
,
title
:
'创建打卡内容'
,
},
];
class
EmigratedClockForm
extends
React
.
Component
{
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
// eslint-disable-next-line consistent-return
getStepContent
=
(
id
)
=>
{
// eslint-disable-next-line default-case
switch
(
id
)
{
case
0
:
return
<
Unclock
/>
;
case
1
:
return
<
ContentSetting
/>
;
}
}
next
()
{
const
{
dispatch
,
stepNumber
}
=
this
.
props
;
dispatch
({
type
:
'createtheme/changeStepNumber'
,
payload
:
{
value
:
stepNumber
+
1
,
},
});
}
render
()
{
const
{
stepNumber
,
}
=
this
.
props
;
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
stepsContent
}
>
<
Steps
current
=
{
stepNumber
}
>
{
steps
.
map
(
item
=>
(
<
Step
key
=
{
item
.
title
}
title
=
{
item
.
title
}
/
>
))}
<
/Steps
>
<
/div
>
{
this
.
getStepContent
(
stepNumber
)}
<
/div
>
);
}
}
EmigratedClockForm
.
propTypes
=
{
};
const
EmigratedClock
=
Form
.
create
()(
EmigratedClockForm
);
function
mapStateToProps
(
state
)
{
const
{
themeAddLoading
,
classList
,
jobParams
,
editorText
,
stepNumber
,
}
=
state
.
createtheme
;
return
{
themeAddLoading
,
classList
,
jobParams
,
editorText
,
stepNumber
,
};
}
export
default
connect
(
mapStateToProps
)(
EmigratedClock
);
src/pages/newtheme/emigratedclock/index.less
deleted
100644 → 0
View file @
1a418bf6
.container {
background-color: #fff;
padding: 0 20px;
position: relative;
}
.title {
font-size:16px;
font-family:PingFangSC;
font-weight:600;
color:rgba(0,0,0,0.85);
line-height:24px;
position: relative;
padding-bottom: 30px;
.pack {
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(24,144,255,1);
line-height:20px;
display: inline-block;
margin-left: 36px;
cursor: pointer;
}
}
.title:after {
position: absolute;
content: '';
display: block;
width: 3px;
height: 19px;
background-color: #1890FF;
left: -10px;
top: 4px;
border-radius:2px;
}
.commonwrap {
display: flex;
align-items: flex-start;
:global {
.ant-form-item-label > label::after {
content: '';
}
}
.commonleft {
width: 105px;
font-size:14px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.85);
line-height:40px;
}
.commonright {
width: 80%;
:global {
.ant-form-text1 {
font-size:12px;
font-family:PingFangSC;
font-weight:400;
color:rgba(0,0,0,0.55);
line-height:22px;
display: inline-block;
margin-left: 10px;
}
.ant-form-item .ant-switch {
margin-left: -12px;
}
}
}
}
.panpelBox {
display: block;
transition: all .3s;
}
.panpelhideBox {
display: none;
}
.pushlocation {
:global {
.ant-form-item {
.ant-form-item-children {
display: flex;
align-items: center;
}
}
}
}
.stepsContent {
width: 400px;
margin-left: 140px;
}
src/pages/newtheme/index.js
View file @
38a99787
...
...
@@ -6,7 +6,6 @@ import pageStyle from './index.less';
import
{
pageIn
,
hasBtnPower
}
from
'../../utils/index'
;
import
JobClock
from
'./jobclock/index'
;
import
CalendarClock
from
'./calendarclock/index'
;
import
EmigratedClock
from
'./emigratedclock/index'
;
const
{
TabPane
}
=
Tabs
;
class
NewThemeForm
extends
React
.
Component
{
componentDidMount
()
{
// 挂载
...
...
src/pages/newtheme/jobclock/index.js
View file @
38a99787
This diff is collapsed.
Click to expand it.
src/pages/newtheme/jobclock/index.less
View file @
38a99787
...
...
@@ -84,3 +84,16 @@
}
}
}
.radioText {
display: inline-flex;
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(34,34,34,1);
&>span {
font-size:13px;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:#999999;
}
}
src/router.js
View file @
38a99787
...
...
@@ -321,6 +321,7 @@ function RouterConfig({ history }) {
<
Route
path
=
"/sjd/studentclass/:id"
exact
component
=
{
StudentClass
}
/
>
<
Route
path
=
"/sjd/institutions"
exact
component
=
{
Institutions
}
/
>
<
Route
path
=
"/sjd/schooledit"
exact
component
=
{
SchoolEdit
}
/
>
<
Route
path
=
"/sjd/newtheme/jobclock"
exact
component
=
{
JobClock
}
/
>
<
Route
path
=
"/sjd/newtheme/jobclock/:id"
exact
component
=
{
JobClock
}
/
>
<
Route
path
=
"/sjd/newtheme/jobclock/:id/:isCopy"
exact
component
=
{
JobClock
}
/
>
<
Route
path
=
"/sjd/newtheme/calendarclock/:id"
exact
component
=
{
CalendarClock
}
/
>
...
...
src/services/createtheme.js
View file @
38a99787
...
...
@@ -117,3 +117,20 @@ export function UnlockStudentExport(params) {
data
,
});
}
export
function
getClassList
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
classList
}
?
${
data
}
`
,
method
:
'GET'
,
data
,
});
}
export
function
getlandingList
(
params
)
{
const
data
=
qs
.
stringify
(
params
);
return
request
({
url
:
`
${
api
.
createtheme
.
landing_pages
}
?
${
data
}
`
,
method
:
'GET'
,
data
,
});
}
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