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
8430b14d
Commit
8430b14d
authored
May 07, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
412ed223
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
src/components/ml/index.js
+6
-3
src/components/ml/pythomDes/index.js
+3
-1
src/components/ml/pythonStudy/index.js
+3
-1
No files found.
src/components/ml/index.js
View file @
8430b14d
...
...
@@ -20,6 +20,7 @@ class ML extends Component {
super
(
props
)
this
.
state
=
{
isPay
:
''
,
buyTry
:
''
,
userInfoList
:
[],
isAppUpdate
:
false
,
backwardVersion
:
false
,
// 默认是新版本
...
...
@@ -205,7 +206,8 @@ class ML extends Component {
}
else
{
this
.
setState
({
backwardVersion
:
false
,
isPay
:
data
.
course_info
.
is_pay
isPay
:
data
.
course_info
.
is_pay
,
buyTry
:
data
.
course_info
.
buy_try
})
}
}
...
...
@@ -213,7 +215,7 @@ class ML extends Component {
}
render
()
{
const
{
isPay
,
isAppUpdate
,
backwardVersion
,
isWxlogin
}
=
this
.
state
const
{
isPay
,
buyTry
,
isAppUpdate
,
backwardVersion
,
isWxlogin
}
=
this
.
state
// 旧版本 无论购买未购买 都跳转到 未购买的详情页; 如果是已购买就提示更新APP
return
(
<
div
>
...
...
@@ -225,11 +227,12 @@ class ML extends Component {
history
=
{
this
.
props
.
history
}
isAppUpdate
=
{
isAppUpdate
}
isPay
=
{
isPay
}
buyTry
=
{
buyTry
}
/
>
)
}
{
(
isPay
===
1
&&
!
getParam
(
'version'
))
&&
<
PythonStudy
isAppUpdate
=
{
isAppUpdate
}
/
>
(
isPay
===
1
&&
!
getParam
(
'version'
))
&&
<
PythonStudy
isAppUpdate
=
{
isAppUpdate
}
buyTry
=
{
buyTry
}
/
>
}
{
...
...
src/components/ml/pythomDes/index.js
View file @
8430b14d
...
...
@@ -186,7 +186,9 @@ class PythonDes extends Component {
}
getStatus
=
()
=>
{
http
.
get
(
`
${
API
[
'home'
]}
/web/it_detail?course_id=
${
getParam
(
'id'
)}
`
).
then
(
res
=>
{
const
{
buyTry
}
=
this
.
props
http
.
get
(
`
${
API
[
'home'
]}
/web/it_detail?course_id=
${
getParam
(
'id'
)}
&buy_try=
${
buyTry
}
`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
==
200
)
{
this
.
setState
({
...
...
src/components/ml/pythonStudy/index.js
View file @
8430b14d
...
...
@@ -25,7 +25,9 @@ class PythonStudy extends Component {
}
fetchCourseDetail
=
()
=>
{
http
.
get
(
`
${
API
[
'home'
]}
/web/it_detail?course_id=
${
getParam
(
'id'
)}
&is_pay=1`
).
then
(
res
=>
{
const
{
buyTry
}
=
this
.
props
http
.
get
(
`
${
API
[
'home'
]}
/web/it_detail?course_id=
${
getParam
(
'id'
)}
&is_pay=1&buy_try=
${
buyTry
}
`
).
then
(
res
=>
{
const
{
data
,
code
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
this
.
setState
({
...
...
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