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
6a604060
Commit
6a604060
authored
Aug 21, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify tip not login when get into kanjia course detial
parent
f7077b39
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
12 deletions
+48
-12
src/components/detail/bargain/index.js
+16
-9
src/components/detail/index.js
+32
-3
No files found.
src/components/detail/bargain/index.js
View file @
6a604060
...
@@ -27,7 +27,7 @@ class Bargain extends Component {
...
@@ -27,7 +27,7 @@ class Bargain extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
getBargainInfo
()
//
this.getBargainInfo()
}
}
// 获取助理好友
// 获取助理好友
...
@@ -119,7 +119,8 @@ class Bargain extends Component {
...
@@ -119,7 +119,8 @@ class Bargain extends Component {
}
}
// 继续砍价
// 继续砍价
continueBargain
=
()
=>
{
continueBargain
=
()
=>
{
const
code
=
this
.
state
.
bargainCode
const
{
barInfo
=
{}
}
=
this
.
props
;
const
code
=
barInfo
.
bargain_code
;
this
.
props
.
history
.
push
(
`/bargain-middle-page?id=
${
getParam
(
'id'
)}
&bargaincode=
${
code
}
&is_originator=1`
)
this
.
props
.
history
.
push
(
`/bargain-middle-page?id=
${
getParam
(
'id'
)}
&bargaincode=
${
code
}
&is_originator=1`
)
}
}
...
@@ -170,18 +171,19 @@ class Bargain extends Component {
...
@@ -170,18 +171,19 @@ class Bargain extends Component {
}
}
render
()
{
render
()
{
const
{
list
,
outList
,
barInfo
}
=
this
.
props
;
return
(
return
(
<
div
className
=
{
'bargain-func'
}
>
<
div
className
=
{
'bargain-func'
}
>
{
/*bargain_status 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买*/
}
{
/*bargain_status 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买*/
}
{
{
this
.
state
.
i
nfo
.
bargain_status
===
2
&&
barI
nfo
.
bargain_status
===
2
&&
<
BargainIntro
limitPeople
=
{
this
.
state
.
limitPeople
}
iWantBargain
=
{
this
.
iWantBargain
}
/
>
<
BargainIntro
limitPeople
=
{
barInfo
.
limitPeople
}
iWantBargain
=
{
this
.
iWantBargain
}
/
>
}
}
{
{
(
this
.
state
.
info
.
bargain_status
===
0
||
this
.
state
.
i
nfo
.
bargain_status
===
1
)
&&
(
barInfo
.
bargain_status
===
0
||
barI
nfo
.
bargain_status
===
1
)
&&
<
BargainStatus
<
BargainStatus
info
=
{
this
.
state
.
i
nfo
}
info
=
{
barI
nfo
}
outList
=
{
this
.
state
.
outList
}
outList
=
{
outList
}
getMore
=
{
this
.
getMore
}
getMore
=
{
this
.
getMore
}
toArtifact
=
{
this
.
toArtifact
}
toArtifact
=
{
this
.
toArtifact
}
useArtifact
=
{
this
.
useArtifact
}
useArtifact
=
{
this
.
useArtifact
}
...
@@ -222,8 +224,13 @@ class Bargain extends Component {
...
@@ -222,8 +224,13 @@ class Bargain extends Component {
{
/*更多好友砍价*/
}
{
/*更多好友砍价*/
}
<
Ranking
list
=
{
this
.
state
.
list
}
icon
=
{
this
.
state
.
kanjiaIcon
}
limitPeople
=
{
this
.
state
.
limitPeople
}
<
Ranking
isShowMore
=
{
this
.
state
.
isShowMore
}
boxHide
=
{
this
.
boxHide
}
><
/Ranking
>
list
=
{
list
}
icon
=
{
this
.
state
.
kanjiaIcon
}
limitPeople
=
{
barInfo
.
limitPeople
}
isShowMore
=
{
this
.
state
.
isShowMore
}
boxHide
=
{
this
.
boxHide
}
/
>
<
/div
>
<
/div
>
)
)
...
...
src/components/detail/index.js
View file @
6a604060
...
@@ -29,6 +29,8 @@ class Detail extends Component {
...
@@ -29,6 +29,8 @@ class Detail extends Component {
barInfo
:
''
,
barInfo
:
''
,
share
:
false
,
share
:
false
,
countdown
:
'00:00:00'
,
countdown
:
'00:00:00'
,
outList
:
[],
list
:
[],
}
}
}
}
...
@@ -156,6 +158,29 @@ class Detail extends Component {
...
@@ -156,6 +158,29 @@ class Detail extends Component {
if
(
res
.
data
.
code
===
200
)
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
this
.
setState
({
barInfo
:
res
.
data
.
data
barInfo
:
res
.
data
.
data
});
if
(
res
.
data
.
data
.
bargain_status
===
0
)
{
this
.
getBargainRankList
(
getParam
(
'id'
),
0
)
}
}
else
if
(
res
.
data
.
code
===
4030
)
{
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
})
}
// 获取助理好友
getBargainRankList
=
(
id
,
type
)
=>
{
let
data
=
{
courseId
:
id
,
type
:
type
}
http
.
post
(
`
${
API
.
home
}
/m/bargain/rankList`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
list
:
res
.
data
.
data
.
list
,
outList
:
res
.
data
.
data
.
list
[
0
]
})
})
}
else
{
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
Toast
.
info
(
res
.
data
.
msg
,
2
)
...
@@ -180,7 +205,7 @@ class Detail extends Component {
...
@@ -180,7 +205,7 @@ class Detail extends Component {
number
=
courseInfo
.
pdd_group_info
.
groupon_member
.
number
;
number
=
courseInfo
.
pdd_group_info
.
groupon_member
.
number
;
}
}
}
}
const
{
share
,
countdown
}
=
this
.
state
;
const
{
share
,
countdown
,
list
,
outList
}
=
this
.
state
;
const
href
=
this
.
props
.
location
&&
this
.
props
.
location
.
state
?
this
.
props
.
location
.
state
.
href
:
undefined
;
const
href
=
this
.
props
.
location
&&
this
.
props
.
location
.
state
?
this
.
props
.
location
.
state
.
href
:
undefined
;
return
(
return
(
<
div
className
=
'detail-box'
>
<
div
className
=
'detail-box'
>
...
@@ -267,8 +292,12 @@ class Detail extends Component {
...
@@ -267,8 +292,12 @@ class Detail extends Component {
{
/*砍价*/
}
{
/*砍价*/
}
{
{
courseInfo
.
is_baoming
===
0
&&
(
!
courseInfo
.
is_aist
)
&&
this
.
props
.
courseInfo
.
course_info
&&
this
.
props
.
courseInfo
.
course_info
.
is_bargain
&&
courseInfo
.
is_baoming
===
0
&&
(
!
courseInfo
.
is_aist
)
&&
this
.
state
.
barInfo
&&
<
Bargain
/>
<
Bargain
list
=
{
list
}
outList
=
{
outList
}
barInfo
=
{
this
.
state
.
barInfo
}
/
>
}
}
{
/*课程介绍、大纲*/
}
{
/*课程介绍、大纲*/
}
...
...
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