v2026.05.19-01 가격 확인·제품 상태 필드 및 별 표시
실제 확인한 가격은 ⭐로 표시하고, 개봉/미개봉 상태를 목록·상세·DB에 반영했다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,6 +2,9 @@ import NSW_DB from '../db/nsw.resale.db.js';
|
||||
|
||||
const SHOW_RECOMMENDED_PRICE_RANGE_BY_DEFAULT = false;
|
||||
|
||||
/** @type {string} 가격 확인 완료 표시 */
|
||||
const VERIFIED_PRICE_MARK = '⭐';
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// URL에서 게임 번호 가져오기
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
@@ -33,10 +36,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
cero: '심의 등급',
|
||||
iarc: '심의 등급',
|
||||
releaseDate: '출시일',
|
||||
suggestedPrice: '추천 판매가',
|
||||
suggestedPrice: '판매가',
|
||||
priceRange: '판매가 범위',
|
||||
pricingBasis: '가격 참고 기준',
|
||||
checkedAt: '기준일',
|
||||
itemCondition: '제품 상태',
|
||||
priceVerified: '가격 확인',
|
||||
extension: '추가 콘텐츠',
|
||||
none: '없음',
|
||||
supported: '대응',
|
||||
@@ -61,6 +66,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
priceRange: '価格帯',
|
||||
pricingBasis: '価格参考基準',
|
||||
checkedAt: '確認日',
|
||||
itemCondition: '商品状態',
|
||||
priceVerified: '価格確認',
|
||||
extension: '追加コンテンツ',
|
||||
none: 'なし',
|
||||
supported: '対応',
|
||||
@@ -94,6 +101,30 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
return labels[language][pricingBasis] || '';
|
||||
}
|
||||
|
||||
function formatItemCondition(itemCondition) {
|
||||
if (!itemCondition) {
|
||||
return language === 'ko' ? '미정' : '未設定';
|
||||
}
|
||||
|
||||
const labels = {
|
||||
ko: {
|
||||
SEALED: '미개봉',
|
||||
OPENED: '개봉',
|
||||
},
|
||||
ja: {
|
||||
SEALED: '未開封',
|
||||
OPENED: '開封済',
|
||||
},
|
||||
};
|
||||
|
||||
return labels[language][itemCondition] || itemCondition;
|
||||
}
|
||||
|
||||
function formatPriceVerified(priceVerified) {
|
||||
if (!priceVerified) return '';
|
||||
return language === 'ko' ? '실제 시세 확인 완료' : '実勢価格確認済み';
|
||||
}
|
||||
|
||||
function convertLanguage(value) {
|
||||
if (!value || language !== 'ko') return value;
|
||||
|
||||
@@ -214,8 +245,11 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
// 기본 정보 설정
|
||||
document.getElementById('gameImage').src = window.innerWidth < 640 ? game.thumbnail : game.image;
|
||||
document.getElementById('gameTitle').textContent =
|
||||
language === 'ko' ? game.koTitle || game.title : game.title;
|
||||
const displayTitle = language === 'ko' ? game.koTitle || game.title : game.title;
|
||||
const gameTitleEl = document.getElementById('gameTitle');
|
||||
gameTitleEl.className =
|
||||
'text-3xl font-bold tracking-tight text-gray-900 sm:text-4xl flex items-center justify-center gap-2';
|
||||
gameTitleEl.innerHTML = `${game.sale?.priceVerified ? VERIFIED_PRICE_MARK : ''}<span>${game.no}. ${displayTitle}</span>`;
|
||||
document.getElementById('gameTags').textContent = convertTags(game.tags);
|
||||
document.getElementById('infoTitle').textContent = currentTexts.infoTitle;
|
||||
document.getElementById('purchaseTitle').textContent = currentTexts.purchaseTitle;
|
||||
@@ -294,6 +328,8 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
? [{ value: priceRange, label: currentTexts.priceRange }]
|
||||
: []),
|
||||
{ value: formatPricingBasis(game.sale.pricingBasis), label: currentTexts.pricingBasis },
|
||||
{ value: formatItemCondition(game.itemCondition), label: currentTexts.itemCondition },
|
||||
{ value: formatPriceVerified(game.sale.priceVerified), label: currentTexts.priceVerified },
|
||||
{ value: game.sale.checkedAt, label: currentTexts.checkedAt },
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user