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
61372954
authored
Sep 21, 2020
by
zqm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
MM - 订单列表 logo显示
parent
6bfb7ddf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
31 deletions
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/order/order.js
pages/mine/home/home.js
View file @
61372954
...
@@ -60,6 +60,12 @@ Page({
...
@@ -60,6 +60,12 @@ Page({
shopConfig
:
App
.
globalData
.
shopId
,
shopConfig
:
App
.
globalData
.
shopId
,
isYearCard
:
true
,
isYearCard
:
true
,
isMonthCard
:
false
,
isMonthCard
:
false
,
goodTypeCountData
:
{}
},
goQuestion
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/mine/question/question'
,
})
},
},
// 跳转订单详情
// 跳转订单详情
onOrderDetail
:
function
(
event
)
{
onOrderDetail
:
function
(
event
)
{
...
@@ -225,6 +231,25 @@ Page({
...
@@ -225,6 +231,25 @@ Page({
}
}
})
})
},
},
//获取分类统计
getCountByGoodType
()
{
let
that
=
this
App
.
wxRequest
({
url
:
'/api/v1/order/getCountByGoodType'
,
data
:
{
status
:
""
,
//0已过期1待使用2已使用(""全部)
pageNo
:
1
,
pageSize
:
-
1
},
success
:
function
(
res
)
{
console
.
log
(
res
,
'获取分类统计'
);
let
data
=
res
.
data
?
res
.
data
:
{}
that
.
setData
({
goodTypeCountData
:
data
})
}
})
},
setUserInfo
:
function
()
{
setUserInfo
:
function
()
{
let
funcUserInfo
=
wx
.
getStorageSync
(
'userInfo'
)
let
funcUserInfo
=
wx
.
getStorageSync
(
'userInfo'
)
...
@@ -265,6 +290,8 @@ Page({
...
@@ -265,6 +290,8 @@ Page({
this
.
getWillUseOrders
()
this
.
getWillUseOrders
()
this
.
getPermissions
()
this
.
getPermissions
()
this
.
getIntegral
()
this
.
getIntegral
()
this
.
getList
()
this
.
getCountByGoodType
()
},
},
})
})
}
else
{
}
else
{
...
@@ -418,7 +445,6 @@ Page({
...
@@ -418,7 +445,6 @@ Page({
id
:
item
.
id
,
id
:
item
.
id
,
mobile
:
item
.
mobile
,
mobile
:
item
.
mobile
,
name
:
item
.
name
,
name
:
item
.
name
,
}
}
tmpArr
.
push
(
obj
)
tmpArr
.
push
(
obj
)
})
})
...
...
pages/mine/home/home.wxml
View file @
61372954
...
@@ -99,41 +99,46 @@
...
@@ -99,41 +99,46 @@
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image>
<view class="order-activity-badge {{ passBadge > 9 ? 'badge-widen' : ''}}"
<view class="order-activity-badge {{ goodTypeCountData['1'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{passBadge > 0}}">{{passBadge > 99 ? '···' : passBadge}}</view>
wx:if="{{goodTypeCountData['1'] > 0}}">
{{goodTypeCountData['1'] > 99 ? '···' : goodTypeCountData['1']}}</view>
</view>
</view>
<text>门票</text>
<text>门票</text>
</view>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image>
<view class="order-activity-badge {{ foodBadge > 9 ? 'badge-widen' : ''}}"
<view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{foodBadge > 0}}">{{foodBadge > 99 ? '···' : foodBadge}}</view>
wx:if="{{goodTypeCountData['2'] > 0}}">
{{goodTypeCountData['2'] > 99 ? '···' : goodTypeCountData['2']}}</view>
</view>
</view>
<text>餐饮</text>
<text>餐饮</text>
</view>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image>
<view class="order-activity-badge {{ movieBadge > 9 ? 'badge-widen' : ''}}"
<view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{movieBadge > 0}}">{{movieBadge > 99 ? '···' : movieBadge}}</view>
wx:if="{{goodTypeCountData['3'] > 0}}">
{{goodTypeCountData['3'] > 99 ? '···' : goodTypeCountData['3']}}</view>
</view>
</view>
<text>影票</text>
<text>影票</text>
</view>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image>
<view class="order-activity-badge {{ spaBadge > 9 ? 'badge-widen' : ''}}"
<view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{spaBadge > 0}}">{{spaBadge > 99 ? '···' : spaBadge}}</view>
wx:if="{{goodTypeCountData['4'] > 0}}">
{{goodTypeCountData['4'] > 99 ? '···' : goodTypeCountData['4']}}</view>
</view>
</view>
<text>SPA</text>
<text>SPA</text>
</view>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image>
<view class="order-activity-badge {{ artBadge > 9 ? 'badge-widen' : ''}}"
<view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{artBadge > 0}}">{{artBadge > 99 ? '···' : artBadge}}</view>
wx:if="{{goodTypeCountData['5'] > 0}}">
{{goodTypeCountData['5'] > 99 ? '···' : goodTypeCountData['5']}}</view>
</view>
</view>
<text>文创</text>
<text>文创</text>
</view>
</view>
...
@@ -141,7 +146,8 @@
...
@@ -141,7 +146,8 @@
<view class="more-wrapper" wx:if="{{myOrder}}}">
<view class="more-wrapper" wx:if="{{myOrder}}}">
<!-- 订单卡片 -->
<!-- 订单卡片 -->
<!-- 年卡 -->
<!-- 年卡 -->
<view class="pass-wrapper" wx:if="{{myOrder.passOrder}}" bindtap="handleToCard">
<view class="pass-wrapper" wx:if="{{myOrder.passOrder&&myOrder.passOrder.length>0}}"
bindtap="handleToCard">
<image wx:if="{{ myOrder.passOrder[0].cardType==1}}" class="card-bg year-bg"
<image wx:if="{{ myOrder.passOrder[0].cardType==1}}" class="card-bg year-bg"
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{myOrder.passOrder[0].cardType==2}}" class="card-bg month-bg"
<image wx:elif="{{myOrder.passOrder[0].cardType==2}}" class="card-bg month-bg"
...
@@ -172,8 +178,9 @@
...
@@ -172,8 +178,9 @@
</view>
</view>
<!-- 商品 -->
<!-- 商品 -->
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this" data-item="{{item}}"
<block wx:if="myOrder.artOrder.orderList.length>0">
bindtap="onOrderDetail">
<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="logo-box">
<view class="logo-box">
<image mode="aspectFit" src="{{imageResourcesBase+ item.logo}}"></image>
<image mode="aspectFit" src="{{imageResourcesBase+ item.logo}}"></image>
...
@@ -187,7 +194,8 @@
...
@@ -187,7 +194,8 @@
</image>
</image>
</block>
</block>
<block wx:else>
<block wx:else>
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this">
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k"
wx:key="*this">
</image>
</image>
</block>
</block>
...
@@ -198,7 +206,6 @@
...
@@ -198,7 +206,6 @@
<text>共{{item.smOrderDetails.length}}件</text>
<text>共{{item.smOrderDetails.length}}件</text>
</view>
</view>
</view>
</view>
<!-- more -->
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder">
<view class="more row align-c con-c" bindtap="onShowMoreOrder">
<text wx:if="{{!showMoreOrder}}">展开更多</text>
<text wx:if="{{!showMoreOrder}}">展开更多</text>
...
@@ -206,6 +213,7 @@
...
@@ -206,6 +213,7 @@
<image wx:if="{{!showMoreOrder}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:if="{{!showMoreOrder}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
<!-- 预约 -->
<!-- 预约 -->
...
@@ -223,7 +231,7 @@
...
@@ -223,7 +231,7 @@
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="
/image/audit-err.png
"></image>
<image src="
{{imageResourcesBase+'mine/home/yy_theme.png'}}
"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</view>
{{badge}}</view>
</view>
</view>
...
@@ -231,7 +239,7 @@
...
@@ -231,7 +239,7 @@
</view>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="
/image/audit-err.png
"></image>
<image src="
{{imageResourcesBase+'mine/home/yy_night.png'}}
"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</view>
{{badge}}</view>
</view>
</view>
...
@@ -239,7 +247,7 @@
...
@@ -239,7 +247,7 @@
</view>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<view class="order-activity-icon row con-c align-c">
<image src="
/image/audit-err.png
"></image>
<image src="
{{imageResourcesBase+'mine/home/yy_house.png'}}
"></image>
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
<view class="order-activity-badge {{ badge > 9 ? 'badge-widen' : ''}}" wx:if="{{badge}}">
{{badge}}</view>
{{badge}}</view>
</view>
</view>
...
@@ -247,7 +255,7 @@
...
@@ -247,7 +255,7 @@
</view>
</view>
</view>
</view>
<!-- 预约卡片 -->
<!-- 预约卡片 -->
<view class="appintment">
<view class="appintment"
>
<!-- 主题活动 -->
<!-- 主题活动 -->
<view class="appointment-wrapper">
<view class="appointment-wrapper">
<view class="appointment-time">8月15日-7月15日 10:00-12:00</view>
<view class="appointment-time">8月15日-7月15日 10:00-12:00</view>
...
@@ -265,6 +273,7 @@
...
@@ -265,6 +273,7 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view class="appointment-wrapper">
<view class="appointment-wrapper">
<view class="appointment-time">
<view class="appointment-time">
<text>8月15日-7月15日 10:00-12:00</text>
<text>8月15日-7月15日 10:00-12:00</text>
...
@@ -298,8 +307,8 @@
...
@@ -298,8 +307,8 @@
</view>
</view>
</view>
</view>
<view class="border-right"></view>
<view class="border-right"></view>
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
<
!-- <
view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view>
</view>
-->
</view>
</view>
</view>
</view>
<!-- 看房预约 -->
<!-- 看房预约 -->
...
@@ -320,16 +329,15 @@
...
@@ -320,16 +329,15 @@
</view>
</view>
</view>
</view>
<!-- more -->
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreActivity">
<view class="more row align-c con-c" bindtap="onShowMoreActivity"
>
<text wx:if="{{!showMoreActivity}}">展开更多</text>
<text wx:if="{{!showMoreActivity}}">展开更多</text>
<text wx:else>收起</text>
<text wx:else>收起</text>
<image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</view>
</view>
</view>
<!-- 客服中心 -->
<!-- 客服中心 -->
<view class="service row con-b align-c">
<view class="service row con-b align-c"
bindtap="goQuestion"
>
<text>客服中心</text>
<text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
</view>
...
...
pages/mine/order/order.js
View file @
61372954
...
@@ -132,7 +132,7 @@ Page({
...
@@ -132,7 +132,7 @@ Page({
// 映射门店信息
// 映射门店信息
for
(
let
i
=
0
,
l
=
App
.
globalData
.
shopId
.
length
;
i
<
l
;
i
++
)
{
for
(
let
i
=
0
,
l
=
App
.
globalData
.
shopId
.
length
;
i
<
l
;
i
++
)
{
if
(
funcItem
.
shopName
===
App
.
globalData
.
shopId
[
i
].
name
)
{
if
(
funcItem
.
shopName
.
toLowerCase
()
===
App
.
globalData
.
shopId
[
i
].
name
.
toLowerCase
()
)
{
funcItem
.
shopId
=
App
.
globalData
.
shopId
[
i
].
id
funcItem
.
shopId
=
App
.
globalData
.
shopId
[
i
].
id
funcItem
.
shopAppId
=
App
.
globalData
.
shopId
[
i
].
appId
funcItem
.
shopAppId
=
App
.
globalData
.
shopId
[
i
].
appId
funcItem
.
shopLogo
=
App
.
globalData
.
shopId
[
i
].
logo
funcItem
.
shopLogo
=
App
.
globalData
.
shopId
[
i
].
logo
...
...
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