Merge branch 'main' of https://gitlab.guxuan.icu/Leo_Ding/JinShan_uniapp
This commit is contained in:
commit
e9ead9668f
@ -106,8 +106,8 @@
|
|||||||
<u-button type="primary" text="我已知晓" :disabled="hasReaded" @click="show=false"></u-button>
|
<u-button type="primary" text="我已知晓" :disabled="hasReaded" @click="show=false"></u-button>
|
||||||
</u-popup> -->
|
</u-popup> -->
|
||||||
<!-- 保持原有结构不变 -->
|
<!-- 保持原有结构不变 -->
|
||||||
<view class="copyright-fixed">
|
<view class="copyright-fixed">
|
||||||
<Copyright :footerHeight="'0'" />
|
<Copyright :footerHeight="'0'" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -284,67 +284,67 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
goDetail(item) {
|
goDetail(item) {
|
||||||
console.log("====item",item)
|
console.log("====item",item)
|
||||||
// 安全获取ID(兼容各种可能的字段名)
|
// 安全获取ID(兼容各种可能的字段名)
|
||||||
const id = item.id;
|
const id = item.id;
|
||||||
const isSelfStudy = item.title === '自习室';
|
const isSelfStudy = item.title === '自习室';
|
||||||
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '会议室信息异常',
|
title: '会议室信息异常',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 如果是自习室,先弹出提示确认框
|
// 如果是自习室,先弹出提示确认框
|
||||||
if (item.roomType == 2&&item.num!==4 ) {
|
if (item.roomType == 2&&item.num!==4 ) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '温馨提示',
|
title: '温馨提示',
|
||||||
content: '自习室预约时间按月为单位,单次预约最长两个月,请确认是否继续?',
|
content: '自习室预约时间按月为单位,单次预约最长一个月,请确认是否继续?',
|
||||||
confirmColor: '#007AFF', // 可根据uView主题色调整
|
confirmColor: '#007AFF', // 可根据uView主题色调整
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
// 用户点击确定,执行跳转
|
// 用户点击确定,执行跳转
|
||||||
this.navigateToDetail(id, true);
|
this.navigateToDetail(id, true);
|
||||||
} else if (res.cancel) {
|
} else if (res.cancel) {
|
||||||
// 用户点击取消,可选操作(如提示取消)
|
// 用户点击取消,可选操作(如提示取消)
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '已取消',
|
title: '已取消',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('弹窗失败:', err);
|
console.error('弹窗失败:', err);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '操作失败',
|
title: '操作失败',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 非自习室,直接跳转
|
// 非自习室,直接跳转
|
||||||
this.navigateToDetail(id, false);
|
this.navigateToDetail(id, false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// 封装跳转逻辑,避免重复代码
|
// 封装跳转逻辑,避免重复代码
|
||||||
navigateToDetail(id, isSelfStudy) {
|
navigateToDetail(id, isSelfStudy) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/meetingDetail/index?Id=${encodeURIComponent(id)}&isSelfStudy=${isSelfStudy}`,
|
url: `/pages/meetingDetail/index?Id=${encodeURIComponent(id)}&isSelfStudy=${isSelfStudy}`,
|
||||||
success: () => {
|
success: () => {
|
||||||
console.log('导航成功,ID:', id);
|
console.log('导航成功,ID:', id);
|
||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
console.error('导航失败:', err);
|
console.error('导航失败:', err);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '打开详情页失败',
|
title: '打开详情页失败',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 获取会议室列表
|
// 获取会议室列表
|
||||||
async getList() {
|
async getList() {
|
||||||
@ -412,21 +412,21 @@
|
|||||||
$card-radius: 24rpx;
|
$card-radius: 24rpx;
|
||||||
$tag-radius: 8rpx;
|
$tag-radius: 8rpx;
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
background-color: $bg-color;
|
background-color: $bg-color;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
display: flex; /* 新增 */
|
display: flex; /* 新增 */
|
||||||
flex-direction: column; /* 新增 */
|
flex-direction: column; /* 新增 */
|
||||||
padding-bottom: calc(100rpx + 80rpx); /* 调整为footer高度 + copyright高度 */
|
padding-bottom: calc(100rpx + 80rpx); /* 调整为footer高度 + copyright高度 */
|
||||||
|
|
||||||
// .copyright-fixed {
|
// .copyright-fixed {
|
||||||
// position: fixed;
|
// position: fixed;
|
||||||
// bottom: 0;
|
// bottom: 0;
|
||||||
// left: 0;
|
// left: 0;
|
||||||
// right: 0;
|
// right: 0;
|
||||||
// z-index: 10; /* 防止被其他元素遮挡 */
|
// z-index: 10; /* 防止被其他元素遮挡 */
|
||||||
// }
|
// }
|
||||||
|
|
||||||
.nav-bar {
|
.nav-bar {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user