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
b1e29db3
Commit
b1e29db3
authored
Sep 25, 2019
by
FE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc to m param error
parent
30e40b6d
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
17 deletions
+27
-17
src/components/bargainMiddlePage/index.js
+15
-7
src/components/country/countryRedux.js
+2
-1
src/components/country/index.js
+2
-2
src/components/detail/bargain/bargainInfo/index.js
+1
-2
src/components/detail/bargain/index.js
+3
-4
src/components/detail/index.js
+4
-1
No files found.
src/components/bargainMiddlePage/index.js
View file @
b1e29db3
...
...
@@ -171,6 +171,7 @@ class BargainMiddlePage extends Component {
// }
// })
}
// 我要砍价列表的去支付
toCartBottom
=
(
id
)
=>
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/cart/addtopreorder/[
${
id
}
]`
).
then
((
res
)
=>
{
...
...
@@ -195,6 +196,7 @@ class BargainMiddlePage extends Component {
isShowMore
:
true
})
}
// 自组件传给父组件的boxHide
boxHide
=
(
val
)
=>
{
this
.
setState
({
isShowMore
:
val
})
...
...
@@ -202,8 +204,9 @@ class BargainMiddlePage extends Component {
// 领取砍价神器
toArtifact
=
()
=>
{
const
{
course
:
{
course_id
=
''
}
}
=
this
.
state
;
let
data
=
{
courseId
:
getParam
(
'id'
)
courseId
:
getParam
(
'id'
)
?
getParam
(
'id'
)
:
course_id
}
http
.
post
(
`
${
API
.
home
}
/m/bargain/receiveLimit`
,
data
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
...
...
@@ -219,7 +222,9 @@ class BargainMiddlePage extends Component {
// 使用砍价神器
useArtifact
=
()
=>
{
this
.
toKanjia
(
getParam
(
'id'
),
2
,
0
)
const
{
course
:
{
course_id
=
''
}
}
=
this
.
state
;
const
id
=
getParam
(
'id'
)?
getParam
(
'id'
)
:
course_id
;
this
.
toKanjia
(
id
,
2
,
0
);
}
// 砍价接口
...
...
@@ -298,12 +303,16 @@ class BargainMiddlePage extends Component {
// 帮好友砍价第一刀
friendBargainFirst
=
()
=>
{
this
.
toKanjia
(
getParam
(
'id'
),
3
,
this
.
state
.
originatorUid
)
const
{
course
:
{
course_id
=
''
}
}
=
this
.
state
;
const
id
=
getParam
(
'id'
)?
getParam
(
'id'
)
:
course_id
;
this
.
toKanjia
(
id
,
3
,
this
.
state
.
originatorUid
);
}
// 帮好友砍价第二刀
friendBargainSecond
=
()
=>
{
this
.
toKanjia
(
getParam
(
'id'
),
4
,
this
.
state
.
originatorUid
)
const
{
course
:
{
course_id
=
''
}
}
=
this
.
state
;
const
id
=
getParam
(
'id'
)?
getParam
(
'id'
)
:
course_id
;
this
.
toKanjia
(
id
,
4
,
this
.
state
.
originatorUid
);
}
// 邀请好友砍价
...
...
@@ -312,8 +321,7 @@ class BargainMiddlePage extends Component {
isShowOverlay
:
true
,
status
:
7
,
isshowYindao
:
browser
.
isWeixin
?
true
:
false
})
});
wxShare
({
title
:
`我发现一门好课,快来帮我砍价吧!`
,
...
...
@@ -328,7 +336,7 @@ class BargainMiddlePage extends Component {
this
.
setState
({
isShowOverlay
:
false
,
status
:
''
,
})
})
;
}
toCourseDetail
=
(
id
)
=>
{
...
...
src/components/country/countryRedux.js
View file @
b1e29db3
...
...
@@ -22,7 +22,8 @@ export default (state = {}, action) => {
return
{
...
state
,
num
:
''
,
code
:
''
code
:
''
,
from
:
''
};
default
:
return
state
;
...
...
src/components/country/index.js
View file @
b1e29db3
...
...
@@ -47,11 +47,11 @@ class Country extends Component {
}
toParentPage
=
(
e
,
num
)
=>
{
// console.log(this.props);
const
{
history
,
addCountryNum
}
=
this
.
props
;
addCountryNum
({
num
,
code
:
getParam
(
'share_code'
)
code
:
getParam
(
'share_code'
),
from
:
getParam
(
'from'
)
});
history
.
push
(
`/detail?id=
${
getParam
(
'id'
)}
`
);
e
.
preventDefault
();
...
...
src/components/detail/bargain/bargainInfo/index.js
View file @
b1e29db3
...
...
@@ -108,7 +108,6 @@ class BargainInfo extends Component {
}
else
{
Toast
.
info
(
msg
);
}
console
.
log
(
res
);
});
...
...
@@ -202,7 +201,7 @@ class BargainInfo extends Component {
>
<
a
className
=
"bargain-phone-popup__button--num"
href
=
{
`/country?id=
${
getParam
(
'id'
)}
`
}
href
=
{
`/country?id=
${
getParam
(
'id'
)}
&from=bargain
`
}
>
+
{
country
}
<
i
className
=
"iconfont iconiconfront-69"
><
/i
>
...
...
src/components/detail/bargain/index.js
View file @
b1e29db3
...
...
@@ -34,11 +34,10 @@ class Bargain extends Component {
this
.
judgePopupTypeFromCountry
();
}
// // 选择区号后进入
judgePopupTypeFromCountry
=
()
=>
{
// console.log(this.props);
// 选择区号后进入
judgePopupTypeFromCountry
=
()
=>
{
const
{
country
,
delCountryNum
}
=
this
.
props
;
if
(
country
.
num
)
{
if
(
country
.
from
&&
country
.
from
===
'bargain'
)
{
this
.
setState
({
country
:
country
.
num
,
isShowOverlay
:
true
,
...
...
src/components/detail/index.js
View file @
b1e29db3
...
...
@@ -618,7 +618,10 @@ class Detail extends Component {
*/
}
{
course_info
.
is_baoming
===
0
&&
(
!
course_info
.
is_aist
)
&&
course_info
.
is_bargain
&&
<
Bargain
country
=
{
this
.
props
.
country
}
delCountryNum
=
{
this
.
props
.
delCountryNum
}
/
>
<
Bargain
country
=
{
this
.
props
.
country
}
delCountryNum
=
{
this
.
props
.
delCountryNum
}
/
>
}
{
/*课程介绍、大纲*/
}
...
...
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