날씨 정보 커스텀 이미지 추가 및 각 라우터 name 설정
All checks were successful
LocalNet_front/pipeline/head This commit looks good

This commit is contained in:
nevermoregb 2025-04-08 01:11:39 +09:00
parent c43614c743
commit f18bc15d91
2 changed files with 12 additions and 1 deletions

View File

@ -545,8 +545,11 @@
const theDayWeatherInfo = dailyWeatherList.value.find(weather => weather.date === dateStr); const theDayWeatherInfo = dailyWeatherList.value.find(weather => weather.date === dateStr);
if (theDayWeatherInfo) { if (theDayWeatherInfo) {
let weatherIconUrl = `https://openweathermap.org/img/wn/${theDayWeatherInfo.icon}.png`;
if (theDayWeatherInfo.icon === '01d' || theDayWeatherInfo.icon === '01n') {
weatherIconUrl = '/img/icons/sunny-custom.png';
}
// //
const weatherIconUrl = `https://openweathermap.org/img/wn/${theDayWeatherInfo.icon}.png`;
const weatherEl = document.createElement('img'); const weatherEl = document.createElement('img');
weatherEl.src = weatherIconUrl; weatherEl.src = weatherIconUrl;
weatherEl.alt = theDayWeatherInfo.description; weatherEl.alt = theDayWeatherInfo.description;

View File

@ -22,6 +22,7 @@ const routes = [
}, },
{ {
path: 'write', path: 'write',
name: 'BoardWrite',
component: () => import('@v/board/BoardWrite.vue'), component: () => import('@v/board/BoardWrite.vue'),
}, },
{ {
@ -44,6 +45,7 @@ const routes = [
}, },
{ {
path: '/wordDict', path: '/wordDict',
name: 'WordDict',
component: () => import('@v/wordDict/wordDict.vue'), component: () => import('@v/wordDict/wordDict.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
@ -73,31 +75,37 @@ const routes = [
}, },
{ {
path: '/voteboard', path: '/voteboard',
name: 'VoteBoard',
component: () => import('@v/voteboard/TheVoteBoard.vue'), component: () => import('@v/voteboard/TheVoteBoard.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
children: [ children: [
{ {
path: '', path: '',
name: 'VoteBoardList',
component: () => import('@v/voteboard/voteBoardList.vue'), component: () => import('@v/voteboard/voteBoardList.vue'),
}, },
{ {
path: 'write', path: 'write',
name: 'VoteboardWrite',
component: () => import('@v/voteboard/voteboardWrite.vue'), component: () => import('@v/voteboard/voteboardWrite.vue'),
}, },
], ],
}, },
{ {
path: '/projectlist', path: '/projectlist',
name: 'Projectlist',
component: () => import('@v/projectlist/TheProjectList.vue'), component: () => import('@v/projectlist/TheProjectList.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/commuters', path: '/commuters',
name: 'Commuters',
component: () => import('@v/commuters/TheCommuters.vue'), component: () => import('@v/commuters/TheCommuters.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },
{ {
path: '/authorization', path: '/authorization',
name: 'Authorization',
component: () => import('@v/admin/TheAuthorization.vue'), component: () => import('@v/admin/TheAuthorization.vue'),
meta: { requiresAuth: true }, meta: { requiresAuth: true },
}, },