Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
87673eb6
Commit
87673eb6
authored
Apr 22, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ml小课统计
parent
c57c0d68
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
src/components/ml/pythomDes/Experience/index.js
+1
-1
src/components/ml/pythomDes/index.js
+13
-3
No files found.
src/components/ml/pythomDes/Experience/index.js
View file @
87673eb6
...
@@ -20,7 +20,7 @@ export default class Experience extends Component {
...
@@ -20,7 +20,7 @@ export default class Experience extends Component {
<
/div
>
<
/div
>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/r%402x.png"
alt
=
""
/>
<
img
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/h5_python_class/r%402x.png"
alt
=
""
/>
<
/div
>
<
/div
>
<
div
className
=
{
'btn'
}
onClick
=
{
tryLearn
}
>
立即体验
<
/div
>
<
div
className
=
{
'btn'
}
onClick
=
{
()
=>
{
tryLearn
(
1
)}
}
>
立即体验
<
/div
>
<
/
>
<
/
>
)
)
:
(
:
(
...
...
src/components/ml/pythomDes/index.js
View file @
87673eb6
...
@@ -12,7 +12,7 @@ import ShareRank from "@components/detail/shareRank"
...
@@ -12,7 +12,7 @@ import ShareRank from "@components/detail/shareRank"
import
{
http
,
getParam
,
SendMessageToApp
,
}
from
'@/utils'
import
{
http
,
getParam
,
SendMessageToApp
,
}
from
'@/utils'
import
{
connect
}
from
'react-redux'
import
{
connect
}
from
'react-redux'
import
{
Toast
}
from
"antd-mobile"
import
{
Toast
}
from
"antd-mobile"
import
{
CallApp
}
from
"@common/index"
import
{
CallApp
}
from
"@common/index"
@
connect
(
state
=>
({
@
connect
(
state
=>
({
user
:
state
.
user
user
:
state
.
user
...
@@ -35,6 +35,7 @@ class PythonDes extends Component {
...
@@ -35,6 +35,7 @@ class PythonDes extends Component {
// 立即报名
// 立即报名
signUp
=
()
=>
{
signUp
=
()
=>
{
this
.
statistics
(
3
)
// 已登录
// 已登录
if
(
!
this
.
props
.
user
.
hasError
)
{
if
(
!
this
.
props
.
user
.
hasError
)
{
this
.
toDetail
()
this
.
toDetail
()
...
@@ -44,7 +45,8 @@ class PythonDes extends Component {
...
@@ -44,7 +45,8 @@ class PythonDes extends Component {
}
}
// 立即体验、免费试学
// 立即体验、免费试学
tryLearn
=
()
=>
{
tryLearn
=
type
=>
{
this
.
statistics
(
type
)
// 已登录
// 已登录
if
(
!
this
.
props
.
user
.
hasError
)
{
if
(
!
this
.
props
.
user
.
hasError
)
{
this
.
toLearn
()
this
.
toLearn
()
...
@@ -169,6 +171,11 @@ class PythonDes extends Component {
...
@@ -169,6 +171,11 @@ class PythonDes extends Component {
}
}
}
}
// 统计
statistics
=
type
=>
{
http
.
post
(
`
${
API
.
home
}
/web/it_click_num/
${
getParam
(
'id'
)}
`
,
{
type
})
}
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
if
(
this
.
props
.
isAppUpdate
!==
nextProps
.
isAppUpdate
)
{
if
(
this
.
props
.
isAppUpdate
!==
nextProps
.
isAppUpdate
)
{
...
@@ -207,7 +214,10 @@ class PythonDes extends Component {
...
@@ -207,7 +214,10 @@ class PythonDes extends Component {
<
/div
>
<
/div
>
<
div
className
=
{
'btn__group'
}
>
<
div
className
=
{
'btn__group'
}
>
<
div
className
=
{
'try__study'
}
onClick
=
{
this
.
tryLearn
}
>
免费试学
<
/div
>
<
div
className
=
{
'try__study'
}
onClick
=
{()
=>
{
this
.
tryLearn
(
2
)
}}
>
免费试学
<
/div
>
<
div
className
=
{
'sign__now'
}
onClick
=
{
this
.
signUp
}
>
立即报名
<
/div
>
<
div
className
=
{
'sign__now'
}
onClick
=
{
this
.
signUp
}
>
立即报名
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
...
...
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