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
2a88d279
Commit
2a88d279
authored
5 years ago
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bargain and call app
parent
d99a4dbe
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
16 deletions
+29
-16
src/common/CallApp/index.js
+10
-1
src/components/bargainMiddlePage/index.js
+3
-1
src/components/detail/bargain/index.js
+15
-13
src/components/detail/index.js
+1
-1
No files found.
src/common/CallApp/index.js
View file @
2a88d279
...
...
@@ -24,12 +24,21 @@ const options = {
class
OpenApp
extends
Component
{
callApp
=
new
CallApp
(
options
)
// callApp = new CallApp(options)
callApp
=
null
static
defaultProps
=
{
text
:
'在APP打开'
}
componentWillMount
()
{
this
.
callApp
=
new
CallApp
({
...
options
,
path
:
this
.
props
.
path
||
'/'
});
}
handleClick
=
()
=>
{
this
.
callApp
.
open
({})
}
...
...
This diff is collapsed.
Click to expand it.
src/components/bargainMiddlePage/index.js
View file @
2a88d279
...
...
@@ -124,9 +124,11 @@ class BargainMiddlePage extends Component {
// 获取助理好友
getBargainRankList
=
(
id
,
type
)
=>
{
const
bargain_code
=
getParam
(
'bargaincode'
)
||
''
;
let
data
=
{
courseId
:
id
,
type
:
type
type
:
type
,
bargain_code
}
http
.
post
(
`
${
API
.
home
}
/m/bargain/rankList`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
...
...
This diff is collapsed.
Click to expand it.
src/components/detail/bargain/index.js
View file @
2a88d279
...
...
@@ -33,12 +33,8 @@ class Bargain extends Component {
}
// 获取助理好友
getBargainRankList
=
(
id
,
type
)
=>
{
let
data
=
{
courseId
:
id
,
type
:
type
}
http
.
post
(
`
${
API
.
home
}
/m/bargain/rankList`
,
data
).
then
((
res
)
=>
{
getBargainRankList
=
(
params
=
{})
=>
{
http
.
post
(
`
${
API
.
home
}
/m/bargain/rankList`
,
params
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
this
.
setState
({
list
:
res
.
data
.
data
.
list
,
...
...
@@ -57,20 +53,26 @@ class Bargain extends Component {
courseId
:
getParam
(
'id'
)
}
http
.
post
(
`
${
API
.
home
}
/m/bargain/courseDetail`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
const
{
code
,
data
,
msg
=
''
}
=
res
.
data
;
if
(
code
===
200
)
{
this
.
setState
({
barInfo
:
res
.
data
.
data
,
barInfo
:
data
,
// info: res.data.data,
// limitPeople: res.data.data.limit_people,
// bargainCode: res.data.data.bargain_code
})
if
(
res
.
data
.
data
.
bargain_status
===
0
)
{
this
.
getBargainRankList
(
getParam
(
'id'
),
0
)
});
// 砍价状态 0-砍价中,1砍价结束,待支付,2砍价过期(没有砍价记录没有砍价信息),3已购买
if
(
data
.
bargain_status
===
0
)
{
this
.
getBargainRankList
({
type
:
0
,
bargain_code
:
data
.
bargain_code
});
}
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
)
Toast
.
info
(
msg
,
2
);
}
})
})
;
}
// 查看更多
...
...
This diff is collapsed.
Click to expand it.
src/components/detail/index.js
View file @
2a88d279
...
...
@@ -461,7 +461,7 @@ class Detail extends Component {
cart
=
{
true
}
toHref
=
{
href
}
/
>
<
CallApp
className
=
'toapp'
/>
<
CallApp
className
=
'toapp'
path
=
{
`/detail/id=
${
getParam
(
'id'
)}
`
}
/
>
{
/*弹幕*/
}
<
Barrage
isShow
=
{
course_info
.
is_show
}
/
>
...
...
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