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
b4ad1e14
Commit
b4ad1e14
authored
Aug 28, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 下单页商品信息
parent
05b28005
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
152 additions
and
156 deletions
+152
-156
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+18
-11
confirmOrder.wxml
src/pages/confirmOrder/confirmOrder.wxml
+131
-142
project.config.json
src/project.config.json
+3
-3
No files found.
src/pages/confirmOrder/confirmOrder.js
View file @
b4ad1e14
...
@@ -8,7 +8,9 @@ wxService.page({
...
@@ -8,7 +8,9 @@ wxService.page({
data
:
{
data
:
{
addressInfo
:
''
,
addressInfo
:
''
,
showSelectCoupon
:
false
,
showSelectCoupon
:
false
,
skuIds
:
[]
skuIds
:
[],
trolleySku2Buy
:
Array
,
currentOrderList
:
Array
},
},
/**
/**
...
@@ -22,34 +24,39 @@ wxService.page({
...
@@ -22,34 +24,39 @@ wxService.page({
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
let
trolleySku2Buy
=
this
.
options
.
trolleySku2Buy
let
trolleySku2Buy
=
this
.
options
.
trolleySku2Buy
console
.
log
(
'thtrolleySku2Bu'
,
JSON
.
parse
(
trolleySku2Buy
))
// 下单 && 计算优惠价
// 下单 && 计算优惠价
if
(
trolleySku2Buy
.
length
){
if
(
trolleySku2Buy
.
length
)
{
// this.getBill(trolleySku2Buy) // 下单
this
.
setData
({
trolleySku2Buy
},
()
=>
{
this
.
calPreferentialPrice
(
trolleySku2Buy
)
// 计算优惠价
this
.
calPreferentialPrice
(
trolleySku2Buy
)
// 计算优惠价
})
}
}
},
},
//
下单
//
计算优惠价
getBill
(
trolleySku2Buy
)
{
calPreferentialPrice
(
trolleySku2Buy
)
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
wxService
.
post
(
`/sale/trade/buyer/
bill`
,
trolleySku2Buy
).
then
(
res
=>
{
wxService
.
post
(
`/sale/trade/buyer/
preview`
,
trolleySku2Buy
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
console
.
log
(
'data'
,
data
)
console
.
log
(
'data'
,
data
)
this
.
setData
({
currentOrderList
:
data
})
}
}
}
}
})
})
},
},
// 计算优惠价
handelGobuy
()
{
calPreferentialPrice
(
trolleySku2Buy
)
{
const
{
trolleySku2Buy
}
=
this
.
data
this
.
getBill
(
trolleySku2Buy
)
// 下单
},
// 下单
getBill
(
trolleySku2Buy
)
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
wxService
.
post
(
`/sale/trade/buyer/
preview`
,
trolleySku2Buy
).
then
(
res
=>
{
wxService
.
post
(
`/sale/trade/buyer/
bill`
,
trolleySku2Buy
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
...
...
src/pages/confirmOrder/confirmOrder.wxml
View file @
b4ad1e14
This diff is collapsed.
Click to expand it.
src/project.config.json
View file @
b4ad1e14
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
"list"
:
[]
"list"
:
[]
},
},
"miniprogram"
:
{
"miniprogram"
:
{
"current"
:
23
,
"current"
:
17
,
"list"
:
[
"list"
:
[
{
{
"id"
:
-1
,
"id"
:
-1
,
...
@@ -147,10 +147,10 @@
...
@@ -147,10 +147,10 @@
"scene"
:
null
"scene"
:
null
},
},
{
{
"id"
:
-1
,
"id"
:
17
,
"name"
:
"确认订单"
,
"name"
:
"确认订单"
,
"pathName"
:
"pages/confirmOrder/confirmOrder"
,
"pathName"
:
"pages/confirmOrder/confirmOrder"
,
"query"
:
""
,
"query"
:
"
trolleySku2Buy=[{
\"
count
\"
:3,
\"
skuId
\"
:1556108807316001},{
\"
count
\"
:1,
\"
skuId
\"
:1556108807316000}]
"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
...
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