B2BÍøÂçÈí¼þ

 ÕÒ»ØÃÜÂë
 Á¢¼´×¢²á ÉóºËÍøÕ¾ºÅ:QQ:896757558
ËÑË÷
²é¿´: 3|»Ø¸´: 0
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

°²×¿ÊÖ»ú½Å±¾¶àÖÖµ¹¼ÆÊ±ÏÔʾ·½Ê½

[¸´ÖÆÁ´½Ó]

1066

Ö÷Ìâ

1071

Ìû×Ó

7541

»ý·Ö

abc

Rank: 9Rank: 9Rank: 9

»ý·Ö
7541
Ìø×ªµ½Ö¸¶¨Â¥²ã
Â¥Ö÷
°²×¿ÊÖ»ú½Å±¾¶àÖÖµ¹¼ÆÊ±ÏÔʾ·½Ê½
°²×¿ÊÖ»ú½Å±¾¶àÖÖµ¹¼ÆÊ±ÏÔʾ·½Ê½ B2BÍøÂçÈí¼þ

°²×¿ÊÖ»ú½Å±¾¶àÖÖµ¹¼ÆÊ±ÏÔʾ·½Ê½ B2BÍøÂçÈí¼þ

  1. /*
  2.    µ¹¼ÆÊ±¹¤¾ßº¯Êý - ¿ÉÖ±½ÓÔÚÆäËû½Å±¾Öе÷ÓÃ
  3.    Ìṩ¶àÖÖµ¹¼ÆÊ±ÏÔʾ·½Ê½
  4.    //🍎½»Á÷ QQ Ⱥ 711841924 Ⱥһ£¬Æ»¹ûÄÚ²âȺ£¬528816639
  5. */

  6. /**
  7. * ¸ñʽ»¯Ê±¼äº¯Êý£¨ÄÚ²¿Ê¹Óã©
  8. * @param {number} secs - ÃëÊý
  9. * @returns {string} ¸ñʽ»¯ºóµÄʱ¼ä×Ö·û´®
  10. */
  11. function formatTime(secs) {
  12.     var h = Math.floor(secs / 3600);
  13.     var m = Math.floor((secs % 3600) / 60);
  14.     var s = secs % 60;
  15.    
  16.     var str = "";
  17.     if (h > 0) str += h + "ʱ";
  18.     if (m > 0 || h > 0) str += m + "·Ö";
  19.     str += s + "Ãë";
  20.     return str;
  21. }

  22. /**
  23. * Ôڹ̶¨Î»ÖÃÏÔʾµ¹¼ÆÊ±£¨Ðü¸¡´°·½Ê½£©
  24. * @param {number} seconds - µ¹¼ÆÊ±ÃëÊý
  25. * @param {object} options - ÅäÖÃÑ¡Ïî
  26. */
  27. function showCountdownFloat(seconds, options) {
  28.     options = options || {};
  29.     var config = {
  30.         x: options.x || (screen.getScreenWidth() - 400) / 2,  // X ×ø±ê
  31.         y: options.y || (screen.getScreenHeight() - 150),     // Y ×ø±ê
  32.         width: options.width || 400,                          // ¿í¶È
  33.         height: options.height || 60,                         // ¸ß¶È
  34.         textColor: options.textColor || '#00ff00',            // ÎÄ×ÖÑÕÉ«
  35.         bgColor: options.bgColor || '#000000',                // ±³¾°ÑÕÉ«
  36.         textSize: options.textSize || 24                      // ×ÖºÅ
  37.     };
  38.    
  39.     // ´´½¨Ðü¸¡´°
  40.     var countdownUI = new floatUI();
  41.     countdownUI.loadXML(
  42.         '<LinearLayout orientation="vertical" w="' + config.width + '" h="' + config.height + '" gravity="center">' +
  43.         '  <TextView id="countdownText" textColor="' + config.textColor + '" background="' + config.bgColor + '" layout_width="wrap_content" layout_height="wrap_content" textSize="' + config.textSize + 'sp" />' +
  44.         '</LinearLayout>'
  45.     );
  46.    
  47.     var countdownText = countdownUI.findViewById('countdownText');
  48.    
  49.     if (countdownText) {
  50.         // ÉèÖÃλÖÃ
  51.         setTimeout(function() {
  52.             countdownUI.setPosition(config.x, config.y);
  53.         }, 100);
  54.         
  55.         // ¿ªÊ¼µ¹¼ÆÊ±
  56.         var remaining = seconds;
  57.         countdownText.setText(formatTime(remaining));
  58.         
  59.         var timer = setInterval(function() {
  60.             remaining--;
  61.             
  62.             if (remaining > 0) {
  63.                 countdownText.setText(formatTime(remaining));
  64.                
  65.                 // ×îºó 10 Ãë±äºì
  66.                 if (remaining <= 10) {
  67.                     countdownText.setTextColor(android.graphics.Color.RED);
  68.                 }
  69.             } else {
  70.                 clearInterval(timer);
  71.                 countdownText.setText("ʱ¼äµ½£¡");
  72.                 countdownText.setTextColor(android.graphics.Color.YELLOW);
  73.                 toast.show("µ¹¼ÆÊ±½áÊø£¡");
  74.             }
  75.         }, 1000);
  76.         
  77.         return {
  78.             stop: function() {
  79.                 clearInterval(timer);
  80.             },
  81.             update: function(newSeconds) {
  82.                 remaining = newSeconds;
  83.             }
  84.         };
  85.     }
  86.    
  87.     return null;
  88. }

  89. /**
  90. * ʹÓà Toast ÏÔʾµ¹¼ÆÊ±£¨¼òµ¥·½Ê½£©
  91. * @param {number} seconds - µ¹¼ÆÊ±ÃëÊý
  92. */
  93. function showCountdownToast(seconds) {
  94.     var remaining = seconds;
  95.    
  96.     function formatTime(secs) {
  97.         var h = Math.floor(secs / 3600);
  98.         var m = Math.floor((secs % 3600) / 60);
  99.         var s = secs % 60;
  100.         return h + "ʱ" + m + "·Ö" + s + "Ãë";
  101.     }
  102.    
  103.     var interval = setInterval(function() {
  104.         remaining--;
  105.         
  106.         if (remaining > 0) {
  107.             toast.show("⏱️ Ê£Óࣺ" + formatTime(remaining));
  108.         } else {
  109.             clearInterval(interval);
  110.             toast.show("✅ ʱ¼äµ½£¡");
  111.         }
  112.     }, 1000);
  113. }

  114. /**
  115. * ÔÚÈÕÖ¾ÖÐÏÔʾµ¹¼ÆÊ±
  116. * @param {number} seconds - µ¹¼ÆÊ±ÃëÊý
  117. * @param {string} prefix - ÈÕ־ǰ׺
  118. */
  119. function showCountdownLog(seconds, prefix) {
  120.     prefix = prefix || "⏱️";
  121.     var remaining = seconds;
  122.    
  123.     function formatTime(secs) {
  124.         var h = Math.floor(secs / 3600);
  125.         var m = Math.floor((secs % 3600) / 60);
  126.         var s = secs % 60;
  127.         
  128.         var str = "";
  129.         if (h > 0) str += h + "ʱ";
  130.         if (m > 0 || h > 0) str += m + "·Ö";
  131.         str += s + "Ãë";
  132.         return str;
  133.     }
  134.    
  135.     printl(prefix + " µ¹¼ÆÊ±¿ªÊ¼£º" + formatTime(remaining));
  136.    
  137.     var timer = setInterval(function() {
  138.         remaining--;
  139.         
  140.         if (remaining > 0) {
  141.             if (remaining % 5 === 0) { // ÿ 5 Ãë´òÓ¡Ò»´Î
  142.                 printl(prefix + " Ê£Óࣺ" + formatTime(remaining));
  143.             }
  144.         } else {
  145.             clearInterval(timer);
  146.             printl(prefix + " ⏰ ʱ¼äµ½£¡");
  147.         }
  148.     }, 1000);
  149. }

  150. /**
  151. * µ¹¼ÆÊ±µ½Ö¸¶¨Ê±¼äµã
  152. * @param {string} targetTime - Ä¿±êʱ¼ä£¬¸ñʽ 'HH:mm:ss' »ò 'HH:mm'
  153. */
  154. function countdownTo(targetTime) {
  155.     var now = new Date();
  156.     var parts = targetTime.split(':');
  157.     var targetHour = parseInt(parts[0]);
  158.     var targetMin = parseInt(parts[1]);
  159.     var targetSec = parts.length > 2 ? parseInt(parts[2]) : 0;
  160.    
  161.     var target = new Date();
  162.     target.setHours(targetHour, targetMin, targetSec, 0);
  163.    
  164.     // Èç¹ûÄ¿±êʱ¼äÒѹý£¬ÉèΪÃ÷Ìì
  165.     if (target <= now) {
  166.         target.setDate(target.getDate() + 1);
  167.     }
  168.    
  169.     var diffMs = target - now;
  170.     var diffSeconds = Math.floor(diffMs / 1000);
  171.    
  172.     printl("&#127919; Ä¿±êʱ¼ä£º" + targetTime);
  173.     printl("⏱️ Ê£Óàʱ¼ä£º" + diffSeconds + "Ãë");
  174.    
  175.     // ÏÔʾµ¹¼ÆÊ±Ðü¸¡´°
  176.     return showCountdownFloat(diffSeconds, {
  177.         y: screen.getScreenHeight() - 200
  178.     });
  179. }

  180. // µ¼³öº¯Êý¹©ÍⲿʹÓÃ
  181. this.showCountdownFloat = showCountdownFloat;
  182. this.showCountdownToast = showCountdownToast;
  183. this.showCountdownLog = showCountdownLog;
  184. this.countdownTo = countdownTo;

  185. // ʹÓÃʾÀý
  186. if (typeof main !== 'function') {
  187.     printl("\n========== µ¹¼ÆÊ±¹¤¾ßº¯ÊýʹÓÃʾÀý ==========\n");
  188.    
  189.     // ʾÀý 1: ¼òµ¥µÄ 30 Ãëµ¹¼ÆÊ±£¨Ðü¸¡´°£©
  190.     printl("ʾÀý 1: 30 Ãëµ¹¼ÆÊ±Ðü¸¡´°");
  191.     showCountdownFloat(30, { y: screen.getScreenHeight() - 150 });
  192.    
  193.     // ʾÀý 2: ʹÓà Toast ÏÔʾµ¹¼ÆÊ±
  194.     printl("ʾÀý 2: Toast µ¹¼ÆÊ±");
  195.     showCountdownToast(10);
  196.    
  197.     // ʾÀý 3: ÔÚÈÕÖ¾ÖÐÏÔʾµ¹¼ÆÊ±
  198.     printl("ʾÀý 3: ÈÕÖ¾µ¹¼ÆÊ±");
  199.     showCountdownLog(20, "⏱️");
  200.    
  201.     // ʾÀý 4: µ¹¼ÆÊ±µ½Ö¸¶¨Ê±¼ä
  202.     printl("ʾÀý 4: µ¹¼ÆÊ±µ½ 18:30:00");
  203.     countdownTo("18:30:00");
  204.    
  205.     printl("\n============================================\n");
  206.     printl("&#128161; Ìáʾ£ºÈ¡Ïû×¢ÊÍÉÏÃæµÄʾÀý´úÂëÀ´Ê¹ÓöÔÓ¦¹¦ÄÜ");
  207. }
