sbd-npm 1.3.91 → 1.3.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/summary_daily.js +9 -2
- package/util.js +6 -7
package/package.json
CHANGED
package/summary_daily.js
CHANGED
@@ -448,9 +448,16 @@ $(function () {
|
|
448
448
|
end_date: $("#index_hist_modal_end_date").val()
|
449
449
|
};
|
450
450
|
Util.post("/action", payload, function (j) {
|
451
|
-
let _html = [];
|
451
|
+
let _html = [], latest_date = 0;
|
452
452
|
j["data"].forEach(function (item) {
|
453
|
-
|
453
|
+
latest_date = Math.max(latest_date, item["date"]);
|
454
|
+
});
|
455
|
+
j["data"].forEach(function (item) {
|
456
|
+
if (item["date"] === latest_date) {
|
457
|
+
_html.push("<tr class='info'>");
|
458
|
+
} else {
|
459
|
+
_html.push("<tr>");
|
460
|
+
}
|
454
461
|
_html.push("<td>", Util.seconds_to_format(item["date"], "%Y-%m-%d"), "</td>");
|
455
462
|
_html.push("<td>", item["open"], "</td>");
|
456
463
|
_html.push("<td>", item["low"], "</td>");
|
package/util.js
CHANGED
@@ -653,18 +653,18 @@ const Util = {
|
|
653
653
|
*/
|
654
654
|
code_to_market: function (code) {
|
655
655
|
if (Util.is_us(code)) {
|
656
|
-
return "US"
|
656
|
+
return "US";
|
657
657
|
}
|
658
658
|
if (Util.is_hk(code)) {
|
659
|
-
return "HK"
|
659
|
+
return "HK";
|
660
660
|
}
|
661
661
|
if (Util.is_sh(code)) {
|
662
|
-
return "SH"
|
662
|
+
return "SH";
|
663
663
|
}
|
664
664
|
if (Util.is_bse(code)) {
|
665
|
-
return "BJ"
|
665
|
+
return "BJ";
|
666
666
|
}
|
667
|
-
return "SZ"
|
667
|
+
return "SZ";
|
668
668
|
},
|
669
669
|
|
670
670
|
/**
|
@@ -724,8 +724,7 @@ const Util = {
|
|
724
724
|
* @returns {boolean}
|
725
725
|
*/
|
726
726
|
is_bse: function (code) {
|
727
|
-
|
728
|
-
return prefix === "4" || prefix === "8";
|
727
|
+
return ["4", "8"].includes(code.charAt(0));
|
729
728
|
},
|
730
729
|
|
731
730
|
/**
|