Update price table body element ID and simplify price loading function

This commit is contained in:
wood chen 2025-02-08 02:25:31 +08:00
parent 974b5d581f
commit 1e2cbbbcdf

View File

@ -365,7 +365,7 @@ const html = `<!DOCTYPE html>
<th></th> <th></th>
</tr> </tr>
</thead> </thead>
<tbody id="priceTable"> <tbody id="priceTableBody">
<tr> <tr>
<td colspan="11" class="text-center py-5"> <td colspan="11" class="text-center py-5">
<div class="spinner-border text-primary loading-spinner" role="status"> <div class="spinner-border text-primary loading-spinner" role="status">
@ -547,8 +547,7 @@ const html = `<!DOCTYPE html>
// 修改加载价格数据函数 // 修改加载价格数据函数
async function loadPrices() { async function loadPrices() {
console.log('Starting to load prices...'); console.log('Starting to load prices...');
const priceTable = document.getElementById('priceTable'); const tbody = document.getElementById('priceTableBody');
const tbody = priceTable?.querySelector('tbody');
if (!tbody) { if (!tbody) {
console.error('Price table body not found'); console.error('Price table body not found');
return; return;