From c9d2e41b1113617d517ec28d82d44a74d798974b Mon Sep 17 00:00:00 2001
From: limqhz <540344226@qq.com>
Date: Sun, 7 Jan 2024 20:02:48 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9F=A5=E7=9C=8B=E5=85=A5?=
=?UTF-8?q?=E5=9C=BA=E8=AE=A2=E5=8D=95=E4=BF=A1=E6=81=AF=E5=85=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app.json | 2 +
pages/basketballGym/index.wxml | 2 +-
pages/mine/index.js | 8 +-
pages/mine/index.wxml | 14 ++--
pages/myEnterList/index.js | 116 +++++++++++++++++++++++++++
pages/myEnterList/index.json | 7 ++
pages/myEnterList/index.wxml | 40 ++++++++++
pages/myEnterList/index.wxss | 134 ++++++++++++++++++++++++++++++++
pages/myEnters/index.js | 138 +++++++++++++++++++++++++++++++++
pages/myEnters/index.json | 7 ++
pages/myEnters/index.wxml | 43 ++++++++++
pages/myEnters/index.wxss | 117 ++++++++++++++++++++++++++++
utils/api.js | 8 ++
13 files changed, 629 insertions(+), 7 deletions(-)
create mode 100644 pages/myEnterList/index.js
create mode 100644 pages/myEnterList/index.json
create mode 100644 pages/myEnterList/index.wxml
create mode 100644 pages/myEnterList/index.wxss
create mode 100644 pages/myEnters/index.js
create mode 100644 pages/myEnters/index.json
create mode 100644 pages/myEnters/index.wxml
create mode 100644 pages/myEnters/index.wxss
diff --git a/app.json b/app.json
index 7b79654..25c4d0b 100644
--- a/app.json
+++ b/app.json
@@ -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",
diff --git a/pages/basketballGym/index.wxml b/pages/basketballGym/index.wxml
index 4243f55..5c7cd4e 100644
--- a/pages/basketballGym/index.wxml
+++ b/pages/basketballGym/index.wxml
@@ -83,7 +83,7 @@
- 请出示二维码
+ 请向门禁读头出示本二维码
diff --git a/pages/mine/index.js b/pages/mine/index.js
index 5c8db5d..ba002a0 100644
--- a/pages/mine/index.js
+++ b/pages/mine/index.js
@@ -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',
diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml
index 10fbcf0..c37948c 100644
--- a/pages/mine/index.wxml
+++ b/pages/mine/index.wxml
@@ -32,18 +32,22 @@
我的预约
+
+ 篮球订单
+
+
- 我的账单
+ 消费账单
我的报告
-
- 人脸采集
-
-
+
+
+
+
常见问题
diff --git a/pages/myEnterList/index.js b/pages/myEnterList/index.js
new file mode 100644
index 0000000..def51fe
--- /dev/null
+++ b/pages/myEnterList/index.js
@@ -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}`,
+ })
+ }
+})
diff --git a/pages/myEnterList/index.json b/pages/myEnterList/index.json
new file mode 100644
index 0000000..5e1780e
--- /dev/null
+++ b/pages/myEnterList/index.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "篮球订单",
+ "enablePullDownRefresh": true,
+ "usingComponents": {
+ "header": "/component/header/header"
+ }
+}
diff --git a/pages/myEnterList/index.wxml b/pages/myEnterList/index.wxml
new file mode 100644
index 0000000..99adc47
--- /dev/null
+++ b/pages/myEnterList/index.wxml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+ 预约单号: {{item.orderSn}}
+ 进行中
+ 已完成
+
+
+
+
+
+
+ {{item.lessonName}}
+
+ ¥{{item.price}}
+
+
+ {{item.startTime}} ~ {{item.endTime == null ? '现在': item.endTime }}
+
+ {{item.address}}
+
+
+
+
+
+
+
+ 暂无预约 ~
+
diff --git a/pages/myEnterList/index.wxss b/pages/myEnterList/index.wxss
new file mode 100644
index 0000000..10188f5
--- /dev/null
+++ b/pages/myEnterList/index.wxss
@@ -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;
+}
\ No newline at end of file
diff --git a/pages/myEnters/index.js b/pages/myEnters/index.js
new file mode 100644
index 0000000..b1b60ac
--- /dev/null
+++ b/pages/myEnters/index.js
@@ -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,
+ })
+ }
+
+})
diff --git a/pages/myEnters/index.json b/pages/myEnters/index.json
new file mode 100644
index 0000000..a9cf9b1
--- /dev/null
+++ b/pages/myEnters/index.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "篮球订单",
+ "usingComponents": {
+ "confirm-dialog": "/component/confirmDialog/confirmDialog",
+ "header": "/component/header/header"
+ }
+}
diff --git a/pages/myEnters/index.wxml b/pages/myEnters/index.wxml
new file mode 100644
index 0000000..70ac285
--- /dev/null
+++ b/pages/myEnters/index.wxml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+ {{memberEnterDetail.lessonName}}
+
+
+ 使用中
+ 待结算
+ 已结算
+
+
+
+ 开始时间
+ {{memberEnterDetail.startTime}}分钟
+
+
+
+ 出场时间
+ {{memberEnterDetail.endTime}}
+
+
+
+ 运动时长
+ {{memberEnterDetail.lessonCount}}
+
+
+
+ 费用
+ 已支付: ¥{{memberEnterDetail.price}}
+
+
+
+ {{memberEnterDetail.address}}
+
+
+ 导航
+
+
+
+
diff --git a/pages/myEnters/index.wxss b/pages/myEnters/index.wxss
new file mode 100644
index 0000000..f9c3164
--- /dev/null
+++ b/pages/myEnters/index.wxss
@@ -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;
+}
diff --git a/utils/api.js b/utils/api.js
index 42ff964..b0c68cb 100644
--- a/utils/api.js
+++ b/utils/api.js
@@ -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);