Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
高淑倩
7-Eleven
Commits
9db81c6f
Commit
9db81c6f
authored
Sep 11, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预览
parent
2defa835
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+20
-8
No files found.
src/pages/confirmOrder/confirmOrder.js
View file @
9db81c6f
...
...
@@ -7,6 +7,8 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
couponId
:
null
,
checkByPremium
:
false
,
addressInfo
:
[],
showSelectCoupon
:
false
,
skuIds
:
[],
...
...
@@ -47,8 +49,13 @@ wxService.page({
// 下单 && 计算优惠价
this
.
setData
({
trolleySku2Buy
:
tradeDto
},
()
=>
{
this
.
calPreferentialPrice
(
tradeDto
)
// 计算优惠价
this
.
setData
({
trolleySku2Buy
:
tradeDto
.
trolleySku2Buy
},
()
=>
{
const
{
trolleySku2Buy
,
checkByPremium
}
=
this
.
data
let
params
=
{
checkByPremium
,
trolleySku2Buy
}
this
.
calPreferentialPrice
(
params
)
// 计算优惠价
})
this
.
initCitys
()
...
...
@@ -191,11 +198,11 @@ wxService.page({
wxService
.
router
(
'/pages/myAddress/myAddress'
)
},
// 计算优惠价
calPreferentialPrice
(
tradeDto
)
{
calPreferentialPrice
(
params
)
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/sale/trade/buyer/preview`
,
tradeDto
).
then
(
res
=>
{
wxService
.
post
(
`/sale/trade/buyer/preview`
,
params
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
...
...
@@ -206,15 +213,20 @@ wxService.page({
})
},
handelGobuy
()
{
const
{
trolleySku2Buy
}
=
this
.
data
this
.
getBill
(
trolleySku2Buy
)
// 下单
const
{
trolleySku2Buy
,
couponId
}
=
this
.
data
let
params
=
{
couponId
,
trolleySku2Buy
}
console
.
log
(
'params'
,
params
,
trolleySku2Buy
)
this
.
getBill
(
params
)
// 下单
},
// 下单
getBill
(
trolleySku2Buy
)
{
getBill
(
params
)
{
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
post
(
`/sale/trade/buyer/bill`
,
trolleySku2Buy
).
then
(
res
=>
{
wxService
.
post
(
`/sale/trade/buyer/bill`
,
params
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
...
...
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