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
5cd4c442
Commit
5cd4c442
authored
5 years ago
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kanjia to midlle page modify
parent
06587250
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
src/components/detail/bargain/index.js
+5
-5
src/components/detail/btnstatus/index.js
+8
-7
No files found.
src/components/detail/bargain/index.js
View file @
5cd4c442
...
...
@@ -135,25 +135,25 @@ class Bargain extends Component {
type
:
type
,
// 1 用户自己砍价 2 使用砍价神器 3 好友助力砍价 4 好友第二次助力
parent_uid
:
uid
// 被助力人id 【自己本人操作传0】
}
const
{
history
}
=
this
.
props
;
http
.
post
(
`
${
API
.
home
}
/m/bargain/toBargain`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
const
{
data
:
{
data
,
code
}
}
=
res
;
if
(
code
===
200
)
{
if
(
type
===
2
)
{
this
.
setState
({
isShowOverlay
:
true
,
status
:
2
,
})
}
else
{
if
(
res
.
data
.
data
.
user_status
===
2
)
{
if
(
data
.
user_status
===
2
)
{
this
.
setState
({
isShowOverlay
:
true
,
status
:
3
,
})
}
else
{
// this.getBargainInfo()
document
.
location
.
reload
()
history
.
push
(
`/bargain-middle-page?id=
${
getParam
(
'id'
)}
&bargaincode=
${
data
.
bargain_code
}
&is_originator=1`
)
}
}
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
}
...
...
This diff is collapsed.
Click to expand it.
src/components/detail/btnstatus/index.js
View file @
5cd4c442
...
...
@@ -179,22 +179,23 @@ class BtnStatus extends Component {
}
// 砍价接口
toKanjia
=
()
=>
{
const
{
user
}
=
this
.
props
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
const
{
user
,
history
}
=
this
.
props
;
const
uid
=
user
&&
user
.
data
&&
user
.
data
.
uid
;
const
course_id
=
getParam
(
'id'
);
if
(
!
uid
)
{
this
.
props
.
history
.
push
(
'/passport/login'
)
}
else
{
let
data
=
{
course_id
:
getParam
(
'id'
)
,
course_id
,
type
:
1
,
// 1 用户自己砍价 2 使用砍价神器 3 好友助力砍价 4 好友第二次助力
parent_uid
:
0
// 被助力人id 【自己本人操作传0】
}
http
.
post
(
`
${
API
.
home
}
/m/bargain/toBargain`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
// this.props.getBargainInfo()
document
.
location
.
reload
(
)
const
{
data
:
{
data
,
code
,
msg
}}
=
res
;
if
(
code
===
200
)
{
history
.
push
(
`/bargain-middle-page?id=
${
course_id
}
&bargaincode=
${
data
.
bargain_code
}
&is_originator=1`
)
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
Toast
.
info
(
msg
,
2
)
}
})
}
...
...
This diff is collapsed.
Click to expand it.
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