Feat: 商店功能完整实现(单次特效卡888/周卡8888/改名卡5000,含购买、周卡覆盖、改名黑名单)
This commit is contained in:
@@ -27,10 +27,20 @@
|
||||
|
||||
// ── Tab 切换 ──────────────────────────────────────
|
||||
function switchTab(tab) {
|
||||
// 所有内容面板(名单/房间/贴图/酷库 用 block,商店用 flex)
|
||||
['users', 'rooms', 'emoji', 'action'].forEach(t => {
|
||||
document.getElementById('panel-' + t).style.display = t === tab ? 'block' : 'none';
|
||||
document.getElementById('tab-' + t).classList.toggle('active', t === tab);
|
||||
});
|
||||
// 商店面板单独处理(flex 布局以支持内部滚动)
|
||||
const shopPanel = document.getElementById('shop-panel');
|
||||
const shopTab = document.getElementById('tab-shop');
|
||||
if (shopPanel && shopTab) {
|
||||
shopPanel.style.display = tab === 'shop' ? 'flex' : 'none';
|
||||
shopPanel.style.flexDirection = 'column';
|
||||
shopPanel.style.height = '100%';
|
||||
shopTab.classList.toggle('active', tab === 'shop');
|
||||
}
|
||||
// 贴图 Tab 懒加载:首次切换时将 data-src 赋值到 src
|
||||
if (tab === 'emoji') {
|
||||
document.querySelectorAll('#panel-emoji img[data-src]').forEach(img => {
|
||||
|
||||
Reference in New Issue
Block a user