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
565c0be5
authored
Sep 19, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://120.77.182.185/yanl/mini-shimao
parents
65d8f033
7757d137
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
97 additions
and
53 deletions
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/home/home.wxss
pages/mine/home/home.js
View file @
565c0be5
...
@@ -43,35 +43,10 @@ Page({
...
@@ -43,35 +43,10 @@ Page({
showMoreOrder
:
false
,
// 查看更多订单
showMoreOrder
:
false
,
// 查看更多订单
showMoreActivity
:
false
,
// 查看更多活动
showMoreActivity
:
false
,
// 查看更多活动
myOrder
:
{
myOrder
:
{
passOrder
:
[{
passOrder
:
[],
id
:
0
,
logo
:
''
,
store
:
'儿童营地'
,
title
:
'精灵鸟理想国年卡'
,
time
:
'有效期至 2020.09.30'
,
name
:
'文*海'
,
idNum
:
'211222****08080090'
},
{
id
:
0
,
logo
:
''
,
store
:
'儿童营地'
,
title
:
'精灵鸟理想国年卡'
,
time
:
'有效期至 2020.09.30'
,
name
:
'文*海'
,
idNum
:
'211222****08080090'
},
],
artOrder
:
{
artOrder
:
{
logo
:
''
,
logo
:
''
,
orderList
:
[{
orderList
:
[]
id
:
0
,
store
:
'海错图展馆'
,
cover
:
'../../pay/order-detail/image/goods_item.png'
,
title
:
'《海错图》展览单人门票'
,
time
:
'有效期至 2020.09.30'
,
quantity
:
'共1张门票'
},
]
}
}
},
},
appointmentList
:
[{
appointmentList
:
[{
...
@@ -82,7 +57,16 @@ Page({
...
@@ -82,7 +57,16 @@ Page({
}],
}],
orderListBackup
:
[],
orderListBackup
:
[],
integral
:
0
,
//积分
integral
:
0
,
//积分
shopConfig
:
App
.
globalData
.
shopId
,
isYearCard
:
true
,
isMonthCard
:
false
,
},
// 跳转订单详情
onOrderDetail
:
function
(
event
)
{
let
funcItem
=
event
.
currentTarget
.
dataset
.
item
wx
.
navigateTo
({
url
:
'/pages/pay/order-detail/order-detail?id='
+
funcItem
.
orderId
,
})
},
},
close
()
{
close
()
{
this
.
setData
({
this
.
setData
({
...
@@ -174,9 +158,20 @@ Page({
...
@@ -174,9 +158,20 @@ Page({
pageSize
:
-
1
pageSize
:
-
1
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
tmpArr
=
[]
console
.
log
(
'that.shopConfig'
,
that
.
data
.
shopConfig
);
console
.
log
(
'daishiyongdingdan'
,
res
);
let
list
=
res
.
data
let
list
=
res
.
data
.
map
(
item
=>
{
let
shopFilter
=
that
.
data
.
shopConfig
.
filter
(
k
=>
{
return
k
.
name
.
toLowerCase
()
==
item
.
officeName
.
toLowerCase
()
})
item
.
logo
=
shopFilter
.
length
>
0
?
shopFilter
[
0
].
logo
:
''
if
(
item
.
smOrderDetails
.
length
>
3
)
{
item
.
smOrderDetailsSlice3
=
item
.
smOrderDetails
.
slice
(
0
,
3
)
}
item
.
expireTimeEnd
=
item
.
expireTime
.
substr
(
12
)
return
item
})
let
listBackUp
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
//备份数据
let
listBackUp
=
JSON
.
parse
(
JSON
.
stringify
(
list
))
//备份数据
let
orderList
=
`myOrder.artOrder.orderList`
let
orderList
=
`myOrder.artOrder.orderList`
...
@@ -201,15 +196,31 @@ Page({
...
@@ -201,15 +196,31 @@ Page({
pageSize
:
-
1
pageSize
:
-
1
},
},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
tmpArr
=
[]
console
.
log
(
'卡片数据'
,
res
);
let
list
=
res
.
data
.
map
(
item
=>
{
let
list
=
res
.
data
.
map
(
item
=>
{
let
shopFilter
=
that
.
data
.
shopConfig
.
filter
(
k
=>
{
return
k
.
name
.
toLowerCase
()
==
item
.
officeName
.
toLowerCase
()
})
if
(
item
.
name
.
indexOf
(
'年卡'
)
!=
-
1
)
{
item
.
cardType
=
1
}
else
if
(
item
.
name
.
indexOf
(
'月卡'
)
!=
-
1
)
{
item
.
cardType
=
2
}
else
{
item
.
cardType
=
3
}
item
.
logo
=
shopFilter
.
length
>
0
?
shopFilter
[
0
].
logo
:
''
return
item
return
item
})
})
let
filterList
=
list
.
filter
(
item
=>
{
return
item
.
officeName
==
'儿童营地'
})
let
passOrder
=
`myOrder.passOrder`
let
passOrder
=
`myOrder.passOrder`
that
.
setData
({
that
.
setData
({
[
passOrder
]:
l
ist
[
passOrder
]:
filterL
ist
})
})
}
}
})
})
...
...
pages/mine/home/home.wxml
View file @
565c0be5
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
</view>
</view>
<view class="row align-c" bindtap="onOrder">
<view class="row align-c" bindtap="onOrder">
<text>查看全部</text>
<text>查看全部</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image
class="all-order-icon"
src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
</view>
</view>
<!-- 订单分类icno -->
<!-- 订单分类icno -->
...
@@ -142,17 +142,23 @@
...
@@ -142,17 +142,23 @@
<!-- 订单卡片 -->
<!-- 订单卡片 -->
<!-- 年卡 -->
<!-- 年卡 -->
<view class="pass-wrapper" wx:if="{{myOrder.passOrder}}" bindtap="handleToCard">
<view class="pass-wrapper" wx:if="{{myOrder.passOrder}}" bindtap="handleToCard">
<image wx:if="{{ myOrder.passOrder[0].cardType==1}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{myOrder.passOrder[0].cardType==2}}" class="card-bg month-bg"
src="{{imageResourcesBase +'pay/order-input/card-2.png'}}"></image>
<image wx:else class="card-bg month-bg" src="{{imageResourcesBase +'pay/order-input/card-3.png'}}">
</image>
<view class="pass-bg-one" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-bg-one" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-logo-wrapper row align-c">
<view class="pass-logo-wrapper row align-c">
<view class="logo-box">
<view class="logo-box">
<image
src="{{
myOrder.passOrder[0].logo}}"></image>
<image
mode="aspectFit" src="{{imageResourcesBase+
myOrder.passOrder[0].logo}}"></image>
</view>
</view>
<text>{{myOrder.passOrder[0].officeName}}</text>
<text>{{myOrder.passOrder[0].officeName}}</text>
</view>
</view>
<view class="pass-title">
<view class="pass-title">
<text>
精灵鸟理想国
{{myOrder.passOrder[0].name}}</text>
<text>{{myOrder.passOrder[0].name}}</text>
</view>
</view>
<view class="pass-time">
<view class="pass-time">
<text>有效期至{{myOrder.passOrder[0].expireTime}}</text>
<text>有效期至{{myOrder.passOrder[0].expireTime}}</text>
...
@@ -166,21 +172,30 @@
...
@@ -166,21 +172,30 @@
</view>
</view>
<!-- 商品 -->
<!-- 商品 -->
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this">
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this" data-item="{{item}}"
bindtap="onOrderDetail">
<view class="goods-logo-wrapper row align-c">
<view class="goods-logo-wrapper row align-c">
<view class="
art-logo
">
<view class="
logo-box
">
<image
src="{{myOrder.artOrder
.logo}}"></image>
<image
mode="aspectFit" src="{{imageResourcesBase+ item
.logo}}"></image>
</view>
</view>
<text>{{item.officeName}}</text>
<text>{{item.officeName}}</text>
</view>
</view>
<view class="goods-content row align-c">
<view class="goods-content row align-c">
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this">
<block wx:if="{{item.smOrderDetails.length>3}}">
</image>
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetailsSlice3}}" wx:for-item="k"
wx:key="*this">
</image>
</block>
<block wx:else>
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this">
</image>
</block>
<text wx:if="{{item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].name}}</text>
<text wx:if="{{item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].name}}</text>
</view>
</view>
<view class="goods-footer row align-c con-b">
<view class="goods-footer row align-c con-b">
<text>有效期
至{{item.time
}}</text>
<text>有效期
{{item.expireTimeEnd
}}</text>
<text>共{{item.smOrderDetails.length}}</text>
<text>共{{item.smOrderDetails.length}}
件
</text>
</view>
</view>
</view>
</view>
...
@@ -201,7 +216,7 @@
...
@@ -201,7 +216,7 @@
</view>
</view>
<view class="row align-c" bindtap="onOrder">
<view class="row align-c" bindtap="onOrder">
<text>查看全部</text>
<text>查看全部</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image
class="all-order-icon"
src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
</view>
</view>
<!-- 预约分类icno -->
<!-- 预约分类icno -->
...
...
pages/mine/home/home.wxss
View file @
565c0be5
...
@@ -60,7 +60,8 @@
...
@@ -60,7 +60,8 @@
font-size: 42rpx;
font-size: 42rpx;
font-weight: bolder;
font-weight: bolder;
}
}
.padding-l-18{
.padding-l-18 {
padding-left: 18rpx;
padding-left: 18rpx;
}
}
...
@@ -393,10 +394,10 @@
...
@@ -393,10 +394,10 @@
border-radius: 4rpx;
border-radius: 4rpx;
}
}
.order-activity image {
/*
.order-activity image {
width: 32rpx;
width: 32rpx;
height: 32rpx;
height: 32rpx;
}
}
*/
.order-activity-title-wrapper {
.order-activity-title-wrapper {
height: 48rpx;
height: 48rpx;
...
@@ -469,6 +470,13 @@
...
@@ -469,6 +470,13 @@
opacity: 0.81;
opacity: 0.81;
}
}
.card-bg {
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
.pass-bg-one {
.pass-bg-one {
position: absolute;
position: absolute;
left: 0;
left: 0;
...
@@ -499,9 +507,9 @@
...
@@ -499,9 +507,9 @@
}
}
.pass-logo-wrapper image {
.pass-logo-wrapper image {
width: 64rpx;
/*
width: 64rpx;
height: 50rpx;
height: 50rpx;
*/
background-color: #ccc;
/* background-color: #ccc; */
}
}
.pass-logo-wrapper text {
.pass-logo-wrapper text {
...
@@ -543,6 +551,7 @@
...
@@ -543,6 +551,7 @@
.goods-logo-wrapper {
.goods-logo-wrapper {
height: 100rpx;
height: 100rpx;
margin-top: 40rpx;
margin-top: 40rpx;
margin-bottom: 10rpx;
}
}
.goods-logo-wrapper text {
.goods-logo-wrapper text {
...
@@ -562,6 +571,7 @@
...
@@ -562,6 +571,7 @@
height: 136rpx;
height: 136rpx;
margin-right: 32rpx;
margin-right: 32rpx;
background-color: #ccc;
background-color: #ccc;
border-radius: 5px;
}
}
.goods-content text {
.goods-content text {
...
@@ -671,6 +681,8 @@
...
@@ -671,6 +681,8 @@
}
}
.more image {
.more image {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
margin-left: 8rpx;
}
}
...
@@ -694,6 +706,11 @@
...
@@ -694,6 +706,11 @@
height: 32rpx;
height: 32rpx;
}
}
.all-order-icon {
width: 32rpx;
height: 32rpx;
}
image {
image {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
...
@@ -708,6 +725,6 @@ image {
...
@@ -708,6 +725,6 @@ image {
}
}
.logo-box image {
.logo-box image {
max-width: 100%!important;
max-width: 100%
!important;
max-height: 100%!important;
max-height: 100%
!important;
}
}
\ No newline at end of file
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