¸´ÖÆ´úÂë




»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

±¾°æ»ý·Ö¹æÔò

¹Ø±Õ

QQ|»ÓªÏúÈí¼þ×ÛºÏÌÖÂÛ|»ÓªÏúÈí¼þÓÐÎʱشð|»ÓªÏúÈí¼þ½Ì³Ì×¨Çø|»ÓªÏúÈí¼þPOST½Å±¾·ÖÏí|»ÓªÏúÈí¼þÆÕͨ½Å±¾·ÖÏí|»ÓªÏúÈí¼þÈí¼þ×ÊѶ|»ÓªÏúÈí¼þ¾«Æ·Èí¼þ|»ÓªÏúÈí¼þ¸üй«¸æ|ÓªÏúÈí¼þ|B2BÈí¼þ|B2BÍøÂçÈí¼þ ( ¾©ICP±¸09078825ºÅ )±¾ÍøÕ¾¿ª·¢µÄÓªÏúÈí¼þÊÇÒ»¿îеÄÍøÂçÓªÏúÈí¼þ£¬Õâ¿îÓªÏú¿ÉÒÔÈ¥ÍøÕ¾Èí¼þ£¬²©¿ÍÈí¼þ£¬B2BÈí¼þ£¬·ÖÀàÐÅÏ¢Íø·¢Ìù£¬¿ÉÒÔÇÀɳ·¢£¬¿ÉÒÔµ½°Ù¶ÈÎÄ¿âÉÏ´«WORDÎĵµ£¬¿ÉÒÔµ½Ò»Ð©ÊÇÏà²áÍøÕ¾×Ô¶¯ÉÏ´«Í¼Æ¬£¬Õâ¸ö×Ô¶¯·¢ÌûÈí¼þ×Ô´øÔÆÖ©Ö룬¼Ó¿ìÊÕ¼£¬ÓÐ6ÖÖ¶Ô½Ó´òÂë½Ó¿Ú£¬·½±ã£¬Ð§Âʸߣ¬Ëٶȿ죬¶øÇÒ¶ÔÍ϶¯µÄÑéÖ¤ÂëÈ«ÍøµÚÒ»¼Ò¶À¼ÒÖ§³Ö£¬È«²¿Ô­´´¼¼Êõ£¬¶À¼ÒÑз¢£¬Õý°æÔ­´´´ø°æÈ¨Èí¼þ¡£Ñ¡ÔñÍòÄÜÓªÏúÈí¼þ£¬¾ÍÑ¡ÔñÁËÒ»ÖÖ׬ǮµÄЧÂÊ£¬´ÓûÓб»³¬Ô½¹ý£¬Ò»Ö±ÔÚŬÁ¦Ñз¢Ð¼¼Êõ¡£·Å·ÉÃÎÏ룬½â·ÅË«ÊÖ£¬À´µã´´Ò⣬³É¾ÍÄãµÄÃÎÏ룬¾ÍÔÚÍòÄÜÓªÏúÈí¼þ¿ªÊ¼

map2

GMT+8, 2026-3-25 12:58 , Processed in 0.191701 second(s), 36 queries .

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí