新增查看入场订单信息入口

This commit is contained in:
2024-01-07 20:02:48 +08:00
parent ccd97a0446
commit c9d2e41b11
13 changed files with 629 additions and 7 deletions

View File

@@ -15,6 +15,8 @@
"pages/myBills/index",
"pages/myBookings/index",
"pages/myBookingsList/index",
"pages/myEnters/index",
"pages/myEnterList/index",
"pages/myMembershipCard/index",
"pages/notice/index",
"pages/questions/index",

View File

@@ -83,7 +83,7 @@
<view class='top'>
<view class='title'>
<image src='../../images/24@3x.png'></image>
<text>请出示二维码</text>
<text>请向门禁读头出示二维码</text>
</view>
<image src='../../images/23@3x.png' bindtap='closeInStep'></image>
</view>

View File

@@ -108,13 +108,19 @@ Page({
url: '/pages/myBookingsList/index',
})
},
// 跳转我的入场订单
pushMyEnter() {
wx.navigateTo({
url: '/pages/myEnterList/index',
})
},
// 跳转我的账单
pushMyBill() {
wx.navigateTo({
url: '/pages/myBills/index',
})
},
// 跳转我的账单
// 跳转我的报告
pushMyHealth() {
wx.navigateTo({
url: '/pages/healthDocs/index',

View File

@@ -32,18 +32,22 @@
<text>我的预约</text>
<image src='../../images/15@3x.png'></image>
</view>
<view class='cell' bindtap='pushMyEnter'>
<text>篮球订单</text>
<image src='../../images/15@3x.png'></image>
</view>
<view class='cell' bindtap='pushMyBill'>
<text>我的账单</text>
<text>消费账单</text>
<image src='../../images/15@3x.png'></image>
</view>
<view class='cell' bindtap='pushMyHealth'>
<text>我的报告</text>
<image src='../../images/15@3x.png'></image>
</view>
<view class='cell' bindtap='pushFacialCapturing'>
<text>人脸采集</text>
<image src='../../images/15@3x.png'></image>
</view>
<!-- <view class='cell' bindtap='pushFacialCapturing'>-->
<!-- <text>人脸采集</text>-->
<!-- <image src='../../images/15@3x.png'></image>-->
<!-- </view>-->
<view class='cell' bindtap='pushFAQ'>
<text>常见问题</text>
<image src='../../images/15@3x.png'></image>

116
pages/myEnterList/index.js Normal file
View File

@@ -0,0 +1,116 @@
// pages/myBookingsList/index.js
const app = getApp();
let page = 1;
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
isShowNewplot: false,
gohome: true
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
page = 1;
this.getData();
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
page = 1;
this.getData();
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
page++;
this.getData();
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
return {
title: '智慧云馆'
}
},
// 获取数据
getData() {
wx.showLoading({
title: '加载中...',
mask: true,
})
app.$api.memberEnterList({
page: page,
pageSize: 10
}).then(res => {
let list = [];
if (page == 1) {
this.setData({
list: []
})
} else {
list = this.data.list;
}
for (let i = 0; i < res.page.data.length; i++) {
let currentDate = new Date().getTime();
res.page.data[i].isEnd = currentDate < res.page.data[i].startTime;
list.push(res.page.data[i]);
}
this.setData({
list: list,
isShowNewplot: true
})
wx.stopPullDownRefresh()
}, err => {
wx.stopPullDownRefresh()
})
},
// 点击CEll
clickCell(e) {
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: `/pages/myEnters/index?id=${id}`,
})
}
})

View File

@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "篮球订单",
"enablePullDownRefresh": true,
"usingComponents": {
"header": "/component/header/header"
}
}

View File

@@ -0,0 +1,40 @@
<!--pages/myBookingsList/index.wxml-->
<header title="篮球订单"></header>
<view class='container'>
<view class='header'>
<!-- <view class='btn-box' data-state='0' bindtap='changeTab'>-->
<!-- <view class='item-btn {{state == 0 ? "isActive" : ""}}'>已预约</view>-->
<!-- </view>-->
<!-- <view class='btn-box' data-state='1' bindtap='changeTab'>-->
<!-- <view class='item-btn {{state == 1 ? "isActive" : ""}}'>已完成</view>-->
<!-- </view>-->
</view>
<view class='cell' wx:for="{{list}}" wx:key="{{index}}" bindtap='clickCell' data-id='{{item.id}}'>
<view class='top'>
<text>预约单号: {{item.orderSn}}</text>
<text class='isActive' wx:if="{{item.status == 0}}">进行中</text>
<text wx:if="{{item.status == 1}}">已完成</text>
</view>
<view class='bottom'>
<image src='{{item.lessonImage}}' mode='aspectFill'></image>
<view class='goods-box'>
<view class='title-box'>
<view class='title-left'>
<text>{{item.lessonName}}</text>
</view>
<view class='title-right' wx:if="{{item.payType == 1}}">¥{{item.price}}</view>
</view>
<view class='message'>
{{item.startTime}} ~ {{item.endTime == null ? '现在': item.endTime }}
</view>
<view class='message'>{{item.address}}</view>
</view>
</view>
</view>
</view>
<view class='newplot' wx:if="{{list.length == 0 && isShowNewplot}}">
<image src='../../images/noContent.png'></image>
<text>暂无预约 ~</text>
</view>

