diff --git a/config.py b/config.py index eb80d3f..b028e10 100644 --- a/config.py +++ b/config.py @@ -320,7 +320,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '') # ========================================== # 系統版本與路徑 # ========================================== -SYSTEM_VERSION = "V10.155" +SYSTEM_VERSION = "V10.156" LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log') public_url = PUBLIC_URL # 用於模板顯示 diff --git a/templates/pchome_crawler.html b/templates/pchome_crawler.html index e57cb64..3d83161 100644 --- a/templates/pchome_crawler.html +++ b/templates/pchome_crawler.html @@ -2,20 +2,139 @@ {% block title %}PChome 爬蟲 - EwoooC{% endblock %} +{% block extra_css %} + +{% endblock %} + {% block content %} -
爬取 PChome 24h 商品資料
-| 圖片 | 商品名稱 | @@ -346,10 +465,10 @@ tbody.innerHTML = ''; for (const p of products) { - const discount = p.discount ? `-${p.discount}%` : '-'; + const discount = p.discount ? `-${p.discount}%` : '-'; const stockBadge = p.stock > 0 - ? `${p.stock}` - : `缺貨`; + ? `${p.stock}` + : `缺貨`; const row = document.createElement('tr'); row.innerHTML = ` @@ -431,8 +550,7 @@ function showToast(message, type = 'info') { // 簡易 Toast const toast = document.createElement('div'); - toast.className = `alert alert-${type} position-fixed`; - toast.style.cssText = 'top: 20px; right: 20px; z-index: 9999; min-width: 300px;'; + toast.className = `pchome-toast pchome-toast--${type} position-fixed`; toast.innerHTML = `||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PChome 商品 | MOMO 商品 | @@ -188,14 +336,14 @@ -||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 日期 | 來源 | @@ -101,7 +140,7 @@ async function loadTrends() { const recordsBody = document.getElementById('recordsBody'); if (!records.success || !records.data.length) { - recordsBody.innerHTML = '|||
|---|---|---|---|---|
| 尚無趨勢資料 | ||||
| 尚無趨勢資料 | ||||