1<!DOCTYPE html> 2<html lang="zh-CN"> 3<head> 4 <meta charset="UTF-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 <title>è¡ç¥¨çæ¦ - Aè¡å¸åºçç¹ä¸çé¨è¡ç¥¨æè¡ | è¿æ¿å¤©æ¢¯</title> 7 <meta name="description" content="è¿æ¿å¤©æ¢¯è¡ç¥¨çæ¦èå Aè¡å¸åºçé¨è¡ç¥¨ãå¸åºå ³æ³¨åº¦åç线çç¹ä¿¡æ¯ï¼å¸®å©ç¨æ·å¿«éäºè§£å½æ¥è¡ç¥¨ç度ååã"> 8 <meta name="keywords" content="è¡ç¥¨çæ¦,Aè¡çæ¦,çé¨è¡ç¥¨æè¡,è¡ç¥¨çç¹,è¿æ¿å¤©æ¢¯,ç线çç¹"> 9 <link rel="canonical" href="https://www.quicktiny.cn/hotlist.html"> 10 <meta property="og:site_name" content="QuickTiny ç¬å¾®è®¡ç®"> 11 <meta property="og:title" content="è¡ç¥¨çæ¦ - Aè¡å¸åºçç¹ä¸çé¨è¡ç¥¨æè¡"> 12 <meta property="og:description" content="æ¥ç Aè¡å¸åºçé¨è¡ç¥¨ãå¸åºå ³æ³¨åº¦åç线çç¹ä¿¡æ¯ã"> 13 <meta property="og:url" content="https://www.quicktiny.cn/hotlist.html"> 14 <meta property="og:type" content="website"> 15 <meta property="og:image" content="https://data.quicktiny.cn/og-wudao-data.png"> 16 <meta name="twitter:card" content="summary_large_image"> 17 <meta name="twitter:title" content="è¡ç¥¨çæ¦ - Aè¡å¸åºçç¹ä¸çé¨è¡ç¥¨æè¡"> 18 <meta name="twitter:description" content="è¿æ¿å¤©æ¢¯è¡ç¥¨çæ¦èå Aè¡çé¨è¡ç¥¨åç线çç¹ä¿¡æ¯ã"> 19 <meta name="twitter:image" content="https://data.quicktiny.cn/og-wudao-data.png"> 20 <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><defs><linearGradient id='red' x1='0%25' y1='0%25' x2='100%25' y2='100%25'><stop offset='0%25' style='stop-color:%23e53e3e'/><stop offset='100%25' style='stop-color:%23c53030'/></linearGradient></defs><rect width='32' height='32' fill='url(%23red)' rx='8'/><text x='16' y='22' font-family='Arial,sans-serif' font-size='20' font-weight='bold' text-anchor='middle' fill='%23fff'>è¿</text></svg>"> 21
21<script type="application/ld+json"> 22{ 23 "@context": "https://schema.org", 24 "@graph": [ 25 { 26 "@type": "WebPage", 27 "@id": "https://www.quicktiny.cn/hotlist.html#webpage", 28 "url": "https://www.quicktiny.cn/hotlist.html", 29 "name": "è¡ç¥¨çæ¦ - Aè¡å¸åºçç¹ä¸çé¨è¡ç¥¨æè¡", 30 "description": "è¿æ¿å¤©æ¢¯è¡ç¥¨çæ¦èå Aè¡å¸åºçé¨è¡ç¥¨ãå¸åºå ³æ³¨åº¦åç线çç¹ä¿¡æ¯ï¼å¸®å©ç¨æ·å¿«éäºè§£å½æ¥è¡ç¥¨ç度ååã", 31 "inLanguage": "zh-CN", 32 "isPartOf": { 33 "@id": "https://www.quicktiny.cn/#website" 34 } 35 }, 36 { 37 "@type": "BreadcrumbList", 38 "@id": "https://www.quicktiny.cn/hotlist.html#breadcrumb", 39 "itemListElement": [ 40 { 41 "@type": "ListItem", 42 "position": 1, 43 "name": "é¦é¡µ", 44 "item": "https://www.quicktiny.cn/" 45 }, 46 { 47 "@type": "ListItem", 48 "position": 2, 49 "name": "è¡ç¥¨çæ¦", 50 "item": "https://www.quicktiny.cn/hotlist.html" 51 } 52 ] 53 } 54 ] 55} 56 </script>
56 57 <style> 58 * { 59 margin: 0; 60 padding: 0; 61 box-sizing: border-box; 62 } 63 64 body { 65 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; 66 background: #ffffff; 67 color: #202124; 68 line-height: 1.6; 69 } 70 71 .container { 72 max-width: 1200px; 73 margin: 0 auto; 74 padding: 0 24px; 75 } 76 77 /* Header */ 78 .header { 79 background: #ffffff; 80 border-bottom: 1px solid #e8eaed; 81 padding: 16px 0; 82 position: sticky; 83 top: 0; 84 z-index: 100; 85 } 86 87 .nav { 88 display: flex; 89 justify-content: space-between; 90 align-items: center; 91 } 92 93 .logo { 94 font-size: 24px; 95 font-weight: 500; 96 color: #1a73e8; 97 text-decoration: none; 98 } 99 100 .nav-links { 101 display: flex; 102 gap: 32px; 103 align-items: center; 104 } 105 106 .nav-links a { 107 color: #5f6368; 108 text-decoration: none; 109 font-weight: 400; 110 transition: color 0.2s ease; 111 } 112 113 .nav-links a:hover { 114 color: #1a73e8; 115 } 116 117 .mobile-menu-btn { 118 display: none; 119 background: none; 120 border: none; 121 font-size: 24px; 122 color: #5f6368; 123 cursor: pointer; 124 } 125 126 .mobile-nav { 127 display: none; 128 position: fixed; 129 top: 0; 130 left: 0; 131 width: 100%; 132 height: 100%; 133 background: rgba(0,0,0,0.5); 134 z-index: 1000; 135 } 136 137 .footer { 138 background: #f8f9fa; 139 border-top: 1px solid #e8eaed; 140 text-align: center; 141 padding: 24px 0; 142 margin-top: 40px; 143 } 144 145 .footer p { 146 color: #5f6368; 147 font-size: 14px; 148 } 149 150 .footer a { 151 color: #5f6368; 152 text-decoration: none; 153 } 154 155 .footer a:hover { 156 color: #1a73e8; 157 } 158 159 .mobile-nav.show { 160 display: block; 161 } 162 163 .mobile-nav-content { 164 position: absolute; 165 top: 0; 166 right: 0; 167 width: 280px; 168 height: 100%; 169 background: #ffffff; 170 padding: 20px; 171 box-shadow: -2px 0 10px rgba(0,0,0,0.1); 172 transform: translateX(100%); 173 transition: transform 0.3s ease; 174 } 175 176 .mobile-nav.show .mobile-nav-content { 177 transform: translateX(0); 178 } 179 180 .mobile-nav-header { 181 display: flex; 182 justify-content: space-between; 183 align-items: center; 184 margin-bottom: 30px; 185 padding-bottom: 20px; 186 border-bottom: 1px solid #e8eaed; 187 } 188 189 .mobile-nav-close { 190 background: none; 191 border: none; 192 font-size: 24px; 193 color: #5f6368; 194 cursor: pointer; 195 } 196 197 .mobile-nav-links { 198 display: flex; 199 flex-direction: column; 200 gap: 20px; 201 } 202 203 .mobile-nav-links a { 204 color: #202124; 205 text-decoration: none; 206 font-size: 16px; 207 padding: 12px 0; 208 border-bottom: 1px solid #f0f0f0; 209 } 210 211 /* Main Content */ 212 .main { 213 padding: 40px 0; 214 } 215 216 .page-title { 217 font-size: 32px; 218 font-weight: 400; 219 color: #202124; 220 margin-bottom: 8px; 221 } 222 223 .page-subtitle { 224 color: #5f6368; 225 margin-bottom: 40px; 226 } 227 228 /* Hotlist */ 229 .hotlist-grid { 230 display: grid; 231 grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 232 gap: 16px; 233 margin-bottom: 32px; 234 } 235 236 .hotlist-item { 237 background: #ffffff; 238 border: 1px solid #e8eaed; 239 border-radius: 8px; 240 padding: 16px; 241 transition: all 0.2s ease; 242 cursor: pointer; 243 } 244 245 .hotlist-item:hover { 246 box-shadow: 0 2px 8px rgba(60,64,67,0.15); 247 border-color: #dadce0; 248 } 249 250 .hotlist-rank { 251 display: inline-flex; 252 align-items: center; 253 justify-content: center; 254 width: 24px; 255 height: 24px; 256 min-width: 24px; 257 min-height: 24px; 258 border-radius: 50%; 259 background: #f5f5f5; 260 color: #666; 261 font-weight: bold; 262 margin-right: 8px; 263 font-size: 12px; 264 flex-shrink: 0; 265 } 266 267 .hotlist-rank.top3 { 268 background: #ff4d4f; 269 color: #fff; 270 } 271 272 .hotlist-rank.top10 { 273 background: #faad14; 274 color: #fff; 275 } 276 277 .hotlist-stock-info { 278 display: flex; 279 align-items: center; 280 margin-bottom: 8px; 281 } 282 283 .hotlist-stock-name { 284 font-weight: 500; 285 color: #202124; 286 margin-right: 8px; 287 } 288 289 .hotlist-stock-code { 290 color: #5f6368; 291 font-size: 14px; 292 margin-right: 8px; 293 } 294 295 .hotlist-change { 296 font-weight: 500; 297 margin-bottom: 8px; 298 } 299 300 .hotlist-change.positive { 301 color: #f5222d; 302 } 303 304 .hotlist-change.negative { 305 color: #52c41a; 306 } 307 308 .hotlist-platforms { 309 display: flex; 310 flex-wrap: wrap; 311 gap: 4px; 312 margin-top: 8px; 313 } 314 315 .hotlist-platform-tag { 316 display: inline-block; 317 background: #ff7875; 318 color: white; 319 padding: 2px 6px; 320 border-radius: 4px; 321 font-size: 11px; 322 } 323 324 .hotlist-platform-tag.eastmoney { 325 background: #ff4d4f; 326 } 327 328 .hotlist-platform-tag.ths { 329 background: #faad14; 330 } 331 332 .hotlist-platform-tag.xueqiu { 333 background: #13c2c2; 334 } 335 336 .hotlist-platform-tag.tgb { 337 background: #722ed1; 338 } 339 340 .hotlist-loading { 341 text-align: center; 342 padding: 60px; 343 color: #5f6368; 344 } 345 346 .hotlist-error { 347 text-align: center; 348 padding: 60px; 349 color: #ea4335; 350 } 351 352 .refresh-btn { 353 background: #1a73e8; 354 color: white; 355 border: none; 356 padding: 12px 24px; 357 border-radius: 8px; 358 font-weight: 500; 359 cursor: pointer; 360 transition: all 0.2s ease; 361 margin-bottom: 24px; 362 } 363 364 .refresh-btn:hover { 365 background: #1557b0; 366 box-shadow: 0 2px 8px rgba(26,115,232,0.4); 367 } 368 369 .refresh-btn:disabled { 370 background: #ccc;
371 cursor: not-allowed; 372 } 373 374 @media(max-width: 768px) { 375 .container { 376 padding: 0 16px; 377 } 378 379 .main { 380 padding: 24px 0; 381 } 382 383 .page-title { 384 font-size: 24px; 385 } 386 387 .hotlist-grid { 388 grid-template-columns: 1fr; 389 gap: 12px; 390 } 391 392 .hotlist-item { 393 padding: 12px; 394 } 395 396 .nav-links { 397 display: none; 398 } 399 400 .mobile-menu-btn { 401 display: block; 402 } 403 } 404 </style> 405</head> 406<body> 407 <header class="header"> 408 <div class="container"> 409 <nav class="nav"> 410 <a href="index.html" class="logo">è¿æ¿å¤©æ¢¯</a> 411 <div class="nav-links"> 412 <a href="index.html">é¦é¡µ</a> 413 <a href="news-hotlist.html">æ°é»çæ¦</a> 414 <a href="https://stock.quicktiny.cn/login">ç»å½</a> 415 </div> 416 <button class="mobile-menu-btn" onclick="showMobileNav()">â°</button> 417 </nav> 418 </div> 419 </header> 420 421 <main class="main"> 422 <div class="container"> 423 <h1 class="page-title">è¡ç¥¨çæ¦</h1> 424 <p class="page-subtitle">æ±èåè±é¡ºã䏿¹è´¢å¯ãæ·è¡å§ãéªçå大平å°ççé¨è¡ç¥¨æè¡ï¼å©æ¨ææ¡å¸åºçç¹</p> 425 426 427 428 <div id="hotlist-loading" class="hotlist-loading"> 429 <div>æ£å¨å è½½çæ¦æ°æ®...</div> 430 </div> 431 432 <div id="hotlist-error" class="hotlist-error" style="display:none"> 433 <div>å 载失败ï¼è¯·ç¨åéè¯</div> 434 </div> 435 436 <div id="hotlist-content" class="hotlist-grid" style="display:none"> 437 <!-- çæ¦æ°æ®å°å¨è¿é卿æå ¥ --> 438 </div> 439 </div> 440 </main> 441 442 <!-- ç§»å¨ç«¯å¯¼èª --> 443 <div id="mobile-nav" class="mobile-nav"> 444 <div class="mobile-nav-content"> 445 <div class="mobile-nav-header"> 446 <span class="logo">è¿æ¿å¤©æ¢¯</span> 447 <button class="mobile-nav-close" onclick="hideMobileNav()">×</button> 448 </div> 449 <div class="mobile-nav-links"> 450 <a href="index.html">é¦é¡µ</a> 451 <a href="news-hotlist.html">æ°é»çæ¦</a> 452 <a href="https://stock.quicktiny.cn/login">ç»å½</a> 453 </div> 454 </div> 455 </div> 456 457 <footer class="footer"> 458 <div class="container"> 459 <p>© 2024 ç¬å¾®è®¡ç® | <a href="https://beian.miit.gov.cn" target="_blank" rel="noopener noreferrer">æµICPå¤18008993å·-2</a></p> 460 </div> 461 </footer> 462 463
463<script> 464 // ç§»å¨ç«¯å¯¼èª 465 function showMobileNav() { 466 document.getElementById('mobile-nav').classList.add('show'); 467 } 468 469 function hideMobileNav() { 470 document.getElementById('mobile-nav').classList.remove('show'); 471 } 472 473 // çæ¦åè½ 474 async function loadHotlist() { 475 console.log('å¼å§å è½½çæ¦æ°æ®...'); 476 477 const loadingEl = document.getElementById('hotlist-loading'); 478 const errorEl = document.getElementById('hotlist-error'); 479 const contentEl = document.getElementById('hotlist-content'); 480 loadingEl.style.display = 'block'; 481 errorEl.style.display = 'none'; 482 contentEl.style.display = 'none'; 483 484 try { 485 // å¹¶è¡è·åå¤å¹³å°æ°æ® 486 const [thsRes, eastmoneyRes, tgbRes, xueqiuRes] = await Promise.allSettled([ 487 fetch('https://stock.quicktiny.cn/api/hotlist/ths').then(r => r.json()), 488 fetch('https://stock.quicktiny.cn/api/hotlist/eastmoney?pageSize=50').then(r => r.json()), 489 fetch('https://stock.quicktiny.cn/api/hotlist/tgb?limit=50').then(r => r.json()), 490 fetch('https://stock.quicktiny.cn/api/hotlist/xueqiu?limit=50').then(r => r.json()) 491 ]); 492 493 // æåæåçæ°æ® 494 const thsData = thsRes.status === 'fulfilled' && thsRes.value.success ? thsRes.value.data.slice(0, 50) : []; 495 const eastmoneyData = eastmoneyRes.status === 'fulfilled' && eastmoneyRes.value.success ? eastmoneyRes.value.data.slice(0, 50) : []; 496 const tgbData = tgbRes.status === 'fulfilled' && tgbRes.value.success ? tgbRes.value.data.slice(0, 50) : []; 497 const xueqiuData = xueqiuRes.status === 'fulfilled' && xueqiuRes.value.success ? xueqiuRes.value.data.slice(0, 50) : []; 498 499 // çæç»¼åçæ¦ 500 const combinedList = generateCombinedHotList(thsData, eastmoneyData, tgbData, xueqiuData); 501 502 if (combinedList.length > 0) { 503 // è·åå20个è¡ç¥¨ç宿¶æ°æ® 504 const topStocks = combinedList.slice(0, 20); 505 const stockCodes = topStocks.map(stock => stock.fullCode).filter(code => code); 506 507 if (stockCodes.length > 0) { 508 try { 509 // 使ç¨ä¸æ¹è´¢å¯ API è·å宿¶æ°æ® 510 const realtimeData = await fetchRealtimeStockData(stockCodes); 511 512 if (realtimeData && Object.keys(realtimeData).length > 0) { 513 // æ´æ°è¡ç¥¨ç宿¶æ°æ® 514 topStocks.forEach(stock => { 515 const realtime = realtimeData[stock.fullCode]; 516 if (realtime) { 517 stock.name = realtime.name || stock.name; 518 stock.changePercent = realtime.changeValue || stock.changePercent; 519 stock.price = realtime.priceValue || stock.price; 520 } 521 }); 522 } 523 } catch (error) { 524 console.warn('è·å宿¶æ°æ®å¤±è´¥ï¼ä½¿ç¨åå§æ°æ®:', error); 525 } 526 } 527 528 renderHotlist(topStocks); 529 loadingEl.style.display = 'none'; 530 contentEl.style.display = 'grid'; 531 console.log('çæ¦æ°æ®å è½½æåï¼æ¾ç¤º', topStocks.length, '个è¡ç¥¨'); 532 } else { 533 throw new Error('没æè·åå°çæ¦æ°æ®'); 534 } 535 } catch (error) { 536 console.error('å è½½çæ¦å¤±è´¥:', error); 537 loadingEl.style.display = 'none'; 538 errorEl.style.display = 'block'; 539 } finally { 540 // æ°æ®å è½½å®æ 541 } 542 } 543 544 // çæç»¼åçæ¦ 545 function generateCombinedHotList(thsList, eastmoneyList, tgbList, xueqiuList) { 546 const stockMap = new Map(); 547 548 // å¤çåè±é¡ºçæ¦ - æé7 549 thsList.forEach((stock, index) => { 550 const score = (100 - index) * 0.7; 551 stockMap.set(stock.fullCode, { 552 ...stock, 553 score, 554 platforms: ['ths'], 555 thsRank: index + 1 556 }); 557 }); 558 559 // å¤ç䏿¹è´¢å¯çæ¦ - æé10 560 eastmoneyList.forEach((stock, index) => { 561 const score = (100 - index) * 1.0; 562 if (stockMap.has(stock.fullCode)) { 563 const existing = stockMap.get(stock.fullCode); 564 existing.score += score; 565 existing.platforms.push('eastmoney'); 566 existing.eastmoneyRank = index + 1; 567 } else { 568 stockMap.set(stock.fullCode, { 569 ...stock, 570 score, 571 platforms: ['eastmoney'], 572 eastmoneyRank: index + 1 573 }); 574 } 575 }); 576 577 // å¤çæ·è¡å§çæ¦ - æé3 578 tgbList.forEach((stock, index) => { 579 const score = (100 - index) * 0.3; 580 if (stockMap.has(stock.fullCode)) { 581 const existing = stockMap.get(stock.fullCode); 582 existing.score += score; 583 existing.platforms.push('tgb'); 584 existing.tgbRank = index + 1; 585 } else { 586 stockMap.set(stock.fullCode, { 587 ...stock, 588 score, 589 platforms: ['tgb'], 590 tgbRank: index + 1 591 }); 592 } 593 }); 594 595 // å¤çéªççæ¦ - æé3 596 xueqiuList.forEach((stock, index) => { 597 const score = (100 - index) * 0.3; 598 if (stockMap.has(stock.fullCode)) { 599 const existing = stockMap.get(stock.fullCode); 600 existing.score += score; 601 existing.platforms.push('xueqiu'); 602 existing.xueqiuRank = index + 1; 603 } else { 604 stockMap.set(stock.fullCode, { 605 ...stock, 606 score, 607 platforms: ['xueqiu'], 608 xueqiuRank: index + 1 609 }); 610 } 611 }); 612 613 // æå¾åæåº 614 return Array.from(stockMap.values()).sort((a, b) => b.score - a.score); 615 } 616 617 function renderHotlist(stocks) { 618 const contentEl = document.getElementById('hotlist-content'); 619 contentEl.innerHTML = ''; 620 621 stocks.forEach((stock, index) => { 622 const item = document.createElement('div'); 623 item.className = 'hotlist-item';
624 item.onclick = () => window.open(`https://stock.quicktiny.cn/hotlist`, '_blank'); 625 626 let rankClass = 'hotlist-rank'; 627 if (index < 3) rankClass += ' top3'; 628 else if (index < 10) rankClass += ' top10'; 629 630 // å¤ç涨è·å¹ æ°æ® 631 let changeText = 'æªç¥'; 632 let changeClass = ''; 633 if (stock.changePercent !== undefined && stock.changePercent !== null) { 634 const change = parseFloat(stock.changePercent); 635 if (!isNaN(change)) { 636 changeClass = change > 0 ? 'positive' : change < 0 ? 'negative' : ''; 637 changeText = change > 0 ? `+${change.toFixed(2)}%` : `${change.toFixed(2)}%`; 638 } 639 } 640 641 // çæå¹³å°æ ç¾ï¼ææå®é¡ºåºï¼ 642 const platformOrder = ['eastmoney', 'ths', 'xueqiu', 'tgb']; 643 const platformNames = { 644 'eastmoney': '䏿¹è´¢å¯', 645 'ths': 'åè±é¡º', 646 'xueqiu': 'éªç', 647 'tgb': 'æ·è¡å§' 648 }; 649 650 const platformTags = platformOrder.filter(platform => stock.platforms.includes(platform)).map(platform => { 651 // è·å该平å°çæå 652 let rank = ''; 653 if (platform === 'ths' && stock.thsRank) rank = stock.thsRank; 654 else if (platform === 'eastmoney' && stock.eastmoneyRank) rank = stock.eastmoneyRank; 655 else if (platform === 'tgb' && stock.tgbRank) rank = stock.tgbRank; 656 else if (platform === 'xueqiu' && stock.xueqiuRank) rank = stock.xueqiuRank; 657 658 const displayText = rank ? `${platformNames[platform]}: ${rank}` : platformNames[platform]; 659 return `<span class="hotlist-platform-tag ${platform}">${displayText}</span>`; 660 }).join(''); 661 662 item.innerHTML = ` 663 <div class="hotlist-stock-info"> 664 <span class="${rankClass}">${index + 1}</span> 665 <span class="hotlist-stock-name">${stock.name || stock.stockName || 'æªç¥'}</span> 666 <span class="hotlist-stock-code">${stock.fullCode || stock.code || ''}</span> 667 </div> 668 <div class="hotlist-change ${changeClass}">${changeText}</div> 669 <div class="hotlist-platforms"> 670 ${platformTags} 671 <span style="font-size:11px;color:#999;margin-left:4px;">${stock.platforms.length}个平å°</span> 672 </div> 673 `; 674 675 contentEl.appendChild(item); 676 }); 677 } 678 679 // è·å宿¶è¡ç¥¨æ°æ®å½æ°ï¼æ¨¡ä»¿å页é¢å®ç°ï¼ 680 async function fetchRealtimeStockData(stockCodes) { 681 try { 682 if (!stockCodes || stockCodes.length === 0) { 683 return {}; 684 } 685 686 // å°è¡ç¥¨ä»£ç 转æ¢ä¸ºä¸æ¹è´¢å¯æ ¼å¼ 687 const eastmoneySecids = stockCodes.map(code => { 688 const purecode = code.replace(/^(sh|sz)/i, ''); 689 const market = purecode.charAt(0) === '6' ? 1 : 0; 690 return `${market}.${purecode}`; 691 }); 692 693 const fields = 'f1,f2,f3,f4,f5,f6,f12,f14,f15,f16,f17,f18'; 694 const url = 'https://push2.eastmoney.com/api/qt/ulist.np/get'; 695 const params = new URLSearchParams({ 696 fields: fields, 697 secids: eastmoneySecids.join(','), 698 _: new Date().getTime() 699 }); 700 701 const response = await fetch(`${url}?${params.toString()}`); 702 if (!response.ok) { 703 throw new Error(`䏿¹è´¢å¯ API请æ±å¤±è´¥: ${response.status}`); 704 } 705 706 const data = await response.json(); 707 if (data.rc !== 0 || !data.data || !data.data.diff) { 708 return {}; 709 } 710 711 const stockData = {}; 712 Object.values(data.data.diff).forEach(stock => { 713 const code = stock.f12; 714 const name = stock.f14; 715 const price = stock.f2 / 100; 716 const changePercent = stock.f3 / 100; 717 718 const market = code.charAt(0) === '6' ? 1 : 0; 719 const prefix = market === 1 ? 'sh' : 'sz'; 720 const fullCode = `${prefix}${code}`; 721 722 stockData[fullCode] = { 723 code: fullCode, 724 name: name, 725 price: price.toFixed(2) + 'å ', 726 priceValue: price, 727 change: changePercent.toFixed(2) + '%', 728 changeValue: changePercent 729 }; 730 }); 731 732 return stockData; 733 } catch (error) { 734 console.error('è·å宿¶è¡ç¥¨æ°æ®å¤±è´¥:', error); 735 return {}; 736 } 737 } 738 739 // 页é¢å è½½å®æååå§å 740 document.addEventListener('DOMContentLoaded', function() { 741 loadHotlist(); 742 743 // ç¹å»ç§»å¨ç«¯å¯¼èªå¤é¨å ³é 744 document.getElementById('mobile-nav').addEventListener('click', function(e) { 745 if (e.target === this) { 746 hideMobileNav(); 747 } 748 }); 749 }); 750 </script>
750 751</body> 752</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.