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
f0a0d703
Commit
f0a0d703
authored
Aug 20, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.julyedu.com:baiguangyao/mr-julyedu
parents
c1c3550f
207a67c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
9 deletions
+21
-9
src/components/detail/group/togroup.js
+3
-2
src/components/detail/index.js
+2
-1
src/components/my/index.js
+15
-5
src/components/order/index.js
+1
-1
No files found.
src/components/detail/group/togroup.js
View file @
f0a0d703
...
@@ -2,12 +2,13 @@ import React, { Component } from 'react'
...
@@ -2,12 +2,13 @@ import React, { Component } from 'react'
import
'./togroup.scss'
import
'./togroup.scss'
import
{
HeaderBar
,
VList
}
from
'../../../common'
import
{
HeaderBar
,
VList
}
from
'../../../common'
import
{
api
,
getParam
,
http
,
browser
}
from
"@/utils"
;
import
{
getParam
,
http
,
browser
}
from
"@/utils"
;
import
{
connect
}
from
"react-redux"
import
{
connect
}
from
"react-redux"
import
{
Link
}
from
"react-router-dom"
import
{
Link
}
from
"react-router-dom"
import
{
WingBlank
,
WhiteSpace
,
Flex
,
Toast
}
from
'antd-mobile'
import
{
WingBlank
,
WhiteSpace
,
Flex
,
Toast
}
from
'antd-mobile'
import
{
getCourses
}
from
'./../../detail/actions'
;
@
connect
()
class
ToGroup
extends
Component
{
class
ToGroup
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
...
...
src/components/detail/index.js
View file @
f0a0d703
...
@@ -38,7 +38,8 @@ class Detail extends Component {
...
@@ -38,7 +38,8 @@ class Detail extends Component {
this
.
props
.
getCourses
();
this
.
props
.
getCourses
();
}
}
const
{
courseInfo
}
=
this
.
props
;
const
{
courseInfo
}
=
this
.
props
;
if
(
courseInfo
.
is_bargain
)
{
console
.
log
(
this
.
props
);
if
(
courseInfo
.
course_info
.
is_bargain
)
{
this
.
getBargainInfo
();
this
.
getBargainInfo
();
}
}
}
}
...
...
src/components/my/index.js
View file @
f0a0d703
...
@@ -7,10 +7,14 @@ import {WithTab} from '@/HOCs'
...
@@ -7,10 +7,14 @@ import {WithTab} from '@/HOCs'
import
{
Link
}
from
"react-router-dom"
import
{
Link
}
from
"react-router-dom"
import
{
connect
}
from
"react-redux"
import
{
connect
}
from
"react-redux"
import
{
HeaderBar
}
from
"@/common"
import
{
HeaderBar
}
from
"@/common"
import
{
getCourses
}
from
'./../detail/actions'
;
const
Item
=
List
.
Item
;
const
Item
=
List
.
Item
;
const
Brief
=
Item
.
Brief
;
const
Brief
=
Item
.
Brief
;
@
connect
(
state
=>
({
user
:
state
.
user
}))
class
My
extends
PureComponent
{
class
My
extends
PureComponent
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
)
super
(
props
)
...
@@ -24,6 +28,14 @@ class My extends PureComponent {
...
@@ -24,6 +28,14 @@ class My extends PureComponent {
this
.
props
.
history
.
push
(
'/passport'
)
this
.
props
.
history
.
push
(
'/passport'
)
}
}
toCourseDetail
=
(
id
)
=>
{
const
{
dispatch
,
history
}
=
this
.
props
;
dispatch
(
getCourses
(
id
,
()
=>
{
history
.
push
(
`/detail?id=
${
id
}
`
);
return
false
;
}));
}
render
()
{
render
()
{
const
{
user
}
=
this
.
props
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
...
@@ -64,7 +76,8 @@ class My extends PureComponent {
...
@@ -64,7 +76,8 @@ class My extends PureComponent {
<
/Link
>
<
/Link
>
{
{
(
isVIP
===
0
||
!
isVIP
)
&&
(
isVIP
===
0
||
!
isVIP
)
&&
<
Link
className
=
"my-isvip"
to
=
{
`/detail?id=139`
}
><
/Link
>
<
a
href
=
"javascript:;"
className
=
"my-isvip"
onClick
=
{()
=>
this
.
toCourseDetail
(
139
)}
><
/a
>
// <Link className="my-isvip" to={`/detail?id=139`}></Link>
}
}
<
/List
>
<
/List
>
}
}
...
@@ -127,7 +140,4 @@ class My extends PureComponent {
...
@@ -127,7 +140,4 @@ class My extends PureComponent {
}
}
export
default
connect
(
export
default
WithTab
(
My
);
state
=>
({
user
:
state
.
user
}),
null
)(
WithTab
(
My
))
src/components/order/index.js
View file @
f0a0d703
...
@@ -127,7 +127,7 @@ class Order extends Component {
...
@@ -127,7 +127,7 @@ class Order extends Component {
if
(
res
.
data
.
errno
===
200
)
{
if
(
res
.
data
.
errno
===
200
)
{
sessionStorage
.
removeItem
(
'orderUseCacheObj'
);
sessionStorage
.
removeItem
(
'orderUseCacheObj'
);
if
(
res
.
data
.
data
.
pay_jump
===
1
)
{
if
(
res
.
data
.
data
.
pay_jump
===
1
)
{
this
.
props
.
history
.
push
(
`/togroup?id=
${
res
.
data
.
data
.
o
rder_
id
}
`
);
this
.
props
.
history
.
push
(
`/togroup?id=
${
res
.
data
.
data
.
oid
}
`
);
return
;
return
;
}
}
this
.
props
.
history
.
replace
(
`/payorder?oid=
${
res
.
data
.
data
.
oid
}
`
);
this
.
props
.
history
.
replace
(
`/payorder?oid=
${
res
.
data
.
data
.
oid
}
`
);
...
...
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