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
3271f73b
Commit
3271f73b
authored
Aug 23, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 订单支付参数
parent
85525c94
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
1 deletions
+45
-1
order.js
src/pages/order/order.js
+44
-0
order.wxml
src/pages/order/order.wxml
+1
-1
No files found.
src/pages/order/order.js
View file @
3271f73b
...
...
@@ -105,6 +105,50 @@ wxService.page({
}
})
},
// 立即支付
handelToPay
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
wx
.
showLoading
({
title
:
'加载中'
,
mask
:
true
})
wxService
.
post
(
`/sale/trade/buyer/wxprepay/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
// const payJson = JSON.parse(decodeURIComponent(res_.data.data.parameter))
// wx.requestPayment({
// 'timeStamp': payJson.timeStamp,
// 'nonceStr': payJson.nonceStr,
// 'package': payJson.package,
// 'signType': payJson.signType,
// 'paySign': payJson.paySign,
// 'success': _res => {
// wx.hideLoading()
// wx.showToast({
// title: '支付成功',
// icon: 'none',
// mask: true
// })
// wx.reportAnalytics('api_pay_success', {
// orderno: orderNo
// })
// this.initByStatus(this.data.status)
// },
// 'fail': _res => {
// wx.hideLoading()
// wx.showToast({
// title: '支付失败',
// icon: 'none',
// mask: true
// })
// }
// })
}
}
})
},
handelDetail
(
e
)
{
// const {detail} = e.currentTarget.dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
...
...
src/pages/order/order.wxml
View file @
3271f73b
...
...
@@ -65,7 +65,7 @@
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDelOrder">删除订单</button>
</view>
<view class="order-status" wx-if="{{item.status == 'N'}}">
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}">立即支付</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}"
bindtap="handelToPay"
>立即支付</button>
</view>
<view class="order-status" wx-if="{{item.status == 'P'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button>
...
...
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