Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f2931965
authored
Dec 29, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
退款问题修改
parent
6674fe67
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
23 deletions
pages/mine/appointment-detail/appointment-detail.js
pages/mine/appointment-detail/appointment-detail.wxml
pages/mine/appointment-detail/appointment-detail.wxss
pages/mine/appointment/appointment.js
pages/mine/appointment/appointment.wxml
pages/pay/order-comment/order-comment.js
pages/pay/order-detail/order-detail.js
pages/pay/order-detail/order-detail.wxml
pages/pay/order-detail/order-detail.wxss
pages/mine/appointment-detail/appointment-detail.js
View file @
f2931965
...
...
@@ -90,6 +90,7 @@ Page({
'instructions'
:
funcResponse
.
particulars
,
'expireTime'
:
funcResponse
.
expireTime
.
replace
(
/-/g
,
'.'
).
replace
(
'~'
,
'-'
),
//订单有效期
'wxRequest'
:
funcResponse
.
wxRequest
,
'isRefund'
:
Boolean
(
Number
(
funcResponse
.
enableRefund
))
}
// 电影
...
...
@@ -186,6 +187,12 @@ Page({
'iconType'
:
'success'
,
'title'
:
'退款申请已提交'
})
wx
.
emit
({
event
:
{
type
:
'onReload'
,
receivePage
:
'pages/mine/appointment/appointment'
,
}
})
this
.
queryOrderDetail
()
})
},
...
...
@@ -285,9 +292,8 @@ Page({
},
// 去评价
onOrderEvaluate
:
function
(
event
)
{
let
item
=
JSON
.
stringify
(
this
.
data
.
orderInfo
)
wx
.
navigateTo
({
url
:
`/pages/pay/order-comment/order-comment?orderItem=
${
item
}
&pageFrom=orderDetail`
,
url
:
'/pages/pay/order-comment/order-comment?id='
+
this
.
data
.
orderInfo
.
id
+
'&pageFrom=orderDetail'
})
},
// 删除订单&取消订单
...
...
pages/mine/appointment-detail/appointment-detail.wxml
View file @
f2931965
...
...
@@ -38,7 +38,20 @@
<text>订单已评价</text>
</view>
</view>
<view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 7}}">
<view class="state-content state-content column cc" wx:if="{{orderInfo.state === 7}}">
<view class="state-content-title row">
<text>退款审核中</text>
</view>
<view class="state-content-tip row">
<text>退款申请正在审核中,请您耐心等待</text>
</view>
</view>
<view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 8}}">
<view class="state-content-title row">
<text>退款成功</text>
</view>
</view>
<view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 9}}">
<view class="state-content-title row">
<text>订单已完成</text>
</view>
...
...
@@ -279,13 +292,13 @@
</view>
<!-- 底部按钮 -->
<view class="footer-btn row ce">
<view class="footer-btn row ce
ac
">
<!-- 状态(-1已取消,0未付款,1未发货,2待使用,3已使用,4已过期,5已发货,6已关闭/已评价) -->
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='0' wx:if="{{orderInfo.state
===
0}}">取消订单</view>
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='0' wx:if="{{orderInfo.state
===
0}}">取消订单</view>
<view class="order-btn" bindtap="onOrderPay" wx:if="{{orderInfo.state===0}}">去支付</view>
<view class="delete-btn" bindtap="onOrderRefund" data-type='0' wx:if="{{orderInfo.state
===2 && orderInfo.goodsType === -1
}}">申请退款</view>
<view class="delete-btn" bindtap="onOrderRefund" data-type='0' wx:if="{{orderInfo.state
=== 2 && orderInfo.goodsType === -1 && orderInfo.isRefund
}}">申请退款</view>
<view class="order-btn" bindtap="onOrderEvaluate" wx:if="{{orderInfo.state===3}}">去评价</view>
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state === 4 || orderInfo.state
===-1 || orderInfo.state===6 || orderInfo.state===7
}}">删除订单</view>
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state === 4 || orderInfo.state
=== -1 || orderInfo.state === 6 || orderInfo.state === 8 || orderInfo.state === 9
}}">删除订单</view>
<view class="order-btn" wx:if="{{orderInfo.state === -1}}" bindtap="onOrderAgain">再次报名</view>
</view>
...
...
pages/mine/appointment-detail/appointment-detail.wxss
View file @
f2931965
...
...
@@ -793,14 +793,14 @@
bottom: 0;
width: 100%;
background: #FFFFFF;
padding:
32rpx
20rpx;
padding:
0
20rpx;
border-top: 1px solid #e2e7ef;
}
.delete-btn, .order-btn {
width: 200rpx;
line-height: 96rpx;
margin
-right: 24rpx
;
margin
: 32rpx 24rpx 32rpx 0
;
border-radius: 4rpx;
font-size: 30rpx;
font-weight: 600;
...
...
pages/mine/appointment/appointment.js
View file @
f2931965
...
...
@@ -115,6 +115,7 @@ Page({
'enrollId'
:
funcData
[
i
].
enrollId
,
'name'
:
funcData
[
i
].
name
,
'status'
:
Number
(
funcData
[
i
].
status
),
// 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
'orderStatus'
:
Number
(
funcData
[
i
].
orderStatus
),
'activeState'
:
Number
(
funcData
[
i
].
activeState
),
// 活动状态(0 未开始 1进行中 2 已结束)
'cover'
:
funcData
[
i
].
cover
,
'date'
:
funcData
[
i
].
activeTime
,
...
...
@@ -173,6 +174,12 @@ Page({
})
this
.
onReload
()
})
.
catch
((
response
)
=>
{
App
.
ui
.
showToast
({
'iconType'
:
'error'
,
'title'
:
response
.
message
})
})
},
fail
:
()
=>
{},
})
...
...
pages/mine/appointment/appointment.wxml
View file @
f2931965
...
...
@@ -49,9 +49,15 @@
<!-- 未开始 -->
<view class="appointment-wrapper" wx:if="{{item.status === 2 && item.activeState === 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status">
<view
wx:if="{{item.orderStatus === 2}}"
class="appintment-activity-status">
<text>未开始</text>
</view>
<view wx:if="{{item.orderStatus === 7}}" class="appintment-activity-status-pay">
<text>退款审核中</text>
</view>
<view wx:if="{{item.orderStatus === 8}}" class="appintment-activity-status">
<text>退款成功</text>
</view>
<view class="appointment-activity-content row ac">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
...
...
@@ -74,17 +80,24 @@
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<button wx:if="{{item.isRefund && item.status !== 7}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<view data-item="{{item}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
<button wx:if="{{item.isRefund && item.orderStatus !== 7}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<view wx:if="{{item.isRefund}}" data-item="{{item}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
<view wx:if="{{item.orderStatus === 8}}" data-item="{{item}}" data-type='1' class="cancel-btn" catchtap="doCancel">删除报名</view>
</view>
</view>
</view>
<!-- 进行中 -->
<view class="appointment-wrapper" wx:if="{{item.status === 2 && item.activeState === 1}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status">
<view
wx:if="{{item.orderStatus === 2}}"
class="appintment-activity-status">
<text>进行中</text>
</view>
<view wx:if="{{item.orderStatus === 7}}" class="appintment-activity-status-pay">
<text>退款审核中</text>
</view>
<view wx:if="{{item.orderStatus === 8}}" class="appintment-activity-status">
<text>退款成功</text>
</view>
<view class="appointment-activity-content row ac">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
...
...
@@ -107,8 +120,9 @@
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<button wx:if="{{item.isRefund && item.status !== 7}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<view data-item="{{item}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
<button wx:if="{{item.isRefund && item.orderStatus !== 7}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<view wx:if="{{item.isRefund}}" catchtap="onOrderUse" class="confirm-btn">去使用</view>
<view wx:if="{{item.orderStatus === 8}}" data-item="{{item}}" data-type='1' class="cancel-btn" catchtap="doCancel">删除报名</view>
</view>
</view>
</view>
...
...
pages/pay/order-comment/order-comment.js
View file @
f2931965
...
...
@@ -29,7 +29,9 @@ Page({
orderInfo
:
Object
.
assign
(
this
.
data
.
orderInfo
,
{
'id'
:
options
.
id
}),
pageFrom
:
pageFrom
})
if
(
pageFrom
==
'activityList'
)
{
// 判断来源的区别在于,评价之后,订单要返回的层数。
if
(
pageFrom
===
'activityList'
||
pageFrom
===
'orderDetail'
)
{
this
.
queryOrderDetail
()
}
...
...
@@ -282,12 +284,23 @@ Page({
iconType
:
'success'
,
title
:
'评价成功'
,
ending
:
()
=>
{
if
(
pageFrom
===
'activityList'
||
pageFrom
===
'orderList'
)
{
wx
.
navigateBack
({
event
:
{
'type'
:
'onReload'
,
}
})
}
if
(
pageFrom
==
'orderDetail'
)
{
wx
.
navigateBack
({
delta
:
2
,
event
:
{
'type'
:
'onReload'
,
}
})
}
}
})
})
},
...
...
@@ -307,10 +320,9 @@ Page({
this
.
uploadImage
()
.
then
((
response
)
=>
{
this
.
saveCommentInfo
()
console
.
log
(
'onSubmitCommennt then'
)
})
.
catch
((
response
)
=>
{
console
.
log
(
'onSubmitCommennt catch'
)
})
},
...
...
pages/pay/order-detail/order-detail.js
View file @
f2931965
...
...
@@ -28,6 +28,12 @@ Page({
},
onReload
:
function
()
{
wx
.
emit
({
event
:
{
type
:
'onReload'
,
receivePage
:
'pages/mine/order/order'
,
}
})
this
.
queryOrderDetail
()
},
...
...
@@ -74,6 +80,7 @@ Page({
'instructions'
:
funcResponse
.
particulars
,
'expireTime'
:
funcResponse
.
expireTime
.
replace
(
/-/g
,
'.'
).
replace
(
'~'
,
'-'
),
//订单有效期
'wxRequest'
:
funcResponse
.
wxRequest
,
'isRefund'
:
Boolean
(
Number
(
funcResponse
.
enableRefund
))
}
// 电影
...
...
pages/pay/order-detail/order-detail.wxml
View file @
f2931965
...
...
@@ -296,13 +296,13 @@
</view>
<!-- 底部按钮 -->
<view class="footer-btn row ce" wx:if="{{orderInfo.state !== 7}}">
<view class="footer-btn row ce
ac
" wx:if="{{orderInfo.state !== 7}}">
<!-- 状态(-1已取消,0未付款,1未发货,2待使用,3已使用,4已过期,5已发货,6已关闭/已评价) -->
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='0' wx:if="{{orderInfo.state === 0}}">取消订单</view>
<view class="order-btn" bindtap="onOrderPay" wx:if="{{orderInfo.state === 0}}">去支付</view>
<view class="delete-btn" bindtap="onOrderRefund" wx:if="{{orderInfo.state === 2}}">申请退款</view>
<view class="delete-btn" bindtap="onOrderRefund" wx:if="{{orderInfo.state === 2
&& orderInfo.isRefund
}}">申请退款</view>
<view class="order-btn" bindtap="onOrderEvaluate" wx:if="{{orderInfo.state === 3}}">去评价</view>
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state === 4 || orderInfo.state === -1 || orderInfo.state === 6 || orderInfo.state === 8}}">删除订单</view>
<view class="delete-btn" bindtap="onDelOrCancelOrder" data-type='1' wx:if="{{orderInfo.state === 4 || orderInfo.state === -1 || orderInfo.state === 6 || orderInfo.state === 8
|| orderInfo.state === 9
}}">删除订单</view>
<view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state === -1 || orderInfo.state === 8}}">再次下单</view>
</view>
...
...
pages/pay/order-detail/order-detail.wxss
View file @
f2931965
...
...
@@ -822,14 +822,14 @@
bottom: 0;
width: 100%;
background: #FFFFFF;
padding:
32rpx
20rpx;
padding:
0
20rpx;
border-top: 1px solid #e2e7ef;
}
.delete-btn, .order-btn {
width: 200rpx;
line-height: 96rpx;
margin
-right: 24rpx
;
margin
: 32rpx 24rpx 32rpx 0
;
border-radius: 4rpx;
font-size: 30rpx;
font-weight: 600;
...
...
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