// 确保ul元素存在 if ($m.length === 0) { $('#mianlist').html(''); $m = $('#mianlist ul'); } items.forEach(item => { const priceParts = item.price.toString().split('.'); const integerPart = priceParts[0]; const decimalPart = priceParts.length > 1 ? priceParts[1] : '00'; $m.append(`
  • ${item.title} ${item.ddiggtop || 0} Liked Added to Cart
    ${item.title}
    ${item.onclick || 0}
    ${item.currencySymbol || '$'} ${integerPart}. ${decimalPart} / ${item.currencySymbol || '$'} ${item.tprice || '0.00'} ${item.ddiggtop || 0}
  • `); }); } });