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
a35f1495
Commit
a35f1495
authored
Aug 16, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
一键开团支付的时候创建订单流程完善
parent
cb812f10
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletions
+15
-1
src/components/order/index.js
+15
-1
No files found.
src/components/order/index.js
View file @
a35f1495
...
...
@@ -96,6 +96,18 @@ class Order extends Component {
if
(
!
this
.
state
.
perfect
)
{
Toast
.
info
(
'请完善报名信息!'
);
}
if
(
this
.
props
.
location
.
state
&&
this
.
props
.
location
.
state
.
group
===
1
)
{
http
.
post
(
`
${
API
[
'base-api'
]}
/pdd/m`
,
{
course_id
:
getParam
(
"id"
)}).
then
(
res
=>
{
console
.
log
(
res
.
data
.
data
);
if
(
res
.
data
.
errno
===
200
)
{
sessionStorage
.
removeItem
(
'orderUseCacheObj'
);
this
.
props
.
history
.
replace
(
`/payorder?oid=
${
res
.
data
.
data
.
oid
}
`
);
}
else
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
return
;
}
});
}
else
{
let
url
=
`
${
API
[
'base-api'
]}
/m/v34/cart/order?ischeck=
${
this
.
state
.
useBalance
}
`
;
if
(
this
.
props
.
location
.
state
&&
this
.
props
.
location
.
state
.
type
===
1
)
{
url
+=
'&type=1'
...
...
@@ -110,6 +122,8 @@ class Order extends Component {
this
.
props
.
history
.
replace
(
`/payorder?oid=
${
res
.
data
.
data
.
order_id
}
`
);
});
}
}
// 勾选取消勾选 是否使用余额
useBalance
=
()
=>
{
let
useBalanceFlag
=
this
.
state
.
useBalance
;
...
...
@@ -280,7 +294,7 @@ class Order extends Component {
})
}
else
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/order/preorder`
).
then
((
res
)
=>
{
alert
(
'为了验证什么条件下会走这段代码'
);
console
.
log
(
'为了验证什么条件下会走这段代码'
);
if
(
res
.
data
.
errno
!==
200
)
{
Toast
.
info
(
res
.
data
.
msg
,
2
);
return
;
...
...
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