View File

@@ -0,0 +1,134 @@
/* pages/myBookingsList/index.wxss */
.container {
min-height: calc(100vh - 260rpx);
padding: 250rpx 30rpx 30rpx 30rpx;
}
.header {
position: fixed;
top: 120rpx;
left: 0;
display: flex;
justify-content: space-between;
width: 100%;
height: 90rpx;
background: #1a191e;
}
.header .btn-box {
flex: 1;
height: 100%;
text-align: center;
}
.header .btn-box .item-btn {
width: 90rpx;
height: 84rpx;
margin: 0 auto;
font-size: 28rpx;
line-height: 90rpx;
border-bottom: 6rpx solid #1a191e;
color: rgba(255, 255, 255, 0.6);
}
.header .btn-box .item-btn.isActive {
color: #ffda2e;
border-bottom: 6rpx solid #ffda2e;
}
.cell {
margin-bottom: 30rpx;
border-radius: 20rpx;
background: #1a191e;
}
.cell .top {
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
padding: 0 26rpx;
border: 2rpx solid #212025;
}
.cell .top>text:first-child {
font-size: 24rpx;
color: #fff;
}
.cell .top>text:last-child {
color: rgba(255, 255, 255, 0.6);
font-size: 24rpx;
}
.cell .top>text:last-child.isActive {
color: #ffda2e;
}
.cell .bottom {
display: flex;
justify-content: space-between;
padding: 20rpx 24rpx;
}
.cell .bottom>image {
width: 130rpx;
height: 110rpx;
}
.cell .bottom .goods-box {
flex: 1;
margin-left: 20rpx;
}
.cell .bottom .goods-box .title-box {
display: flex;
justify-content: space-between;
align-items: center;
}
.cell .bottom .goods-box .title-box .title-left {
flex: 1;
height: 26rpx;
color: #fff;
font-size: 24rpx;
line-height: 26rpx;
}
.cell .bottom .goods-box .title-box .title-left>text:first-child {
font-size: 26rpx;
color: #ffda2e;
}
.cell .bottom .goods-box .title-box .title-right {
font-size: 24rpx;
color: #FFF;
}
.cell .bottom .goods-box .message {
font-size: 22rpx;
color: #FFF;
line-height: 22rpx;
margin-top: 16rpx;
}
.newplot {
position: fixed;
top: 260rpx;
bottom: 0;
left: 0;
right: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: #FFF;
font-size: 28rpx;
}
.newplot>image {
width: 200rpx;
height: 200rpx;
margin-top: -200rpx;
}

138
pages/myEnters/index.js Normal file
View File

