sbd-npm 1.3.45 → 1.3.47
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/stock_basics.js +7 -13
- package/util.js +4 -4
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -721,8 +721,7 @@ let Stock = {
|
|
721
721
|
Util.post("/stock/" + Stock["code"], {action: "holder_num"}, function (j) {
|
722
722
|
Stock["holder_chart"].hideLoading();
|
723
723
|
let _html = [], date_data = [], holder_data = [], price_data = [];
|
724
|
-
let latest_date = 0, max_holder_num = 0, max_holder_num_date = 0, min_holder_num_date = 0;
|
725
|
-
let min_holder_num = Util.one_year_second;
|
724
|
+
let latest_date = 0, max_holder_num = 0, max_holder_num_date = 0, min_holder_num = Util.max_32bit_integer, min_holder_num_date = 0;
|
726
725
|
j["data"].forEach(function (item) {
|
727
726
|
let date_format = Util.seconds_to_format(item["date"], "%Y-%m-%d");
|
728
727
|
latest_date = Math.max(latest_date, item["date"]);
|
@@ -743,21 +742,16 @@ let Stock = {
|
|
743
742
|
_html.push("<td><b class='", Util.text_color(item["price_change"]), "'>", item["price"], "(", item["price_change"], "%)</b></td>");
|
744
743
|
_html.push("<td>", item["avg_num"], "</td>");
|
745
744
|
_html.push("<td>", Util.to_unit(item["avg_num"] * item["price"]), "</td>");
|
746
|
-
_html.push("<td>", item["circulation_stock"], "</td>");
|
747
|
-
_html.push("<td>", item["circulation_stock_ratio"], "%</td>");
|
748
|
-
_html.push("<td>", item["main_stock"], "</td>");
|
749
|
-
_html.push("<td>", item["main_stock_ratio"], "%</td>");
|
750
|
-
_html.push("<td>", item["fund_stock"], "</td>");
|
751
|
-
_html.push("<td>", item["fund_stock_ratio"], "%</td>");
|
745
|
+
_html.push("<td>", (item["circulation_stock"] ? item["circulation_stock"] : 0), "</td>");
|
746
|
+
_html.push("<td>", (item["circulation_stock_ratio"] ? item["circulation_stock_ratio"] : 0), "%</td>");
|
747
|
+
_html.push("<td>", (item["main_stock"] ? item["main_stock"] : 0), "</td>");
|
748
|
+
_html.push("<td>", (item["main_stock_ratio"] ? item["main_stock_ratio"] : 0), "%</td>");
|
749
|
+
_html.push("<td>", (item["fund_stock"] ? item["fund_stock"] : 0), "</td>");
|
750
|
+
_html.push("<td>", (item["fund_stock_ratio"] ? item["fund_stock_ratio"] : 0), "%</td>");
|
752
751
|
_html.push("</tr>");
|
753
752
|
});
|
754
753
|
let holder_num_summary = "";
|
755
754
|
if (j["latest_date"]) {
|
756
|
-
if (j["previous_date"] > latest_date) {
|
757
|
-
date_data.unshift(Util.seconds_to_format(j["previous_date"], "%Y-%m-%d")); // 将新项添加到数组的开头
|
758
|
-
holder_data.unshift(j["previous_holder_num"]);
|
759
|
-
price_data.unshift(j["previous_day_price"]);
|
760
|
-
}
|
761
755
|
let latest_date_format = Util.seconds_to_format(j["latest_date"], "%Y-%m-%d");
|
762
756
|
if (j["latest_date"] > latest_date) {
|
763
757
|
latest_date = latest_date_format;
|
package/util.js
CHANGED
@@ -2884,7 +2884,7 @@ const Util = {
|
|
2884
2884
|
holder_info = Util.digit_compare_trend(item["holder_num"], 0);
|
2885
2885
|
}
|
2886
2886
|
}
|
2887
|
-
let holder_url =
|
2887
|
+
let holder_url = "/stock/" + item["code"] + "?tab=holder_data";
|
2888
2888
|
return Util.pack_html_link(holder_url, holder_info);
|
2889
2889
|
},
|
2890
2890
|
|
@@ -2914,9 +2914,9 @@ const Util = {
|
|
2914
2914
|
if (item["code"]) {
|
2915
2915
|
url += "&code=" + item["code"];
|
2916
2916
|
}
|
2917
|
-
|
2918
|
-
|
2919
|
-
$("
|
2917
|
+
$("#snowball_follower").html(Util.pack_html_link(url, snowball_follower_rank));
|
2918
|
+
let tooltip = "雪球共有 " + item["snowball_follower"] + " 人关注,关注排名第 " + item["snowball_follower_rank"] + " 位";
|
2919
|
+
$("#snowball_follower_info").attr("data-original-title", tooltip);
|
2920
2920
|
}
|
2921
2921
|
},
|
2922
2922
|
|