diff --git a/shop.html b/shop.html index 9b87151d164e13bb4e58234548850cbf26de2f87..751134627048066b95af5eaff9829787b91d531f 100644 --- a/shop.html +++ b/shop.html @@ -1,50 +1,19 @@ - - -Shop - + + +HNKG MARKET | 商品一覧 + - - - -

🛒 商品一覧

- -
- +
HNKG MARKET

管理画面の在庫データを表示しています

在庫管理へ

公開中の商品がありません。

- - - \ No newline at end of file +const sample=[{name:"五条完凸アカウント",game:"ファンパレ",rank:"SSS",price:7980,stock:1,status:"販売中",memo:"PICK UP"},{name:"ニカルフィ所持",game:"バウンティ",rank:"SS",price:4980,stock:2,status:"販売中",memo:"即納可"}]; +const data=JSON.parse(localStorage.getItem("hnkg_inventory")||localStorage.getItem("db")||"null")||sample; +const yen=n=>Number(n||0).toLocaleString("ja-JP",{style:"currency",currency:"JPY",maximumFractionDigits:0}); +const visible=data.filter(i=>i.status!=="非公開"); +list.innerHTML=visible.map(i=>`
${i.game}
${i.rank}

${i.name}

${i.memo||"即時対応"}

${i.stock>0?`残り${i.stock}件`:'売り切れ'}

${yen(i.price)}
`).join(""); +empty.style.display=visible.length?"none":"block"; +