@@ -0,0 +1,138 @@
// pages/myBookings/index.js
const app = getApp();
let enterId = ""
Page({
/**
* 页面的初始数据
*/
data: {
isSignIn: false,
memberEnterDetail: {},
showDeleteDialog: false,
isGoHome: false,
endDate: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
enterId = options.id;
this.getData();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
let pages = getCurrentPages();
this.setData({
isGoHome: pages.length == 1
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
return {
title: '智慧云馆'
}
},
// 获取数据
getData() {
app.$api.memberEntersDetail({
enterId: enterId
}).then(res => {
let currentDate = new Date().getTime();
let startDate = currentDate;
if (res.memberEnterDetail) {
startDate = new Date(res.memberEnterDetail.date.replace(/-/g, "/") + ' ' + res.memberEnterDetail.startTime).getTime();
}
if (!res.memberEnterDetail) {
wx.navigateBack({
delta: 1,
})
}
this.setData({
memberEnterDetail: res.memberEnterDetail
})
}, err => {
})
},
// 取消弹框
cancelDeleteDialog() {
this.setData({
showDeleteDialog: false
})
},
// // 确认删除
// confirmDeleteDialog() {
// app.$api.memberEnterDetailsCancel({
// orderSn: this.data.memberEnterDetail.orderSn
// }).then(res => {
// wx.showToast({
// title: '取消成功',
// })
// this.setData({
// showDeleteDialog: false
// })
// this.getData();
// }, err => {
// this.setData({
// showDeleteDialog: false
// })
// });
// },
// 打开导航,
opnGPS() {
wx.openLocation({
latitude: Number(this.data.memberEnterDetail.latitude),
longitude: Number(this.data.memberEnterDetail.longitude),
name: this.data.memberEnterDetail.lessonName,
address: this.data.memberEnterDetail.address,
})
}
})

View File

@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "篮球订单",
"usingComponents": {
"confirm-dialog": "/component/confirmDialog/confirmDialog",
"header": "/component/header/header"
}
}

43
pages/myEnters/index.wxml Normal file
View File

@@ -0,0 +1,43 @@
<!--pages/myBookings/index.wxml-->
<header title="篮球订单" isGoHome="{{isGoHome}}"></header>
<view class='container'>
<view class='cell-box'>
<view class='cell'>
<view class='title'>
<text>{{memberEnterDetail.lessonName}}</text>
</view>
<!-- <view class='state'>{{memberEnterDetail.status == 0 ? "已预约" : (memberEnterDetail.status == 1 ? "已完成" : "已取消")}}</view> -->
<view class='state' wx:if="{{memberEnterDetail.status == 0}}">使用中</view>
<view class='state' wx:if="{{memberEnterDetail.status == 1}}">待结算</view>
<view class='state' wx:if="{{memberEnterDetail.status == 2}}">已结算</view>
</view>
<view class='cell'>
<image src='../../images/42@3x.png' mode='aspectFit'></image>
<text>开始时间</text>
<view class='cell-right-white'>{{memberEnterDetail.startTime}}分钟</view>
</view>
<view class='cell'>
<image src='../../images/42@3x.png' mode='aspectFit'></image>
<text>出场时间</text>
<view class='cell-right-white'>{{memberEnterDetail.endTime}}</view>
</view>
<view class='cell'>
<image src='../../images/42@3x.png' mode='aspectFit'></image>
<text>运动时长</text>
<view class='cell-right-white'>{{memberEnterDetail.lessonCount}}</view>
</view>
<view class='cell'>
<image src='../../images/33@3x.png' mode='aspectFit'></image>
<text>费用</text>
<view class='cell-right-white'>已支付: ¥{{memberEnterDetail.price}}</view>
</view>
<view class='cell' bindtap='opnGPS'>
<image src='../../images/41@3x.png' mode='aspectFit'></image>
<text>{{memberEnterDetail.address}}</text>
<view class='cell-right'>
<image src='../../images/34@3x.png' class='gps-img'></image>
<text>导航</text>
</view>
</view>
</view>
</view>

117
pages/myEnters/index.wxss Normal file
View File

@@ -0,0 +1,117 @@
/* pages/myBookings/index.wxss */
.container {
min-height: calc(100vh - 290rpx);
padding: 160rpx 30rpx 130rpx 30rpx;
}
.cell-box {
background: #1a191e;
border-radius: 10rpx;
}
.cell-box .cell {
display: flex;
justify-content: space-between;
align-items: center;
height: 90rpx;
padding: 0 20rpx;
border-bottom: 2rpx solid #212025;
}
.cell-box .cell.unline {
border: none;
}
.cell-box .cell>image {
width: 34rpx;
height: 34rpx;
margin-right: 26rpx;
}
.cell-box .cell>text {
flex: 1;
font-size: 24rpx;
color: rgba(255, 255, 255, 0.6);
}
.cell-box .cell .title {
flex: 1;
display: flex;
align-items: center;
color: #fff;
font-size: 26rpx;
}
.cell-box .cell .cell-right {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
color: rgba(255, 255, 255, 0.6);
font-size: 20rpx;
}
.cell-box .cell .cell-right .gps-img {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.cell-box .cell .cell-right>text {
height: 20rpx;
margin-top: 6rpx;
line-height: 20rpx;
}
.cell-box .cell .state {
font-size: 22rpx;
color: #ffda2e;
}
.cell-box .cell .cell-right-white {
color: #fff;
font-size: 24rpx;
}
.cell-box .qrCode-box {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 300rpx;
}
.cell-box .qrCode-box>image {
width: 200rpx;
height: 200rpx;
}
.cell-box .qrCode-box>text {
margin-top: 20rpx;
font-size: 22rpx;
line-height: 22rpx;
color: rgba(255, 255, 255, 0.6);
}
.footer-box {
position: fixed;
bottom: 0;
left: 0;
display: flex;
width: 100%;
height: 100rpx;
}
.footer-btn {
flex: 1;
background: #767578;
color: #1a191e;
font-size: 32rpx;
text-align: center;
line-height: 100rpx;
}
.footer-btn.isActive {
background: #ffda2e;
}

View File

@@ -359,6 +359,14 @@ export default {
memberLessonTicketsDetail(params) {
return fetchPost('/member/lesson/tickets/detail', params, true);
},
// 入场订单
memberEnterList(params) {
return fetchPost('/member/order/enter/list', params, true);
},
// 预约详情页
memberEntersDetail(params) {
return fetchPost('/member/order/enter/detail', params, true);
},
// 取消预约
memberLessonTicketsCancel(params) {
return fetchPost('/member/lesson/tickets/cancel', params, true);