2024-02-27 12:00:47 +08:00
|
|
|
const app = getApp()
|
|
|
|
|
2024-03-04 17:10:32 +08:00
|
|
|
import {
|
|
|
|
meetingRoomDetailRq
|
|
|
|
} from "../../../../api/meeting/meetingRoom.js"
|
|
|
|
|
2024-03-04 18:00:27 +08:00
|
|
|
import {
|
|
|
|
selfFormatTimeYMD,
|
|
|
|
selfFormatTimeHM,
|
|
|
|
twoTimeInterval
|
|
|
|
} from "../../../../utils/util.js"
|
|
|
|
|
|
|
|
|
2024-02-27 12:00:47 +08:00
|
|
|
Page({
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面的初始数据
|
|
|
|
*/
|
|
|
|
data: {
|
|
|
|
IMG_NAME: app.IMG_NAME,
|
2024-02-27 16:06:54 +08:00
|
|
|
protocolFlag: true,
|
|
|
|
protocolTitle: '《会议室服务协议》',
|
2024-03-04 17:10:32 +08:00
|
|
|
meetingRoomId: null,
|
|
|
|
startTime: null,
|
|
|
|
endTime: null,
|
2024-03-04 18:00:27 +08:00
|
|
|
selectDay: null,
|
|
|
|
selectCountTime: null,
|
2024-03-04 17:10:32 +08:00
|
|
|
bannerList: [],
|
|
|
|
room: {},
|
2024-03-04 18:00:27 +08:00
|
|
|
userData: {},
|
2024-03-05 15:29:46 +08:00
|
|
|
couponId : '',
|
2024-02-27 12:00:47 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面加载
|
|
|
|
*/
|
|
|
|
onLoad(options) {
|
2024-03-04 14:38:21 +08:00
|
|
|
console.log('onLoad', options);
|
2024-03-04 18:00:27 +08:00
|
|
|
let selectCountTime = selfFormatTimeHM(options.startTime) + "-" + selfFormatTimeHM(options.endTime) + ' 共计' + twoTimeInterval(options.startTime , options.endTime)
|
2024-03-04 14:38:21 +08:00
|
|
|
this.setData({
|
2024-03-04 18:00:27 +08:00
|
|
|
...options,
|
|
|
|
userData: wx.getStorageSync('user'),
|
|
|
|
selectDay: selfFormatTimeYMD(options.startTime),
|
|
|
|
selectCountTime
|
2024-03-04 14:38:21 +08:00
|
|
|
})
|
2024-03-04 17:10:32 +08:00
|
|
|
// 详细信息
|
|
|
|
this.getDetail();
|
|
|
|
},
|
|
|
|
|
|
|
|
// 详细信息
|
|
|
|
getDetail() {
|
|
|
|
let _this = this;
|
|
|
|
meetingRoomDetailRq(this.data.meetingRoomId).then(res => {
|
|
|
|
_this.setData({
|
|
|
|
room: res.roomContent,
|
2024-03-04 18:00:27 +08:00
|
|
|
bannerList: [res.roomContent.indoorPicUrl]
|
2024-03-04 17:10:32 +08:00
|
|
|
})
|
|
|
|
})
|
2024-02-27 12:00:47 +08:00
|
|
|
},
|
|
|
|
|
2024-02-27 17:58:38 +08:00
|
|
|
// 跳转-空间设施
|
|
|
|
jumpMeetingFacilities() {
|
2024-03-04 17:10:32 +08:00
|
|
|
let meetingRoomId = this.data.meetingRoomId;
|
2024-02-27 17:58:38 +08:00
|
|
|
wx.navigateTo({
|
2024-03-04 17:10:32 +08:00
|
|
|
url: '/pages/meeting/meetingRoom/meetingFacilities/meetingFacilities?meetingRoomId=' + meetingRoomId,
|
2024-02-27 17:58:38 +08:00
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
// 跳转-优惠卷
|
|
|
|
jumpMeetingCoupon() {
|
2024-03-05 15:29:46 +08:00
|
|
|
let _this = this;
|
2024-02-27 17:58:38 +08:00
|
|
|
wx.navigateTo({
|
2024-03-05 15:29:46 +08:00
|
|
|
url: "/pages/meeting/meetingRoom/meetingCoupon/meetingCoupon?type=1&couponId=" + _this.data.couponId,
|
2024-02-27 17:58:38 +08:00
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2024-02-27 15:38:56 +08:00
|
|
|
// 协议点击
|
2024-02-27 16:06:54 +08:00
|
|
|
protocolChange() {
|
2024-02-27 15:38:56 +08:00
|
|
|
let _this = this;
|
|
|
|
_this.setData({
|
|
|
|
protocolFlag: !_this.data.protocolFlag
|
2024-02-27 16:06:54 +08:00
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
// 跳转协议
|
|
|
|
jumpProtocol() {
|
|
|
|
let _this = this;
|
|
|
|
wx.navigateTo({
|
2024-02-27 17:58:38 +08:00
|
|
|
url: "/pages/meeting/meetingRoom/meetingProtocol/meetingProtocol?title=" + _this.data.protocolTitle,
|
2024-02-27 16:06:54 +08:00
|
|
|
})
|
2024-02-27 15:38:56 +08:00
|
|
|
},
|
|
|
|
|
2024-02-28 13:41:19 +08:00
|
|
|
// 提交订单
|
|
|
|
submitCase() {
|
|
|
|
wx.redirectTo({
|
2024-02-28 14:02:22 +08:00
|
|
|
url: "/pages/meeting/pay/waitPay/waitPay",
|
2024-02-28 13:41:19 +08:00
|
|
|
})
|
|
|
|
},
|
|
|
|
|
2024-02-27 12:00:47 +08:00
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面初次渲染完成
|
|
|
|
*/
|
|
|
|
onReady() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面显示
|
|
|
|
*/
|
2024-03-05 15:29:46 +08:00
|
|
|
onShow(options) {
|
|
|
|
console.log('onShow' , options);
|
2024-02-27 12:00:47 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面隐藏
|
|
|
|
*/
|
|
|
|
onHide() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 生命周期函数--监听页面卸载
|
|
|
|
*/
|
|
|
|
onUnload() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面相关事件处理函数--监听用户下拉动作
|
|
|
|
*/
|
|
|
|
onPullDownRefresh() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 页面上拉触底事件的处理函数
|
|
|
|
*/
|
|
|
|
onReachBottom() {
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 用户点击右上角分享
|
|
|
|
*/
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|