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 {
}
componentDidMount
()
{
this
.
getBargainInfo
()
//
this.getBargainInfo()
}
// 获取助理好友
...
...
@@ -119,7 +119,8 @@ class Bargain extends Component {
}
// 继续砍价
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`
)
}
...
...
@@ -170,18 +171,19 @@ class Bargain extends Component {
}
render
()
{
const
{
list
,
outList
,
barInfo
}
=
this
.
props
;
return
(
<
div
className
=
{
'bargain-func'
}
>
{
/*bargain_status 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买*/
}
{
this
.
state
.
i
nfo
.
bargain_status
===
2
&&
<
BargainIntro
limitPeople
=
{
this
.
state
.
limitPeople
}
iWantBargain
=
{
this
.
iWantBargain
}
/
>
barI
nfo
.
bargain_status
===
2
&&
<
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
info
=
{
this
.
state
.
i
nfo
}
outList
=
{
this
.
state
.
outList
}
info
=
{
barI
nfo
}
outList
=
{
outList
}
getMore
=
{
this
.
getMore
}
toArtifact
=
{
this
.
toArtifact
}
useArtifact
=
{
this
.
useArtifact
}
...
...
@@ -222,8 +224,13 @@ class Bargain extends Component {
{
/*更多好友砍价*/
}
<
Ranking
list
=
{
this
.
state
.
list
}
icon
=
{
this
.
state
.
kanjiaIcon
}
limitPeople
=
{
this
.
state
.
limitPeople
}
isShowMore
=
{
this
.
state
.
isShowMore
}
boxHide
=
{
this
.
boxHide
}
><
/Ranking
>
<
Ranking
list
=
{
list
}
icon
=
{
this
.
state
.
kanjiaIcon
}
limitPeople
=
{
barInfo
.
limitPeople
}
isShowMore
=
{
this
.
state
.
isShowMore
}
boxHide
=
{
this
.
boxHide
}
/
>
<
/div
>
)
...
...
src/components/detail/index.js
View file @
6a604060
...
...
@@ -29,6 +29,8 @@ class Detail extends Component {
barInfo
:
''
,
share
:
false
,
countdown
:
'00:00:00'
,
outList
:
[],
list
:
[],
}
}
...
...
@@ -156,6 +158,29 @@ class Detail extends Component {
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
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
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
...
...
@@ -180,7 +205,7 @@ class Detail extends Component {
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
;
return
(
<
div
className
=
'detail-box'
>
...
...
@@ -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
&&
<
Bargain
/>
courseInfo
.
is_baoming
===
0
&&
(
!
courseInfo
.
is_aist
)
&&
this
.
state
.
barInfo
&&
<
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