diff --git a/miniprogram/api/meeting/exhibition.js b/miniprogram/api/meeting/exhibition.js
index 0b68758..b7e60f8 100644
--- a/miniprogram/api/meeting/exhibition.js
+++ b/miniprogram/api/meeting/exhibition.js
@@ -57,3 +57,11 @@ export function saveShowRoomRecordRq(data) {
});
}
+// 查询预约记录
+export function selectShowroomRecordRq(data) {
+ return request({
+ url: `/api/showroom/selectShowroomRecord?pageNum=${data.pageNum}&pageSize=${data.pageSize}`,
+ method: "post",
+ data
+ });
+}
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js
index b6a040f..d44d1a7 100644
--- a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js
+++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.js
@@ -1,66 +1,150 @@
-// pages/meeting/reservationRecord/exhibitionRecord/list.js
+const app = getApp()
+
+import Notify from '@vant/weapp/notify/notify';
+
+import {
+ selectShowroomRecordRq,
+} from "../../../../../api/meeting/exhibition.js"
+
+import {
+ selfFormatTimeYMD,
+ selfFormatTimeHM
+} from "../../../../../utils/util.js"
+
Page({
- /**
- * 页面的初始数据
- */
- data: {
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ IMG_NAME: app.IMG_NAME,
+ userDetail: {},
+ // 预约
+ pageNum: 1,
+ pageSize: 10,
+ dataList: [],
+ isAll: false,
+ },
- },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad(options) {
+ let _this = this;
+ let userDetail = wx.getStorageSync('user')
+ _this.setData({
+ ...options,
+ userDetail,
+ })
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
+ // 获取数据
+ _this.getDataList()
+ },
- },
+ // 获取数据
+ getDataList() {
+ let _this = this;
+ if (_this.data.isAll) {
+ return;
+ }
+ selectShowroomRecordRq({
+ userId: _this.data.userDetail.id,
+ pageNum: _this.data.pageNum,
+ pageSize: _this.data.pageSize,
+ }).then(res => {
+ console.log('selectShowroomRecordRq', res);
+ let dataList = res.data.records
+ if (dataList && dataList.length > 0) {
+ dataList = _this.data.dataList.concat(_this.formartData(dataList))
+ _this.setData({
+ dataList,
+ pageNum: _this.data.pageNum + 1,
+ })
+ } else {
+ _this.setData({
+ isAll: true
+ })
+ }
+ })
+ },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
+ // 格式化数据
+ formartData(list) {
+ return list.map(item => {
+ let color = "#3794FF"
+ if (item.status == 0) { // 待审核
+ color = "#3794FF"
+ } else if (item.status == 1) { // 审核通过
+ color = "#62c855"
+ } else if (item.status == 2) { // 审核驳回
+ color = "red"
+ }
+ item.timeSlot = selfFormatTimeYMD(item.startTime) + ' ' + selfFormatTimeHM(item.startTime) + '~' + selfFormatTimeHM(item.endDate);
+ console.log('item.timeSlot', item.timeSlot);
+ item.statusColor = color;
+ return item;
+ })
+ },
- },
+ // 跳转-详情、修改
+ goDetail(e) {
+ console.log('goDetail', e);
+ let id = e.currentTarget.dataset.id
+ wx.navigateTo({
+ url: '/pages/meeting/visitorIinvitation/detail/detail'
+ })
+ },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady() {
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
+ },
- },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow() {
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
+ },
- },
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide() {
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
+ },
- },
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload() {
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
+ },
- },
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh() {
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
+ },
- }
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom() {
+ console.log('onReachBottom');
+ let _this = this;
+ // 获取数据
+ _this.getDataList()
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage() {
+
+ },
})
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.json b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.json
index 8835af0..f87429c 100644
--- a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.json
+++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.json
@@ -1,3 +1,9 @@
{
- "usingComponents": {}
+ "navigationBarTitleText": "展厅预约",
+ "onReachBottomDistance": 100,
+ "usingComponents": {
+ "van-icon": "@vant/weapp/icon/index",
+ "van-notify": "@vant/weapp/notify/index",
+ "van-divider": "@vant/weapp/divider/index"
+ }
}
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxml b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxml
index 3a36439..8398fce 100644
--- a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxml
+++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxml
@@ -1,2 +1,28 @@
-
-pages/meeting/reservationRecord/exhibitionRecord/list.wxml
\ No newline at end of file
+
+
+
+ {{item.reservationNumber}}
+ {{item.statusName}}
+
+
+
+
+ {{item.capacityNum}}人间 | {{item.roomName}} | {{item.buildingName}}
+ {{item.title}}
+ {{item.timeSlot}}
+
+
+
+ 查看详情
+
+
+
+ 数据已全部加载
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxss b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxss
index db16fd4..8267e62 100644
--- a/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxss
+++ b/miniprogram/pages/meeting/reservationRecord/exhibitionRecord/list/list.wxss
@@ -1 +1,93 @@
-/* pages/meeting/reservationRecord/exhibitionRecord/list.wxss */
\ No newline at end of file
+.containerView.public {
+ background: none;
+ height: auto;
+}
+
+.itemView {
+ background: white;
+ margin: 30rpx 20rpx;
+ padding: 30rpx 20rpx;
+ /* box-shadow: rgba(210,210,210,0.5) 0px 3.752px 3.752px 0px; */
+}
+
+.itemView .headView {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
+
+.itemView .headView .number {
+ font-size: 26rpx;
+}
+
+.itemView .headView .status {
+ font-size: 26rpx;
+ color: #4e96f8;
+ margin-right: 20rpx;
+}
+
+.itemView .contentView {
+ box-sizing: border-box;
+ border-radius: 10rpx;
+ width: 100%;
+ margin-top: 20rpx;
+ padding: 30rpx 20rpx;
+ display: flex;
+ justify-content: flex-start;
+ align-items: center;
+ background: #f2f2f2;
+}
+
+.itemView .contentView .img {
+ border-radius: 10rpx;
+ width: 200rpx;
+ height: 110rpx;
+}
+
+.itemView .contentView .msgView {
+ flex: 1;
+ margin-left: 20rpx;
+ word-break: break-all;
+}
+
+.itemView .contentView .msgView .title {
+ font-size: 28rpx;
+}
+
+.itemView .contentView .msgView .name,
+.itemView .contentView .msgView .time {
+ font-size: 24rpx;
+ color: gray;
+ margin-top: 6rpx;
+}
+
+.itemView .btnView {
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ margin-top: 30rpx;
+}
+
+.itemView .btnView .btn {
+ border: 1px solid #4e96f8;
+ position: relative;
+ border-radius: 10rpx;
+ margin-left: 16rpx;
+ padding: 10rpx 24rpx;
+ font-size: 24rpx;
+ color: #4e96f8;
+}
+
+.shareBtn {
+ position: absolute;
+ z-index: 1;
+ width: 100%;
+ height: 100%;
+ left: 0;
+ top: 0;
+ opacity: 0;
+}
+
+.loadAllLine {
+ margin-top: 80rpx;
+}
\ No newline at end of file
diff --git a/miniprogram/pages/meeting/reservationRecord/reservationRecord.js b/miniprogram/pages/meeting/reservationRecord/reservationRecord.js
index ec2b401..e6c2fa9 100644
--- a/miniprogram/pages/meeting/reservationRecord/reservationRecord.js
+++ b/miniprogram/pages/meeting/reservationRecord/reservationRecord.js
@@ -28,6 +28,13 @@ Page({
})
},
+ // 跳转-展厅
+ jumpExhibitionRecord() {
+ wx.navigateTo({
+ url: '/pages/meeting/reservationRecord/exhibitionRecord/list/list',
+ })
+ },
+
/**
* 生命周期函数--监听页面初次渲染完成
*/
diff --git a/miniprogram/pages/meeting/reservationRecord/reservationRecord.wxml b/miniprogram/pages/meeting/reservationRecord/reservationRecord.wxml
index 7a1d85a..cb23423 100644
--- a/miniprogram/pages/meeting/reservationRecord/reservationRecord.wxml
+++ b/miniprogram/pages/meeting/reservationRecord/reservationRecord.wxml
@@ -12,7 +12,7 @@
访客预约记录
-
+
展厅预约记录