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
31fbfb09
Commit
31fbfb09
authored
Sep 17, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付状态
parent
edb29a1e
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
39 deletions
+39
-39
plus.js
src/component/plus/plus.js
+2
-6
cart.js
src/pages/cart/cart.js
+2
-6
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+2
-6
order.js
src/pages/order/order.js
+2
-6
project.config.json
src/project.config.json
+3
-3
paymentStatus.js
src/subPackage/page/pages/paymentStatus/paymentStatus.js
+16
-4
paymentStatus.json
src/subPackage/page/pages/paymentStatus/paymentStatus.json
+1
-1
paymentStatus.wxml
src/subPackage/page/pages/paymentStatus/paymentStatus.wxml
+6
-6
paymentStatus.wxss
src/subPackage/page/pages/paymentStatus/paymentStatus.wxss
+5
-1
No files found.
src/component/plus/plus.js
View file @
31fbfb09
...
...
@@ -148,15 +148,11 @@ Component({
// })
// 支付成功页面
console
.
log
(
res
)
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus'
)
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus
?status=S
'
)
},
fail
(
res
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'支付失败'
,
icon
:
'none'
,
mask
:
true
})
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus?status=F'
)
}
},
data
))
}
...
...
src/pages/cart/cart.js
View file @
31fbfb09
...
...
@@ -286,15 +286,11 @@ wxService.page({
// mask: true
// })
// 支付成功页面
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus'
)
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus
?status=S
'
)
},
fail
(
res
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'支付失败'
,
icon
:
'none'
,
mask
:
true
})
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus?status=F'
)
}
},
data
))
}
...
...
src/pages/confirmOrder/confirmOrder.js
View file @
31fbfb09
...
...
@@ -294,15 +294,11 @@ wxService.page({
success
(
res
)
{
wx
.
hideLoading
()
// 支付成功页面
wxService
.
router
(
`/subPackage/page/pages/paymentStatus/paymentStatus?amount=
${
amount
}
`
)
wxService
.
router
(
`/subPackage/page/pages/paymentStatus/paymentStatus?
status=S&
amount=
${
amount
}
`
)
},
fail
(
res
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'已取消'
,
icon
:
'none'
,
mask
:
true
})
wxService
.
router
(
`/subPackage/page/pages/paymentStatus/paymentStatus?status=F`
)
}
},
data
.
wxParams
))
}
...
...
src/pages/order/order.js
View file @
31fbfb09
...
...
@@ -143,15 +143,11 @@ if(currentIndex == 5){
// mask: true
// })
// 支付成功页面
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus'
)
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus
?status=S
'
)
},
fail
(
res
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
'支付失败'
,
icon
:
'none'
,
mask
:
true
})
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus?status=F'
)
}
},
data
))
...
...
src/project.config.json
View file @
31fbfb09
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
17
,
"current"
:
34
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -267,10 +267,10 @@
"scene"
:
null
},
{
"id"
:
3
3
,
"id"
:
3
4
,
"name"
:
"支付状态"
,
"pathName"
:
"subPackage/page/pages/paymentStatus/paymentStatus"
,
"query"
:
""
,
"query"
:
"
status=F&amount=333
"
,
"scene"
:
null
},
{
...
...
src/subPackage/page/pages/paymentStatus/paymentStatus.js
View file @
31fbfb09
...
...
@@ -11,7 +11,8 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
amount
:
0
amount
:
0
,
status
:
'S'
,
},
/**
...
...
@@ -27,15 +28,26 @@ wxService.page({
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
const
{
amount
}
=
this
.
options
const
{
amount
,
status
}
=
this
.
options
console
.
log
(
'this.options'
,
status
)
this
.
setData
({
amount
amount
,
status
})
// 动态设置title
wx
.
setNavigationBarTitle
({
title
:
status
==
'S'
?
'支付成功'
:
'支付失败'
})
},
goPayAgain
()
{
console
.
log
(
'goPayAgain'
)
},
goOrder
()
{
wxService
.
router
(
`/pages/order/order`
)
...
...
src/subPackage/page/pages/paymentStatus/paymentStatus.json
View file @
31fbfb09
{
"navigationBarTitleText"
:
"
支付成功
"
,
"navigationBarTitleText"
:
""
,
"usingComponents"
:
{
"go-home"
:
"/component/goHome/goHome"
}
...
...
src/subPackage/page/pages/paymentStatus/paymentStatus.wxml
View file @
31fbfb09
...
...
@@ -3,18 +3,18 @@
<view class="payment-status">
<image
class="status-img"
src="
/assets/imgs/7_1_0/08_22/success.png
"
src="
{{status == 'S' ? '/assets/imgs/7_1_0/08_22/success.png' : '/assets/imgs/7_1_0/08_22/fail.png'}}
"
mode="widthFix"
lazy-load="false"
binderror=""
bindload=""
/>
<view class="status-success">支付成功</view>
<view class="status-price">¥ {{amount}}</view>
<view class="status-success" wx:if="{{status == 'S'}}">支付成功</view>
<view class="status-fail" wx:if="{{status == 'F'}}">很遗憾,支付失败</view>
<view class="status-price" wx:if="{{status == 'S'}}">¥ {{amount}}</view>
<!-- <view class="status-time">交易时间: 2019-03-24 至 2019-06-23</view> -->
<view class="status-btn weui-flex">
<view class="btn-detail" bindtap="goOrder">查看详情</view>
<view class="btn-go-on" bindtap="goClassificationPage">继续逛逛</view>
<view class="btn-go-on" bindtap="goClassificationPage" wx:if="{{status == 'S'}}">继续逛逛</view>
<view class="btn-go-on" bindtap="goPayAgain" wx:if="{{status == 'F'}}">重新支付</view>
</view>
</view>
<view class="status-look df">
...
...
src/subPackage/page/pages/paymentStatus/paymentStatus.wxss
View file @
31fbfb09
...
...
@@ -13,7 +13,11 @@
height: 50rpx;
color: rgba(192, 154, 116, 1);
font-size: 36rpx;
font-family: PingFangSC-Medium;
}
.status-fail {
height: 50rpx;
color: rgba(170, 170, 170, 1);
font-size: 36rpx;
}
.status-price {
height: 112rpx;
...
...
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