This commit is contained in:
qiuyuan 2025-07-21 18:58:03 +08:00
parent 5e32aea993
commit bf6bfdb18e
7 changed files with 923 additions and 835 deletions

View File

@ -127,8 +127,8 @@
<u-icon name="share" size="30" color="#666"></u-icon> <u-icon name="share" size="30" color="#666"></u-icon>
<text>分享</text> <text>分享</text>
</view> </view>
<button class="signup-btn" @click="handleSignUp" disabled> <button class="signup-btn" @click="handleSignUp" >
{{isSignedUp ? '已报名' : '线下报名'}} 立即报名
</button> </button>
</view> </view>
</view> </view>
@ -146,11 +146,7 @@ export default {
Id:null, Id:null,
isFavorite: false, isFavorite: false,
isSignedUp: false, isSignedUp: false,
bannerImages: [ bannerImages: [],
// '/static/night-run-1.jpg',
// '/static/night-run-2.jpg',
// '/static/night-run-3.jpg'
],
activityInfo: {}, activityInfo: {},
// timeline: [ // timeline: [
// {time: '19:00-19:20', desc: ''}, // {time: '19:00-19:20', desc: ''},
@ -190,12 +186,25 @@ export default {
icon: 'none' icon: 'none'
}) })
}, },
handleSignUp() {
this.isSignedUp = true async handleSignUp(){
try {
const res = await get(`/api/v1/app_auth/activities/${this.Id}`);
if ( !res.success) {
uni.showToast({
title: res.msg || '报名失败',
icon: 'error'
})
}else{
uni.showToast({ uni.showToast({
title: '报名成功!', title: '报名成功!',
icon: 'success' icon: 'success'
}) })
}
} catch (err) {
console.error('获取详情失败:', err);
}
}, },
shareActivity() { shareActivity() {
uni.share({ uni.share({
@ -518,7 +527,7 @@ $shadow: 0 4rpx 24rpx rgba(0, 0, 0, 0.06);
.signup-btn { .signup-btn {
flex: 1; flex: 1;
height: 80rpx; height: 80rpx;
background-color: #ccc; background-color: #5b9cf8;
color: #fff; color: #fff;
border-radius: 40rpx; border-radius: 40rpx;
font-size: 32rpx; font-size: 32rpx;

View File

@ -29,7 +29,6 @@
</u-swiper> </u-swiper>
</view> </view>
<!-- 天气和穿搭建议 -->
<!-- 天气和穿搭建议 --> <!-- 天气和穿搭建议 -->
<view class="weather-outfit-section"> <view class="weather-outfit-section">
<view class="weather-card"> <view class="weather-card">
@ -38,28 +37,38 @@
<text class="date">{{weather.date}} {{weather.week}}</text> <text class="date">{{weather.date}} {{weather.week}}</text>
</view> </view>
<view class="weather-content"> <view class="weather-content">
<view class="temperature"> <view class="weather-main">
<text class="temp-value">{{weather.lowest}}~{{weather.highest}}</text> <view class="current-weather">
<!-- <text class="temp-unit">°C</text> --> <image class="weather-icon" :src="getWeatherIcon(weather.weather)" mode="aspectFit">
</image>
<text class="current-temp">{{weather.real}}°</text>
</view> </view>
<view class="weather-info">
<text class="weather-desc">{{weather.weather}}</text> <text class="weather-desc">{{weather.weather}}</text>
</view> </view>
<view class="temperature-range">
<text class="temp-item">最高温 {{weather.highest}}°</text>
<text class="temp-item">最高温 {{weather.lowest}}°</text>
</view>
</view> </view>
<view class="weather-footer"> <view class="weather-footer">
<view class="weather-detail-item"> <view class="footer-item">
<text>东风 {{weather.wind}}</text> <text class="footer-icon">🌬东风</text>
<text class="footer-text">{{weather.wind}}</text>
</view> </view>
<view class="weather-detail-item"> <view class="footer-item">
<text>湿度 {{weather.humidity}}%</text> <text class="footer-icon">💧湿度</text>
<text class="footer-text">{{weather.humidity}}%</text>
</view> </view>
<view class="weather-detail-item"> <view class="footer-item">
<text>空气质量 {{weather.quality}}</text> <text class="footer-icon">🌫空气质量</text>
<text class="footer-text">{{weather.quality}}</text>
</view> </view>
<view class="weather-detail-item"> <view class="footer-item">
<text>紫外线 {{weather.uv_index}}</text> <text class="footer-icon">紫外线</text>
<text class="footer-text">{{weather.uv_index}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 便捷服务中心 --> <!-- 便捷服务中心 -->
@ -179,12 +188,43 @@
if (!res || !res.success) { if (!res || !res.success) {
throw new Error('获取天气失败'); throw new Error('获取天气失败');
} }
this.weather = {...res.data}; this.weather = {
...res.data
};
} catch (err) { } catch (err) {
console.error('获取轮播图失败:', err); console.error('获取轮播图失败:', err);
} }
}, },
getWeatherIcon(weather) {
const weatherMap = {
'晴': '/static/imgs/index/sunny.png',
'多云': '/static/imgs/index/cloudy.png',
'阴': '/static/imgs/index/overcast.png',
'雨': '/static/imgs/index/rain.png',
'小雨': '/static/imgs/index/light-rain.png',
'中雨': '/static/imgs/index/moderate-rain.png',
'大雨': '/static/imgs/index/heavy-rain.png',
'暴雨': '/static/imgs/index/storm-rain.png',
'雪': '/static/imgs/index/snow.png',
'雾': '/static/imgs/index/fog.png',
'霾': '/static/imgs/index/fog.png',
};
//
const defaultIcon = '/static/imgs/weather/default.png';
//
for (const key in weatherMap) {
if (weather.includes(key)) {
return weatherMap[key];
}
}
return defaultIcon;
}
} }
} }
</script> </script>
@ -284,61 +324,79 @@
.weather-content { .weather-content {
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
margin: 30rpx 0; align-items: center;
margin: 20rpx 0;
padding: 20rpx 0; padding: 20rpx 0;
.temperature { .weather-main {
display: flex;
align-items: flex-start;
.temp-value {
font-size: 60rpx;
font-weight: 600;
line-height: 1;
}
.temp-unit {
font-size: 36rpx;
margin-top: 8rpx;
}
}
.weather-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.current-weather {
display: flex;
align-items: center;
.weather-icon { .weather-icon {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
margin-bottom: 10rpx; margin-right: 15rpx;
}
.current-temp {
font-size: 64rpx;
font-weight: bold;
line-height: 1;
}
} }
.weather-desc { .weather-desc {
font-size: 28rpx; font-size: 28rpx;
margin-top: 10rpx;
opacity: 0.9; opacity: 0.9;
} }
} }
}
.temperature-range {
display: flex;
flex-direction: column;
align-items: flex-end;
.temp-item {
font-size: 28rpx;
margin-bottom: 10rpx;
opacity: 0.8;
&:last-child {
margin-bottom: 0;
}
}
}
}
.weather-footer { .weather-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
padding-top: 20rpx; padding-top: 20rpx;
border-top: 1rpx solid rgba(255, 255, 255, 0.2); border-top: 1rpx solid rgba(255, 255, 255, 0.2);
font-size: 24rpx; font-size: 24rpx;
.weather-detail-item { .footer-item {
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
opacity: 0.9; flex: 1;
.detail-icon { .footer-icon {
width: 28rpx; font-size: 24rpx;
height: 28rpx; margin-bottom: 6rpx;
margin-right: 8rpx; }
.footer-text {
opacity: 0.9;
text-align: center;
line-height: 1.2;
} }
} }
} }

