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
82702b22
Commit
82702b22
authored
Apr 17, 2020
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP oss上传修改
parent
60ea4b07
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
90 additions
and
30 deletions
+90
-30
index.html
index.html
+1
-1
officialweb.js
src/models/officialweb.js
+45
-2
editor.js
src/pages/officialweb/editor.js
+19
-6
index.js
src/pages/officialweb/index.js
+3
-3
AdCarouselEditor.js
src/pages/officialweb/pagecomponent/AdCarouselEditor.js
+2
-2
Banner.js
src/pages/officialweb/pagecomponent/Banner.js
+1
-1
BannerEditor.js
src/pages/officialweb/pagecomponent/BannerEditor.js
+2
-2
ClassMomentsEditor.js
src/pages/officialweb/pagecomponent/ClassMomentsEditor.js
+2
-2
SchoolIntroEditor.js
src/pages/officialweb/pagecomponent/SchoolIntroEditor.js
+2
-2
StudentClock.js
src/pages/officialweb/pagecomponent/StudentClock.js
+1
-1
Teacher.js
src/pages/officialweb/pagecomponent/Teacher.js
+6
-2
Teacher.less
src/pages/officialweb/pagecomponent/Teacher.less
+4
-4
TeacherEditor.js
src/pages/officialweb/pagecomponent/TeacherEditor.js
+2
-2
No files found.
index.html
View file @
82702b22
...
...
@@ -18,5 +18,5 @@
</head>
<body>
<div
id=
"root"
></div>
<script
type=
"text/javascript"
src=
"/dist/main.
4bc31f
.js"
></script></body>
<script
type=
"text/javascript"
src=
"/dist/main.
98a3f4
.js"
></script></body>
</html>
\ No newline at end of file
src/models/officialweb.js
View file @
82702b22
...
...
@@ -162,6 +162,28 @@ export default {
schoolIntroStatus
:
false
,
// 学校介绍保存状态
teachers
:
[],
// 名师风采
teacherStatus
:
false
,
// 名师保存状态
avatorUploaderDefault
:
{
// 裁剪不限制
maxsize
:
8192
,
// 奖品图片最大尺寸KBcropper: {
cropper
:
{
croppered_params
:
[],
// 图片裁剪后的参数
config
:
{
dragMode
:
'move'
,
viewMode
:
1
,
aspectRatio
:
NaN
,
autoCropArea
:
0.8
,
guides
:
!
1
,
center
:
!
0
,
highlight
:
!
1
,
dragCrop
:
!
1
,
cropBoxMovable
:
!
0
,
cropBoxResizable
:
!
0
,
zoom
:
-
0.2
,
checkImageOrigin
:
!
0
,
background
:
!
1
,
rotatable
:
!
0
,
},
},
},
},
subscriptions
:
{
setup
({
dispatch
,
history
})
{
// eslint-disable-line
...
...
@@ -277,7 +299,6 @@ export default {
if
(
!
schoolDetail
.
data
)
{
const
orgschoolDetail
=
yield
call
(
officialwebajax
.
memberSchooldetail
,
{
school_id
:
sid
});
if
(
orgschoolDetail
.
code
==
200
)
{
console
.
log
(
orgschoolDetail
,
'orgschoolDetail111'
);
newpageInfo
.
forEach
((
ele
)
=>
{
const
element
=
ele
;
if
(
element
.
type
==
'schoolinfo'
)
{
...
...
@@ -450,7 +471,7 @@ export default {
newpageInfo
.
forEach
((
ele
)
=>
{
const
element
=
ele
;
if
(
element
.
type
==
'teacher'
)
{
element
.
data
=
teacherData
.
data
.
list
.
slice
(
0
,
2
);
element
.
data
=
teacherData
.
data
.
list
.
slice
(
0
,
4
);
}
});
newTeacherData
=
teacherData
.
data
.
list
;
...
...
@@ -2283,6 +2304,28 @@ export default {
schoolIntroStatus
:
false
,
// 学校介绍保存状态
teachers
:
[],
// 名师风采
teacherStatus
:
false
,
// 名师保存状态
avatorUploaderDefault
:
{
// 裁剪不限制
maxsize
:
8192
,
// 奖品图片最大尺寸KBcropper: {
cropper
:
{
croppered_params
:
[],
// 图片裁剪后的参数
config
:
{
dragMode
:
'move'
,
viewMode
:
1
,
aspectRatio
:
NaN
,
autoCropArea
:
0.8
,
guides
:
!
1
,
center
:
!
0
,
highlight
:
!
1
,
dragCrop
:
!
1
,
cropBoxMovable
:
!
0
,
cropBoxResizable
:
!
0
,
zoom
:
-
0.2
,
checkImageOrigin
:
!
0
,
background
:
!
1
,
rotatable
:
!
0
,
},
},
},
},
});
},
...
...
src/pages/officialweb/editor.js
View file @
82702b22
...
...
@@ -129,10 +129,10 @@ class Officialweb extends React.Component {
schoolInfo
,
collapsed
,
screenIsBig
,
avatorUploaderDefault
,
}
=
this
.
props
;
let
renderDom
;
const
newPageInfo
=
pageInfo
;
console
.
log
(
newPageInfo
,
'newPageInfo'
);
const
qrcodeBox
=
(
<
div
>
<
img
className
=
{
pageStyle
.
qrcodebox
}
src
=
{
imagify
(
previewQrcode
)}
alt
=
""
/>
...
...
@@ -180,7 +180,10 @@ class Officialweb extends React.Component {
<
/div
>
{
moduleSelect
==
index
&&
<
div
className
=
{
pageStyle
.
editbox
}
>
<
BannerEditor
banner
=
{
ele
.
data
}
/
>
<
BannerEditor
banner
=
{
ele
.
data
}
avatorUploaderDefault
=
{
avatorUploaderDefault
}
/
>
<
/div
>
}
<
/div
>
...
...
@@ -211,7 +214,9 @@ class Officialweb extends React.Component {
}
{
moduleSelect
==
index
&&
<
div
className
=
{
pageStyle
.
editbox
}
>
<
AdCarouselEditor
/>
<
AdCarouselEditor
avatorUploaderDefault
=
{
avatorUploaderDefault
}
/
>
<
/div
>
}
<
/div
>
...
...
@@ -242,7 +247,9 @@ class Officialweb extends React.Component {
}
{
moduleSelect
==
index
&&
<
div
className
=
{
pageStyle
.
editbox
}
>
<
SchoolIntroEditor
/>
<
SchoolIntroEditor
avatorUploaderDefault
=
{
avatorUploaderDefault
}
/
>
<
/div
>
}
<
/div
>
...
...
@@ -273,7 +280,9 @@ class Officialweb extends React.Component {
}
{
moduleSelect
==
index
&&
<
div
className
=
{
pageStyle
.
editbox
}
>
<
TeacherEditor
/>
<
TeacherEditor
avatorUploaderDefault
=
{
avatorUploaderDefault
}
/
>
<
/div
>
}
<
/div
>
...
...
@@ -330,7 +339,9 @@ class Officialweb extends React.Component {
}
{
moduleSelect
==
index
&&
<
div
className
=
{
pageStyle
.
editbox
}
>
<
ClassMomentsEditor
/>
<
ClassMomentsEditor
avatorUploaderDefault
=
{
avatorUploaderDefault
}
/
>
<
/div
>
}
<
/div
>
...
...
@@ -461,6 +472,7 @@ function mapStateToProps(state) {
course
,
coursePostStatus
,
schoolInfo
,
avatorUploaderDefault
,
}
=
state
.
officialweb
;
const
{
cropperboxShow
,
...
...
@@ -482,6 +494,7 @@ function mapStateToProps(state) {
schoolInfo
,
collapsed
,
screenIsBig
,
avatorUploaderDefault
,
};
}
export
default
connect
(
mapStateToProps
)(
Officialweb
);
...
...
src/pages/officialweb/index.js
View file @
82702b22
...
...
@@ -272,9 +272,9 @@ class Officialweb extends React.Component {
<
Button
type
=
"primary"
onClick
=
{
this
.
editor
}
className
=
{
pageStyle
.
editBtn
}
>
装修主页
<
/Button
>
<
/BtnPermission
>
}
<
BtnPermission
btnId
=
"80001"
>
<
Button
type
=
"primary"
onClick
=
{
this
.
editThemeClass
}
className
=
{
pageStyle
.
editBtn
}
style
=
{{
marginLeft
:
30
}}
>
装修主题课
<
/Button
>
<
/BtnPermission
>
{
/* <BtnPermission btnId="80001"> */
}
{
/* <Button type="primary" onClick={this.editThemeClass} className={pageStyle.editBtn} style={{ marginLeft: 30 }}>装修主题课</Button> */
}
{
/* </BtnPermission> */
}
<
div
className
=
{
pageStyle
.
websiteeditdesc
}
>
左图是您微官网当前的预览效果。
<
br
/>
...
...
src/pages/officialweb/pagecomponent/AdCarouselEditor.js
View file @
82702b22
...
...
@@ -98,14 +98,14 @@ class AdCarouselEditor extends React.Component {
},
200
);
}
uploadAdBanner
=
(
e
,
index
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
avatorUploaderDefault
}
=
this
.
props
;
const
{
avatorUploader
}
=
this
.
state
;
dispatch
({
type
:
'uploader/queryimgsignature'
,
payload
:
{
files
:
e
.
target
,
uploadtype
:
'uploadAdBanner'
,
avatorUploader
,
avatorUploader
:
avatorUploaderDefault
,
imgIndex
:
index
,
},
});
...
...
src/pages/officialweb/pagecomponent/Banner.js
View file @
82702b22
...
...
@@ -11,7 +11,7 @@ function Banner(props) {
<
div
>
{
banner
.
type
==
'video'
&&
banner
.
src
.
length
>
0
&&
<
div
className
=
{
PageStyle
.
videobox
}
>
<
video
controls
=
"controls"
className
=
{
PageStyle
.
videoPoster
}
src
=
{
ossVideofy
(
banner
.
src
[
0
])}
/
>
<
video
autoPlay
=
{
false
}
controls
=
"controls"
className
=
{
PageStyle
.
videoPoster
}
src
=
{
ossVideofy
(
banner
.
src
[
0
])}
/
>
<
/div
>
}
{
banner
.
type
==
'img'
&&
banner
.
src
.
length
>
1
&&
...
...
src/pages/officialweb/pagecomponent/BannerEditor.js
View file @
82702b22
...
...
@@ -74,14 +74,14 @@ class BannerEditor extends React.Component {
});
}
uploadImg
=
(
e
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
avatorUploaderDefault
}
=
this
.
props
;
const
{
avatorUploader
}
=
this
.
state
;
dispatch
({
type
:
'uploader/queryimgsignature'
,
payload
:
{
files
:
e
.
target
,
uploadtype
:
'banner'
,
avatorUploader
,
avatorUploader
:
avatorUploaderDefault
,
},
});
}
...
...
src/pages/officialweb/pagecomponent/ClassMomentsEditor.js
View file @
82702b22
...
...
@@ -110,7 +110,7 @@ class ClassMomentsEditor extends React.Component {
const
REGEXP_VIDEO
=
/^video
\/\w
+/
;
const
REGEXP_IMG
=
/^image
\/\w
+/
;
const
{
files
}
=
e
.
target
;
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
avatorUploaderDefault
}
=
this
.
props
;
if
(
files
&&
files
[
0
]
&&
REGEXP_VIDEO
.
test
(
files
[
0
].
type
))
{
dispatch
({
type
:
'officialweb/queryvideosignature'
,
...
...
@@ -135,7 +135,7 @@ class ClassMomentsEditor extends React.Component {
payload
:
{
files
:
e
.
target
,
uploadtype
:
'uploadClassMomentImg'
,
avatorUploader
,
avatorUploader
:
avatorUploaderDefault
,
imgIndex
:
index
,
},
});
...
...
src/pages/officialweb/pagecomponent/SchoolIntroEditor.js
View file @
82702b22
...
...
@@ -52,14 +52,14 @@ class SchoolIntroEditor extends React.Component {
},
200
);
}
uploadSchoolIntro
=
(
e
,
index
,
type
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
,
avatorUploaderDefault
}
=
this
.
props
;
const
{
avatorUploader
}
=
this
.
state
;
dispatch
({
type
:
'uploader/queryimgsignature'
,
payload
:
{
files
:
e
.
target
,
uploadtype
:
'uploadSchoolIntro'
,
avatorUploader
,
avatorUploader
:
avatorUploaderDefault
,
imgIndex
:
index
,
orgType
:
type
,
},
...
...
src/pages/officialweb/pagecomponent/StudentClock.js
View file @
82702b22
...
...
@@ -69,7 +69,7 @@ class StudentClock extends React.Component {
}
{
ele
.
subject
&&
(
ele
.
subject
.
subject_type
==
2
||
ele
.
subject
.
subject_type
==
1
)
&&
<
div
className
=
{
PageStyle
.
playstatus
}
>
{
timeCompare
(
ele
.
created_at_time
)}
&
nbsp
;
&
nbsp
;
已坚持
{
ele
.
clock_days
}
天
&&
{
ele
.
visit_pv_count
!=
0
?
ele
.
visit_pv_count
:
1
}
次
{
timeCompare
(
ele
.
created_at_time
)}
&
nbsp
;
&
nbsp
;
已坚持
{
ele
.
clock_days
}
天
{
ele
.
visit_pv_count
!=
0
?
ele
.
visit_pv_count
:
1
}
次
<
/div
>
}
<
/div
>
...
...
src/pages/officialweb/pagecomponent/Teacher.js
View file @
82702b22
...
...
@@ -25,7 +25,6 @@ class Teacher extends React.Component {
}
render
()
{
const
{
data
,
schoolInfo
,
showStatus
}
=
this
.
props
;
console
.
log
(
data
,
'data111'
);
return
(
<
div
className
=
{
PageStyle
.
Bannercontainer
}
>
{
...
...
@@ -50,7 +49,12 @@ class Teacher extends React.Component {
<
/div
>
<
div
className
=
{
PageStyle
.
commonRight
}
>
<
div
className
=
{
PageStyle
.
commonName
}
>
{
item
.
name
}
<
/div
>
<
div
className
=
{
PageStyle
.
commonDesc
}
><
Tooltip
title
=
{
item
.
course
}
>
{
item
.
course
.
substr
(
0
,
4
)}
<
/Tooltip> {item.seniority}年教龄</
div
>
<
div
className
=
{
PageStyle
.
commonDesc
}
>
<
div
>
<
Tooltip
title
=
{
item
.
course
}
>
{
item
.
course
.
substr
(
0
,
4
)}
<
/Tooltip
>
<
/div
>
<
div
>&
nbsp
;{
item
.
seniority
}
年教龄
<
/div
>
<
/div
>
<
/div
>
<
/div
>
);
...
...
src/pages/officialweb/pagecomponent/Teacher.less
View file @
82702b22
...
...
@@ -41,11 +41,10 @@
align-items: center;
margin-top: 10px;
.commonItem {
display: flex;
align-items
: center;
margin-right:
5
px;
//
display: flex;
text-align
: center;
margin-right:
20
px;
.commonLeft {
margin-right: 11px;
&>img {
width: 52px;
height: 52px;
...
...
@@ -70,6 +69,7 @@
line-height:18px;
display: flex;
align-items: center;
flex-direction: column;
}
}
}
src/pages/officialweb/pagecomponent/TeacherEditor.js
View file @
82702b22
...
...
@@ -52,12 +52,13 @@ class TeacherEditor extends React.Component {
uploadTeacherAvatar
=
(
e
,
index
)
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
avatorUploader
}
=
this
.
state
;
const
{
avatorUploaderDefault
}
=
this
.
props
;
dispatch
({
type
:
'uploader/queryimgsignature'
,
payload
:
{
files
:
e
.
target
,
uploadtype
:
'uploadTeacherAvatar'
,
avatorUploader
,
avatorUploader
:
avatorUploaderDefault
,
imgIndex
:
index
,
},
});
...
...
@@ -132,7 +133,6 @@ class TeacherEditor extends React.Component {
teacherStatus
,
sid
,
}
=
this
.
props
;
console
.
log
(
teachers
,
'teachersteachersteachers'
);
const
formItemLayout
=
{
labelCol
:
{
xs
:
{
span
:
4
},
...
...
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