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
6c0680a9
Commit
6c0680a9
authored
Feb 19, 2020
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP新增需求
parent
f65dfbc0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
523 additions
and
3 deletions
+523
-3
index.html
index.html
+2
-2
officialweb.js
src/models/officialweb.js
+5
-0
webapp.js
src/models/webapp.js
+11
-0
index.js
src/pages/officialweb/index.js
+8
-1
AddThemeClassModal.js
src/pages/officialweb/themeclass/AddThemeClassModal.js
+178
-0
AddThemeClassModal.less
src/pages/officialweb/themeclass/AddThemeClassModal.less
+101
-0
themeclass.js
src/pages/officialweb/themeclass/themeclass.js
+115
-0
themeclass.less
src/pages/officialweb/themeclass/themeclass.less
+97
-0
router.js
src/router.js
+6
-0
No files found.
index.html
View file @
6c0680a9
...
...
@@ -13,10 +13,10 @@
<script
charset=
"utf-8"
src=
"https://map.qq.com/api/js?v=2.exp&key=XSZBZ-5LHCV-5I2P7-UQHPW-6456F-JBB3B"
></script>
<script
src=
"/js/ueeditor/ueditor.config.js?20200107"
charset=
"utf-8"
></script><script
src=
"/js/ueeditor/ueditor.all.js?20200107"
charset=
"utf-8"
></script>
<script
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/js/console-polyfill.js?20200107"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es6-shim.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-shim.js?20200107"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/es5-sham.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/json3.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/html5shiv.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/js/polyfill.js?20200107"
charset=
"utf-8"
></script><script
src=
"https://cdn.img.shangjiadao.cn/qingxiao/biz/
lib/vendor.dll.js?20200107"
charset=
"utf-8"
></script>
<script
src=
"
js/console-polyfill.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/es6-shim.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/es5-shim.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/es5-sham.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/json3.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/html5shiv.min.js?20200107"
charset=
"utf-8"
></script><script
src=
"js/polyfill.js?20200107"
charset=
"utf-8"
></script><script
src=
"
lib/vendor.dll.js?20200107"
charset=
"utf-8"
></script>
</head>
</head>
<body>
<div
id=
"root"
></div>
<script
type=
"text/javascript"
src=
"
https://cdn.img.shangjiadao.cn/qingxiao/biz/dist/main.560276
.js"
></script></body>
<script
type=
"text/javascript"
src=
"
/dist/main.857db3
.js"
></script></body>
</html>
\ No newline at end of file
src/models/officialweb.js
View file @
6c0680a9
...
...
@@ -1009,6 +1009,11 @@ export default {
pathname
:
'/sjd/officialwebeditor'
,
}));
},
*
editThemeClass
({
payload
},
{
call
,
put
,
select
})
{
yield
put
(
routerRedux
.
push
({
pathname
:
'/sjd/themeClass'
,
}));
},
*
titlechange
({
payload
},
{
call
,
put
,
select
})
{
const
{
orgdescs
}
=
yield
select
(
state
=>
state
.
officialweb
);
const
{
index
,
value
}
=
payload
;
...
...
src/models/webapp.js
View file @
6c0680a9
...
...
@@ -187,6 +187,17 @@ export default {
},
});
}
if
(
pathname
===
'/sjd/themeClass'
)
{
dispatch
({
type
:
'updateState'
,
payload
:
{
breadcrumbList
:
[{
path
:
pathname
,
name
:
'微官网管理'
,
}],
},
});
}
if
(
pathname
===
'/sjd/indexstaic'
)
{
dispatch
({
type
:
'indexstaic/queryinfo'
,
...
...
src/pages/officialweb/index.js
View file @
6c0680a9
...
...
@@ -81,6 +81,12 @@ class Officialweb extends React.Component {
type
:
'officialweb/editor'
,
});
}
editThemeClass
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'officialweb/editThemeClass'
,
});
}
render
()
{
const
{
pageInfo
,
...
...
@@ -184,9 +190,10 @@ class Officialweb extends React.Component {
<
div
className
=
{
pageStyle
.
websitedescbox
}
>
{
hasBtnPower
(
'sjd/officialweb'
,
'editOfficialweb'
)
&&
<
BtnPermission
btnId
=
"80001"
>
<
Button
type
=
"primary"
onClick
=
{
this
.
editor
}
className
=
{
pageStyle
.
editBtn
}
>
装修
微官网
<
/Button
>
<
Button
type
=
"primary"
onClick
=
{
this
.
editor
}
className
=
{
pageStyle
.
editBtn
}
>
装修
主页
<
/Button
>
<
/BtnPermission
>
}
<
Button
type
=
"primary"
onClick
=
{
this
.
editThemeClass
}
className
=
{
pageStyle
.
editBtn
}
style
=
{{
marginLeft
:
30
}}
>
装修主题课
<
/Button
>
<
div
className
=
{
pageStyle
.
websiteeditdesc
}
>
左图是您微官网当前的预览效果。
<
br
/>
...
...
src/pages/officialweb/themeclass/AddThemeClassModal.js
0 → 100644
View file @
6c0680a9
import
{
connect
}
from
'dva'
;
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
message
,
Row
,
Col
,
Input
,
Select
,
Modal
,
Form
,
InputNumber
,
Checkbox
,
Radio
,
Tabs
,
Icon
}
from
'antd'
;
import
{
imagify
,
pageIn
}
from
'../../../utils/index'
;
import
pageStyle
from
'./AddThemeClassModal.less'
;
const
FormItem
=
Form
.
Item
;
const
{
TabPane
}
=
Tabs
;
class
AddThemeClassModal
extends
React
.
Component
{
componentWillMount
()
{
}
componentDidUpdate
()
{
}
componentWillUpdate
()
{
}
componentDidMount
()
{
// 挂载
pageIn
(
'班级管理'
);
}
componentWillUnmount
()
{
// 卸载
}
componentWillReceiveProps
(
nextProps
)
{
}
save
=
()
=>
{
const
{
form
,
save
}
=
this
.
props
;
form
.
validateFields
((
err
,
values
)
=>
{
console
.
log
(
values
,
'values'
);
if
(
!
err
)
{
const
{
schedule_remind
,
}
=
values
;
save
({
schedule_remind
:
schedule_remind
?
1
:
2
,
callBack
:
()
=>
{
form
.
resetFields
();
},
});
}
});
}
close
=
()
=>
{
const
{
form
,
close
}
=
this
.
props
;
form
.
resetFields
();
close
();
}
wxSwitchTime
=
(
key
)
=>
{
const
{
wxSwitchTime
}
=
this
.
props
;
const
timeKey
=
Number
(
key
);
wxSwitchTime
({
timeKey
,
});
}
render
()
{
const
{
visible
,
loading
,
form
:
{
getFieldDecorator
,
getFieldValue
},
}
=
this
.
props
;
const
formItemModalLineLayout
=
{
labelCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
3
},
},
wrapperCol
:
{
xs
:
{
span
:
24
},
sm
:
{
span
:
21
},
},
};
const
radioStyle
=
{
display
:
'block'
,
};
return
(
<
Modal
visible
=
{
visible
}
title
=
"添加课程"
confirmLoading
=
{
loading
}
onCancel
=
{
this
.
close
}
onOk
=
{
this
.
save
}
maskClosable
=
{
false
}
zIndex
=
{
110
}
width
=
{
750
}
className
=
{
pageStyle
.
modalForm
}
>
<
Form
hideRequiredMark
className
=
{
pageStyle
.
modalform
}
labelAlign
=
"left"
>
<
div
className
=
{
pageStyle
.
commonTitle
}
>
课程封面
<
/div
>
<
div
className
=
{
pageStyle
.
imgWrap
}
>
<
div
className
=
{
pageStyle
.
imgLeft
}
><
img
src
=
"https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png"
alt
=
""
/><
/div
>
<
div
className
=
{
pageStyle
.
imgRight
}
>
<
div
className
=
{
pageStyle
.
courseName
}
><
span
>
已选课程:
<
/span>练字集训</
div
>
<
div
className
=
{
pageStyle
.
imgTip
}
>
建议尺寸:
660
*
290
,
jpg
/
png
格式,大小不超过
300
kb
<
/div
>
<
div
className
=
{
pageStyle
.
uploadImg
}
>
<
Icon
type
=
"upload"
/>
<
span
>&
nbsp
;
&
nbsp
;
&
nbsp
;
上传封面
<
/span
>
<
input
type
=
"file"
className
=
{
pageStyle
.
uploadInput
}
accept
=
"image/png, image/jpeg"
onChange
=
{(
e
)
=>
{
this
.
toUploadBanner
(
e
);
}}
/
>
<
/div
>
<
/div
>
<
/div
>
<
FormItem
colon
=
{
false
}
{...
formItemModalLineLayout
}
label
=
"课程标题"
>
{
getFieldDecorator
(
'push_type'
,
{
initialValue
:
'0'
,
rules
:
[
{
required
:
true
,
message
:
'请输入课程标题'
,
},
],
})(
<
Input
style
=
{{
width
:
350
}}
placeholder
=
"请输入课程标题"
/>
,
)}
<
/FormItem
>
<
div
className
=
{
pageStyle
.
modalLine
}
>
<
span
className
=
{
pageStyle
.
commonTitle
}
>
虚拟数据
<
/span
>
<
FormItem
{...
formItemModalLineLayout
}
className
=
{
pageStyle
.
formNumberOne
}
>
{
getFieldDecorator
(
'push_type'
,
{
initialValue
:
'0'
,
rules
:
[
{
required
:
true
,
message
:
'请输入'
,
},
],
})(
<
InputNumber
placeholder
=
"请输入"
/>
,
)}
<
span
className
=
"ant-form-text"
>
人参与,
<
/span
>
<
/FormItem
>
<
FormItem
{...
formItemModalLineLayout
}
className
=
{
pageStyle
.
formNumberTwo
}
>
{
getFieldDecorator
(
'push_type'
,
{
initialValue
:
'0'
,
rules
:
[
{
required
:
true
,
message
:
'请输入'
,
},
],
})(
<
InputNumber
placeholder
=
"请输入"
/>
,
)}
<
span
className
=
"ant-form-text"
>
多少篇打卡
<
/span
>
<
/FormItem
>
<
/div
>
<
div
className
=
{
pageStyle
.
commonTitle
}
>
选择跳转课程
<
/div
>
<
div
>
<
Form
.
Item
className
=
{
pageStyle
.
radioList
}
>
{
getFieldDecorator
(
'radiobutton'
,
{
initialValue
:
'a'
,
},
)(
<
Radio
.
Group
>
<
div
className
=
{
pageStyle
.
radioTitle
}
>
<
div
>
课程名称
<
/div
>
<
div
>
课程类型
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
radioItem
}
>
<
Radio
style
=
{
radioStyle
}
value
=
"a"
>
小行星英语练习第一课
<
/Radio
>
<
div
>
闯关打卡
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
radioItem
}
>
<
Radio
style
=
{
radioStyle
}
value
=
"b"
>
小行星英语练习第一课
11
<
/Radio
>
<
div
>
闯关打卡
<
/div
>
<
/div
>
<
/Radio.Group>
,
)}
<
/Form.Item
>
<
/div
>
<
/Form
>
<
/Modal
>
);
}
}
const
AddThemeClass
=
Form
.
create
()(
AddThemeClassModal
);
export
default
AddThemeClass
;
src/pages/officialweb/themeclass/AddThemeClassModal.less
0 → 100644
View file @
6c0680a9
.modalLine {
display: flex;
align-items: center;
.formNumberOne {
width: 187px;
margin-left: 18px;
}
.formNumberTwo {
width: 230px;
margin-left: -33px;
}
}
.modalForm {
:global {
.ant-form-item {
margin-bottom: 5px;
}
.ant-form-item-label > label {
font-weight: bold;
}
}
}
.commonTitle {
font-size:14px;
font-family:PingFang SC;
font-weight:bold;
color:rgba(0,0,0,1);
display: block;
min-width: 70px;
}
.imgWrap {
display: flex;
margin-top: 15px;
.imgLeft {
width: 248px;
height: 116px;
margin-right: 20px;
&>img {
width: 100%;
height: 100%;
border-radius: 4px;
}
}
.imgRight {
.courseName {
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color: #19B5FE;
line-height:36px;
&>span {
color:rgba(0,0,0,1);
}
}
.imgTip {
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(151,151,151,1);
}
.uploadImg {
position: relative;
width: 120px;
height: 25px;
cursor: pointer;
color: #4EC0FE;
font-size: 14px;
margin-top: 25px;
.uploadInput {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
z-index: 1;
}
}
}
}
.radioList {
border:1px solid rgba(229,229,229,1);
border-radius: 8px;
:global {
.ant-radio-group {
width: 100%;
}
}
.radioItem, .radioTitle {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding:0 20px;
}
.radioTitle {
border-bottom: 1px solid #E5E5E5;
}
}
src/pages/officialweb/themeclass/themeclass.js
0 → 100644
View file @
6c0680a9
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
'./themeclass.less'
;
import
{
hasBtnPower
,
imagify
}
from
'../../../utils'
;
import
AddThemeClassModal
from
'./AddThemeClassModal'
;
const
{
TabPane
}
=
Tabs
;
const
FormItem
=
Form
.
Item
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
{
RangePicker
}
=
DatePicker
;
class
ThemeClassForm
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
};
}
componentDidUpdate
()
{
}
componentWillUnmount
()
{
// 卸载
}
goAddCourse
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'officialweb/updateState'
,
payload
:
{
addThemeVisible
:
true
,
},
});
}
render
()
{
const
{
form
:
{
getFieldDecorator
,
getFieldValue
},
collapsed
,
screenIsBig
,
addThemeVisible
,
}
=
this
.
props
;
return
(
<
div
className
=
{
pageStyle
.
container
}
>
<
div
className
=
{
pageStyle
.
topHead
}
>
<
div
className
=
{
pageStyle
.
head
}
onClick
=
{
this
.
goAddCourse
}
>
<
div
className
=
{
pageStyle
.
addIcon
}
><
Icon
type
=
"plus-circle"
theme
=
"filled"
/><
/div
>
<
span
>
添加课程
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
courseList
}
>
<
div
className
=
{
pageStyle
.
courseItem
}
>
<
div
className
=
{
pageStyle
.
courseHead
}
>
<
div
className
=
{
pageStyle
.
courseTitle
}
>
21
天
0
基础书法入门训练营
<
/div
>
<
div
className
=
{
pageStyle
.
courseNum
}
><
span
style
=
{{
marginRight
:
20
}}
>
3456
人参与
<
/span><span>100次打卡</
span
><
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
courseBody
}
>
<
div
className
=
{
pageStyle
.
courseLeft
}
>
<
img
src
=
"https://cdn.img.shangjiadao.cn/qingxiao/daka/images/2c/sharemoretheme/newunlockbg.png"
alt
=
""
/>
<
/div
>
<
div
className
=
{
pageStyle
.
courseRight
}
>
<
span
className
=
{
pageStyle
.
link
}
>
编辑
<
/span
>
<
span
className
=
{
pageStyle
.
link
}
>
删除
<
/span
>
<
span
className
=
{
pageStyle
.
link
}
>
上移
<
/span
>
<
span
className
=
{
pageStyle
.
link
}
>
下移
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
className
=
{
pageStyle
.
footerBox
}
style
=
{{
left
:
screenIsBig
?
(
!
collapsed
?
'193px'
:
'102px'
)
:
0
,
// eslint-disable-line
width
:
screenIsBig
?
(
`calc(100% -
${
!
collapsed
?
'214px'
:
'122px'
}
)`
)
:
'100%'
,
// eslint-disable-line
}}
>
<
div
>
<
Button
ghost
type
=
"primary"
>
取消
<
/Button
>
<
Button
type
=
"primary"
>
保存
<
/Button
>
<
/div
>
<
/div
>
<
AddThemeClassModal
visible
=
{
addThemeVisible
}
/
>
<
/div
>
);
}
}
ThemeClassForm
.
propTypes
=
{
};
const
ThemeClass
=
Form
.
create
()(
ThemeClassForm
);
function
mapStateToProps
(
state
)
{
const
{
addThemeVisible
,
}
=
state
.
officialweb
;
const
{
collapsed
,
screenIsBig
}
=
state
.
webapp
;
return
{
collapsed
,
screenIsBig
,
addThemeVisible
,
};
}
export
default
connect
(
mapStateToProps
)(
ThemeClass
);
src/pages/officialweb/themeclass/themeclass.less
0 → 100644
View file @
6c0680a9
.container {
background-color: #fff;
padding: 20px;
border-radius: 2px;
padding-bottom: 100px;
}
.topHead {
border-bottom: 1px solid #E5E5E5;
.head {
display: flex;
align-items: center;
height: 57px;
cursor: pointer;
width: 150px;
.addIcon {
width: 27px;
height: 27px;
background-color: #52A5FF;
border-radius: 4px;
color: #fff;
line-height: 27px;
text-align: center;
font-size: 16px;
margin-right: 14px;
}
&>span {
font-size:16px;
font-family:PingFang SC;
font-weight:400;
color:rgba(33,148,255,1);
}
}
}
.courseList {
.courseItem {
border-bottom: 1px solid #EFEFEF;
padding: 20px 0;
.courseHead {
.courseTitle {
font-size:16px;
font-family:PingFang SC;
font-weight:400;
color:rgba(0,0,0,1);
line-height:36px;
}
.courseNum {
font-size:12px;
font-family:PingFang SC;
font-weight:400;
color:rgba(139,139,139,1);
line-height:36px;
&>span {
display: inline-block;
}
}
}
.courseBody {
display: flex;
align-items: flex-end;
justify-content: space-between;
.courseLeft {
width: 248px;
height: 116px;
&>img {
width: 100%;
height: 100%;
border-radius: 4px;
}
}
.courseRight {
.link {
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(33,148,255,1);
line-height:36px;
display: inline-block;
margin-right: 30px;
cursor: pointer;
}
}
}
}
}
.footerBox {
position: fixed;
bottom: 0;
background-color: #fff;
padding: 20px 20px 14px 20px;
width: 100%;
box-shadow:1px -6px 6px 0px rgba(0, 0, 0, 0.04);
transition: 0.2s left;
transition: 0.1s width;
z-index: 20;
text-align: center;
}
\ No newline at end of file
src/router.js
View file @
6c0680a9
...
...
@@ -276,6 +276,11 @@ const AddStoreCount = props => (
{
AddStoreCount
=>
(
<
AddStoreCount
{...
props
}
/>
)
}
<
/Bundle
>
);
const
ThemeClass
=
props
=>
(
<
Bundle
load
=
{()
=>
import
(
/* webpackChunkName:"ThemeClass" */
'./pages/officialweb/themeclass/themeclass'
)}
>
{
ThemeClass
=>
(
<
ThemeClass
{...
props
}
/>
)
}
<
/Bundle
>
);
function
RouterConfig
({
history
})
{
return
(
<
ConfigProvider
locale
=
{
zhCN
}
>
...
...
@@ -328,6 +333,7 @@ function RouterConfig({ history }) {
<
Route
path
=
"/sjd/editCustomsContent/:id"
exact
component
=
{
UnclockDetail
}
/
>
<
Route
path
=
"/sjd/addCustomsContent/:id"
exact
component
=
{
UnclockDetail
}
/
>
<
Route
path
=
"/sjd/addStoreCount/:id"
exact
component
=
{
AddStoreCount
}
/
>
<
Route
path
=
"/sjd/themeClass"
exact
component
=
{
ThemeClass
}
/
>
<
Route
component
=
{
Errorpage
}
/
>
<
/Switch
>
<
/SjdIndex
>
...
...
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