View File

@ -9,7 +9,7 @@
<view v-if="meetingRoomList.length === 0" class="empty-container"> <view v-if="meetingRoomList.length === 0" class="empty-container">
<text>暂无会议室数据 ({{ meetingRoomList }})</text> <text>暂无会议室数据 ({{ meetingRoomList }})</text>
</view> </view>
<view class="room-item" v-for="(item, index) in meetingRoomList" :key="index"> <view class="room-item" v-for="(item, index) in meetingRoomList" :key="index" @click="goDetail(item.roomInfo || item)">
<image class="room-img" :src="`${IMAGE_BASE_URL}`+item.imgs[0]"> <image class="room-img" :src="`${IMAGE_BASE_URL}`+item.imgs[0]">
</image> </image>
<view class="room-info"> <view class="room-info">
@ -104,7 +104,7 @@
IMAGE_BASE_URL, IMAGE_BASE_URL,
tabsReady: false, tabsReady: false,
tabList: [{ tabList: [{
name: '会议预约' name: '共享空间'
}, },
{ {
name: '预约记录' name: '预约记录'
@ -146,7 +146,6 @@
} else { } else {
this.getList(); this.getList();
} }
console.log("=======index", index)
}, },
// //
formatDate(dateString) { formatDate(dateString) {
@ -210,7 +209,6 @@
}); });
} }
} catch (err) { } catch (err) {
console.error('取消预约失败:', err);
uni.showToast({ uni.showToast({
title: '取消失败', title: '取消失败',
icon: 'none' icon: 'none'
@ -221,14 +219,11 @@
}, },
goDetail(item) { goDetail(item) {
//
console.log('点击项完整数据:', JSON.stringify(item));
// ID // ID
const id = item.id; const id = item.id;
if (!id) { if (!id) {
console.error('无效的会议室数据缺少ID字段:', item);
uni.showToast({ uni.showToast({
title: '会议室信息异常', title: '会议室信息异常',
icon: 'none' icon: 'none'
@ -236,9 +231,6 @@
return; return;
} }
// 使ID
console.log('导航使用的ID:', id);
uni.navigateTo({ uni.navigateTo({
url: `/pages/meetingDetail/index?Id=${encodeURIComponent(id)}`, // 使encodeURIComponent url: `/pages/meetingDetail/index?Id=${encodeURIComponent(id)}`, // 使encodeURIComponent
success: () => { success: () => {
@ -261,16 +253,12 @@
pageSize: 10, pageSize: 10,
}); });
console.log("===res", res)
if (res?.success) { if (res?.success) {
this.meetingRoomList = [...res.data]; this.meetingRoomList = [...res.data];
console.log("======this.meetingRoomList", this.meetingRoomList)
this.tabsReady = true; this.tabsReady = true;
} }
} catch (err) { } catch (err) {
console.error('获取我的求助失败:', err);
uni.showToast({ uni.showToast({
title: '加载列表失败', title: '加载列表失败',
icon: 'none' icon: 'none'
@ -287,8 +275,6 @@
pageSize: 10, pageSize: 10,
}); });
console.log("===res", res)
if (res?.success) { if (res?.success) {
this.orderList = [...res.data]; this.orderList = [...res.data];
this.tabsReady = true; this.tabsReady = true;

View File

@ -146,7 +146,7 @@ export default {
{ {
key: 4, key: 4,
url: "/static/imgs/service/service_friend.png", url: "/static/imgs/service/service_friend.png",
name: '会议室预约', name: '共享空间预约',
pageUrl: 'meetingList' pageUrl: 'meetingList'
}, },
{ {

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,7 @@
<view class="slanted-block"></view> <view class="slanted-block"></view>
</view> </view>
<view class="right" @click="goPage('helpInfo')"> <view class="right" @click="goPage('helpInfo','')">
<view class="right-icon">+</view> <view class="right-icon">+</view>
<view class="right-font">发帖</view> <view class="right-font">发帖</view>
</view> </view>
@ -92,9 +92,9 @@
}, },
methods: { methods: {
// //
goPage(page){ goPage(page,id){
uni.navigateTo({ uni.navigateTo({
url: `/pages/${page}/index`, url: `/pages/${page}/index?Id=${id}`,
// url: '/pages/helpInfo/index', // url: '/pages/helpInfo/index',
success: () => { success: () => {
console.log('切换到tabBar页面成功'); console.log('切换到tabBar页面成功');