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