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
ccd11ae1
authored
Sep 17, 2020
by
zqm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
MM-订单详情
parent
538f3685
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
247 additions
and
32 deletions
pages/mine/card/card.js
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/home/home.wxss
pages/mine/order/order.js
pages/pay/order-detail/order-detail.js
pages/pay/order-detail/order-detail.wxml
pages/pay/order-detail/order-detail.wxss
pages/mine/card/card.js
View file @
ccd11ae1
...
...
@@ -4,7 +4,7 @@ const App = getApp()
Page
({
data
:
{
imageBase
:
App
.
globalData
.
appImageBase
,
passListType
:
0
,
// 0为单张卡 1为多张卡
passListType
:
1
,
// 0为单张卡 1为多张卡
privateStatus
:
true
,
swiperCurrent
:
0
,
passList
:
[
...
...
pages/mine/home/home.js
View file @
ccd11ae1
...
...
@@ -77,7 +77,8 @@ Page({
img
:
''
,
title
:
'日落观光游船体验活动之船行碧波共赏美景'
,
num
:
3
}]
}],
orderListBackup
:
[]
},
close
()
{
...
...
@@ -109,7 +110,59 @@ Page({
// 去核销
goCouponInput
(
event
)
{
wx
.
navigateTo
({
url
:
'/pages/pay/coupon-input/coupon-input'
,
url
:
'/pages/pay/coupon-input/coupon-input'
,
})
},
//获取待使用订单
getWillUseOrders
()
{
let
that
=
this
App
.
wxRequest
({
url
:
'/api/v1/order/getOrderList'
,
data
:
{
goodType
:
""
,
//数据字典(good_type) 商品分类(全部为"")
status
:
2
,
//状态(-1已取消0未付款1未发货2待使用3已使用4已过期)
pageNo
:
1
,
pageSize
:
-
1
},
success
:
function
(
res
)
{
let
tmpArr
=
[]
console
.
log
(
'daishiyongdingdan'
,
res
);
let
list
=
res
.
data
let
listBackUp
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
//备份数据
let
orderList
=
`myOrder.artOrder.orderList`
list
.
length
=
1
that
.
setData
({
[
orderList
]:
list
,
orderListBackup
:
listBackUp
})
}
})
},
//获取卡数据
getCardList
()
{
let
that
=
this
App
.
wxRequest
({
url
:
'/api/v1/volume/getVolumeList'
,
data
:
{
status
:
""
,
//0已过期1待使用2已使用(""全部)
pageNo
:
1
,
pageSize
:
-
1
},
success
:
function
(
res
)
{
let
tmpArr
=
[]
console
.
log
(
'卡片数据'
,
res
);
let
list
=
res
.
data
.
map
(
item
=>
{
return
item
})
let
passOrder
=
`myOrder.passOrder`
that
.
setData
({
[
passOrder
]:
list
})
}
})
},
...
...
@@ -145,6 +198,8 @@ Page({
userInfo
:
funcUserInfo
})
this
.
getMyActivityList
()
this
.
getCardList
()
this
.
getWillUseOrders
()
}
else
{
this
.
setData
({
isRegister
:
false
,
...
...
@@ -328,9 +383,30 @@ Page({
//查看更多
onShowMoreOrder
:
function
()
{
let
showMoreOrder
=
!
this
.
data
.
showMoreOrder
let
orderList
=
`myOrder.artOrder.orderList`
console
.
log
(
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
orderListBackup
)));
if
(
showMoreOrder
)
{
// 展开
this
.
setData
({
[
orderList
]:
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
orderListBackup
)),
})
}
else
{
// 收起
let
list
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
data
.
orderListBackup
))
list
.
length
=
1
this
.
setData
({
[
orderList
]:
list
,
})
}
this
.
setData
({
showMoreOrder
showMoreOrder
,
})
},
onShowMoreActivity
:
function
()
{
let
showMoreActivity
=
!
this
.
data
.
showMoreActivity
...
...
pages/mine/home/home.wxml
View file @
ccd11ae1
...
...
@@ -128,41 +128,40 @@
<view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-logo-wrapper row align-c">
<image src="{{myOrder.passOrder[0].logo}}"></image>
<text>{{myOrder.passOrder[0].
stor
e}}</text>
<text>{{myOrder.passOrder[0].
officeNam
e}}</text>
</view>
<view class="pass-title">
<text>
{{myOrder.passOrder[0].titl
e}}</text>
<text>
精灵鸟理想国{{myOrder.passOrder[0].nam
e}}</text>
</view>
<view class="pass-time">
<text>
{{myOrder.passOrder[0].t
ime}}</text>
<text>
有效期至{{myOrder.passOrder[0].expireT
ime}}</text>
</view>
<view class="pass-name">
<text>{{myOrder.passOrder[0].
n
ame}}</text>
<text>{{myOrder.passOrder[0].
personN
ame}}</text>
</view>
<view class="pass-idNum">
<text>{{myOrder.passOrder[0].id
Num
}}</text>
<text>{{myOrder.passOrder[0].id
entityCard
}}</text>
</view>
</view>
<!-- 商品 -->
<view class="goods-wrapper">
<view class="goods-wrapper"
wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this"
>
<view class="goods-logo-wrapper row align-c">
<view class="art-logo">
<image src="{{myOrder.artOrder.logo}}"></image>
</view>
<text>{{
myOrder.artOrder.orderList[0].stor
e}}</text>
<text>{{
item.officeNam
e}}</text>
</view>
<view class="goods-content row align-c">
<image src="{{
item.cover}}" wx:for="{{myOrder.artOrder.orderList}}" wx:key="id
"></image>
<text wx:if="{{
myOrder.artOrder.orderList.length === 1}}">{{myOrder.artOrder.orderList[0].titl
e}}</text>
<image src="{{
k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this
"></image>
<text wx:if="{{
item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].nam
e}}</text>
</view>
<view class="goods-footer row align-c con-b">
<text>
{{myOrder.artOrder.orderList[0]
.time}}</text>
<text>
{{myOrder.artOrder.orderList[0].quantity
}}</text>
<text>
有效期至{{item
.time}}</text>
<text>
共{{item.smOrderDetails.length
}}</text>
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder">
<text wx:if="{{!showMoreOrder}}">展开更多</text>
...
...
pages/mine/home/home.wxss
View file @
ccd11ae1
.container {
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%);
background: linear-gradient(180deg, #fff 10%, #F3F4F6 20%);
/* background: #F3F4F6 */
}
.navigation {
z-index: 2;
}
...
...
@@ -13,6 +15,7 @@
width: 100%;
height: 100%;
}
.mine {
position: relative;
width: 750rpx;
...
...
@@ -25,7 +28,7 @@
margin-right: 32rpx;
}
.mine-avatar
>
image {
.mine-avatar
>
image {
width: 128rpx;
height: 128rpx;
border-radius: 50%;
...
...
@@ -61,10 +64,13 @@
padding: 41rpx 32rpx;
background-color: #fff;
border-radius: 4rpx;
margin-top:48rpx;
}
.cpopon-info {
flex: 1;
}
.cpopon-info text:nth-child(1) {
font-size: 34rpx;
font-weight: 600;
...
...
@@ -76,6 +82,7 @@
font-size: 26rpx;
color: #161A1F;
}
.coupon image {
width: 32rpx;
height: 32rpx;
...
...
@@ -127,7 +134,7 @@
.menu {
width: 750rpx;
margin-top: 16rpx;
/* margin-top: 16rpx; */
margin-bottom: 30rpx;
padding: 0 48rpx;
overflow-x: hidden;
...
...
@@ -328,24 +335,30 @@
background-color: #fff;
border-radius: 4rpx;
}
.order-activity image {
width: 32rpx;
height: 32rpx;
}
.order-activity-title-wrapper {
height: 48rpx;
}
.order-activity-title {
font-size: 34rpx;
color: #15191F;
font-weight: 600;
}
.order-activity-icon-list {
margin-top: 56rpx;
}
.order-activity-icon-wrapper {
flex: 1;
}
.order-activity-icon {
position: relative;
width: 80rpx;
...
...
@@ -353,10 +366,12 @@
background-color: #F5F6F8;
border-radius: 50%;
}
.order-activity-icon image{
.order-activity-icon image {
width: 48rpx;
height: 48rpx;
}
.order-activity-badge {
position: absolute;
top: -10rpx;
...
...
@@ -370,9 +385,11 @@
background-color: #E66060;
border-radius: 16rpx;
}
.badge-widen {
width: 48rpx;
}
.order-activity-icon-wrapper text {
margin-top: 16rpx;
font-size: 22rpx;
...
...
@@ -394,6 +411,7 @@
border-radius: 4rpx;
opacity: 0.81;
}
.pass-bg-one {
position: absolute;
left: 0;
...
...
@@ -405,6 +423,7 @@
background: rgba(247, 179, 197, 0.5);
border-radius: 4rpx 4rpx 0 0;
}
.pass-bg-two {
position: absolute;
left: 0;
...
...
@@ -417,33 +436,40 @@
background: rgba(247, 179, 197, 0.3);
border-radius: 4rpx 4rpx 0 0;
}
.pass-logo-wrapper {
height: 50rpx;
}
.pass-logo-wrapper image {
width: 64rpx;
height: 50rpx;
background-color: #ccc;
background-color: #ccc;
}
.pass-logo-wrapper text {
height: 50rpx;
margin-left: 20rpx;
font-size: 26rpx;
line-height: 50rpx;
}
.pass-title {
margin-top: 24rpx;
font-size: 42rpx;
font-weight: 600;
}
.pass-time {
margin-top: 8rpx;
font-size: 26rpx;
}
.pass-name {
margin-top: 32rpx;
font-size: 22rpx;
}
.pass-idNum {
margin-top: 8rpx;
font-size: 22rpx;
...
...
@@ -456,10 +482,12 @@
background-color: #F5F6F8;
border-radius: 4rpx;
}
.goods-logo-wrapper {
height: 100rpx;
margin-top: 40rpx;
}
.goods-logo-wrapper text {
height: 100rpx;
margin-left: 20rpx;
...
...
@@ -467,24 +495,29 @@
color: #15191F;
line-height: 100rpx;
}
.goods-content {
height: 136rpx;
}
.goods-content image{
.goods-content image {
width: 140rpx;
height: 136rpx;
margin-right: 32rpx;
background-color: #ccc;
}
.goods-content text {
font-size: 30rpx;
color: #15191F;
font-weight: 600;
line-height: 42rpx;
}
.goods-footer {
height: 84rpx;
}
.goods-footer text {
font-size: 26rpx;
color: #959DA9;
...
...
@@ -509,6 +542,7 @@
background-color: #F5F6F8;
border-radius: 4rpx;
}
.appointment-time {
position: absolute;
left: 0;
...
...
@@ -523,23 +557,26 @@
border-radius: 4rpx;
}
.appointment-activity-content {
}
.appointment-activity-content {
}
.appointment-activity-img {
width: 140rpx;
height: 136rpx;
background-color: #ccc;
}
.appointment-activity-info {
flex: 1;
margin-left: 32rpx;
}
.appointment-activity-title {
color: #15191F;
font-size: 30rpx;
font-weight: 600;
line-height: 42rpx;
}
.appointment-activity-num {
margin-top: 16rpx;
color: #959DA9;
...
...
@@ -550,6 +587,7 @@
width: 305rpx;
height: 110rpx;
}
.border-right {
width: 1rpx;
height: 75rpx;
...
...
@@ -571,10 +609,12 @@
.more {
margin-top: 32rpx;
}
.more text {
font-size: 26rpx;
color: #15191F;
}
.more image {
margin-left: 8rpx;
}
...
...
@@ -587,16 +627,19 @@
background-color: #fff;
border-radius: 4rpx;
}
.service text {
font-size: 34rpx;
color: #15191F;
font-weight: 600;
}
.service image {
width: 32rpx;
height: 32rpx;
}
image {
width: 100%;
height: 100%;
}
}
\ No newline at end of file
pages/mine/order/order.js
View file @
ccd11ae1
...
...
@@ -18,7 +18,7 @@ Page({
'name'
:
'待付款'
},
{
'value'
:
'
1
'
,
'value'
:
'
2
'
,
'name'
:
'待使用'
},
{
...
...
@@ -34,7 +34,14 @@ Page({
isFinished
:
false
},
onLoad
:
function
(
options
)
{
this
.
setOrderType
()
App
.
login
({
timeout
:
0
,
success
:
(
result
)
=>
{
this
.
setOrderType
()
},
})
},
/**
...
...
@@ -414,7 +421,7 @@ Page({
onOrderEvaluate
:
function
(
event
)
{
console
.
log
(
event
.
currentTarget
.
dataset
,
'----------------event.currentTarget.dataset'
);
let
item
=
JSON
.
stringify
(
event
.
currentTarget
.
dataset
.
item
)
let
item
=
JSON
.
stringify
(
event
.
currentTarget
.
dataset
.
item
)
wx
.
navigateTo
({
url
:
`/pages/pay/order-comment/order-comment?orderItem=
${
item
}
`
,
})
...
...
pages/pay/order-detail/order-detail.js
View file @
ccd11ae1
...
...
@@ -2,6 +2,8 @@ let App = getApp()
Page
({
data
:
{
swiperCurrent
:
0
,
showCodePopup
:
false
,
imageBase
:
App
.
globalData
.
appImageBase
,
resourcesBase
:
App
.
globalData
.
appResourcesBase
,
...
...
@@ -15,6 +17,45 @@ Page({
isFromUse
:
false
,
winCode
:
false
,
residuePayTime
:
""
,
//剩余支付时间
sealImgs
:
[{
type
:
1
,
url
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
}],
sealTest
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
sealBig
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-1.png'
,
seals
:
{
seal1
:
{
passSrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
willPaySrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
},
seal1
:
{
passSrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
willPaySrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
},
seal1
:
{
passSrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
willPaySrc
:
App
.
globalData
.
appResourcesBase
+
'sealOfOrder/ertongyingdi-2.png'
,
},
},
codeList
:
[{
id
:
0
,
title
:
'《 阿凡达 》电影票'
,
img
:
'./image/QRcode.png'
,
num
:
'2179 7092 0925'
},
{
id
:
1
,
title
:
'《 阿凡达 》电影票'
,
img
:
'./image/QRcode.png'
,
num
:
'2179 7092 0925'
},
{
id
:
2
,
title
:
'《 阿凡达 》电影票'
,
img
:
'./image/QRcode.png'
,
num
:
'2179 7092 0925'
}
]
},
...
...
@@ -27,11 +68,58 @@ Page({
fromPage
:
options
.
fromPage
===
'order'
?
'order'
:
''
,
isFromUse
:
options
.
showCode
===
'true'
?
true
:
false
,
})
App
.
login
({
timeout
:
0
,
success
:
(
result
)
=>
{
this
.
queryOrderDetail
()
},
})
console
.
log
(
this
.
data
.
shopInfo
)
this
.
queryOrderDetail
()
},
// /api/v1/order/getVolumesByOrderId
// 一键扫码
onFastScan
:
function
(
event
)
{
App
.
wxRequest
({
url
:
'/api/v1/order/getVolumesByOrderId'
,
data
:
{
'orderId'
:
this
.
data
.
orderInfo
.
id
},
success
:
(
response
)
=>
{
let
funcResponse
=
response
.
data
console
.
log
(
response
,
'一键扫码'
);
let
list
=
response
.
data
// let funcCodeInfo = {
// 'codeNo': funcResponse.serialNumber,
// 'codeName': funcResponse.name,
// 'codeBase64': funcResponse.qrcode,
// }
this
.
setData
({
showCodePopup
:
true
,
codeList
:
list
})
}
})
},
swiperChange
(
e
)
{
let
swiperCurrent
=
e
.
detail
.
current
this
.
setData
({
swiperCurrent
})
},
closeQRcode
()
{
let
showCodePopup
=
false
this
.
setData
({
showCodePopup
,
// swiperCurrent:0
})
},
/**
* 订单详情
* @function
...
...
@@ -59,7 +147,8 @@ Page({
'tipOrderNo'
:
funcResponse
.
orderSerialNumber
,
// 订单编号
'tipTimeSubmit'
:
funcResponse
.
createDate
,
'tipTimePay'
:
App
.
modular
.
miment
(
funcResponse
.
paymentTime
).
format
(
'YYYY-MM-DD hh:mm:ss'
),
'tipIntegral'
:
funcResponse
.
integral
'tipIntegral'
:
funcResponse
.
integral
,
'officeName'
:
funcResponse
.
officeName
}
// 添加订单商品列表
...
...
@@ -119,7 +208,7 @@ Page({
},
// 弹出单张二维码
onCouponCode
:
function
(
event
)
{
let
funcOrderInfo
=
event
.
currentTarget
.
dataset
.
item
App
.
wxRequest
({
...
...
pages/pay/order-detail/order-detail.wxml
View file @
ccd11ae1
This diff is collapsed.
Click to expand it.
pages/pay/order-detail/order-detail.wxss
View file @
ccd11ae1
This diff is collapsed.
Click to expand it.
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