Commit 2ad473a2 by 严立

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao

parents 028b08b9 451e5518
......@@ -60,6 +60,13 @@ Page({
shopConfig: App.globalData.shopId,
isYearCard: true,
isMonthCard: false,
authInfo: null,
goodTypeCountData: {}
},
goQuestion: function () {
wx.navigateTo({
url: '/pages/mine/question/question',
})
},
// 跳转订单详情
onOrderDetail: function (event) {
......@@ -97,7 +104,7 @@ Page({
// 去核销
goCouponInput(event) {
wx.navigateTo({
url: '/pages/pay/coupon-input/coupon-input',
url: '/pages/pay/coupon-input/coupon-input?authInfo=' + JSON.stringify(this.data.authInfo),
})
},
// 获取核销权限
......@@ -113,7 +120,11 @@ Page({
console.log(res, '核销');
let data = res.data
let isPer = false
if (data.length > 0) {
let authInfo = {
officeName: data.officeName,
roleName: data.roleNames[0],
}
if (data.permissions.length > 0) {
//有核销权限
isPer = true
} else {
......@@ -124,7 +135,8 @@ Page({
that.setData({
isCheckPermission: isPer
isCheckPermission: isPer,
authInfo: authInfo
})
}
})
......@@ -197,7 +209,7 @@ Page({
},
success: function (res) {
let list = res.data.map(item => {
let shopFilter = that.data.shopConfig.filter(k => {
......@@ -225,6 +237,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 () {
let funcUserInfo = wx.getStorageSync('userInfo')
......@@ -265,6 +296,8 @@ Page({
this.getWillUseOrders()
this.getPermissions()
this.getIntegral()
this.getList()
this.getCountByGoodType()
},
})
} else {
......@@ -418,7 +451,6 @@ Page({
id: item.id,
mobile: item.mobile,
name: item.name,
}
tmpArr.push(obj)
})
......
......@@ -63,7 +63,7 @@
<view class="coupon row align-c" bindtap="goCouponInput" wx:if="{{isCheckPermission}}">
<view class="cpopon-info col">
<text>券码核销</text>
<text>所属门店:拾光花坊</text>
<text>所属门店:{{authInfo.officeName}}</text>
</view>
<view class="">
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
......@@ -99,41 +99,46 @@
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ passBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{passBadge > 0}}">{{passBadge > 99 ? '···' : passBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['1'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['1'] > 0}}">
{{goodTypeCountData['1'] > 99 ? '···' : goodTypeCountData['1']}}</view>
</view>
<text>门票</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ foodBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{foodBadge > 0}}">{{foodBadge > 99 ? '···' : foodBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['2'] > 0}}">
{{goodTypeCountData['2'] > 99 ? '···' : goodTypeCountData['2']}}</view>
</view>
<text>餐饮</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ movieBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{movieBadge > 0}}">{{movieBadge > 99 ? '···' : movieBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['3'] > 0}}">
{{goodTypeCountData['3'] > 99 ? '···' : goodTypeCountData['3']}}</view>
</view>
<text>影票</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ spaBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{spaBadge > 0}}">{{spaBadge > 99 ? '···' : spaBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['4'] > 0}}">
{{goodTypeCountData['4'] > 99 ? '···' : goodTypeCountData['4']}}</view>
</view>
<text>SPA</text>
</view>
<view class="order-activity-icon-wrapper col align-c">
<view class="order-activity-icon row con-c align-c">
<image src="/image/audit-err.png"></image>
<view class="order-activity-badge {{ artBadge > 9 ? 'badge-widen' : ''}}"
wx:if="{{artBadge > 0}}">{{artBadge > 99 ? '···' : artBadge}}</view>
<image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['5'] > 0}}">
{{goodTypeCountData['5'] > 99 ? '···' : goodTypeCountData['5']}}</view>
</view>
<text>文创</text>
</view>
......@@ -141,7 +146,8 @@
<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"
src="{{imageResourcesBase +'pay/order-input/card-1.png'}}"></image>
<image wx:elif="{{myOrder.passOrder[0].cardType==2}}" class="card-bg month-bg"
......@@ -172,40 +178,42 @@
</view>
<!-- 商品 -->
<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="logo-box">
<image mode="aspectFit" src="{{imageResourcesBase+ item.logo}}"></image>
<block wx:if="myOrder.artOrder.orderList.length>0">
<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="logo-box">
<image mode="aspectFit" src="{{imageResourcesBase+ item.logo}}"></image>
</view>
<text>{{item.officeName}}</text>
</view>
<text>{{item.officeName}}</text>
</view>
<view class="goods-content row align-c">
<block wx:if="{{item.smOrderDetails.length>3}}">
<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>
<view class="goods-content row align-c">
<block wx:if="{{item.smOrderDetails.length>3}}">
<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 class="goods-footer row align-c con-b">
<text>有效期{{item.expireTimeEnd}}</text>
<text>共{{item.smOrderDetails.length}}件</text>
</view>
</view>
<view class="goods-footer row align-c con-b">
<text>有效期{{item.expireTimeEnd}}</text>
<text>共{{item.smOrderDetails.length}}件</text>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder">
<text wx:if="{{!showMoreOrder}}">展开更多</text>
<text wx:else>收起</text>
<image wx:if="{{!showMoreOrder}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder">
<text wx:if="{{!showMoreOrder}}">展开更多</text>
<text wx:else>收起</text>
<image wx:if="{{!showMoreOrder}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</block>
</view>
</view>
<!-- 预约 -->
......@@ -223,7 +231,7 @@
<view class="order-activity-icon-list row con-b">
<view class="order-activity-icon-wrapper col 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}}">
{{badge}}</view>
</view>
......@@ -231,7 +239,7 @@
</view>
<view class="order-activity-icon-wrapper col 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}}">
{{badge}}</view>
</view>
......@@ -239,7 +247,7 @@
</view>
<view class="order-activity-icon-wrapper col 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}}">
{{badge}}</view>
</view>
......@@ -247,7 +255,7 @@
</view>
</view>
<!-- 预约卡片 -->
<view class="appintment">
<view class="appintment" >
<!-- 主题活动 -->
<view class="appointment-wrapper">
<view class="appointment-time">8月15日-7月15日 10:00-12:00</view>
......@@ -265,6 +273,7 @@
</view>
</view>
</view>
<view class="appointment-wrapper">
<view class="appointment-time">
<text>8月15日-7月15日 10:00-12:00</text>
......@@ -298,8 +307,8 @@
</view>
</view>
<view class="border-right"></view>
<view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view>
<!-- <view class="appointment-subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证
</view> -->
</view>
</view>
<!-- 看房预约 -->
......@@ -320,16 +329,15 @@
</view>
</view>
<!-- 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:else>收起</text>
<image wx:if="{{!showMoreActivity}}" src="{{imageBase + 'icon/arrow-b-2.png'}}"></image>
<image wx:else src="{{imageBase + 'up.png'}}"></image>
</view>
</view>
<!-- 客服中心 -->
<view class="service row con-b align-c">
<view class="service row con-b align-c" bindtap="goQuestion">
<text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
......
......@@ -132,7 +132,7 @@ Page({
// 映射门店信息
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.shopAppId = App.globalData.shopId[i].appId
funcItem.shopLogo = App.globalData.shopId[i].logo
......
......@@ -117,7 +117,12 @@ Page({
volumeId: that.data.couponDetail.volumeId,
},
success: function (res) {
if (res.data.code * 1 == 200) {
if (res.data && res.data.code * 1 == 500) {
wx.lin.showToast({
image: '/image/error.png',
title: res.data.msg,
})
} else {
wx.lin.showToast({
image: '/image/success.png',
title: '核销成功',
......@@ -125,11 +130,6 @@ Page({
setTimeout(() => {
wx.navigateBack()
}, 2000);
} else {
wx.lin.showToast({
image: '/image/error.png',
title: res.data.msg,
})
}
},
......
......@@ -2,13 +2,24 @@ const App = getApp()
Page({
data: {
bgUrl: '/pages/mine/home/image/mine.png',
avatarUrl: '/pages/mine/home/image/avatar.png',
name:'姓名',
idString: '前台核销',
shop: '艺术花坊',
showDialog: false,
showDialogSmg: '非本店券码,无法使用',
couponCode: '',
},
onLoad: function (options) {
let userInfo = wx.getStorageSync('userInfo')
let authInfo = JSON.parse(options.authInfo)
this.setData({
avatarUrl: userInfo.avatar ? userInfo.avatar : '/pages/mine/home/image/avatar.png',
name: userInfo.name,
idString: authInfo.roleName,
shop: authInfo.officeName,
})
},
handleWriteOff() {
this.getVolumeDetails(this.data.couponCode)
......
......@@ -4,21 +4,21 @@
<!-- 头像信息 -->
<view class="header col align-c">
<view class="header-bg">
<image src=""></image>
<image src="{{bgUrl}}"></image>
</view>
<view class="header-avatar">
<l-avatar size="160" src="{{avatarUrl}}"></l-avatar>
</view>
<view class="header-info">
<view class="info-name">文碧海</view>
<view class="info-name">{{name}}</view>
<view class="info-text col con-b">
<view class="row con-b">
<text class="info-left">工作身份</text>
<text class="info-right">前台核销</text>
<text class="info-right">{{idString}}</text>
</view>
<view class="row con-b">
<text class="info-left">所属门店</text>
<text class="info-right">艺术花坊</text>
<text class="info-right">{{shop}}</text>
</view>
</view>
</view>
......
......@@ -12,7 +12,7 @@
.header-info {
position: absolute;
top: 472rpx;
width: 232rpx;
/* width: 232rpx; */
height: 205rpx;
}
.info-name {
......@@ -33,6 +33,7 @@
.info-right {
color: #15191F;
font-size: 26rpx;
margin-left: 10rpx;
}
.coupon-input-wrapper {
width: 668rpx;
......@@ -83,9 +84,9 @@
min-width: 262rpx !important;
min-height: 262prx !important;
}
.toast-image {
/* .toast-image {
}
} */
.coupon-scan-wrapper {
width: 668rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment