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
cfa619c6
authored
Dec 31, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
订单列表,活动列表状态重构。
parent
f2931965
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
492 additions
and
421 deletions
pages/club/home/home.wxml
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/mine/appointment/appointment.wxss
pages/mine/home/home.js
pages/mine/order/order.js
pages/mine/order/order.wxml
pages/mine/order/order.wxss
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/pay/order-input/order-input.js
pages/club/home/home.wxml
View file @
cfa619c6
...
...
@@ -18,7 +18,7 @@
<view class="member-power row cc ac" wx:if="{{winPowerInfoEnter}}">
<view class="member-power-info column cc ac">
<text>权限提醒</text>
<text>该俱乐部为业主专享,仅面向业主。如果您
不
是业主,可前往【我的】页面进行业主认证。</text>
<text>该俱乐部为业主专享,仅面向业主。如果您是业主,可前往【我的】页面进行业主认证。</text>
<button class="row cc ac" bindtap="onCloseTip">我知道了</button>
</view>
</view>
...
...
pages/mine/appointment-detail/appointment-detail.js
View file @
cfa619c6
...
...
@@ -13,14 +13,11 @@ Page({
fromPage
:
''
,
codeInfo
:
{},
isFromUse
:
false
,
winCode
:
false
,
residuePayTime
:
""
,
//剩余支付时间
residuePayTime
:
''
,
//剩余支付时间
codeList
:
[],
shopAppId
:
""
,
activityId
:
''
,
shopInfo
:
{},
...
...
@@ -40,9 +37,7 @@ Page({
options
:
options
,
activityId
:
options
.
activityId
,
orderInfo
:
{
'id'
:
options
.
id
},
shopAppId
:
options
.
shopAppId
,
fromPage
:
options
.
fromPage
===
'order'
?
'order'
:
''
,
isFromUse
:
options
.
showCode
===
'true'
?
true
:
false
,
})
this
.
queryOrderDetail
()
},
...
...
@@ -90,8 +85,12 @@ Page({
'instructions'
:
funcResponse
.
particulars
,
'expireTime'
:
funcResponse
.
expireTime
.
replace
(
/-/g
,
'.'
).
replace
(
'~'
,
'-'
),
//订单有效期
'wxRequest'
:
funcResponse
.
wxRequest
,
'isRefund'
:
Boolean
(
Number
(
funcResponse
.
enableRefund
))
'isRefund'
:
Boolean
(
Number
(
funcResponse
.
enableRefund
)),
'viewButton'
:
[],
}
this
.
setActivityDetailView
(
funcOrderInfo
)
console
.
log
(
funcOrderInfo
)
// 电影
if
(
funcOrderInfo
.
goodsType
===
-
2
&&
funcOrderInfo
.
expireTime
)
{
...
...
@@ -128,18 +127,75 @@ Page({
goodsList
:
funcGoodsList
,
})
this
.
setData
({
orderInfo
:
funcOrderInfo
,
shopInfo
:
funcShopInfo
,
userInfo
:
funcUserInfo
,
goodsList
:
funcGoodsList
,
})
// 等待支付时间计时
if
(
funcOrderInfo
.
state
==
0
)
this
.
setPayCountdown
(
funcOrderInfo
.
submitTime
)
}).
catch
(()
=>
{})
},
// +----------+----------+---------+-----------+------------------+------------------+-------------------------------+
// | 状态码 | 订单状态 | 状态码 | 活动状态 | 列表按钮 | 详情按钮 | 备注 |
// +----------+----------+---------+-----------+------------------+------------------+-------------------------------+
// | 0 | 待付款 | | | 取消报名 去支付 | 取消报名 去支付 | |
// | 1 | 未发货 | | | | | 不考虑。 |
// | 2 | 待使用 | 0 | 未开始 | 申请退款 去使用 | 申请退款 | 先判断订单状态,再判断活动状态。|
// | 2 | 待使用 | 1 | 进行中 | 申请退款 去使用 | 申请退款 | 先判断订单状态,再判断活动状态。|
// | 2 | 待使用 | 2 | 已结束 | | | 视为已过期。 |
// | 3 | 待评价 | | | 去评价 | 去评价 | 无视活动状态。 |
// | 4 | 已过期 | | | 删除报名 | 删除报名 | 无视活动状态。 |
// | 5 | 已发货 | | | | | 不考虑。 |
// | 6 | 已评价 | | | 删除报名 | 删除报名 | 无视活动状态。 |
// | 7 | 退款审核 | | | | | 无视活动状态。 |
// | 8 | 退款成功 | | | 删除报名 再次报名| 删除报名 再次报名| 无视活动状态。 |
// | -1 | 已取消 | | | 删除报名 再次报名| 删除报名 再次报名| 无视活动状态。 |
// +----------+----------+---------+-----------+------------------+------------------+-------------------------------+
setActivityDetailView
:
function
(
funcItem
)
{
let
funcButtonTypePredefined
=
{
cancel
:
{
buttonId
:
1
,
text
:
'取消报名'
,
style
:
'invalid'
},
pay
:
{
buttonId
:
2
,
text
:
'去支付'
,
style
:
'tip'
},
refund
:
{
buttonId
:
3
,
text
:
'申请退款'
,
style
:
'invalid'
},
use
:
{
buttonId
:
4
,
text
:
'去使用'
,
style
:
'tip'
},
evaluate
:
{
buttonId
:
5
,
text
:
'去评价'
,
style
:
'tip'
},
delete
:
{
buttonId
:
6
,
text
:
'删除报名'
,
style
:
'invalid'
},
again
:
{
buttonId
:
7
,
text
:
'再次报名'
,
style
:
'tip'
},
}
switch
(
funcItem
.
state
)
{
case
0
:
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
cancel
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
pay
)
break
case
2
:
if
(
funcItem
.
isRefund
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
refund
)
break
case
3
:
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
evaluate
)
break
case
4
:
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
6
:
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
7
:
break
case
8
:
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
case
-
1
:
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
}
},
setPayCountdown
:
function
(
funcSubmitTime
)
{
let
doTime
=
15
*
60
*
1000
let
timeInter
=
setInterval
(()
=>
{
...
...
@@ -207,62 +263,6 @@ Page({
}
else
{
wx
.
navigateTo
({
url
:
'/pages/play/activity/activity'
})
}
return
let
funcUrl
=
''
let
funcGoodsType
=
this
.
data
.
orderInfo
.
goodsType
let
funcShopAppId
=
App
.
getShopInfo
(
this
.
data
.
shopInfo
.
id
).
appId
App
.
setShopInfo
(
this
.
data
.
shopInfo
.
id
,
funcGoodsType
)
switch
(
funcShopAppId
)
{
case
0
:
funcUrl
=
'/pages/club/home/home'
break
// 海错图
case
1
:
if
(
funcGoodsType
===
-
1
)
funcUrl
=
'/pages/play/activity/activity'
if
(
funcGoodsType
===
1
)
funcUrl
=
'/pages/commodity/project-detail/project-detail'
if
(
funcGoodsType
===
3
)
funcUrl
=
'/pages/commodity/project-detail/project-detail'
break
// 星空影院
case
2
:
if
(
funcGoodsType
===
-
2
)
funcUrl
=
'/pages/play/movie/movie'
break
// 儿童营地
case
3
:
if
(
funcGoodsType
===
1
)
funcUrl
=
'/pages/commodity/project-detail/project-detail'
if
(
funcGoodsType
===
2
)
funcUrl
=
'/pages/commodity/menu-food/menu-food'
if
(
funcGoodsType
===
3
)
funcUrl
=
'/pages/commodity/project-detail/project-detail'
break
// 原野MOJITO
case
4
:
if
(
funcGoodsType
===
5
)
funcUrl
=
'/pages/commodity/menu-food/menu-food'
break
// 拾光花坊
case
5
:
if
(
funcGoodsType
===
-
1
)
funcUrl
=
'/pages/play/activity/activity'
if
(
funcGoodsType
===
5
)
funcUrl
=
'/pages/commodity/menu-food/menu-food'
break
// 原味舒食
case
6
:
if
(
funcGoodsType
===
5
)
funcUrl
=
'/pages/commodity/menu-food/menu-food'
break
// 元养水韵SPA
case
7
:
if
(
funcGoodsType
===
2
)
funcUrl
=
'/pages/commodity/project-detail/project-detail'
break
}
console
.
log
(
funcUrl
)
wx
.
navigateTo
({
url
:
funcUrl
})
},
// 去支付
onOrderPay
:
function
(
event
)
{
...
...
@@ -298,7 +298,7 @@ Page({
},
// 删除订单&取消订单
// type :1删除0取消
onDelOrCancelOrder
:
function
(
event
)
{
doCancel
:
function
(
event
)
{
let
funcItem
=
this
.
data
.
orderInfo
let
type
=
event
.
currentTarget
.
dataset
.
type
...
...
pages/mine/appointment-detail/appointment-detail.wxml
View file @
cfa619c6
...
...
@@ -293,13 +293,15 @@
<!-- 底部按钮 -->
<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="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 && 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 || orderInfo.state === 9}}">删除订单</view>
<view class="order-btn" wx:if="{{orderInfo.state === -1}}" bindtap="onOrderAgain">再次报名</view>
<block wx:for="{{orderInfo.viewButton}}" wx:for-item="itemButton" wx:for-index="indexButton" wx:key="indexButton">
<button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-type="0" catchtap="doCancel">取消报名</button>
<button wx:if="{{itemButton.buttonId === 2}}" class="operation-tip row cc ac" catchtap="onOrderPay">去支付</button>
<button wx:if="{{itemButton.buttonId === 3}}" class="operation-invalid row cc ac" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" catchtap="onOrderUse">去使用</button>
<button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" catchtap="onOrderEvaluate">去评价</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-type="1" catchtap="doCancel">删除报名</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" catchtap="onOrderAgain">再次报名</button>
</block>
</view>
<!-- 二维码弹窗 -->
...
...
pages/mine/appointment-detail/appointment-detail.wxss
View file @
cfa619c6
...
...
@@ -797,7 +797,7 @@
border-top: 1px solid #e2e7ef;
}
.
delete-btn, .order-btn
{
.
operation-invalid
{
width: 200rpx;
line-height: 96rpx;
margin: 32rpx 24rpx 32rpx 0;
...
...
@@ -805,15 +805,21 @@
font-size: 30rpx;
font-weight: 600;
text-align: center;
}
.delete-btn {
color: #656e7b;
background: #FFFFFF;
border: 1px solid #c2c7cf;
}
.order-btn {
.operation-tip {
width: 200rpx;
line-height: 96rpx;
margin: 32rpx 24rpx 32rpx 0;
border-radius: 4rpx;
font-size: 30rpx;
font-weight: 600;
text-align: center;
color: #FFFFFF;
background: #86c5e1;
}
...
...
pages/mine/appointment/appointment.js
View file @
cfa619c6
...
...
@@ -2,72 +2,40 @@ let App = getApp()
Page
({
data
:
{
active
:
0
,
tabItem
:
[
{
content
:
'主题活动'
,
type
:
'0'
},
{
content
:
'夜间入园预约'
,
type
:
'1'
},
{
content
:
'看房预约'
,
type
:
'2'
},
],
isLoading
:
false
,
option
:
{},
isDoing
:
false
,
pageNo
:
1
,
pageSize
:
10
,
tabItem
:
[{
content
:
'主题活动'
,
type
:
'0'
},
{
content
:
'夜间入园预约'
,
type
:
'1'
},
{
content
:
'看房预约'
,
type
:
'2'
},
],
// 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
// 活动状态(0 未开始 1进行中 2 已结束)
activityList
:
[],
data
:
[],
active
:
0
,
},
onLoad
:
function
(
options
)
{
console
.
log
(
'options'
,
options
)
console
.
log
(
options
)
switch
(
options
.
tab
)
{
case
'active'
:
options
.
tab
=
0
break
case
'garden'
:
options
.
tab
=
1
break
case
'scanHouse'
:
options
.
tab
=
2
break
case
'active'
:
options
.
tab
=
0
;
break
case
'activity'
:
options
.
tab
=
0
;
break
case
'garden'
:
options
.
tab
=
1
;
break
case
'scanHouse'
:
options
.
tab
=
2
;
break
}
let
type
=
options
.
tab
?
1
*
options
.
tab
:
0
this
.
setData
({
option
:
options
,
active
:
type
active
:
options
.
tab
})
type
===
0
?
this
.
queryActivityList
()
:
this
.
getList
(
type
)
},
onShow
:
function
()
{
let
funcIsRefresh
=
wx
.
getStorageSync
(
'option-appointment'
)
if
(
funcIsRefresh
===
'refresh'
)
{
this
.
setData
({
pageNo
:
1
,
pageSize
:
10
,
data
:
[],
activityList
:
[],
})
let
type
=
this
.
data
.
option
.
tab
?
1
*
this
.
data
.
option
.
tab
:
0
if
(
type
===
0
)
{
if
(
options
.
tab
===
0
)
{
this
.
queryActivityList
()
}
else
{
this
.
getList
(
type
)
}
this
.
getList
(
options
.
tab
)
}
},
...
...
@@ -88,7 +56,6 @@ Page({
},
queryActivityList
:
function
()
{
wx
.
setStorageSync
(
'option-appointment'
,
''
)
App
.
ui
.
showToast
({
'iconType'
:
'loading'
,
'title'
:
'加载中'
,
...
...
@@ -114,9 +81,9 @@ Page({
'orderId'
:
funcData
[
i
].
orderId
,
'enrollId'
:
funcData
[
i
].
enrollId
,
'name'
:
funcData
[
i
].
name
,
'status'
:
Number
(
funcData
[
i
].
status
),
// 订单状态(-1已取消, 0未付款, 2待使用, 3已使用, 4已过期 6已关闭)
'status'
:
Number
(
funcData
[
i
].
status
),
'orderStatus'
:
Number
(
funcData
[
i
].
orderStatus
),
'activeState'
:
Number
(
funcData
[
i
].
activeState
),
// 活动状态(0 未开始 1进行中 2 已结束)
'activeState'
:
Number
(
funcData
[
i
].
activeState
),
'cover'
:
funcData
[
i
].
cover
,
'date'
:
funcData
[
i
].
activeTime
,
'address'
:
funcData
[
i
].
address
,
...
...
@@ -124,11 +91,18 @@ Page({
'amount'
:
funcData
[
i
].
totalMoney
?
funcData
[
i
].
totalMoney
.
toFixed
(
2
)
:
0
,
'wxRequest'
:
funcData
[
i
].
wxRequest
,
'belongType'
:
Number
(
funcData
[
i
].
type
),
'isRefund'
:
Boolean
(
Number
(
funcData
[
i
].
enableRefund
))
'isRefund'
:
Boolean
(
Number
(
funcData
[
i
].
enableRefund
)),
'viewStateTip'
:
''
,
'viewStateWarning'
:
''
,
'viewStateInvalid'
:
''
,
'viewButton'
:
[],
}
console
.
log
(
funcItem
);
this
.
setActivityItemView
(
funcItem
)
console
.
log
(
funcItem
)
if
(
funcItem
.
status
===
3
&&
funcItem
.
belongType
===
2
)
funcItem
.
status
=
6
// 俱乐部活动没有评价,直接设置为已评价状态。
// if (funcItem.status === 3 && funcItem.belongType === 2) funcItem.status = 6
funcList
.
push
(
funcItem
)
}
...
...
@@ -141,9 +115,85 @@ Page({
}).
catch
(()
=>
{})
},
// +----------+----------+---------+-----------+------------------+------------------+-------------------------------+
// | 状态码 | 订单状态 | 状态码 | 活动状态 | 列表按钮 | 详情按钮 | 备注 |
// +----------+----------+---------+-----------+------------------+------------------+-------------------------------+
// | 0 | 待付款 | | | 取消报名 去支付 | 取消报名 去支付 | |
// | 1 | 未发货 | | | | | 不考虑。 |
// | 2 | 待使用 | 0 | 未开始 | 申请退款 去使用 | 申请退款 | 先判断订单状态,再判断活动状态。|
// | 2 | 待使用 | 1 | 进行中 | 申请退款 去使用 | 申请退款 | 先判断订单状态,再判断活动状态。|
// | 2 | 待使用 | 2 | 已结束 | | | 视为已过期。 |
// | 3 | 待评价 | | | 去评价 | 去评价 | 无视活动状态。 |
// | 4 | 已过期 | | | 删除报名 | 删除报名 | 无视活动状态。 |
// | 5 | 已发货 | | | | | 不考虑。 |
// | 6 | 已评价 | | | 删除报名 | 删除报名 | 无视活动状态。 |
// | 7 | 退款审核 | | | | | 无视活动状态。 |
// | 8 | 退款成功 | | | 删除报名 再次报名| 删除报名 再次报名| 无视活动状态。 |
// | -1 | 已取消 | | | 删除报名 再次报名| 删除报名 再次报名| 无视活动状态。 |
// +----------+----------+---------+-----------+------------------+------------------+-------------------------------+
setActivityItemView
:
function
(
funcItem
)
{
let
funcButtonTypePredefined
=
{
cancel
:
{
buttonId
:
1
,
text
:
'取消报名'
,
style
:
'invalid'
},
pay
:
{
buttonId
:
2
,
text
:
'去支付'
,
style
:
'tip'
},
refund
:
{
buttonId
:
3
,
text
:
'申请退款'
,
style
:
'invalid'
},
use
:
{
buttonId
:
4
,
text
:
'去使用'
,
style
:
'tip'
},
evaluate
:
{
buttonId
:
5
,
text
:
'去评价'
,
style
:
'tip'
},
delete
:
{
buttonId
:
6
,
text
:
'删除报名'
,
style
:
'invalid'
},
again
:
{
buttonId
:
7
,
text
:
'再次报名'
,
style
:
'tip'
},
}
switch
(
funcItem
.
orderStatus
)
{
case
0
:
funcItem
.
viewStateWarning
=
'待付款'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
cancel
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
pay
)
break
case
2
:
if
(
funcItem
.
activeState
===
0
)
funcItem
.
viewStateWarning
=
'未开始'
if
(
funcItem
.
activeState
===
1
)
funcItem
.
viewStateTip
=
'进行中'
if
(
funcItem
.
isRefund
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
refund
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
use
)
break
case
3
:
funcItem
.
viewStateTip
=
'待评价'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
evaluate
)
break
case
4
:
funcItem
.
viewStateInvalid
=
'已过期'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
6
:
funcItem
.
viewStateInvalid
=
'已评价'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
7
:
funcItem
.
viewStateWarning
=
'退款审核中'
break
case
8
:
funcItem
.
viewStateTip
=
'退款成功'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
case
-
1
:
funcItem
.
viewStateInvalid
=
'已取消'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
}
},
// 去使用
onOrderUse
:
function
(
event
)
{
this
.
onOrderDetail
(
event
)
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
wx
.
navigateTo
({
url
:
'/pages/mine/appointment-detail/appointment-detail?id='
+
funcItem
.
orderId
+
'&activityId='
+
funcItem
.
enrollId
+
'&date='
+
funcItem
.
date
+
'&belongType='
+
funcItem
.
belongType
,
})
},
onOrderRefund
:
function
(
event
)
{
...
...
@@ -199,13 +249,6 @@ Page({
})
},
// 跳转详情页面
onOrderDetail
:
function
(
event
)
{
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
wx
.
navigateTo
({
url
:
'/pages/mine/appointment-detail/appointment-detail?id='
+
funcItem
.
orderId
+
'&activityId='
+
funcItem
.
enrollId
+
'&date='
+
funcItem
.
date
+
'&belongType='
+
funcItem
.
belongType
,
})
},
// 点击导航切换,默认是全部的
onSelectionTab
:
function
(
event
)
{
let
index
=
event
.
currentTarget
.
dataset
.
index
...
...
@@ -328,8 +371,7 @@ Page({
},
// 预约列表/我的预约
getList
:
function
(
index
)
{
wx
.
setStorageSync
(
'option-appointment'
,
''
)
console
.
log
(
'getList'
,
index
)
index
=
index
-
1
let
type
=
''
switch
(
index
)
{
...
...
pages/mine/appointment/appointment.wxml
View file @
cfa619c6
...
...
@@ -4,7 +4,7 @@
<view class="tab row cb">
<block wx:for="{{tabItem}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="tab-item {{index ==
active? 'active':
''}}" data-index="{{index}}" bindtap="onSelectionTab">{{item.content}}</view>
<view class="tab-item {{index ==
= active ? 'active' :
''}}" data-index="{{index}}" bindtap="onSelectionTab">{{item.content}}</view>
</block>
</view>
...
...
@@ -13,192 +13,17 @@
<!-- 主题活动 -->
<view class="myAppointment-body" wx:if="{{activityList.length > 0 && active === 0}}">
<block wx:for="{{activityList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<!-- 待付款 -->
<view class="appointment-wrapper" wx:if="{{item.status === 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status-pay">
<text>待付款</text>
</view>
<view class="appointment-activity-content row ac">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
</view>
<view class="appointment-activity-info column ca">
<view class="appointment-activity-title">
<text>{{item.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{item.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + item.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row cb ac">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view catchtap="doCancel" data-item="{{item}}" data-type='0' class="cancel-btn">取消报名</view>
<view catchtap="onOrderPay" data-item="{{item}}" class="confirm-btn">去支付</view>
</view>
</view>
</view>
<!-- 未开始 -->
<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 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>
</view>
<view class="appointment-activity-info column ca">
<view class="appointment-activity-title">
<text>{{item.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{item.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + item.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row cb ac">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<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 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>
</view>
<view class="appointment-activity-info column ca">
<view class="appointment-activity-title">
<text>{{item.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{item.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + item.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row cb ac">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<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>
<!-- 待评价 -->
<view class="appointment-wrapper" wx:if="{{item.status === 3 && item.activeState !== 0}}" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.date}}</view>
<view class="appintment-activity-status">
<text>待评价</text>
</view>
<view class="appointment-activity-content row ac">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
</view>
<view class="appointment-activity-info column ca">
<view class="appointment-activity-title">
<text>{{item.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{item.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + item.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row cb ac">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="confirm-btn" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</view>
</view>
</view>
</view>
<!-- 已过期 -->
<view class="appointment-wrapper" wx:if="{{item.status === 4 || item.status === 6}}" data-item="{{item}}" bindtap="onOrderDetail">
<view wx:if="{{item.status === 4}}" class="mask-cancel"></view>
<view class="appointment-time mask-cancel-time">{{item.date}}</view>
<view class="appintment-activity-status-cancel">
<text wx:if="{{item.status === 4}}">已过期</text>
<text wx:if="{{item.status === 6}}">{{item.belongType === 2 ? '已使用' : '已评价'}}</text>
</view>
<view class="appointment-activity-content row ac">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
</view>
<view class="appointment-activity-info column ca">
<view class="appointment-activity-title">
<text>{{item.name}}</text>
</view>
<view class="appointment-activity-address">
<text>{{item.address}}</text>
</view>
</view>
<view class="appointment-activity-num">
<text>{{'共' + item.num + '人'}}</text>
</view>
</view>
<view class="appointment-activity-footer row cb ac">
<view class="appointment-activity-price">
<text>¥</text>
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view data-item="{{item}}" data-type='1' class="cancel-btn" catchtap="doCancel">删除报名</view>
</view>
</view>
</view>
<!-- 已取消 -->
<view class="appointment-wrapper" wx:if="{{item.status === -1}}">
<view class="mask-cancel" data-item="{{item}}" bindtap="onOrderDetail"></view>
<view class="appointment-time mask-cancel-time">{{item.date}}</view>
<view class="appintment-activity-status-cancel">
<text>已取消</text>
<view class="appointment-wrapper" data-item="{{item}}" bindtap="onOrderUse">
<view wx:if="{{funcItem.orderStatus === 4 || funcItem.orderStatus === -1}}" class="mask-cancel" data-item="{{item}}" bindtap="onOrderUse"></view>
<view wx:if="{{funcItem.orderStatus === 4 || funcItem.orderStatus === -1}}" class="appointment-time mask-cancel-time">{{item.date}}</view>
<view wx:if="{{funcItem.orderStatus !== 4 && funcItem.orderStatus !== -1}}" class="appointment-time">{{item.date}}</view>
<view class="row ce ac">
<text class="appintment-activity-status-tip" wx:if="{{item.viewStateTip}}">{{item.viewStateTip}}</text>
<text class="appintment-activity-status-warning" wx:if="{{item.viewStateWarning}}">{{item.viewStateWarning}}</text>
<text class="appintment-activity-status-invalid" wx:if="{{item.viewStateInvalid}}">{{item.viewStateInvalid}}</text>
</view>
<view class="appointment-activity-content row ac">
<view class="appointment-activity-img">
<image src="{{item.cover}}"></image>
...
...
@@ -221,13 +46,21 @@
<text>{{item.amount}}</text>
</view>
<view class="appointment-activity-btn row">
<view class="cancel-btn cancel" data-item="{{item}}" catchtap="doCancel" data-type="1">删除报名</view>
<view class="confirm-btn confirm-once" data-item="{{item}}" catchtap="onToActivityDetail">再次报名</view>
<block wx:for="{{item.viewButton}}" wx:for-item="itemButton" wx:for-index="indexButton" wx:key="indexButton">
<button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-item="{{item}}" data-type="0" catchtap="doCancel">取消报名</button>
<button wx:if="{{itemButton.buttonId === 2}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button>
<button wx:if="{{itemButton.buttonId === 3}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-item="{{item}}" data-type="1" catchtap="doCancel">删除报名</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onToActivityDetail">再次报名</button>
</block>
</view>
</view>
</view>
</block>
</view>
<!-- 夜间入园预约、看房预约 -->
<view class="myAppointment-body" wx:if="{{data.length > 0 && active !== 0}}">
<view class="myAppointment-item" wx:for="{{data}}" wx:key="index" data-item="{{item}}" bindtap="gohotelAccommodation">
...
...
pages/mine/appointment/appointment.wxss
View file @
cfa619c6
...
...
@@ -152,22 +152,21 @@
border-radius: 4rpx;
}
.appintment-activity-status {
.appintment-activity-status
-tip
{
color: #86C5E1;
text-align: right;
font-size: 26;
line-height: 36rpx;
}
.appintment-activity-status-
pay
{
.appintment-activity-status-
warning
{
color: #E66060;
font-size: 26;
text-align: right;
line-height: 36rpx;
}
.appintment-activity-status-cancel {
.appintment-activity-status-invalid {
color: #C2C7CF;
font-size: 26;
text-align: right;
...
...
@@ -231,18 +230,36 @@
font-size: 30rpx;
font-weight: 600;
}
.cancel-btn {
.operation-tip {
z-index: 4;
width: 120rpx;
height: 56rpx;
color: #656E7B;
margin-left: 20rpx;
border-radius: 2px;
background: #86C5E1;
line-height: 56rpx;
font-size: 22rpx;
font-weight: 600;
text-align: center;
line-height: 56rpx;
border-radius: 4rpx;
color: #fff;
}
.operation-invalid {
z-index: 4;
width: 120rpx;
height: 56rpx;
border-radius: 2px;
border: 1px solid #C2C7CF;
line-height: 56rpx;
font-size: 22rpx;
font-weight: 600;
text-align: center;
color: #656E7B;
}
.cancel {
position: absolute;
right: 172rpx;
...
...
@@ -260,24 +277,6 @@
color: #656e7b;
}
.confirm-btn {
z-index: 4;
width: 120rpx;
height: 56rpx;
margin-left: 20rpx;
color: #fff;
font-size: 22rpx;
font-weight: 600;
text-align: center;
line-height: 56rpx;
background: #86C5E1;
border-radius: 4rpx;
}
.confirm-once {
position: absolute;
right: 32rpx;
bottom: 40rpx;
}
.mask-cancel {
position: absolute;
z-index: 3;
...
...
pages/mine/home/home.js
View file @
cfa619c6
...
...
@@ -28,7 +28,7 @@ Page({
icon
:
'./image/order-1.png'
,
name
:
'门票'
,
quantity
:
0
,
type
:
'
3
'
,
type
:
'
1
'
,
},
{
icon
:
'./image/order-2.png'
,
name
:
'餐饮'
,
...
...
@@ -249,7 +249,7 @@ Page({
/**
* 查询我的订单分类统计数量
* -2 - 电影,
2 - SPA,3 - 门票
,4 - 文创,5 - 餐饮
* -2 - 电影,
1 - 门票,2 - SPA
,4 - 文创,5 - 餐饮
* @function
* @param
* @returns
...
...
pages/mine/order/order.js
View file @
cfa619c6
...
...
@@ -57,7 +57,8 @@ Page({
onCatchNewEvent
:
function
(
funcEvent
)
{
console
.
log
(
'page'
,
funcEvent
)
switch
(
funcEvent
.
type
)
{
case
'onReload'
:
this
.
onReload
()
case
'onReload'
:
this
.
onReload
()
}
},
...
...
@@ -86,9 +87,9 @@ Page({
App
.
request
({
url
:
'v1/order/getOrderList'
,
params
:
{
'goodType'
:
this
.
data
.
orderTypeActive
?
this
.
data
.
orderType
[
this
.
data
.
orderTypeActive
].
value
:
''
,
'goodType'
:
this
.
data
.
orderTypeActive
?
this
.
data
.
orderType
[
this
.
data
.
orderTypeActive
].
value
:
this
.
data
.
orderType
[
0
].
value
,
'status'
:
this
.
data
.
tabItem
[
this
.
data
.
statusActive
].
value
,
'pageSize'
:
1
0
,
'pageSize'
:
2
0
,
'pageNo'
:
this
.
data
.
orderPages
,
}
})
...
...
@@ -111,9 +112,16 @@ Page({
'commodityType'
:
Number
(
funcResponse
[
i
].
goodType
),
'wxRequest'
:
funcResponse
[
i
].
wxRequest
,
'total'
:
funcResponse
[
i
].
smOrderDetails
.
length
,
'isRefund'
:
Boolean
(
Number
(
funcResponse
[
i
].
enableRefund
))
'isRefund'
:
Boolean
(
Number
(
funcResponse
[
i
].
enableRefund
)),
'viewStateTip'
:
''
,
'viewStateWarning'
:
''
,
'viewStateInvalid'
:
''
,
'viewButton'
:
[],
}
this
.
setActivityItemView
(
funcItem
)
// 添加订单商品列表
let
funcTotal
=
0
let
funcCommodity
=
funcResponse
[
i
].
smOrderDetails
...
...
@@ -154,12 +162,83 @@ Page({
funcList
.
push
(
funcItem
)
}
console
.
log
(
'funcList'
,
funcList
)
this
.
setData
({
orderList
:
this
.
data
.
orderPages
===
1
?
funcList
:
this
.
data
.
orderList
.
concat
(
funcList
)
})
})
},
// +----------+----------+------------------+------------------+-------------------------------+
// | 状态码 | 订单状态 | 列表按钮 | 详情按钮 | 备注 |
// +----------+----------+------------------+------------------+-------------------------------+
// | 0 | 待付款 | 取消订单 去支付 | 取消订单 去支付 | |
// | 1 | 未发货 | | | 不考虑。 |
// | 2 | 待使用 | 申请退款 去使用 | 申请退款 | |
// | 3 | 待评价 | 去评价 | 去评价 | |
// | 4 | 已过期 | 删除订单 | 删除订单 | |
// | 5 | 已发货 | | | 不考虑。 |
// | 6 | 已评价 | 删除订单 | 删除订单 | |
// | 7 | 退款审核 | | | |
// | 8 | 退款成功 | 删除订单 再次下单| 删除订单 再次下单| |
// | -1 | 已取消 | 删除订单 再次下单| 删除订单 再次下单| |
// +----------+----------+------------------+------------------+-------------------------------+
setActivityItemView
:
function
(
funcItem
)
{
let
funcButtonTypePredefined
=
{
cancel
:
{
buttonId
:
1
,
text
:
'取消订单'
,
style
:
'invalid'
},
pay
:
{
buttonId
:
2
,
text
:
'去支付'
,
style
:
'tip'
},
refund
:
{
buttonId
:
3
,
text
:
'申请退款'
,
style
:
'invalid'
},
use
:
{
buttonId
:
4
,
text
:
'去使用'
,
style
:
'tip'
},
evaluate
:
{
buttonId
:
5
,
text
:
'去评价'
,
style
:
'tip'
},
delete
:
{
buttonId
:
6
,
text
:
'删除订单'
,
style
:
'invalid'
},
again
:
{
buttonId
:
7
,
text
:
'再次下单'
,
style
:
'tip'
},
}
switch
(
funcItem
.
status
)
{
case
0
:
funcItem
.
viewStateWarning
=
'待付款'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
cancel
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
pay
)
break
case
2
:
funcItem
.
viewStateWarning
=
'待使用'
if
(
funcItem
.
isRefund
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
refund
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
use
)
break
case
3
:
funcItem
.
viewStateTip
=
'待评价'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
evaluate
)
break
case
4
:
funcItem
.
viewStateInvalid
=
'已过期'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
6
:
funcItem
.
viewStateInvalid
=
'已评价'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
7
:
funcItem
.
viewStateWarning
=
'退款审核中'
break
case
8
:
funcItem
.
viewStateTip
=
'退款成功'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
case
-
1
:
funcItem
.
viewStateInvalid
=
'已取消'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
}
},
/**
* 初始化订单类型数据字典
* @function
...
...
@@ -180,26 +259,26 @@ Page({
'name'
:
'全部分类'
}]
for
(
let
i
=
0
,
l
=
funcResponse
.
length
;
i
<
l
;
i
++
)
{
let
funcItem
=
{
let
funcItem
=
{
'value'
:
funcResponse
[
i
].
value
,
}
if
(
funcResponse
[
i
].
value
==
3
)
{
if
(
funcResponse
[
i
].
value
==
3
)
{
//门票
funcItem
.
name
=
"门票"
funcList
.
push
(
funcItem
)
}
else
if
(
funcResponse
[
i
].
value
==
5
)
{
}
else
if
(
funcResponse
[
i
].
value
==
5
)
{
// 餐饮
funcItem
.
name
=
"餐饮"
funcList
.
push
(
funcItem
)
}
else
if
(
funcResponse
[
i
].
value
==-
2
)
{
}
else
if
(
funcResponse
[
i
].
value
==
-
2
)
{
// 影票
funcItem
.
name
=
"影票"
funcList
.
push
(
funcItem
)
}
else
if
(
funcResponse
[
i
].
value
==
2
)
{
}
else
if
(
funcResponse
[
i
].
value
==
2
)
{
// SPA
funcItem
.
name
=
"SPA"
funcList
.
push
(
funcItem
)
}
else
if
(
funcResponse
[
i
].
value
==
4
)
{
}
else
if
(
funcResponse
[
i
].
value
==
4
)
{
// 文创
funcItem
.
name
=
"文创"
funcList
.
push
(
funcItem
)
...
...
@@ -207,7 +286,6 @@ Page({
}
let
typeTitle
=
'全部分类'
//
let
orderTypeActive
=
0
//
let
aVal
=
''
funcList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
value
==
this
.
data
.
optionsGoodType
)
{
typeTitle
=
item
.
name
...
...
@@ -309,7 +387,7 @@ Page({
* @param
* @returns
*/
onOrderCancel
:
function
(
event
)
{
doCancel
:
function
(
event
)
{
App
.
ui
.
showDialog
({
type
:
'confirm'
,
title
:
'是否确认取消订单'
,
...
...
@@ -346,7 +424,7 @@ Page({
this
.
queryOrder
()
})
},
fail
:
()
=>
{
},
fail
:
()
=>
{},
})
},
...
...
@@ -356,7 +434,7 @@ Page({
* @param
* @returns
*/
onOrderRemove
:
function
(
event
)
{
doCancel
:
function
(
event
)
{
App
.
ui
.
showDialog
({
type
:
'confirm'
,
title
:
'是否确认删除订单?'
,
...
...
@@ -532,7 +610,9 @@ Page({
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
console
.
log
(
funcItem
)
if
(
funcItem
.
commodityType
===
-
3
)
{
wx
.
navigateTo
({
url
:
'/pages/club/home/home'
})
wx
.
navigateTo
({
url
:
'/pages/club/home/home'
})
return
}
...
...
pages/mine/order/order.wxml
View file @
cfa619c6
...
...
@@ -57,14 +57,9 @@
<text>{{item.shopName}}</text>
</view>
<view>
<text class="warning" wx:if="{{item.status === 0}}">待付款</text>
<text class="warning" wx:if="{{item.status === 2}}">待使用</text>
<text class="warning" wx:if="{{item.status === 3}}">待评价</text>
<text class="message" wx:if="{{item.status === -1}}">已取消</text>
<text class="message" wx:if="{{item.status === 4}}">已过期</text>
<text class="message" wx:if="{{item.status === 6}}">已评价</text>
<text class="warning" wx:if="{{item.status === 7}}">退款审核中</text>
<text class="message" wx:if="{{item.status === 8}}">退款成功</text>
<text class="warning" wx:if="{{item.viewStateTip}}">{{item.viewStateTip}}</text>
<text class="warning" wx:if="{{item.viewStateWarning}}">{{item.viewStateWarning}}</text>
<text class="message" wx:if="{{item.viewStateInvalid}}">{{item.viewStateInvalid}}</text>
</view>
</view>
...
...
@@ -97,13 +92,15 @@
<text class="amount">¥{{item.amount}}</text>
</view>
<view class="row ac">
<button wx:if="{{item.isRefund && item.status !== 7}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{item.status === 0}}" class="delete row cc ac" data-index="{{index}}" data-item="{{item}}" catchtap="onOrderCancel" disabled="{{isDoing}}">取消订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 4 || item.status === 6 || item.status === 8}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRemove">删除订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 0}}" class="again row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 2}}" class="again row cc ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 3}}" class="again row cc ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 8}}" class="again row cc ac" data-item="{{item}}" catchtap="onOrderAgain">再次下单</button>
<block wx:for="{{item.viewButton}}" wx:for-item="itemButton" wx:for-index="indexButton" wx:key="indexButton">
<button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-item="{{item}}" data-type="0" catchtap="doCancel">取消订单</button>
<button wx:if="{{itemButton.buttonId === 2}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button>
<button wx:if="{{itemButton.buttonId === 3}}" class="operation-invalid row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderUse">去使用</button>
<button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderEvaluate">去评价</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-item="{{item}}" data-type="1" catchtap="doCancel">删除订单</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" data-item="{{item}}" catchtap="onOrderAgain">再次订单</button>
</block>
</view>
</view>
</view>
...
...
pages/mine/order/order.wxss
View file @
cfa619c6
/* 订单分类 */
.order-category {
z-index:
3
;
z-index:
5
;
position: fixed;
top: 0;
left: 0;
...
...
@@ -37,7 +37,7 @@
/* 订单类型选择 */
.order-type-selection {
z-index:
7
;
z-index:
6
;
position: fixed;
top: 176rpx;
left: 0;
...
...
@@ -125,6 +125,11 @@
color: #c2c7cf;
}
.order-list-item-title .tip {
font-weight: 800;
color: #86c5e1;
}
.order-list-item-title image {
/* display: block;
max-width: 100rpx;
...
...
@@ -169,27 +174,33 @@
color: #15191f;
}
.order-list-item-operation .delete {
.operation-tip {
z-index: 4;
width: 120rpx;
height: 56rpx;
border-radius: 4rpx;
border: 1px solid #c2c7cf;
margin-left: 20rpx;
border-radius: 2px;
background: #86C5E1;
line-height: 56rpx;
font-size: 22rpx;
font-weight:
5
00;
line-height: 32rpx
;
color: #
656e7b
;
font-weight:
6
00;
text-align: center
;
color: #
fff
;
}
.order-list-item-operation .again {
.operation-invalid {
z-index: 4;
width: 120rpx;
height: 56rpx;
margin-left: 20rpx;
border-radius: 4rpx;
background: #86c5e1;
border-radius: 2px;
border: 1px solid #C2C7CF;
line-height: 56rpx;
font-size: 22rpx;
font-weight:
5
00;
line-height: 32rpx
;
color: #
fff
;
font-weight:
6
00;
text-align: center
;
color: #
656E7B
;
}
/* 券码 */
...
...
pages/pay/order-comment/order-comment.js
View file @
cfa619c6
...
...
@@ -284,7 +284,7 @@ Page({
iconType
:
'success'
,
title
:
'评价成功'
,
ending
:
()
=>
{
if
(
pageFrom
===
'activityList'
||
pageFrom
===
'orderList'
)
{
if
(
this
.
data
.
pageFrom
===
'activityList'
||
this
.
data
.
pageFrom
===
'orderList'
)
{
wx
.
navigateBack
({
event
:
{
'type'
:
'onReload'
,
...
...
@@ -292,7 +292,7 @@ Page({
})
}
if
(
pageFrom
==
'orderDetail'
)
{
if
(
this
.
data
.
pageFrom
==
'orderDetail'
)
{
wx
.
navigateBack
({
delta
:
2
,
event
:
{
...
...
pages/pay/order-detail/order-detail.js
View file @
cfa619c6
...
...
@@ -80,8 +80,11 @@ Page({
'instructions'
:
funcResponse
.
particulars
,
'expireTime'
:
funcResponse
.
expireTime
.
replace
(
/-/g
,
'.'
).
replace
(
'~'
,
'-'
),
//订单有效期
'wxRequest'
:
funcResponse
.
wxRequest
,
'isRefund'
:
Boolean
(
Number
(
funcResponse
.
enableRefund
))
'isRefund'
:
Boolean
(
Number
(
funcResponse
.
enableRefund
)),
'viewButton'
:
[],
}
this
.
setActivityItemView
(
funcOrderInfo
)
console
.
log
(
funcOrderInfo
)
// 电影
if
(
funcOrderInfo
.
goodsType
===
-
2
&&
funcOrderInfo
.
expireTime
)
{
...
...
@@ -122,6 +125,75 @@ Page({
})
},
// +----------+----------+------------------+------------------+-------------------------------+
// | 状态码 | 订单状态 | 列表按钮 | 详情按钮 | 备注 |
// +----------+----------+------------------+------------------+-------------------------------+
// | 0 | 待付款 | 取消订单 去支付 | 取消订单 去支付 | |
// | 1 | 未发货 | | | 不考虑。 |
// | 2 | 待使用 | 申请退款 去使用 | 申请退款 | |
// | 3 | 待评价 | 去评价 | 去评价 | |
// | 4 | 已过期 | 删除订单 | 删除订单 | |
// | 5 | 已发货 | | | 不考虑。 |
// | 6 | 已评价 | 删除订单 | 删除订单 | |
// | 7 | 退款审核 | | | |
// | 8 | 退款成功 | 删除订单 再次下单| 删除订单 再次下单| |
// | -1 | 已取消 | 删除订单 再次下单| 删除订单 再次下单| |
// +----------+----------+------------------+------------------+-------------------------------+
setActivityItemView
:
function
(
funcItem
)
{
let
funcButtonTypePredefined
=
{
cancel
:
{
buttonId
:
1
,
text
:
'取消订单'
,
style
:
'invalid'
},
pay
:
{
buttonId
:
2
,
text
:
'去支付'
,
style
:
'tip'
},
refund
:
{
buttonId
:
3
,
text
:
'申请退款'
,
style
:
'invalid'
},
use
:
{
buttonId
:
4
,
text
:
'去使用'
,
style
:
'tip'
},
evaluate
:
{
buttonId
:
5
,
text
:
'去评价'
,
style
:
'tip'
},
delete
:
{
buttonId
:
6
,
text
:
'删除订单'
,
style
:
'invalid'
},
again
:
{
buttonId
:
7
,
text
:
'再次下单'
,
style
:
'tip'
},
}
switch
(
funcItem
.
state
)
{
case
0
:
funcItem
.
viewStateWarning
=
'待付款'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
cancel
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
pay
)
break
case
2
:
funcItem
.
viewStateTip
=
'待使用'
if
(
funcItem
.
isRefund
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
refund
)
break
case
3
:
funcItem
.
viewStateTip
=
'待评价'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
evaluate
)
break
case
4
:
funcItem
.
viewStateInvalid
=
'已过期'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
6
:
funcItem
.
viewStateInvalid
=
'已评价'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
break
case
7
:
funcItem
.
viewStateWarning
=
'退款审核中'
break
case
8
:
funcItem
.
viewStateTip
=
'退款成功'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
case
-
1
:
funcItem
.
viewStateInvalid
=
'已取消'
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
delete
)
funcItem
.
viewButton
.
push
(
funcButtonTypePredefined
.
again
)
break
}
},
setPayCountdown
:
function
(
funcSubmitTime
)
{
let
doTime
=
15
*
60
*
1000
let
timeInter
=
setInterval
(()
=>
{
...
...
@@ -271,7 +343,7 @@ Page({
// 删除订单&取消订单
// type :1删除0取消
onDelOrCancelOrder
:
function
(
event
)
{
doCancel
:
function
(
event
)
{
let
type
=
event
.
currentTarget
.
dataset
.
type
App
.
ui
.
showDialog
({
type
:
'confirm'
,
...
...
pages/pay/order-detail/order-detail.wxml
View file @
cfa619c6
...
...
@@ -296,14 +296,16 @@
</view>
<!-- 底部按钮 -->
<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 && 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 || orderInfo.state === 9}}">删除订单</view>
<view class="order-btn" bindtap="onOrderAgain" wx:if="{{orderInfo.state === -1 || orderInfo.state === 8}}">再次下单</view>
<view class="footer-btn row ce ac">
<block wx:for="{{orderInfo.viewButton}}" wx:for-item="itemButton" wx:for-index="indexButton" wx:key="indexButton">
<button wx:if="{{itemButton.buttonId === 1}}" class="operation-invalid row cc ac" data-type="0" catchtap="doCancel">取消订单</button>
<button wx:if="{{itemButton.buttonId === 2}}" class="operation-tip row cc ac" catchtap="onOrderPay">去支付</button>
<button wx:if="{{itemButton.buttonId === 3}}" class="operation-invalid row cc ac" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{itemButton.buttonId === 4}}" class="operation-tip row cc ac" catchtap="onOrderUse">去使用</button>
<button wx:if="{{itemButton.buttonId === 5}}" class="operation-tip row cc ac" catchtap="onOrderEvaluate">去评价</button>
<button wx:if="{{itemButton.buttonId === 6}}" class="operation-invalid row cc ac" data-type="1" catchtap="doCancel">删除订单</button>
<button wx:if="{{itemButton.buttonId === 7}}" class="operation-tip row cc ac" catchtap="onOrderAgain">再次下单</button>
</block>
</view>
<!-- 二维码弹窗 -->
...
...
pages/pay/order-detail/order-detail.wxss
View file @
cfa619c6
...
...
@@ -847,6 +847,33 @@
background: #86c5e1;
}
.operation-invalid {
width: 200rpx;
line-height: 96rpx;
margin: 32rpx 24rpx 32rpx 0;
border-radius: 4rpx;
font-size: 30rpx;
font-weight: 600;
text-align: center;
color: #656e7b;
background: #FFFFFF;
border: 1px solid #c2c7cf;
}
.operation-tip {
width: 200rpx;
line-height: 96rpx;
margin: 32rpx 24rpx 32rpx 0;
border-radius: 4rpx;
font-size: 30rpx;
font-weight: 600;
text-align: center;
color: #FFFFFF;
background: #86c5e1;
}
.logo-box {
width: 100rpx;
height: 80rpx;
...
...
pages/pay/order-input/order-input.js
View file @
cfa619c6
...
...
@@ -558,7 +558,7 @@ Page({
*/
onEntryComplete
:
function
()
{
wx
.
reLaunch
({
url
:
'/pages/mine/appointment/appointment?fromPage=pay'
url
:
'/pages/mine/appointment/appointment?fromPage=pay
&tab=activity
'
})
},
...
...
@@ -1181,7 +1181,7 @@ Page({
})
}
else
{
wx
.
reLaunch
({
url
:
'/pages/mine/appointment/appointment?fromPage=pay'
url
:
'/pages/mine/appointment/appointment?fromPage=pay
&tab=activity
'
})
}
}
...
...
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