Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-weichat
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
hqzhdj_app
saas-weichat
Commits
e2c7aa96
Commit
e2c7aa96
authored
Dec 03, 2024
by
yanglang123
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
1d552aef
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
249 additions
and
294 deletions
+249
-294
build/server.prod.js
+1
-1
jslibs/spdb_vote20200119/js/login.js
+0
-25
jslibs/spdb_vote2020011902/js/login.js
+0
-24
src/components/Training/TrainingSteps/Ellipse-icon.png
+0
-0
src/components/Training/TrainingSteps/Ellipse-jf.png
+0
-0
src/components/Training/TrainingSteps/TrainingSteps.jsx
+92
-16
src/components/Training/TrainingSteps/TrainingStepsAction.jsx
+11
-9
src/components/Training/TrainingSteps/index.css
+34
-4
src/components/Training/TrainingSteps/index.less
+38
-6
src/components/common/carousel.jsx
+47
-35
src/components/indexComponent/index.jsx
+1
-2
src/components/menulearn/menulearn.jsx
+8
-21
src/components/menulearn/visitCount/index.jsx
+0
-53
src/components/menulearn/visitCount/style.less
+0
-13
src/components/menutrain/MenuTrain.jsx
+0
-1
src/components/menutrain/MenuTrainAction.js
+2
-0
src/components/menutrain/trainIndexList/index.jsx
+3
-33
src/components/menutrain/trainIndexList/style.css
+3
-3
src/components/menutrain/trainIndexList/style.less
+3
-3
src/redux/action/home/home.js
+0
-10
src/util/fetchUtil.js
+0
-16
src/util/urlconfig.js
+6
-19
No files found.
build/server.prod.js
View file @
e2c7aa96
...
...
@@ -23,7 +23,7 @@ app.get("*", function(req, res) {
res
.
sendFile
(
path
.
join
(
rootPath
,
"dist/index.html"
));
});
app
.
listen
(
3
003
,
function
(
err
)
{
app
.
listen
(
8
003
,
function
(
err
)
{
if
(
err
)
{
return
console
.
error
(
err
);
}
...
...
jslibs/spdb_vote20200119/js/login.js
View file @
e2c7aa96
...
...
@@ -62,31 +62,6 @@ function getUserInfo(){
});
}
function
getConfig
(){
$
.
ajax
({
type
:
"get"
,
url
:
"https://wechat.kmelearning.com/web-student/public/wechat/get/signature"
,
async
:
true
,
dataType
:
"json"
,
data
:
{
"url"
:
location
.
href
.
split
(
'#'
)[
0
],
"appid"
:
corpId
,
"agentId"
:
agentId
},
success
:
function
(
data
)
{
produceSign1
(
data
.
data
);
},
error
:
function
(
data
){
console
.
log
(
"TokenError:"
+
JSON
.
stringify
(
data
));
}
});
}
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
...
...
jslibs/spdb_vote2020011902/js/login.js
View file @
e2c7aa96
...
...
@@ -63,30 +63,6 @@ function getUserInfo(){
}
function
getConfig
(){
$
.
ajax
({
type
:
"get"
,
url
:
"https://wechat.kmelearning.com/web-student/public/wechat/get/signature"
,
async
:
true
,
dataType
:
"json"
,
data
:
{
"url"
:
location
.
href
.
split
(
'#'
)[
0
],
"appid"
:
corpId
,
"agentId"
:
agentId
},
success
:
function
(
data
)
{
produceSign1
(
data
.
data
);
},
error
:
function
(
data
){
console
.
log
(
"TokenError:"
+
JSON
.
stringify
(
data
));
}
});
}
function
getQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
);
...
...
src/components/Training/TrainingSteps/Ellipse-icon.png
0 → 100644
View file @
e2c7aa96
288 Bytes
src/components/Training/TrainingSteps/Ellipse-jf.png
0 → 100644
View file @
e2c7aa96
208 Bytes
src/components/Training/TrainingSteps/TrainingSteps.jsx
View file @
e2c7aa96
...
...
@@ -30,6 +30,8 @@ import $ from "jquery";
import
zan
from
"../../../image/zan.png"
;
import
alreadyzan
from
"../../../image/alreadyzan.png"
;
import
myIcon
from
"../../../image/my.png"
;
import
ellipse
from
"./Ellipse-icon.png"
;
import
ellipseJf
from
"./Ellipse-jf.png"
;
import
ReactPlayer
from
"react-player"
;
const
TabPane
=
Tabs
.
TabPane
;
...
...
@@ -68,8 +70,10 @@ class TrainingSteps extends Component {
showContentOccupy
:
false
,
isNative
:
false
,
enablePosition
:
0
,
baomingModal
:
false
,
refreshTrainComment
:
""
,
activityStateCode
:
""
,
//0待开始;1待报名;2待签到;3正在报名;4正在签到;5进行中;6已结束;7未报名;8未签到
activityStateCode
:
""
,
//0待开始;1待报名;2待签到;3立即报名;4立即签到;5进行中;6已结束;7未报名;8未签到
activityStateName
:
""
,
signTimeId
:
""
,
//签到
signType
:
""
,
//签到
};
...
...
@@ -99,9 +103,11 @@ class TrainingSteps extends Component {
this
.
props
.
trainStepsData
(
finished
,
params
,
()
=>
{
let
{
introductionVo
}
=
_this
.
props
.
TrainingStepsReducer
;
let
{
activityStateCode
,
signTimeId
,
signType
}
=
introductionVo
;
let
{
activityStateCode
,
activityStateName
,
signTimeId
,
signType
}
=
introductionVo
;
_this
.
setState
({
activityStateCode
:
activityStateCode
,
activityStateName
:
activityStateName
,
signTimeId
:
signTimeId
,
signType
:
signType
,
});
...
...
@@ -241,7 +247,7 @@ class TrainingSteps extends Component {
}
};
renderContent
=
()
=>
{
renderContent
=
(
code
)
=>
{
let
{
introductionVo
=
{},
hasEnrolled
,
...
...
@@ -268,23 +274,25 @@ class TrainingSteps extends Component {
return
(
<
div
style=
{
{
backgroundColor
:
"#F4F4F4"
}
}
>
{
this
.
renderIntroduction
(
introductionVo
)
}
{
this
.
renderComment
(
reviewListData
,
loadMore
)
}
{
code
!=
"4"
?
this
.
renderComment
(
reviewListData
,
loadMore
)
:
""
}
</
div
>
);
};
render
()
{
let
{
introductionVo
=
{}
}
=
this
.
props
.
TrainingStepsReducer
;
let
{
activityStateCode
,
signTimeId
,
signType
}
=
this
.
state
;
let
{
activityStateCode
,
activityStateName
,
signTimeId
,
signType
}
=
this
.
state
;
let
signUpTitle
=
activityStateCode
==
"1"
?
"待报名"
:
activityStateCode
==
"2"
?
"待签到"
:
activityStateCode
==
"3"
?
"
正在
报名"
?
"
立即
报名"
:
activityStateCode
==
"4"
?
"
正在
签到"
?
"
立即
签到"
:
"进行中"
;
let
signUpColor
=
"#999999"
;
let
signedColor
=
"#d23a29"
;
...
...
@@ -309,15 +317,15 @@ class TrainingSteps extends Component {
{
activityStateCode
==
1
?
(
<
div
className=
"overed"
>
待报名
</
div
>
)
:
activityStateCode
==
2
?
(
<
div
className=
"
overed"
>
待签到
</
div
>
<
div
className=
"
enrolled"
>
已报名
</
div
>
)
:
activityStateCode
==
3
?
(
<
div
className=
"enroll"
>
正在
报名
</
div
>
<
div
className=
"enroll"
>
报名
</
div
>
)
:
activityStateCode
==
4
?
(
<
div
className=
"enrolled"
>
已报名
</
div
>
)
:
activityStateCode
==
5
?
(
<
div
className=
"enrolled"
>
进行中
</
div
>
)
:
activityStateCode
==
6
?
(
<
div
className=
"overed"
>
结束
</
div
>
<
div
className=
"overed"
>
活动
结束
</
div
>
)
:
activityStateCode
==
7
?
(
<
div
className=
"overed"
>
未报名
</
div
>
)
:
activityStateCode
==
8
?
(
...
...
@@ -328,9 +336,11 @@ class TrainingSteps extends Component {
</
div
>
</
div
>
<
div
style=
{
{
width
:
"100%"
,
marginTop
:
0
}
}
>
<
StickyContainer
>
{
this
.
renderContent
()
}
</
StickyContainer
>
<
StickyContainer
>
{
this
.
renderContent
(
activityStateCode
)
}
</
StickyContainer
>
</
div
>
{
{
activityStateCode
!=
"5"
&&
activityStateCode
!=
"6"
?
(
<
Fragment
>
<
div
style=
{
{
width
:
"100%"
,
height
:
88
}
}
></
div
>
<
div
...
...
@@ -348,8 +358,30 @@ class TrainingSteps extends Component {
>
{
signUpTitle
}
</
div
>
<
Modal
title=
"报名成功"
visible=
{
this
.
state
.
baomingModal
}
transparent
maskClosable=
{
false
}
className=
{
"signup-modal"
}
onClose=
{
this
.
baomingHidden
}
footer=
{
[
{
text
:
"确定"
,
onPress
:
()
=>
{
this
.
baomingHidden
();
},
},
]
}
>
<
div
className=
"modal-body"
>
报名成功后,待活动开始,您要在活动现场扫码签到哦
</
div
>
</
Modal
>
</
Fragment
>
}
)
:
(
""
)
}
</
div
>
);
}
...
...
@@ -399,10 +431,15 @@ class TrainingSteps extends Component {
intl.get("To") || "至"
} ${introEndTime && introEndTime}`
}
</
p
>
{
introductionVo
.
organizer
?
(
<
p
>
<
span
>
组织方
</
span
>
:
<
span
>
组织方
</
span
>
:
{
introductionVo
&&
introductionVo
.
organizer
}
</
p
>
)
:
(
""
)
}
<
p
>
<
span
>
活动地点
</
span
>
:
{
introductionVo
&&
introductionVo
.
activityAddress
}
...
...
@@ -439,11 +476,13 @@ class TrainingSteps extends Component {
活动介绍
</
p
>
{
introductionVo
.
videoUrl
?
(
<
div
style=
{
{
width
:
"100%"
,
height
:
"350px"
,
paddingLeft
:
"40px"
,
paddingRight
:
"40px"
,
}
}
>
<
ReactPlayer
...
...
@@ -454,6 +493,27 @@ class TrainingSteps extends Component {
height=
"100%"
/>
</
div
>
)
:
(
introductionVo
.
detailsImage
.
map
((
item
)
=>
{
return
(
<
div
style=
{
{
width
:
"100%"
,
height
:
"280px"
,
paddingLeft
:
"40px"
,
paddingRight
:
"40px"
,
}
}
>
<
img
style=
{
{
width
:
"100%"
,
height
:
"280px"
}
}
src=
{
item
.
img
}
alt=
""
/>
</
div
>
);
})
)
}
<
div
className=
"train-info"
>
<
div
>
<
List
className=
"train-info-contain"
>
...
...
@@ -467,6 +527,7 @@ class TrainingSteps extends Component {
</
div
>
</
div
>
</
div
>
{
introductionVo
.
researchName
?
(
<
div
style=
{
{
marginBottom
:
"20px"
}
}
>
<
p
style=
{
{
...
...
@@ -486,9 +547,14 @@ class TrainingSteps extends Component {
}
}
onClick=
{
()
=>
this
.
toSurvey
(
introductionVo
.
researchId
)
}
>
<
img
className=
"tp-icon"
src=
{
ellipse
}
alt=
""
/>
{
introductionVo
.
researchName
}
</
div
>
</
div
>
)
:
(
<
div
></
div
>
)
}
{
introductionVo
.
point
>
0
?
(
<
div
>
<
p
...
...
@@ -506,6 +572,7 @@ class TrainingSteps extends Component {
paddingLeft
:
"40px"
,
}
}
>
<
img
className=
"tp-icon1"
src=
{
ellipseJf
}
alt=
""
/>
参与活动获得
{
introductionVo
.
point
}
积分
</
div
>
</
div
>
...
...
@@ -695,6 +762,11 @@ class TrainingSteps extends Component {
commitContent
:
""
,
});
};
baomingHidden
=
()
=>
{
this
.
setState
({
baomingModal
:
false
,
});
};
handleCancel
=
()
=>
{
this
.
setState
({
visible
:
false
,
...
...
@@ -702,16 +774,19 @@ class TrainingSteps extends Component {
};
//确认报名
handleOk
=
(
code
,
signTimeId
,
signType
)
=>
{
console
.
log
(
code
,
signTimeId
,
signType
,
"111111111111111111"
);
let
{
id
,
finished
}
=
this
.
props
.
location
.
query
;
if
(
code
==
"4"
)
{
let
_this
=
this
;
let
params
=
{
trainingProjectId
:
id
,
signTimeId
:
signTimeId
,
signType
:
signType
,
};
let
params1
=
{
id
:
id
,
};
this
.
props
.
sign
(
params
,
()
=>
{
_this
.
props
.
trainStepsData
(
finished
,
params
,
()
=>
{
_this
.
props
.
trainStepsData
(
finished
,
params
1
,
()
=>
{
let
{
introductionVo
}
=
_this
.
props
.
TrainingStepsReducer
;
let
{
activityStateCode
}
=
introductionVo
;
_this
.
setState
({
...
...
@@ -730,6 +805,7 @@ class TrainingSteps extends Component {
let
{
activityStateCode
}
=
introductionVo
;
_this
.
setState
({
activityStateCode
:
activityStateCode
,
baomingModal
:
true
,
});
});
});
...
...
src/components/Training/TrainingSteps/TrainingStepsAction.jsx
View file @
e2c7aa96
...
...
@@ -178,10 +178,8 @@ export const lessonEnrollEvent = (params, callBack) => {
NetWork
.
post
(
API
.
courseSignUp
,
params
,
(
response
)
=>
{
try
{
if
(
Number
.
parseInt
(
response
.
code
)
===
1000
)
{
Toast
.
info
(
intl
.
get
(
"PublishKey70"
)
||
"报名成功"
);
callBack
&&
callBack
();
}
else
{
Toast
.
info
(
intl
.
get
(
"PublishKey70"
)
||
"报名成功"
);
}
}
catch
(
e
)
{
console
.
log
(
e
);
...
...
@@ -192,12 +190,17 @@ export const lessonEnrollEvent = (params, callBack) => {
//签到
export
function
sign
(
params
,
callBack
)
{
return
(
dispatch
)
=>
{
return
excute
.
post
(
API
.
signIn
,
params
,
(
res
)
=>
{
callBack
(
res
);
dispatch
({
type
:
SIGN_ACTION
,
data
:
res
,
});
NetWork
.
post
(
API
.
signIn
,
params
,
(
response
)
=>
{
try
{
if
(
Number
.
parseInt
(
response
.
code
)
===
1000
)
{
Toast
.
info
(
"签到成功"
);
callBack
&&
callBack
();
}
else
{
Toast
.
info
(
"签到成功"
);
}
}
catch
(
e
)
{
console
.
log
(
e
);
}
});
};
}
...
...
@@ -296,4 +299,3 @@ export const trainCertificateGet = (data, callback) => {
});
};
};
src/components/Training/TrainingSteps/index.css
View file @
e2c7aa96
...
...
@@ -10,6 +10,16 @@
width
:
40px
;
height
:
40px
;
}
.train-info-view
.tp-icon
{
width
:
24px
!important
;
height
:
24px
;
margin-right
:
15px
;
}
.train-info-view
.tp-icon1
{
width
:
20px
!important
;
height
:
20px
;
margin-right
:
15px
;
}
.BraftEditor-content
{
font-size
:
0.25rem
;
}
...
...
@@ -436,21 +446,21 @@
background-color
:
#53af5c
;
color
:
#fff
;
text-align
:
center
;
padding
:
5px
8
px
;
padding
:
8px
10
px
;
}
.train-info
.enrolled
{
width
:
120px
;
background-color
:
#ffba19
;
color
:
#fff
;
text-align
:
center
;
padding
:
5px
8
px
;
padding
:
8px
10
px
;
}
.train-info
.overed
{
width
:
1
0
0px
;
width
:
1
2
0px
;
background-color
:
#e5e6e8
;
color
:
#a1a1a1
;
text-align
:
center
;
padding
:
5px
8
px
;
padding
:
8px
10
px
;
}
.train-info
p
{
color
:
#fff
;
...
...
@@ -698,6 +708,26 @@
color
:
white
;
text-align
:
center
;
}
.signup-modal
.am-modal-content
{
background
:
linear-gradient
(
180deg
,
#ffe2e2
0%
,
#fff
25%
);
}
.signup-modal
.am-modal-title
{
color
:
#16181a
;
font-weight
:
600
;
}
.signup-modal
.modal-body
{
text-align
:
left
;
margin
:
28px
0
;
}
.signup-modal
.am-modal-button
{
width
:
45%
!important
;
height
:
80px
!important
;
line-height
:
80px
!important
;
margin
:
0
auto
;
color
:
#fff
!important
;
margin-bottom
:
25px
;
background
:
linear-gradient
(
270deg
,
#eb6c53
,
#d23a29
);
}
.train-pay-button-container
{
width
:
100%
;
height
:
128px
;
...
...
src/components/Training/TrainingSteps/index.less
View file @
e2c7aa96
...
...
@@ -7,7 +7,18 @@
height: 40px;
//margin-right: 16px;
}
.train-info-view {
.tp-icon {
width: 24px !important;
height: 24px;
margin-right: 15px;
}
.tp-icon1 {
width: 20px !important;
height: 20px;
margin-right: 15px;
}
}
.color-4a() {
color: #4a4a4a;
}
...
...
@@ -591,21 +602,21 @@
background-color: #53af5c;
color: #fff;
text-align: center;
padding:
5px 8
px;
padding:
8px 10
px;
}
.enrolled {
width: 120px;
background-color: #ffba19;
color: #fff;
text-align: center;
padding:
5px 8
px;
padding:
8px 10
px;
}
.overed {
width: 1
0
0px;
width: 1
2
0px;
background-color: #e5e6e8;
color: #a1a1a1;
text-align: center;
padding:
5px 8
px;
padding:
8px 10
px;
}
p {
color: #fff;
...
...
@@ -885,7 +896,28 @@
color: white;
text-align: center;
}
.signup-modal {
.am-modal-content{
background: linear-gradient(180deg,#ffe2e2 0%,#fff 25%);
}
.am-modal-title {
color: #16181a;
font-weight: 600;
}
.modal-body {
text-align: left;
margin: 28px 0;
}
.am-modal-button{
width: 45% !important;
height: 80px !important;
line-height: 80px !important;
margin: 0 auto;
color: #fff !important;
margin-bottom: 25px;
background:linear-gradient(270deg,#eb6c53, #d23a29);
}
}
.train-pay-button-container {
width: 100%;
height: 128px;
...
...
src/components/common/carousel.jsx
View file @
e2c7aa96
//轮播图
import
React
,
{
Component
}
from
'react'
;
import
{
Carousel
}
from
'antd-mobile'
;
import
fnNavigate
from
'../../util/navDirector'
;
import
React
,
{
Component
}
from
"react"
;
import
{
Carousel
}
from
"antd-mobile"
;
import
fnNavigate
from
"../../util/navDirector"
;
import
"./less/carousel.less"
;
export
default
class
carousel
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
imageIndex
:
0
}
this
.
state
=
{
imageIndex
:
0
,
};
}
autoSlideListen
=
(
index
)
=>
{
autoSlideListen
=
(
index
)
=>
{
this
.
setState
({
imageIndex
:
index
})
}
imageIndex
:
index
,
});
};
imageClick
(
item
)
{
console
.
log
(
item
);
fnNavigate
(
item
,
'banner'
);
fnNavigate
(
item
,
"banner"
);
}
render
()
{
let
{
data
,
carouselparam
,
frameOverflow
}
=
this
.
props
;
const
{
imageIndex
}
=
this
.
state
;
let
carouselItemWidth
=
document
.
body
.
clientWidth
-
60
;
if
(
data
.
length
==
1
)
{
let
{
data
,
carouselparam
}
=
this
.
props
;
if
(
data
.
length
==
1
)
{
return
(
<
div
style=
{
{
width
:
"100%"
,
padding
:
"0 30px"
}
}
>
<
a
key=
{
data
[
0
].
id
}
style=
{
{
display
:
'inline-block'
,
width
:
'100%'
,
padding
:
0
}
}
<
div
style=
{
{
width
:
"100%"
,
padding
:
"0 30px"
}
}
>
<
a
key=
{
data
[
0
].
id
}
style=
{
{
display
:
"inline-block"
,
width
:
"100%"
,
padding
:
0
}
}
onClick=
{
()
=>
this
.
imageClick
(
data
[
0
])
}
className=
{
this
.
props
.
isIndex
?
"carousel-container"
:
''
}
className=
{
this
.
props
.
isIndex
?
"carousel-container"
:
""
}
>
<
img
style=
{
{
...
...
@@ -48,7 +44,7 @@ export default class carousel extends Component {
alt=
"icon"
onLoad=
{
()
=>
{
// fire window resize event to change height
window
.
dispatchEvent
(
new
Event
(
'resize'
));
window
.
dispatchEvent
(
new
Event
(
"resize"
));
this
.
setState
({
initialHeight
:
null
,
});
...
...
@@ -56,33 +52,36 @@ export default class carousel extends Component {
/>
</
a
>
</
div
>
);
}
else
{
return
(
<
div
className=
{
this
.
props
.
isIndex
?
"carousel-index-container"
:
''
}
style=
{
{
width
:
"100%"
}
}
>
<
div
className=
{
this
.
props
.
isIndex
?
"carousel-index-container"
:
""
}
style=
{
{
width
:
"100%"
}
}
>
<
Carousel
className=
"my-index-carousel"
autoplay=
{
true
}
infinite=
{
true
}
dots=
{
tru
e
}
dots=
{
fals
e
}
swipeSpeed=
{
35
}
afterChange=
{
this
.
autoSlideListen
}
afterChange=
{
this
.
autoSlideListen
}
>
{
data
.
map
((
item
,
index
)
=>
(
<
a
key=
{
index
}
<
a
key=
{
index
}
style=
{
{
display
:
'block'
,
height
:
carouselparam
.
height
,
display
:
"block"
,
height
:
carouselparam
.
height
+
80
,
borderRadius
:
carouselparam
.
radius
,
overflow
:
"hidden"
,
position
:
"relative"
position
:
"relative"
,
}
}
onClick=
{
()
=>
this
.
imageClick
(
item
)
}
>
<
img
style=
{
{
height
:
carouselparam
.
height
,
height
:
carouselparam
.
height
+
80
,
borderRadius
:
carouselparam
.
radius
,
width
:
"100%"
,
}
}
...
...
@@ -90,19 +89,32 @@ export default class carousel extends Component {
alt=
"icon"
onLoad=
{
()
=>
{
// fire window resize event to change height
window
.
dispatchEvent
(
new
Event
(
'resize'
));
window
.
dispatchEvent
(
new
Event
(
"resize"
));
this
.
setState
({
initialHeight
:
null
,
});
}
}
/>
<
div
style=
{
{
width
:
"100%"
,
textAlign
:
"center"
,
color
:
"#fff"
,
fontSize
:
"26px"
,
position
:
"absolute"
,
bottom
:
"20px"
,
textOverflow
:
"ellipsis"
,
whiteSpace
:
"nowrap"
,
overflow
:
"hidden"
,
}
}
>
{
item
.
imgTitle
}
</
div
>
</
a
>
))
}
</
Carousel
>
</
div
>
);
}
}
}
src/components/indexComponent/index.jsx
View file @
e2c7aa96
...
...
@@ -5,7 +5,6 @@ import {
getHomeShowConfig
,
getHomeTemplateConfig
,
getModubleById
,
getVisitCount
,
getReportHome
,
getTaskModuleState
,
getCalendarList
,
...
...
@@ -199,7 +198,7 @@ function mapDispatchToProps(dispatch) {
// getHomeTemplateConfig: (data, callback) => dispatch(getHomeTemplateConfig(data, callback)),
// getModubleById: (data, callback) => dispatch(getModubleById(data, callback)),
// getVisitCount: (callback) => dispatch(getVisitCount(callback)),
// getReportHome: (data, callback) => dispatch(getReportHome(data, callback)),
getTaskModuleState
:
(
callback
)
=>
dispatch
(
getTaskModuleState
(
callback
)),
getCalendarList
:
(
data
,
callback
)
=>
...
...
src/components/menulearn/menulearn.jsx
View file @
e2c7aa96
...
...
@@ -3,11 +3,11 @@ import { Rate, Icon } from "antd";
import
{
SearchBar
,
WhiteSpace
,
Toast
}
from
"antd-mobile"
;
import
{
hashHistory
}
from
"react-router"
;
import
{
connect
}
from
"react-redux"
;
import
moment
from
"moment"
;
import
{
getHomeShowConfig
,
getHomeTemplateConfig
,
getModubleById
,
getVisitCount
,
getReportHome
,
getCalendarList
,
getAssToken
,
...
...
@@ -19,7 +19,6 @@ import Mycarousel from "../common/carousel";
//我是有底线的
import
Footline
from
"../../common/footer/footer"
;
import
NoticeBlock
from
"../../common/noticeblock/index"
;
import
VisitCount
from
"./visitCount"
;
//平台报告浮窗
import
func
from
"../../util/commonFunc"
;
...
...
@@ -57,7 +56,7 @@ function mapDispatchToProps(dispatch) {
getModubleById
:
(
data
,
callback
)
=>
dispatch
(
getModubleById
(
data
,
callback
)),
getVisitCount
:
(
callback
)
=>
dispatch
(
getVisitCount
(
callback
)),
getReportHome
:
(
data
,
callback
)
=>
dispatch
(
getReportHome
(
data
,
callback
)),
getCalendarList
:
(
data
,
callback
)
=>
dispatch
(
getCalendarList
(
data
,
callback
)),
...
...
@@ -349,7 +348,7 @@ class Menulearn extends React.Component {
{
/* 轮播图 */
}
<
div
className=
"carouseldiv"
>
<
div
style=
{
{
height
:
bannerHeight
,
position
:
"relative"
}
}
>
<
div
style=
{
{
height
:
bannerHeight
+
80
,
position
:
"relative"
}
}
>
{
carouselData
&&
carouselData
.
length
>
0
?
(
<
Mycarousel
carouselparam=
{
carouselparam
}
...
...
@@ -364,7 +363,6 @@ class Menulearn extends React.Component {
/>
)
}
</
div
>
<
VisitCount
getVisitCount=
{
this
.
props
.
getVisitCount
}
/>
</
div
>
{
/* 选项卡 */
}
...
...
@@ -386,7 +384,7 @@ class Menulearn extends React.Component {
display
:
"inline-block"
,
width
:
"9px"
,
height
:
"34px"
,
background
:
'linear-gradient(180deg,#fe742b, #fc5b2b 100%)'
,
background
:
"linear-gradient(180deg,#fe742b, #fc5b2b 100%)"
,
marginLeft
:
"4%"
,
marginRight
:
"1%"
,
}
}
...
...
@@ -418,8 +416,6 @@ class Menulearn extends React.Component {
<
IndexModuleContainer
/>
{
/* 底部 */
}
{
this
.
state
.
showFooter
&&
false
?
(
<
Footline
...
...
@@ -458,6 +454,7 @@ const NewsItemList = ({ list, onClick }) => {
image
:
item
.
logoPath
||
newsDefaultImage
,
number
:
item
.
number
,
releaseTime
:
item
.
releaseTime
,
author
:
item
.
author
,
};
if
(
index
<
list
.
length
-
1
)
{
return
(
...
...
@@ -503,20 +500,11 @@ const IndexNewsItem = ({ data, onClick }) => {
>
<
div
className=
"index-module-news-item-info-name"
>
{
data
.
name
}
</
div
>
<
div
className=
"index-module-news-item-info-text"
>
<
img
src=
{
newsClockIcon
}
alt=
""
className=
"index-module-news-item-info-icon"
/>
{
func
.
dateFormat
(
data
.
releaseTime
,
false
,
true
)
}
<
Icon
type=
"eye"
style=
{
{
fontSize
:
24
,
marginRight
:
10
,
marginLeft
:
60
}
}
/>
{
data
.
number
}
<
span
style=
{
{
marginRight
:
'20px'
}
}
>
{
data
.
author
}
</
span
>
{
moment
(
data
.
releaseTime
).
format
(
"YYYY-MM-DD"
)
}
</
div
>
</
div
>
</
div
>
</
div
>
);
};
\ No newline at end of file
};
src/components/menulearn/visitCount/index.jsx
deleted
100644 → 0
View file @
1d552aef
import
React
,
{
Component
}
from
"react"
;
import
"./style.less"
;
import
intl
from
"react-intl-universal"
;
class
VisitCount
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
visitCount
:
0
};
this
.
visitCountTimer
=
null
;
this
.
refreshVisitCountByTime
=
this
.
refreshVisitCountByTime
.
bind
(
this
);
}
componentDidMount
()
{
const
{
getVisitCount
}
=
this
.
props
;
let
_this
=
this
;
getVisitCount
((
visitCount
)
=>
{
_this
.
setState
({
visitCount
});
});
}
refreshVisitCountByTime
()
{
const
{
getVisitCount
}
=
this
.
props
;
let
_this
=
this
;
this
.
visitCountTimer
=
setInterval
(()
=>
{
getVisitCount
((
visitCount
)
=>
{
_this
.
setState
({
visitCount
});
if
(
visitCount
<=
0
)
{
clearInterval
(
_this
.
visitCountTimer
);
}
});
},
3
*
60
*
1000
);
}
render
()
{
if
(
this
.
state
.
visitCount
>
0
)
{
return
<
div
className=
"visit-people-count"
>
{
intl
.
get
(
"Visits"
)
}
:
{
this
.
state
.
visitCount
}
</
div
>;
}
else
{
return
<
div
style=
{
{
display
:
"none"
}
}
></
div
>;
}
}
}
export
default
VisitCount
;
\ No newline at end of file
src/components/menulearn/visitCount/style.less
deleted
100644 → 0
View file @
1d552aef
.visit-people-count{
position: absolute;
height: 42px;
line-height: 42px;
font-size: 24px;
color: #fff;
left: 30px;
top: 44px;
background-color: rgba(0,0,0,0.5);
padding: 0 12px;
border-radius: 5px;
}
\ No newline at end of file
src/components/menutrain/MenuTrain.jsx
View file @
e2c7aa96
...
...
@@ -30,7 +30,6 @@ class MenuTrain extends Component {
inHeight
:
document
.
documentElement
.
clientHeight
,
isLoading
:
false
,
trainDataList
:
[],
trainDataList
:
[],
carouselParam
:
{
height
:
carouselHeight
,
radius
:
"0.1rem"
,
...
...
src/components/menutrain/MenuTrainAction.js
View file @
e2c7aa96
...
...
@@ -55,7 +55,9 @@ function itemList(item) {
id
:
item
.
id
,
finished
:
item
.
finished
,
activitieNum
:
item
.
activitieNum
,
activityName
:
item
.
activityName
,
activityStateCode
:
item
.
activityStateCode
,
activityStateName
:
item
.
activityStateName
,
period
:
item
.
period
,
trainingDurationShow
:
item
.
trainingDurationShow
,
enablePay
:
item
.
enablePay
...
...
src/components/menutrain/trainIndexList/index.jsx
View file @
e2c7aa96
...
...
@@ -63,26 +63,12 @@ const TrainItem = ({ data, onClick }) => {
<
div
className=
"train-index-list-item-container"
onClick=
{
onClick
}
>
<
img
src=
{
data
.
image
}
alt=
""
className=
"train-index-list-item-image"
/>
<
div
style=
{
{
display
:
"flex"
,
alignItems
:
"end"
}
}
>
<
div
className=
"train-index-list-item-info"
>
<
div
className=
"train-index-list-item-info"
style=
{
{
display
:
'flex'
,
flexDirection
:
'column'
,
justifyContent
:
'space-between'
}
}
>
<
div
className=
"train-index-list-item-info-name"
>
{
data
.
text
}
</
div
>
<
div
className=
"train-index-list-item-info-text"
>
<
IconfontD
code=
{
"iconnumberofactivities"
}
style=
{
{
fontSize
:
28
,
marginRight
:
6
}
}
/>
{
data
.
activitieNum
}
{
intl
.
get
(
"AtLeastFinish2"
)
}
{
parseInt
(
data
.
enablePay
)
==
1
?
(
<
TrigleTagComponent
text=
{
intl
.
get
(
"payTheBill"
)
||
"付费"
}
/>
)
:
(
""
)
}
</
div
>
<
div
className=
"train-index-list-item-info-text"
style=
{
{
marginTop
:
16
}
}
>
{
data
.
trainTimeStr
}
<
span
style=
{
{
marginRight
:
'10px'
}
}
>
{
data
.
activityName
}
</
span
>
{
data
.
trainTimeStr
}
</
div
>
</
div
>
<
div
...
...
@@ -94,23 +80,7 @@ const TrainItem = ({ data, onClick }) => {
:
"train-enroll-status"
}
>
{
data
.
activityStateCode
==
1
?
" 待报名"
:
data
.
activityStateCode
==
2
?
"待签到"
:
data
.
activityStateCode
==
3
?
"正在报名"
:
data
.
activityStateCode
==
4
?
"已报名"
:
data
.
activityStateCode
==
5
?
"进行中"
:
data
.
activityStateCode
==
6
?
"结束"
:
data
.
activityStateCode
==
7
?
"未报名"
:
data
.
activityStateCode
==
8
?
"未签到"
:
""
}
<
span
>
{
data
.
activityStateName
}
</
span
>
</
div
>
</
div
>
</
div
>
...
...
src/components/menutrain/trainIndexList/style.css
View file @
e2c7aa96
...
...
@@ -56,7 +56,7 @@
text-align
:
center
;
}
.train-index-list-container
.train-index-list-item-container
.train-enroll-status
{
width
:
1
5
0px
;
width
:
1
6
0px
;
border-radius
:
50px
;
padding
:
5px
15px
;
font-size
:
30px
;
...
...
@@ -65,7 +65,7 @@
color
:
#d23a29
;
}
.train-index-list-container
.train-index-list-item-container
.train-sign-status
{
width
:
1
5
0px
;
width
:
1
6
0px
;
border-radius
:
50px
;
padding
:
5px
15px
;
font-size
:
30px
;
...
...
@@ -74,7 +74,7 @@
color
:
#fff
;
}
.train-index-list-container
.train-index-list-item-container
.train-end-status
{
width
:
1
5
0px
;
width
:
1
6
0px
;
border-radius
:
50px
;
padding
:
5px
15px
;
font-size
:
30px
;
...
...
src/components/menutrain/trainIndexList/style.less
View file @
e2c7aa96
...
...
@@ -46,7 +46,7 @@
text-align: center;
}
.train-enroll-status {
width: 1
5
0px;
width: 1
6
0px;
border-radius: 50px;
padding: 5px 15px;
font-size: 30px;
...
...
@@ -55,7 +55,7 @@
color: #d23a29;
}
.train-sign-status {
width: 1
5
0px;
width: 1
6
0px;
border-radius: 50px;
padding: 5px 15px;
font-size: 30px;
...
...
@@ -64,7 +64,7 @@
color: #fff;
}
.train-end-status {
width: 1
5
0px;
width: 1
6
0px;
border-radius: 50px;
padding: 5px 15px;
font-size: 30px;
...
...
src/redux/action/home/home.js
View file @
e2c7aa96
...
...
@@ -75,16 +75,6 @@ export function getModuleByIdRefresh(param,callback) {
});
};
}
export
function
getVisitCount
(
callback
)
{
let
url
=
api
.
homeUrl
+
"/api/portal/pc/look/num?terminalType=3"
+
"&t="
+
new
Date
().
getTime
();
return
dispatch
=>
{
return
excute
.
get
(
url
,(
json
)
=>
{
if
(
callback
){
callback
(
json
.
data
||
0
);
}
});
};
}
// GET /api/portal/getReport 获取首页配置的平台报告
export
const
getReportHome
=
(
data
,
callback
)
=>
{
return
dispatch
=>
{
...
...
src/util/fetchUtil.js
View file @
e2c7aa96
...
...
@@ -81,10 +81,6 @@ var commonFetch = {
callback
(
data
);
}
}
else
{
if
(
url
.
indexOf
(
"public/wechat/get/signature"
)
!=
-
1
||
url
.
indexOf
(
"api/portal/bottomMenu/list"
)
!=
-
1
)
{
return
;
}
if
(
url
.
indexOf
(
"system/api/loginApp"
)
!=
-
1
)
{
Toast
.
info
(
intl
.
get
(
data
.
subMsg
)
?
intl
.
get
(
data
.
subMsg
)
:
...
...
@@ -173,9 +169,6 @@ var commonFetch = {
callback
(
data
);
}
}
else
{
if
(
url
.
indexOf
(
"public/wechat/get/signature"
)
!=
-
1
)
{
return
;
}
if
(
url
.
indexOf
(
"system/api/loginApp"
)
!=
-
1
)
{
Toast
.
info
(
intl
.
get
(
data
.
subMsg
)
?
intl
.
get
(
data
.
subMsg
)
:
...
...
@@ -338,9 +331,6 @@ var commonFetch = {
callback
(
data
);
}
}
else
{
if
(
url
.
indexOf
(
"public/wechat/get/signature"
)
!=
-
1
)
{
return
;
}
if
(
data
.
subMsg
)
{
Toast
.
info
(
intl
.
get
(
data
.
subMsg
)
?
intl
.
get
(
data
.
subMsg
)
:
...
...
@@ -464,9 +454,6 @@ var commonFetch = {
callback
(
data
);
}
}
else
{
if
(
url
.
indexOf
(
"public/wechat/get/signature"
)
!=
-
1
)
{
return
;
}
if
(
data
.
subMsg
)
{
Toast
.
info
(
intl
.
get
(
data
.
subMsg
)
?
intl
.
get
(
data
.
subMsg
)
:
...
...
@@ -542,9 +529,6 @@ var commonFetch = {
callback
(
data
);
}
}
else
{
if
(
url
.
indexOf
(
"public/wechat/get/signature"
)
!=
-
1
)
{
return
;
}
if
(
data
.
subMsg
)
{
Toast
.
info
(
intl
.
get
(
data
.
subMsg
)
?
intl
.
get
(
data
.
subMsg
)
:
...
...
src/util/urlconfig.js
View file @
e2c7aa96
...
...
@@ -19,24 +19,11 @@ if (
host
.
indexOf
(
"1"
)
!=
-
1
||
host
.
indexOf
(
"172."
)
!=
-
1
)
{
//本地浏览器使用localhost时
//开发环境
baseUrl
=
"http://192.168.1.106:8090"
;
//生产环境
// baseUrl = "http://10.23.1.180:8090";
// baseUrl = 'http://dev.wechat.kmelearning.com';
baseUrl
=
"http://10.23.1.180:8090"
;
// baseUrl = 'https://uat.wechat.kmelearning.com';
// baseUrl = 'https://sasswx.kmelearning.com';
// baseUrl = 'http://dev.wechat.kmelearning.com';
// baseUrl = 'http://192.168.1.22:31043';
// baseUrl = 'http://localhost:8003';
// baseUrl = 'http://192.168.1.22:31061';
// baseUrl = 'http://localhost:8003';
// baseUrl = 'https://wechat.kmelearning.com';
}
else
if
(
host
.
indexOf
(
"192.168.1.131"
)
!=
-
1
||
host
.
indexOf
(
"192.168.2.23"
)
!=
-
1
...
...
@@ -218,8 +205,8 @@ const url = {
myShareUrl
:
`
${
baseUrl
}${
WEBSTUDENT
}
api/marketing/course/share/list`
,
//我分享的课程被浏览数
myShareLeSeeUrl
:
`
${
baseUrl
}${
WEBSTUDENT
}
api/marketing/course/share/browse/records`
,
//微信签名
signatureUrl
:
`
${
baseUrl
}${
WEBSTUDENT
}
public/wechat/get/signature`
,
accessToken
:
`
${
baseUrl
}${
WEBSTUDENT
}
public/wechat/get/token`
,
//签到
signIn
:
`
${
baseUrl
}${
WEBSTUDENT
}
api/sign/scan`
,
...
...
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