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
bb22d5db
Commit
bb22d5db
authored
Aug 17, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单
parent
d38495ed
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
15 deletions
+28
-15
src/components/order/index.js
+28
-15
No files found.
src/components/order/index.js
View file @
bb22d5db
...
...
@@ -278,21 +278,8 @@ class Order extends Component {
this
.
publicGetData
(
courseInfo
);
this
.
publicLocalStorage
();
});
}
else
{
if
(
getParam
(
'id'
))
{
Promise
.
all
([
http
.
get
(
`
${
API
.
home
}
/m/del_cart_order/
${
getParam
(
'id'
)}
`
),
http
.
get
(
`
${
API
[
'base-api'
]}
/m/order/preorder`
)]).
then
(
res
=>
{
console
.
log
(
res
);
let
preorder
=
res
[
1
],
orderList
=
preorder
.
data
.
data
.
course
;
if
(
preorder
.
data
.
errno
!==
200
)
{
Toast
.
info
(
preorder
.
data
.
msg
,
2
);
return
;
}
this
.
publicGetData
(
preorder
);
this
.
publicLocalStorage
();
})
}
else
{
else
{
http
.
get
(
`
${
API
[
'base-api'
]}
/m/order/preorder`
).
then
((
res
)
=>
{
console
.
log
(
'为了验证什么条件下会走这段代码'
);
if
(
res
.
data
.
errno
!==
200
)
{
...
...
@@ -304,7 +291,33 @@ class Order extends Component {
this
.
publicLocalStorage
();
})
}
}
// else {
// if(getParam('id')) {
// Promise.all([http.get(`${API.home}/m/del_cart_order/${getParam('id')}`), http.get(`${API['base-api']}/m/order/preorder`)]).then(res => {
// console.log(res);
// let preorder = res[1],
// orderList = preorder.data.data.course;
// if(preorder.data.errno !== 200) {
// Toast.info(preorder.data.msg, 2);
// return;
// }
//
// this.publicGetData(preorder);
// this.publicLocalStorage();
// })
// }else{
// http.get(`${API['base-api']}/m/order/preorder`).then((res) => {
// console.log('为了验证什么条件下会走这段代码');
// if (res.data.errno !== 200) {
// Toast.info(res.data.msg, 2);
// return;
// }
//
// this.publicGetData(res);
// this.publicLocalStorage();
// })
// }
// }
};
render
()
{
const
{
...
...
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