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
70426bdf
Commit
70426bdf
authored
Aug 20, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bargainMiddlePage modify
parent
caa42759
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
src/common/VList/index.js
+4
-1
src/common/VList/index.scss
+1
-0
src/components/bargainMiddlePage/index.js
+13
-8
No files found.
src/common/VList/index.js
View file @
70426bdf
...
...
@@ -9,7 +9,10 @@ const VList = (props) => {
<
div
className
=
"cover"
>
{
props
.
status
}
{
/* <Link to={`/detail?id=${props.id}`}> */
}
<
img
src
=
{
props
.
img
}
alt
=
""
onClick
=
{()
=>
props
.
toDetail
(
props
.
id
)}
/
>
{
props
.
toDetail
?(
<
img
src
=
{
props
.
img
}
alt
=
""
onClick
=
{()
=>
props
.
toDetail
(
props
.
id
)}
/>
)
:(
<
img
src
=
{
props
.
img
}
alt
=
""
/>
)
}
{
/* </Link> */
}
<
/div
>
{
props
.
info
}
...
...
src/common/VList/index.scss
View file @
70426bdf
...
...
@@ -12,6 +12,7 @@
flex
:
0
0
auto
;
margin-right
:
16px
;
position
:
relative
;
width
:
150px
;
img
{
width
:
150px
;
height
:
108px
;
...
...
src/components/bargainMiddlePage/index.js
View file @
70426bdf
...
...
@@ -22,6 +22,7 @@ class BargainMiddlePage extends Component {
isShowOverlay
:
false
,
isOriginator
:
''
,
kanjiaIcon
:
require
(
'./image/kanjia_icon.png'
),
course
:
{},
// 当前砍价课程
courseList
:
[],
// 所有砍价课程
data
:
''
,
bargainData
:
''
,
...
...
@@ -53,14 +54,17 @@ class BargainMiddlePage extends Component {
http
.
get
(
`
${
API
.
home
}
/m/bargain/info?bargaincode=
${
getParam
(
'bargaincode'
)}
&is_originator=
${
getParam
(
'is_originator'
)}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
this
.
setState
(
{
data
:
res
.
data
.
data
,
isOriginator
:
res
.
data
.
data
.
is_originator
,
originatorUid
:
res
.
data
.
data
.
originator_uid
,
course
:
res
.
data
.
data
.
course
,
limitPeople
:
res
.
data
.
data
.
course
.
limit_people
,
bargainData
:
res
.
data
.
data
.
bargain
,
width
:
(
res
.
data
.
data
.
bargain
.
bargain_price
/
res
.
data
.
data
.
bargain
.
total_price
).
toFixed
(
2
)
*
100
+
'%'
},
()
=>
{
},
()
=>
{
if
(
this
.
state
.
bargainData
.
expire_time
)
{
let
date
=
this
.
state
.
bargainData
.
expire_time
*
1000
let
now
=
Date
.
now
()
...
...
@@ -81,7 +85,8 @@ class BargainMiddlePage extends Component {
},
1000
)
}
})
}
)
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
...
...
@@ -263,7 +268,6 @@ class BargainMiddlePage extends Component {
}
render
()
{
let
thirdRow
,
btn
// is_artifact 0-再邀请多少人可以使用 1-可以使用未领取 2-已领取 3-已使用
if
(
this
.
state
.
bargainData
.
is_artifact
===
0
)
{
...
...
@@ -291,8 +295,6 @@ class BargainMiddlePage extends Component {
}
else
if
(
this
.
state
.
isOriginator
===
1
&&
this
.
state
.
data
.
bargain_status
===
0
)
{
bargainBtn
=
<
button
className
=
'active-btn'
onClick
=
{
this
.
shareFriendBargain
}
>
邀请好友砍价
<
/button
>
}
return
(
<
div
className
=
{
'bargain-middle-page'
}
>
<
HeaderBar
title
=
'砍价详情'
arrow
=
{
true
}
cart
=
{
true
}
><
/HeaderBar
>
...
...
@@ -306,10 +308,13 @@ class BargainMiddlePage extends Component {
<
ul
>
<
VList
info
=
{
<
CourseDes
img
=
{
this
.
state
.
course
.
course_img
}
info
=
{
<
CourseDes
isOriginator
=
{
this
.
state
.
isOriginator
}
data
=
{
this
.
state
.
data
}
toCart
=
{
this
.
toCart
}
/>
}
toCart
=
{
this
.
toCart
}
/
>
}
/
>
<
/ul
>
<
div
className
=
"bargain-detail"
>
...
...
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