From dd3f702887dd12ad5ebbff63264957c2815ee8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A0=91=E8=90=8C=E8=8A=BD?= <3205788256@qq.com> Date: Tue, 16 Sep 2025 22:17:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E8=B5=9B=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- InfoGenie-frontend/.env.development | 2 +- InfoGenie-frontend/.env.local | 2 +- InfoGenie-frontend/.env.production | 2 +- .../60sapi/实用功能/天气预报/js/script.js | 91 ++++++++++--- .../60sapi/实用功能/天气预报/接口集合.json | 3 - .../60sapi/实用功能/天气预报/返回接口.json | 102 +-------------- .../60sapi/热搜榜单/微博热搜榜/js/main.js | 3 +- .../60sapi/热搜榜单/微博热搜榜/接口集合.json | 3 - .../src/config/StaticPageConfig.js | 120 ++++++++++-------- InfoGenie-frontend/src/pages/AiModelPage.js | 28 ++-- InfoGenie-frontend/src/pages/Api60sPage.js | 9 +- InfoGenie-frontend/src/pages/SmallGamePage.js | 26 ++-- 12 files changed, 175 insertions(+), 216 deletions(-) delete mode 100755 InfoGenie-frontend/public/60sapi/实用功能/天气预报/接口集合.json delete mode 100755 InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/接口集合.json diff --git a/InfoGenie-frontend/.env.development b/InfoGenie-frontend/.env.development index 0c9ca94e..86b2c5e2 100755 --- a/InfoGenie-frontend/.env.development +++ b/InfoGenie-frontend/.env.development @@ -1 +1 @@ -REACT_APP_API_URL=http://127.0.0.1:5002 \ No newline at end of file +REACT_APP_API_URL=https://infogenie.api.shumengya.top \ No newline at end of file diff --git a/InfoGenie-frontend/.env.local b/InfoGenie-frontend/.env.local index 2df1c86f..61e0b90d 100755 --- a/InfoGenie-frontend/.env.local +++ b/InfoGenie-frontend/.env.local @@ -1 +1 @@ -REACT_APP_API_URL=http://127.0.0.1:5002 +REACT_APP_API_URL=https://infogenie.api.shumengya.top diff --git a/InfoGenie-frontend/.env.production b/InfoGenie-frontend/.env.production index 0c9ca94e..86b2c5e2 100755 --- a/InfoGenie-frontend/.env.production +++ b/InfoGenie-frontend/.env.production @@ -1 +1 @@ -REACT_APP_API_URL=http://127.0.0.1:5002 \ No newline at end of file +REACT_APP_API_URL=https://infogenie.api.shumengya.top \ No newline at end of file diff --git a/InfoGenie-frontend/public/60sapi/实用功能/天气预报/js/script.js b/InfoGenie-frontend/public/60sapi/实用功能/天气预报/js/script.js index 6361f580..2207d110 100755 --- a/InfoGenie-frontend/public/60sapi/实用功能/天气预报/js/script.js +++ b/InfoGenie-frontend/public/60sapi/实用功能/天气预报/js/script.js @@ -2,7 +2,8 @@ class WeatherApp { constructor() { this.apiEndpoints = [ - "https://60s.api.shumengya.top/v2/weather/forecast" + "https://60s.api.shumengya.top/v2/weather/forecast", + "https://60s-cf.viki.moe/v2/weather/forecast" ]; this.currentEndpointIndex = 0; this.init(); @@ -89,31 +90,42 @@ class WeatherApp { } displayWeatherData(data) { - const { location, forecast } = data; + const { location, daily_forecast, hourly_forecast } = data; // 显示位置信息 - document.getElementById('locationName').textContent = location.formatted; + document.getElementById('locationName').textContent = location.name || '未知位置'; document.getElementById('locationDetail').textContent = - `${location.province} ${location.city} | 邮编: ${location.zip_code}`; + `${location.province || ''} ${location.city || ''} ${location.county || ''}`.trim(); // 使用第一天的预报数据作为当前天气(今天的天气) - const todayWeather = forecast[0]; + const todayWeather = daily_forecast && daily_forecast[0]; - // 显示当前天气(使用今天的最高温度) - document.getElementById('temperature').textContent = todayWeather.temperature_high; - document.getElementById('weatherCondition').textContent = - `${todayWeather.weather_day} 转 ${todayWeather.weather_night}`; - - // 体感温度(使用温度范围) - document.getElementById('feelsLike').textContent = - `温度范围 ${todayWeather.temperature_low}°C - ${todayWeather.temperature_high}°C`; + if (todayWeather) { + // 显示当前天气(使用今天的最高温度) + document.getElementById('temperature').textContent = todayWeather.max_temperature; + document.getElementById('weatherCondition').textContent = + `${todayWeather.day_condition} 转 ${todayWeather.night_condition}`; + + // 体感温度(使用温度范围) + document.getElementById('feelsLike').textContent = + `温度范围 ${todayWeather.min_temperature}°C - ${todayWeather.max_temperature}°C`; + } else { + // 如果没有日预报数据,尝试使用小时预报数据 + const currentHour = hourly_forecast && hourly_forecast[0]; + if (currentHour) { + document.getElementById('temperature').textContent = currentHour.temperature; + document.getElementById('weatherCondition').textContent = currentHour.condition; + document.getElementById('feelsLike').textContent = + `风向: ${currentHour.wind_direction} ${currentHour.wind_power}`; + } + } // 显示更新时间(使用当前时间) document.getElementById('updateTime').textContent = `${this.formatDate(new Date())} (基于预报数据)`; // 显示天气预报 - this.displayForecast(forecast); + this.displayForecast(daily_forecast || []); this.showWeatherContainer(); } @@ -122,24 +134,33 @@ class WeatherApp { const forecastGrid = document.getElementById('forecastGrid'); forecastGrid.innerHTML = ''; + if (!forecast || forecast.length === 0) { + forecastGrid.innerHTML = '
暂无预报数据
'; + return; + } + forecast.forEach((day, index) => { const forecastItem = document.createElement('div'); forecastItem.className = 'forecast-item'; + // 格式化日期显示 + const dateStr = day.date || ''; + const dateDesc = this.formatDateDesc(dateStr); + forecastItem.innerHTML = ` -
${day.date_desc}
+
${dateDesc}
-
${day.weather_day}
-
${day.weather_night}
+
${day.day_condition || '未知'}
+
${day.night_condition || '未知'}
- ${day.temperature_high}° - ${day.temperature_low}° + ${day.max_temperature || '--'}° + ${day.min_temperature || '--'}°
-
${day.wind_direction_day} ${day.wind_strength_day}
+
${day.day_wind_direction || ''} ${day.day_wind_power || ''}
-
湿度: ${day.humidity}%
+
空气质量: ${day.air_quality || '未知'}
`; forecastGrid.appendChild(forecastItem); @@ -164,6 +185,34 @@ class WeatherApp { return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; } + // 格式化日期描述 + formatDateDesc(dateStr) { + if (!dateStr) return '未知日期'; + + try { + const date = new Date(dateStr); + const today = new Date(); + const tomorrow = new Date(today); + tomorrow.setDate(today.getDate() + 1); + + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + + // 判断是今天、明天还是其他日期 + if (date.toDateString() === today.toDateString()) { + return `今天 ${month}-${day}`; + } else if (date.toDateString() === tomorrow.toDateString()) { + return `明天 ${month}-${day}`; + } else { + const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']; + const weekday = weekdays[date.getDay()]; + return `${weekday} ${month}-${day}`; + } + } catch (error) { + return dateStr; + } + } + showLoading() { document.getElementById('loading').style.display = 'block'; document.getElementById('weatherContainer').style.display = 'none'; diff --git a/InfoGenie-frontend/public/60sapi/实用功能/天气预报/接口集合.json b/InfoGenie-frontend/public/60sapi/实用功能/天气预报/接口集合.json deleted file mode 100755 index 178eeacc..00000000 --- a/InfoGenie-frontend/public/60sapi/实用功能/天气预报/接口集合.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "https://60s.api.shumengya.top/v2/weather/forecast" -] diff --git a/InfoGenie-frontend/public/60sapi/实用功能/天气预报/返回接口.json b/InfoGenie-frontend/public/60sapi/实用功能/天气预报/返回接口.json index 7de58048..aaf8f58d 100755 --- a/InfoGenie-frontend/public/60sapi/实用功能/天气预报/返回接口.json +++ b/InfoGenie-frontend/public/60sapi/实用功能/天气预报/返回接口.json @@ -1,101 +1 @@ -{ - "code": 200, - "message": "获取成功。数据来自官方/权威源头,以确保稳定与实时。开源地址 https://github.com/vikiboss/60s,反馈群 595941841", - "data": { - "location": { - "province": "北京", - "city": "北京", - "town": "北京", - "formatted": "北京", - "location_id": "101010100", - "detail_url": "http://www.weather.com.cn/weather/101010100.shtml", - "is_province": true, - "is_city": false, - "is_town": false, - "area_code": "10", - "zip_code": "100000" - }, - "forecast": [ - { - "date": "9/4", - "date_desc": "今天", - "weather_day": "多云", - "weather_night": "阴", - "weather_code_day": "01", - "weather_code_night": "02", - "temperature_high": 31, - "temperature_low": 21, - "wind_direction_day": "南风", - "wind_direction_night": "南风", - "wind_strength_day": "\u003C3级", - "wind_strength_night": "\u003C3级", - "rainfall": 96.1, - "humidity": 83 - }, - { - "date": "9/5", - "date_desc": "星期五", - "weather_day": "中雨", - "weather_night": "多云", - "weather_code_day": "08", - "weather_code_night": "01", - "temperature_high": 23, - "temperature_low": 19, - "wind_direction_day": "西南风", - "wind_direction_night": "北风", - "wind_strength_day": "\u003C3级", - "wind_strength_night": "\u003C3级", - "rainfall": 100, - "humidity": 68 - }, - { - "date": "9/6", - "date_desc": "星期六", - "weather_day": "多云", - "weather_night": "晴", - "weather_code_day": "01", - "weather_code_night": "00", - "temperature_high": 30, - "temperature_low": 19, - "wind_direction_day": "南风", - "wind_direction_night": "西南风", - "wind_strength_day": "\u003C3级", - "wind_strength_night": "\u003C3级", - "rainfall": 85.2, - "humidity": 36 - }, - { - "date": "9/7", - "date_desc": "星期日", - "weather_day": "多云", - "weather_night": "晴", - "weather_code_day": "01", - "weather_code_night": "00", - "temperature_high": 29, - "temperature_low": 20, - "wind_direction_day": "北风", - "wind_direction_night": "北风", - "wind_strength_day": "\u003C3级", - "wind_strength_night": "\u003C3级", - "rainfall": 87.3, - "humidity": 27 - }, - { - "date": "9/8", - "date_desc": "星期一", - "weather_day": "多云", - "weather_night": "多云", - "weather_code_day": "01", - "weather_code_night": "01", - "temperature_high": 28, - "temperature_low": 20, - "wind_direction_day": "南风", - "wind_direction_night": "南风", - "wind_strength_day": "\u003C3级", - "wind_strength_night": "\u003C3级", - "rainfall": 84.8, - "humidity": 41 - } - ] - } -} \ No newline at end of file +{"code":200,"message":"获取成功。数据来自官方/权威源头,以确保稳定与实时。开源地址 https://github.com/vikiboss/60s,反馈群 595941841","data":{"location":{"name":"北京北京","province":"北京省","city":"北京市","county":""},"hourly_forecast":[{"datetime":"2025-09-16 21:00","temperature":20,"condition":"多云","condition_code":"01","wind_direction":"东北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"datetime":"2025-09-16 22:00","temperature":19,"condition":"多云","condition_code":"01","wind_direction":"东北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"datetime":"2025-09-16 23:00","temperature":19,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 00:00","temperature":17,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 01:00","temperature":17,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 02:00","temperature":16,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 03:00","temperature":15,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 04:00","temperature":14,"condition":"多云","condition_code":"01","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"datetime":"2025-09-17 05:00","temperature":14,"condition":"多云","condition_code":"01","wind_direction":"东北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"datetime":"2025-09-17 06:00","temperature":15,"condition":"多云","condition_code":"01","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png"},{"datetime":"2025-09-17 07:00","temperature":17,"condition":"多云","condition_code":"01","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png"},{"datetime":"2025-09-17 08:00","temperature":18,"condition":"多云","condition_code":"01","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png"},{"datetime":"2025-09-17 09:00","temperature":20,"condition":"多云","condition_code":"01","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png"},{"datetime":"2025-09-17 10:00","temperature":21,"condition":"多云","condition_code":"01","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png"},{"datetime":"2025-09-17 11:00","temperature":23,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 12:00","temperature":24,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 13:00","temperature":25,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 14:00","temperature":25,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 15:00","temperature":24,"condition":"晴","condition_code":"00","wind_direction":"东北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 16:00","temperature":23,"condition":"晴","condition_code":"00","wind_direction":"东风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 17:00","temperature":21,"condition":"晴","condition_code":"00","wind_direction":"东南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 18:00","temperature":20,"condition":"晴","condition_code":"00","wind_direction":"南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-17 19:00","temperature":18,"condition":"晴","condition_code":"00","wind_direction":"南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 20:00","temperature":17,"condition":"晴","condition_code":"00","wind_direction":"西南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 21:00","temperature":16,"condition":"晴","condition_code":"00","wind_direction":"西南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 22:00","temperature":15,"condition":"晴","condition_code":"00","wind_direction":"西风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-17 23:00","temperature":14,"condition":"晴","condition_code":"00","wind_direction":"西风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 00:00","temperature":14,"condition":"晴","condition_code":"00","wind_direction":"西风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 01:00","temperature":14,"condition":"晴","condition_code":"00","wind_direction":"西北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 02:00","temperature":14,"condition":"晴","condition_code":"00","wind_direction":"西北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 03:00","temperature":14,"condition":"晴","condition_code":"00","wind_direction":"西南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 04:00","temperature":13,"condition":"晴","condition_code":"00","wind_direction":"东南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 05:00","temperature":13,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 06:00","temperature":14,"condition":"晴","condition_code":"00","wind_direction":"东南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 07:00","temperature":15,"condition":"晴","condition_code":"00","wind_direction":"西南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 08:00","temperature":17,"condition":"晴","condition_code":"00","wind_direction":"北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 09:00","temperature":19,"condition":"晴","condition_code":"00","wind_direction":"西风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 10:00","temperature":21,"condition":"晴","condition_code":"00","wind_direction":"东南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 11:00","temperature":24,"condition":"晴","condition_code":"00","wind_direction":"东北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 12:00","temperature":24,"condition":"晴","condition_code":"00","wind_direction":"东北风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 13:00","temperature":24,"condition":"晴","condition_code":"00","wind_direction":"东风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 14:00","temperature":25,"condition":"晴","condition_code":"00","wind_direction":"东南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 15:00","temperature":25,"condition":"晴","condition_code":"00","wind_direction":"东南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 16:00","temperature":25,"condition":"晴","condition_code":"00","wind_direction":"南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 17:00","temperature":25,"condition":"晴","condition_code":"00","wind_direction":"南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 18:00","temperature":24,"condition":"晴","condition_code":"00","wind_direction":"南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png"},{"datetime":"2025-09-18 19:00","temperature":22,"condition":"晴","condition_code":"00","wind_direction":"南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"datetime":"2025-09-18 20:00","temperature":21,"condition":"晴","condition_code":"00","wind_direction":"南风","wind_power":"1-3","weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"}],"daily_forecast":[{"date":"2025-09-15","day_condition":"小雨","day_condition_code":"07","night_condition":"雷阵雨","night_condition_code":"04","max_temperature":24,"min_temperature":19,"day_wind_direction":"西北风","day_wind_power":"3-4","night_wind_direction":"北风","night_wind_power":"1-3","aqi":10,"aqi_level":1,"air_quality":"优","day_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/07.png","night_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/04.png"},{"date":"2025-09-16","day_condition":"阴","day_condition_code":"02","night_condition":"多云","night_condition_code":"01","max_temperature":25,"min_temperature":13,"day_wind_direction":"北风","day_wind_power":"3-4","night_wind_direction":"东北风","night_wind_power":"1-3","aqi":14,"aqi_level":1,"air_quality":"优","day_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/02.png","night_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"date":"2025-09-17","day_condition":"晴","day_condition_code":"00","night_condition":"晴","night_condition_code":"00","max_temperature":26,"min_temperature":13,"day_wind_direction":"北风","day_wind_power":"1-3","night_wind_direction":"西风","night_wind_power":"1-3","aqi":34,"aqi_level":1,"air_quality":"优","day_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png","night_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/00.png"},{"date":"2025-09-18","day_condition":"晴","day_condition_code":"00","night_condition":"多云","night_condition_code":"01","max_temperature":26,"min_temperature":15,"day_wind_direction":"南风","day_wind_power":"1-3","night_wind_direction":"西南风","night_wind_power":"1-3","aqi":63,"aqi_level":2,"air_quality":"良","day_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/00.png","night_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"date":"2025-09-19","day_condition":"多云","day_condition_code":"01","night_condition":"多云","night_condition_code":"01","max_temperature":24,"min_temperature":17,"day_wind_direction":"西南风","day_wind_power":"1-3","night_wind_direction":"西南风","night_wind_power":"1-3","aqi":42,"aqi_level":1,"air_quality":"优","day_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png","night_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"date":"2025-09-20","day_condition":"多云","day_condition_code":"01","night_condition":"多云","night_condition_code":"01","max_temperature":24,"min_temperature":16,"day_wind_direction":"西南风","day_wind_power":"1-3","night_wind_direction":"北风","night_wind_power":"1-3","aqi":48,"aqi_level":1,"air_quality":"优","day_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png","night_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"},{"date":"2025-09-21","day_condition":"多云","day_condition_code":"01","night_condition":"多云","night_condition_code":"01","max_temperature":25,"min_temperature":17,"day_wind_direction":"东北风","day_wind_power":"1-3","night_wind_direction":"东北风","night_wind_power":"1-3","aqi":55,"aqi_level":2,"air_quality":"良","day_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/baitian/01.png","night_weather_icon":"https://mat1.gtimg.com/qqcdn/xw/tianqi/smallIcon/heiye/01.png"}],"sunrise_sunset":[{"sunrise":"2025-09-16 05:56:00","sunrise_at":1757973360000,"sunrise_desc":"05:56","sunset":"2025-09-16 18:23:00","sunset_at":1758018180000,"sunset_desc":"18:23"},{"sunrise":"2025-09-17 05:57:00","sunrise_at":1758059820000,"sunrise_desc":"05:57","sunset":"2025-09-17 18:21:00","sunset_at":1758104460000,"sunset_desc":"18:21"},{"sunrise":"2025-09-18 05:58:00","sunrise_at":1758146280000,"sunrise_desc":"05:58","sunset":"2025-09-18 18:19:00","sunset_at":1758190740000,"sunset_desc":"18:19"},{"sunrise":"2025-09-19 05:58:00","sunrise_at":1758232680000,"sunrise_desc":"05:58","sunset":"2025-09-19 18:18:00","sunset_at":1758277080000,"sunset_desc":"18:18"},{"sunrise":"2025-09-20 05:59:00","sunrise_at":1758319140000,"sunrise_desc":"05:59","sunset":"2025-09-20 18:16:00","sunset_at":1758363360000,"sunset_desc":"18:16"},{"sunrise":"2025-09-21 06:00:00","sunrise_at":1758405600000,"sunrise_desc":"06:00","sunset":"2025-09-21 18:14:00","sunset_at":1758449640000,"sunset_desc":"18:14"},{"sunrise":"2025-09-22 06:01:00","sunrise_at":1758492060000,"sunrise_desc":"06:01","sunset":"2025-09-22 18:13:00","sunset_at":1758535980000,"sunset_desc":"18:13"}]}} \ No newline at end of file diff --git a/InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/js/main.js b/InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/js/main.js index 7e076706..1e5448eb 100755 --- a/InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/js/main.js +++ b/InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/js/main.js @@ -1,6 +1,7 @@ // API接口列表 const API_ENDPOINTS = [ "https://60s.api.shumengya.top/v2/weibo", + "https://60s-cf.viki.moe/v2/weibo", ]; // 当前使用的API索引 @@ -72,7 +73,7 @@ async function fetchWeiboHotList() { // 显示错误信息 hotListElement.innerHTML = `
- 获取数据失败,正在尝试其他接口... + 正在尝试其他接口...
`; diff --git a/InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/接口集合.json b/InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/接口集合.json deleted file mode 100755 index 547b2771..00000000 --- a/InfoGenie-frontend/public/60sapi/热搜榜单/微博热搜榜/接口集合.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "https://60s.api.shumengya.top" -] diff --git a/InfoGenie-frontend/src/config/StaticPageConfig.js b/InfoGenie-frontend/src/config/StaticPageConfig.js index 780da47d..7efb6697 100755 --- a/InfoGenie-frontend/src/config/StaticPageConfig.js +++ b/InfoGenie-frontend/src/config/StaticPageConfig.js @@ -1,127 +1,141 @@ // 静态页面配置文件 // 统一管理所有静态网页的链接和配置信息 -//AI模型工具 +//AI工具 export const AI_MODEL_APPS = [ { title: 'AI变量命名助手', description: '智能变量命名工具,帮助开发者快速生成规范的变量名', link: '/aimodelapp/AI变量命名助手/index.html', gradient: 'linear-gradient(135deg, #4ade80 0%, #22c55e 100%)', - icon: '🤖' + icon: '🤖', + IsShow: true }, { title: 'AI写诗小助手', description: 'AI创作诗歌助手,体验古典诗词的魅力', link: '/aimodelapp/AI写诗小助手/index.html', gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', - icon: '📝' + icon: '📝', + IsShow: true }, { title: 'AI姓名评测', description: '基于AI的姓名分析和评测工具', link: '/aimodelapp/AI姓名评测/index.html', gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', - icon: '👤' + icon: '👤', + IsShow: true }, { title: 'AI翻译助手', description: '基于AI的翻译工具', link: '/aimodelapp/AI语言翻译助手/index.html', gradient: 'linear-gradient(135deg,rgb(80, 77, 243) 0%,rgb(30, 211, 111) 100%)', - icon: '🌍' + icon: '🌍', + IsShow: true }, { title: 'AI文章转文言文', description: '基于AI的文章转文言文工具', link: '/aimodelapp/AI文章转文言文/index.html', gradient: 'linear-gradient(135deg,rgb(186, 248, 70) 0%,rgb(255, 208, 0) 100%)', - icon: '📝' + icon: '📝', + IsShow: true }, { title: 'AI生成表情包', description: '基于AI的生成表情包工具', link: '/aimodelapp/AI生成表情包/index.html', gradient: 'linear-gradient(135deg,rgb(186, 248, 70) 0%,rgb(34, 157, 238) 100%)', - icon: '📸' + icon: '📸', + IsShow: true }, { title: 'AI生成Linux命令', description: '基于AI的生成Linux命令工具', link: '/aimodelapp/AI生成Linux命令/index.html', gradient: 'linear-gradient(135deg,rgb(128, 180, 32) 0%,rgb(29, 199, 162) 100%)', - icon: '🐧' + icon: '🐧', + IsShow: true }, ]; +//玩玩小游戏 export const SMALL_GAMES = [ { title: '2048', description: '经典数字合并游戏,挑战你的策略思维', link: '/smallgame/2048/index.html', gradient: 'linear-gradient(135deg, #f093fb 0%, #f5576c 100%)', - icon: '🔢' + icon: '🔢', + IsShow: true }, { title: '别踩白方块', description: '节奏感游戏,考验你的反应速度和手指协调', link: '/smallgame/别踩白方块/index.html', gradient: 'linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)', - icon: '⬛' + icon: '⬛', + IsShow: true }, { title: '俄罗斯方块', description: '经典落块消除游戏,永恒的经典之作', link: '/smallgame/俄罗斯方块/index.html', gradient: 'linear-gradient(135deg, #4ade80 0%, #22c55e 100%)', - icon: '🧩' + icon: '🧩', + IsShow: true }, { title: '贪吃蛇', description: '经典贪吃蛇游戏,考验你的反应速度和手指协调', link: '/smallgame/贪吃蛇/index.html', gradient: 'linear-gradient(135deg,rgb(37, 132, 240) 0%, #f5576c 100%)', - icon: '🐍' + icon: '🐍', + IsShow: true }, { title: '扫雷', description: '经典扫雷游戏,考验你的反应速度和手指协调', link: '/smallgame/扫雷/index.html', gradient: 'linear-gradient(135deg,rgb(37, 132, 240) 0%, #f5576c 100%)', - icon: '💣' + icon: '💣', + IsShow: true }, ]; +//API聚合应用 export const API_60S_CATEGORIES = [ { title: '热搜榜单', icon: '🔥', color: '#ff6b6b', apis: [ - { title: '哔哩哔哩热搜榜', link: '/60sapi/热搜榜单/哔哩哔哩热搜榜/index.html', icon: '📺' }, - { title: '抖音热搜榜', link: '/60sapi/热搜榜单/抖音热搜榜/index.html', icon: '🎵' }, - { title: '猫眼票房排行榜', link: '/60sapi/热搜榜单/猫眼票房排行榜/index.html', icon: '🎬' }, - { title: '头条热搜榜', link: '/60sapi/热搜榜单/头条热搜榜/index.html', icon: '📰' }, - { title: '网易云榜单', link: '/60sapi/热搜榜单/网易云榜单/index.html', icon: '🎶' }, - { title: '微博热搜榜', link: '/60sapi/热搜榜单/微博热搜榜/index.html', icon: '📱' }, - { title: '知乎热门话题', link: '/60sapi/热搜榜单/知乎热门话题/index.html', icon: '💡' }, - { title: 'Hacker News 榜单', link: '/60sapi/热搜榜单/Hacker News 榜单/index.html', icon: '💻' }, - { title: '小红书热点', link: '/60sapi/热搜榜单/小红书热点/index.html', icon: '📖' }, - { title: '百度实时热搜', link: '/60sapi/热搜榜单/百度实时热搜/index.html', icon: '🔍' }, - { title: '百度电视剧榜', link: '/60sapi/热搜榜单/百度电视剧榜/index.html', icon: '📺' }, - { title: '百度贴吧话题榜', link: '/60sapi/热搜榜单/百度贴吧话题榜/index.html', icon: '💬' }, - { title: '懂车帝热搜', link: '/60sapi/热搜榜单/懂车帝热搜/index.html', icon: '🚗' }, + { title: '哔哩哔哩热搜榜', link: '/60sapi/热搜榜单/哔哩哔哩热搜榜/index.html', icon: '📺', IsShow: true }, + { title: '抖音热搜榜', link: '/60sapi/热搜榜单/抖音热搜榜/index.html', icon: '🎵', IsShow: true }, + { title: '猫眼票房排行榜', link: '/60sapi/热搜榜单/猫眼票房排行榜/index.html', icon: '🎬', IsShow: true }, + { title: '头条热搜榜', link: '/60sapi/热搜榜单/头条热搜榜/index.html', icon: '📰', IsShow: true }, + { title: '网易云榜单', link: '/60sapi/热搜榜单/网易云榜单/index.html', icon: '🎶', IsShow: true }, + { title: '微博热搜榜', link: '/60sapi/热搜榜单/微博热搜榜/index.html', icon: '📱', IsShow: true }, + { title: '知乎热门话题', link: '/60sapi/热搜榜单/知乎热门话题/index.html', icon: '💡', IsShow: true }, + { title: 'Hacker News 榜单', link: '/60sapi/热搜榜单/Hacker News 榜单/index.html', icon: '💻', IsShow: true }, + { title: '小红书热点', link: '/60sapi/热搜榜单/小红书热点/index.html', icon: '📖', IsShow: true }, + { title: '百度实时热搜', link: '/60sapi/热搜榜单/百度实时热搜/index.html', icon: '🔍', IsShow: true }, + { title: '百度电视剧榜', link: '/60sapi/热搜榜单/百度电视剧榜/index.html', icon: '📺', IsShow: true }, + { title: '百度贴吧话题榜', link: '/60sapi/热搜榜单/百度贴吧话题榜/index.html', icon: '💬', IsShow: true }, + { title: '懂车帝热搜', link: '/60sapi/热搜榜单/懂车帝热搜/index.html', icon: '🚗', IsShow: true }, ] }, { title: '日更资讯', icon: '📰', - color: '#4ecdc4', + color: '#81c784', apis: [ - { title: '必应每日壁纸', link: '/60sapi/日更资讯/必应每日壁纸/index.html', icon: '🖼️' }, - { title: '历史上的今天', link: '/60sapi/日更资讯/历史上的今天/index.html', icon: '📅' }, - { title: '每日国际汇率', link: '/60sapi/日更资讯/每日国际汇率/index.html', icon: '💱' }, - { title: '每天60s读懂世界', link: '/60sapi/日更资讯/每天60s读懂世界/index.html', icon: '🌍' } + { title: '必应每日壁纸', link: '/60sapi/日更资讯/必应每日壁纸/index.html', icon: '🖼️', IsShow: true }, + { title: '历史上的今天', link: '/60sapi/日更资讯/历史上的今天/index.html', icon: '📅', IsShow: true }, + { title: '每日国际汇率', link: '/60sapi/日更资讯/每日国际汇率/index.html', icon: '💱', IsShow: true }, + { title: '每天60s读懂世界', link: '/60sapi/日更资讯/每天60s读懂世界/index.html', icon: '🌍', IsShow: true } ] }, { @@ -129,20 +143,20 @@ export const API_60S_CATEGORIES = [ icon: '🛠️', color: '#45b7d1', apis: [ - { title: '百度百科词条', link: '/60sapi/实用功能/百度百科词条/index.html', icon: '📚' }, - { title: '公网IP地址', link: '/60sapi/实用功能/公网IP地址/index.html', icon: '🌐' }, - { title: '哈希解压压缩', link: '/60sapi/实用功能/哈希解压压缩/index.html', icon: '🗜️' }, - { title: '链接OG信息', link: '/60sapi/实用功能/链接OG信息/index.html', icon: '🔗' }, - { title: '密码强度检测', link: '/60sapi/实用功能/密码强度检测/index.html', icon: '🔐' }, - { title: '农历信息', link: '/60sapi/实用功能/农历信息/index.html', icon: '📅' }, - { title: '配色方案', link: '/60sapi/实用功能/配色方案/index.html', icon: '🎨' }, - { title: '身体健康分析', link: '/60sapi/实用功能/身体健康分析/index.html', icon: '🏥' }, - { title: '生成二维码', link: '/60sapi/实用功能/生成二维码/index.html', icon: '📱' }, - { title: '随机密码生成器', link: '/60sapi/实用功能/随机密码生成器/index.html', icon: '🔒' }, - { title: '随机颜色', link: '/60sapi/实用功能/随机颜色/index.html', icon: '🌈' }, - { title: '天气预报', link: '/60sapi/实用功能/天气预报/index.html', icon: '🌤️' }, - { title: 'EpicGames免费游戏', link: '/60sapi/实用功能/EpicGames免费游戏/index.html', icon: '🎮' }, - { title: '在线机器翻译', link: '/60sapi/实用功能/在线翻译/index.html', icon: '🌍' }, + { title: '百度百科词条', link: '/60sapi/实用功能/百度百科词条/index.html', icon: '📚', IsShow: true }, + { title: '公网IP地址', link: '/60sapi/实用功能/公网IP地址/index.html', icon: '🌐', IsShow: true }, + { title: '哈希解压压缩', link: '/60sapi/实用功能/哈希解压压缩/index.html', icon: '🗜️', IsShow: true }, + { title: '链接OG信息', link: '/60sapi/实用功能/链接OG信息/index.html', icon: '🔗', IsShow: true }, + { title: '密码强度检测', link: '/60sapi/实用功能/密码强度检测/index.html', icon: '🔐', IsShow: true }, + { title: '农历信息', link: '/60sapi/实用功能/农历信息/index.html', icon: '📅', IsShow: true }, + { title: '配色方案', link: '/60sapi/实用功能/配色方案/index.html', icon: '🎨', IsShow: true }, + { title: '身体健康分析', link: '/60sapi/实用功能/身体健康分析/index.html', icon: '🏥', IsShow: true }, + { title: '生成二维码', link: '/60sapi/实用功能/生成二维码/index.html', icon: '📱', IsShow: true }, + { title: '随机密码生成器', link: '/60sapi/实用功能/随机密码生成器/index.html', icon: '🔒', IsShow: true }, + { title: '随机颜色', link: '/60sapi/实用功能/随机颜色/index.html', icon: '🌈', IsShow: true }, + { title: '天气预报', link: '/60sapi/实用功能/天气预报/index.html', icon: '🌤️', IsShow: true }, + { title: 'EpicGames免费游戏', link: '/60sapi/实用功能/EpicGames免费游戏/index.html', icon: '🎮', IsShow: true }, + { title: '在线机器翻译', link: '/60sapi/实用功能/在线翻译/index.html', icon: '🌍', IsShow: false }, ] }, { @@ -150,14 +164,14 @@ export const API_60S_CATEGORIES = [ icon: '🎉', color: '#f7b731', apis: [ - { title: '随机唱歌音频', link: '/60sapi/娱乐消遣/随机唱歌音频/index.html', icon: '🎤' }, - { title: '随机发病文学', link: '/60sapi/娱乐消遣/随机发病文学/index.html', icon: '📖' }, - { title: '随机搞笑段子', link: '/60sapi/娱乐消遣/随机搞笑段子/index.html', icon: '😂' }, - { title: '随机冷笑话', link: '/60sapi/娱乐消遣/随机冷笑话/index.html', icon: '😄' }, - { title: '随机一言', link: '/60sapi/娱乐消遣/随机一言/index.html', icon: '💭' }, - { title: '随机运势', link: '/60sapi/娱乐消遣/随机运势/index.html', icon: '⭐' }, - { title: '随机JavaScript趣味题', link: '/60sapi/娱乐消遣/随机JavaScript趣味题/index.html', icon: '💻' }, - { title: '随机KFC文案', link: '/60sapi/娱乐消遣/随机KFC文案/index.html', icon: '🍗' } + { title: '随机唱歌音频', link: '/60sapi/娱乐消遣/随机唱歌音频/index.html', icon: '🎤', IsShow: true }, + { title: '随机发病文学', link: '/60sapi/娱乐消遣/随机发病文学/index.html', icon: '📖', IsShow: true }, + { title: '随机搞笑段子', link: '/60sapi/娱乐消遣/随机搞笑段子/index.html', icon: '😂', IsShow: true }, + { title: '随机冷笑话', link: '/60sapi/娱乐消遣/随机冷笑话/index.html', icon: '😄', IsShow: true }, + { title: '随机一言', link: '/60sapi/娱乐消遣/随机一言/index.html', icon: '💭', IsShow: true }, + { title: '随机运势', link: '/60sapi/娱乐消遣/随机运势/index.html', icon: '⭐', IsShow: true }, + { title: '随机JavaScript趣味题', link: '/60sapi/娱乐消遣/随机JavaScript趣味题/index.html', icon: '💻', IsShow: true }, + { title: '随机KFC文案', link: '/60sapi/娱乐消遣/随机KFC文案/index.html', icon: '🍗', IsShow: true } ] } ]; diff --git a/InfoGenie-frontend/src/pages/AiModelPage.js b/InfoGenie-frontend/src/pages/AiModelPage.js index f7e5684f..ce15a8f5 100755 --- a/InfoGenie-frontend/src/pages/AiModelPage.js +++ b/InfoGenie-frontend/src/pages/AiModelPage.js @@ -21,16 +21,14 @@ const Container = styled.div` const PageHeader = styled.div` text-align: center; margin-bottom: 40px; - padding: 40px 20px; - background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%); - border-radius: 16px; `; const PageTitle = styled.h1` + color: white; font-size: 32px; - font-weight: bold; - color: #1f2937; - margin-bottom: 16px; + font-weight: 700; + margin-bottom: 10px; + text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); .title-emoji { margin: 0 8px; @@ -42,9 +40,10 @@ const PageTitle = styled.h1` `; const PageDescription = styled.p` - font-size: 16px; - color: #6b7280; - line-height: 1.6; + color: rgba(255, 255, 255, 0.8); + font-size: 18px; + max-width: 600px; + margin: 0 auto; `; const LoginPrompt = styled.div` @@ -270,8 +269,9 @@ const AiModelPage = () => { try { setLoadingApps(true); - // 从配置文件获取AI应用数据 - setApps(AI_MODEL_APPS); + // 从配置文件获取AI应用数据,过滤掉IsShow为false的应用 + const visibleApps = AI_MODEL_APPS.filter(app => app.IsShow !== false); + setApps(visibleApps); } catch (err) { console.error('获取AI应用列表失败:', err); setError('获取AI应用列表失败,请稍后重试'); @@ -327,12 +327,10 @@ const AiModelPage = () => { - 🤖 - AI模型 - 🤖 + AI工具 - 智能AI工具和模型应用,提供对话、文本生成、图像识别等功能 + AI大模型工具,提供一些小功能 diff --git a/InfoGenie-frontend/src/pages/Api60sPage.js b/InfoGenie-frontend/src/pages/Api60sPage.js index f6e9596e..972c64cc 100755 --- a/InfoGenie-frontend/src/pages/Api60sPage.js +++ b/InfoGenie-frontend/src/pages/Api60sPage.js @@ -207,8 +207,13 @@ const Api60sPage = () => { // 从配置文件获取60s API数据 const scanApiModules = async () => { try { - // 直接返回配置文件中的数据 - return API_60S_CATEGORIES; + // 过滤掉IsShow为false的API项目 + const filteredCategories = API_60S_CATEGORIES.map(category => ({ + ...category, + apis: category.apis.filter(api => api.IsShow !== false) + })).filter(category => category.apis.length > 0); // 过滤掉没有可显示API的分类 + + return filteredCategories; } catch (error) { console.error('获取API模块时出错:', error); return []; diff --git a/InfoGenie-frontend/src/pages/SmallGamePage.js b/InfoGenie-frontend/src/pages/SmallGamePage.js index 75e714d2..efc8d89e 100755 --- a/InfoGenie-frontend/src/pages/SmallGamePage.js +++ b/InfoGenie-frontend/src/pages/SmallGamePage.js @@ -17,16 +17,14 @@ const Container = styled.div` const PageHeader = styled.div` text-align: center; margin-bottom: 40px; - padding: 40px 20px; - background: linear-gradient(135deg, rgba(74, 222, 128, 0.1) 0%, rgba(34, 197, 94, 0.1) 100%); - border-radius: 16px; `; const PageTitle = styled.h1` + color: white; font-size: 32px; - font-weight: bold; - color: #1f2937; - margin-bottom: 16px; + font-weight: 700; + margin-bottom: 10px; + text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); .title-emoji { margin: 0 8px; @@ -38,9 +36,10 @@ const PageTitle = styled.h1` `; const PageDescription = styled.p` - font-size: 16px; - color: #6b7280; - line-height: 1.6; + color: rgba(255, 255, 255, 0.8); + font-size: 18px; + max-width: 600px; + margin: 0 auto; `; const GameGrid = styled.div` @@ -239,8 +238,9 @@ const SmallGamePage = () => { try { setLoading(true); - // 从配置文件获取小游戏数据 - setGames(SMALL_GAMES); + // 从配置文件获取小游戏数据,过滤掉IsShow为false的游戏 + const visibleGames = SMALL_GAMES.filter(game => game.IsShow !== false); + setGames(visibleGames); } catch (err) { console.error('获取游戏列表失败:', err); setError('获取游戏列表失败,请稍后重试'); @@ -264,9 +264,7 @@ const SmallGamePage = () => { - 🎮 - 小游戏 - 🎮 + 玩玩小游戏 轻松有趣的休闲小游戏合集,即点即玩,无需下载