自习室预约提示

This commit is contained in:
qiuyuan 2025-09-16 16:08:54 +08:00
parent 036be9b27b
commit e1c1edffb3

View File

@ -106,8 +106,8 @@
<u-button type="primary" text="我已知晓" :disabled="hasReaded" @click="show=false"></u-button>
</u-popup> -->
<!-- 保持原有结构不变 -->
<view class="copyright-fixed">
<Copyright :footerHeight="'0'" />
<view class="copyright-fixed">
<Copyright :footerHeight="'0'" />
</view>
</view>
@ -284,67 +284,67 @@
}
},
goDetail(item) {
console.log("====item",item)
// ID
const id = item.id;
const isSelfStudy = item.title === '自习室';
if (!id) {
uni.showToast({
title: '会议室信息异常',
icon: 'none'
});
return;
}
//
if (item.roomType == 2&&item.num!==4 ) {
uni.showModal({
title: '温馨提示',
content: '自习室预约时间按月为单位,单次预约最长个月,请确认是否继续?',
confirmColor: '#007AFF', // uView
success: (res) => {
if (res.confirm) {
//
this.navigateToDetail(id, true);
} else if (res.cancel) {
//
uni.showToast({
title: '已取消',
icon: 'none'
});
}
},
fail: (err) => {
console.error('弹窗失败:', err);
uni.showToast({
title: '操作失败',
icon: 'none'
});
}
});
} else {
//
this.navigateToDetail(id, false);
}
},
//
navigateToDetail(id, isSelfStudy) {
uni.navigateTo({
url: `/pages/meetingDetail/index?Id=${encodeURIComponent(id)}&isSelfStudy=${isSelfStudy}`,
success: () => {
console.log('导航成功ID:', id);
},
fail: (err) => {
console.error('导航失败:', err);
uni.showToast({
title: '打开详情页失败',
icon: 'none'
});
}
});
goDetail(item) {
console.log("====item",item)
// ID
const id = item.id;
const isSelfStudy = item.title === '自习室';
if (!id) {
uni.showToast({
title: '会议室信息异常',
icon: 'none'
});
return;
}
//
if (item.roomType == 2&&item.num!==4 ) {
uni.showModal({
title: '温馨提示',
content: '自习室预约时间按月为单位,单次预约最长个月,请确认是否继续?',
confirmColor: '#007AFF', // uView
success: (res) => {
if (res.confirm) {
//
this.navigateToDetail(id, true);
} else if (res.cancel) {
//
uni.showToast({
title: '已取消',
icon: 'none'
});
}
},
fail: (err) => {
console.error('弹窗失败:', err);
uni.showToast({
title: '操作失败',
icon: 'none'
});
}
});
} else {
//
this.navigateToDetail(id, false);
}
},
//
navigateToDetail(id, isSelfStudy) {
uni.navigateTo({
url: `/pages/meetingDetail/index?Id=${encodeURIComponent(id)}&isSelfStudy=${isSelfStudy}`,
success: () => {
console.log('导航成功ID:', id);
},
fail: (err) => {
console.error('导航失败:', err);
uni.showToast({
title: '打开详情页失败',
icon: 'none'
});
}
});
},
//
async getList() {
@ -412,21 +412,21 @@
$card-radius: 24rpx;
$tag-radius: 8rpx;
.container {
background-color: $bg-color;
padding: 20rpx;
min-height: 100vh;
box-sizing: border-box;
display: flex; /* 新增 */
flex-direction: column; /* 新增 */
.container {
background-color: $bg-color;
padding: 20rpx;
min-height: 100vh;
box-sizing: border-box;
display: flex; /* 新增 */
flex-direction: column; /* 新增 */
padding-bottom: calc(100rpx + 80rpx); /* 调整为footer高度 + copyright高度 */
// .copyright-fixed {
// position: fixed;
// bottom: 0;
// left: 0;
// right: 0;
// z-index: 10; /* */
// .copyright-fixed {
// position: fixed;
// bottom: 0;
// left: 0;
// right: 0;
// z-index: 10; /* */
// }
.nav-bar {