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
e4f4ec62
Commit
e4f4ec62
authored
Aug 16, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
e37d3402
9f286b47
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
7 deletions
+23
-7
src/components/detail/btnstatus/index.js
+2
-3
src/components/order/index.js
+17
-3
src/components/order/orderinfo.js
+4
-1
No files found.
src/components/detail/btnstatus/index.js
View file @
e4f4ec62
...
...
@@ -96,7 +96,7 @@ class BtnStatus extends Component {
}
else
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/cart/addtopreorder/[
${
getParam
(
'id'
)}
]`
).
then
((
res
)
=>
{
if
(
res
.
data
.
errno
===
0
)
{
this
.
props
.
history
.
push
(
`/order?id=
[
${
getParam
(
'id'
)}
]
`
,
{
simple
:
1
})
this
.
props
.
history
.
push
(
`/order?id=
${
getParam
(
'id'
)}
`
,
{
simple
:
1
})
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
}
...
...
@@ -145,7 +145,7 @@ class BtnStatus extends Component {
}
else
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/cart/addtopreorder/[
${
getParam
(
'id'
)}
]`
).
then
((
res
)
=>
{
if
(
res
.
data
.
errno
===
0
)
{
this
.
props
.
history
.
push
(
`/order?id=[
${
getParam
(
'id'
)}
]`
,
{
simple
:
1
});
this
.
props
.
history
.
push
(
`/order?id=[
${
getParam
(
'id'
)}
]`
,
{
bargain
:
1
});
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
}
...
...
@@ -248,7 +248,6 @@ class BtnStatus extends Component {
<
button
className
=
'btn btn-s bg-FCCD05'
onClick
=
{
e
=>
this
.
toCart
(
1
)}
>
加入购物车
<
/button
>
}
{
/*<Link to='/order' className='btn btn-s bg-FD7700'>立即报名</Link>*/
}
<
span
className
=
'btn btn-s bg-FD7700'
onClick
=
{
e
=>
this
.
simpleCourse
()}
>
立即报名
<
/span
>
<
/div
>
}
...
...
src/components/order/index.js
View file @
e4f4ec62
...
...
@@ -40,7 +40,7 @@ function OrderList(props) {
return
(
<
OrderItem
{...
item
}
src
=
{
image_name
}
id
=
{
course_id
}
key
=
{
index
}
info
=
{
Info
}
isaist
=
{
props
.
isaist
}
>
{
is_coupon
===
1
?
(
(
props
.
locationState
&&
(
props
.
locationState
.
type
||
props
.
locationState
.
simple
))
?
(
<
div
className
=
"order-prefer"
>
<
List
key
=
{
index
}
>
<
Item
...
...
@@ -227,7 +227,7 @@ class Order extends Component {
Toast
.
info
(
res
.
data
.
msg
,
2
);
}
})
}
else
if
(
this
.
props
.
location
.
state
&&
this
.
props
.
location
.
state
.
simple
===
1
)
{
}
else
if
(
this
.
props
.
location
.
state
&&
(
this
.
props
.
location
.
state
.
simple
===
1
||
this
.
props
.
location
.
state
.
bargain
===
1
)
)
{
// 普通课程立即报名 不带 type = 1
http
.
get
(
`
${
API
[
'base-api'
]}
/m/order/preorder`
).
then
(
res
=>
{
if
(
res
.
data
.
errno
===
200
)
{
...
...
@@ -243,6 +243,20 @@ class Order extends Component {
console
.
log
(
resList
);
let
courseInfo
=
resList
[
0
],
orderInfo
=
resList
[
1
];
console
.
log
(
courseInfo
.
data
);
console
.
log
(
orderInfo
.
data
);
if
(
courseInfo
.
data
.
errno
===
200
)
{
}
else
{
Toast
.
info
(
courseInfo
.
data
.
msg
,
2
);
return
;
}
if
(
orderInfo
.
data
.
code
===
200
)
{
}
else
{
Toast
.
info
(
courseInfo
.
data
.
msg
,
2
);
return
;
}
this
.
groupPrice
=
orderInfo
.
data
.
data
.
course_info
.
pdd_group_info
.
price
;
this
.
publicGetData
(
courseInfo
);
this
.
publicLocalStorage
();
...
...
@@ -312,7 +326,7 @@ class Order extends Component {
pathname
:
'/orderinfo'
,
state
:
{
...
this
.
state
.
perfect
,
type
:
this
.
props
.
location
.
state
?
this
.
props
.
location
.
state
.
type
:
null
,
...
this
.
props
.
location
.
state
,
id
:
getParam
(
'id'
)
}
}
...
...
src/components/order/orderinfo.js
View file @
e4f4ec62
...
...
@@ -95,6 +95,7 @@ const MyForm = withFormik({
if
(
FormBag
.
props
.
userInfo
.
id
)
{
pathName
=
pathName
+
'?id='
+
FormBag
.
props
.
userInfo
.
id
;
}
console
.
log
(
values
);
if
(
same
===
3
)
{
FormBag
.
props
.
history
.
replace
(
pathName
,
...
...
@@ -113,7 +114,9 @@ const MyForm = withFormik({
Toast
.
info
(
'保存成功!'
,
undefined
,
undefined
,
false
);
FormBag
.
props
.
history
.
replace
(
pathName
,
values
{
...
values
,
}
);
});
},
...
...
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