diff --git a/admin.php b/admin.php index d5e007e..3ef7a1a 100644 --- a/admin.php +++ b/admin.php @@ -3616,7 +3616,9 @@ async function editShopConfig(id) { async function saveShopConfig() { const id = document.getElementById('scfId').value; const name = document.getElementById('scfName').value.trim(); - const stock = parseInt(document.getElementById('scfStock').value) || -1; + // ★ 修复:库存=0不能写成-1。空值才默认-1(无限),0是合法售罄值 + const stockRaw = document.getElementById('scfStock').value; + const stock = stockRaw === '' ? -1 : parseInt(stockRaw, 10); const offer = document.getElementById('scfOffer').value.trim(); const expire = document.getElementById('scfExpire').value.trim(); const price = parseFloat(document.getElementById('scfPrice').value) || 0; diff --git a/player.php b/player.php index 1b0ca2d..abec798 100644 --- a/player.php +++ b/player.php @@ -1184,6 +1184,17 @@ if ($currentVersion !== $BUILD_VERSION) { // 加载商店商品列表 async function loadShopProducts() { const container = document.getElementById('shopProductsContainer'); + // ★ 盲盒随机语录(带动消费情绪) + const blindBoxQuotes = [ + '🎲 手气未知,欧皇可能就是你!', + '✨ 下一发就是传说级债券!', + '🔥 盲盒刺激,开箱见惊喜!', + '💎 运气爆棚,开出大额债券不是梦!', + '🍀 天选之人,?? 藏着大宝藏!', + '🎁 未知才有趣,下单揭晓答案!', + '⚡ 搏一搏,债券多一摞!', + '🌟 你的专属幸运数字正在等你!' + ]; try { const res = await api('pay.php', {action: 'get_shop_products'}); if (res.success && res.data && res.data.products) { @@ -1197,9 +1208,14 @@ if ($currentVersion !== $BUILD_VERSION) { let html = ''; products.forEach((product, index) => { const isSelected = index === 0; // 默认选中第一个 + const isBlindBox = product.bond_min !== product.bond_max; // 盲盒:范围格式 const offerText = product.temporary_offer ? `