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
59faed29
Commit
59faed29
authored
Sep 19, 2019
by
赵雅纹
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_7.1.0' into fixbug-ZYW
parents
ad3a4ddf
ca6135e2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
6 deletions
+84
-6
cart.js
src/pages/cart/cart.js
+0
-2
orderDetail.js
src/pages/orderDetail/orderDetail.js
+84
-4
No files found.
src/pages/cart/cart.js
View file @
59faed29
...
...
@@ -38,7 +38,6 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
console
.
log
(
'cart'
,
this
.
data
.
currentHasUserInfo
)
if
(
typeof
this
.
getTabBar
===
'function'
&&
this
.
getTabBar
())
{
this
.
getTabBar
().
setData
({
...
...
@@ -195,7 +194,6 @@ wxService.page({
setTotalFee
(
skipRedemption
)
{
var
cartList
=
this
.
data
.
cartList
var
checkProsId
=
[]
// 选中的商品id
console
.
log
(
cartList
)
var
totalFee
=
0
// 购物车总金额
...
...
src/pages/orderDetail/orderDetail.js
View file @
59faed29
...
...
@@ -58,13 +58,93 @@ wxService.page({
})
},
// 删除订单
handelDelOrder
()
{
console
.
log
(
'删除订单'
)
handelDelOrder
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
console
.
log
(
'删除订单'
,
id
)
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
wxService
.
post
(
`/sale/trade/buyer/delete/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
`删除成功!`
,
icon
:
'none'
})
}
else
{
wx
.
showToast
({
title
:
`删除失败!`
,
icon
:
'none'
})
}
}
})
},
// 立即支付
handelToPay
()
{
console
.
log
(
'立即支付'
)
},
handelToPay
(
e
)
{
console
.
log
(
'立即支付'
)
const
{
id
}
=
e
.
currentTarget
.
dataset
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
wxService
.
post
(
`/sale/trade/buyer/wxprepay/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
requestPayment
(
Object
.
assign
({
success
(
res
)
{
wx
.
hideLoading
()
// wx.showToast({
// title: '支付成功',
// icon: 'none',
// mask: true
// })
// 支付成功页面
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus?status=S'
)
},
fail
(
res
)
{
wx
.
hideLoading
()
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus?status=F'
)
}
},
data
))
}
}
})
},
// 取消订单
handelCancelOrder
()
{
console
.
log
(
'取消订单'
)
},
handelCancelOrder
(
e
)
{
console
.
log
(
'取消订单'
)
const
{
id
}
=
e
.
currentTarget
.
dataset
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
wxService
.
post
(
`/sale/trade/buyer/cancel/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
`取消成功!`
,
icon
:
'none'
})
}
else
{
wx
.
showToast
({
title
:
`取消失败!`
,
icon
:
'none'
})
}
}
})
},
// 申请退款
handelRequestRefund
(
e
)
{
console
.
log
(
'----'
,
e
)
...
...
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