sbd-npm 1.5.21 → 1.5.22
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/status.js +5 -1
- package/stock_basics.js +4 -8
- package/summary_daily.js +1 -1
- package/util.js +22 -23
package/package.json
CHANGED
package/status.js
CHANGED
|
@@ -391,7 +391,11 @@ $(function () {
|
|
|
391
391
|
} else {
|
|
392
392
|
html.push("<tr", (item.date.includes('logged in') ? " class='info'" : ""), ">");
|
|
393
393
|
}
|
|
394
|
-
|
|
394
|
+
if (item.is_block === 1) {
|
|
395
|
+
html.push("<td><span class='label label-default' title='已屏蔽'>", login_num, "</span></td>");
|
|
396
|
+
} else {
|
|
397
|
+
html.push("<td>", login_num, "</td>");
|
|
398
|
+
}
|
|
395
399
|
html.push("<td>", item.user, "</td>");
|
|
396
400
|
html.push("<td>", item.terminal, "</td>");
|
|
397
401
|
html.push("<td>", Status.pack_ip_link(item.ip), "</td>");
|
package/stock_basics.js
CHANGED
|
@@ -932,10 +932,9 @@ let Stock = {
|
|
|
932
932
|
handle_metrics_statistics: function (metrics, date_type) {
|
|
933
933
|
Stock[metrics + "_bar_chart"] = Util.startup_metrics_statistics(Stock[metrics + "_bar_chart"], metrics, date_type);
|
|
934
934
|
if (metrics === "margin" || metrics === "hkex_holding") {
|
|
935
|
-
let
|
|
936
|
-
if (!
|
|
937
|
-
|
|
938
|
-
t_obj.click(function () {
|
|
935
|
+
let title_object = $("#" + metrics + "_title");
|
|
936
|
+
if (!title_object.hasClass("link_cls")) {
|
|
937
|
+
title_object.addClass("link_cls").click(function () {
|
|
939
938
|
Util.eventFire(metrics, 'click');
|
|
940
939
|
});
|
|
941
940
|
}
|
|
@@ -949,10 +948,7 @@ let Stock = {
|
|
|
949
948
|
interval: interval
|
|
950
949
|
}, function (j) {
|
|
951
950
|
Stock[metrics + "_bar_chart"].hideLoading();
|
|
952
|
-
let date_data = [];
|
|
953
|
-
let value_data = [];
|
|
954
|
-
let price_data = [];
|
|
955
|
-
let color_data = [];
|
|
951
|
+
let date_data = [], value_data = [], price_data = [], color_data = [];
|
|
956
952
|
j.data.forEach(function (item) {
|
|
957
953
|
date_data.push(item.date);
|
|
958
954
|
value_data.push(item.value);
|
package/summary_daily.js
CHANGED
|
@@ -195,7 +195,7 @@ $(function () {
|
|
|
195
195
|
* 沪深股通资金流向
|
|
196
196
|
*/
|
|
197
197
|
pack_hsgt_money_flow: function (hsgt_money_flow_data) {
|
|
198
|
-
if (
|
|
198
|
+
if (document.getElementById("hsgt_money_flow_line")) {
|
|
199
199
|
DailySummary["hsgt_money_flow_chart"].hideLoading();
|
|
200
200
|
let time_array = [], hsmf_data = [], hmf_array = [], smf_array = [], tmf_val = 0, hmf_val = 0, smf_val = 0;
|
|
201
201
|
hsgt_money_flow_data.forEach(function (d) {
|
package/util.js
CHANGED
|
@@ -536,7 +536,7 @@ const Util = {
|
|
|
536
536
|
render_price: function (item) {
|
|
537
537
|
let code = item.code;
|
|
538
538
|
if (item.price) {
|
|
539
|
-
if (
|
|
539
|
+
if (document.getElementById("price_change_" + code)) {
|
|
540
540
|
let price_cls = Util.text_color(item.price, item.previous_price);
|
|
541
541
|
$(".price_" + code).each(function () {
|
|
542
542
|
$(this).html("<b class='" + price_cls + "'>" + Util.to_float(item.price, 2) + "</b>");
|
|
@@ -850,7 +850,7 @@ const Util = {
|
|
|
850
850
|
*/
|
|
851
851
|
pagination: function (data_id, total_num, per_page, current_page, click_func) {
|
|
852
852
|
let page_id = data_id + "_page";
|
|
853
|
-
if (
|
|
853
|
+
if (!document.getElementById(page_id)) {
|
|
854
854
|
$("#" + data_id).parent().after('<div id="' + page_id + '" class="text-center"></div>');
|
|
855
855
|
}
|
|
856
856
|
let html = [];
|
|
@@ -884,9 +884,7 @@ const Util = {
|
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
html.push("</ul>");
|
|
887
|
-
|
|
888
|
-
fg.html(html.join(""));
|
|
889
|
-
fg.find("li").each(function () {
|
|
887
|
+
$("#" + page_id).html(html.join("")).find("li").each(function () {
|
|
890
888
|
let click_page = $(this).attr("data-page");
|
|
891
889
|
if (click_page) {
|
|
892
890
|
$(this).click(function () {
|
|
@@ -902,7 +900,7 @@ const Util = {
|
|
|
902
900
|
* @param modal_content_html
|
|
903
901
|
*/
|
|
904
902
|
init_modal_skeleton: function (modal_id, modal_content_html = "") {
|
|
905
|
-
if (
|
|
903
|
+
if (!document.getElementById(modal_id)) {
|
|
906
904
|
let html = [];
|
|
907
905
|
html.push('<div class="modal fade ', modal_id, '" id="', modal_id, '" tabindex="-1" role="dialog" aria-hidden="true">');
|
|
908
906
|
html.push('<div class="modal-dialog modal-lg modal-xlg"><div class="modal-content">');
|
|
@@ -1789,16 +1787,14 @@ const Util = {
|
|
|
1789
1787
|
{"name": "时间"},
|
|
1790
1788
|
]
|
|
1791
1789
|
});
|
|
1792
|
-
let
|
|
1793
|
-
|
|
1790
|
+
let etm_object = $('#category_top_modal');
|
|
1791
|
+
etm_object.on('shown.bs.modal', function (e) {
|
|
1794
1792
|
Util.render_category_top_modal();
|
|
1795
1793
|
});
|
|
1796
|
-
|
|
1794
|
+
etm_object.on('hidden.bs.modal', function () {
|
|
1797
1795
|
Util.hide_tips();
|
|
1798
1796
|
});
|
|
1799
|
-
|
|
1800
|
-
ctt_obj.val(category_top_type);
|
|
1801
|
-
ctt_obj.change(function() {
|
|
1797
|
+
$("#category_top_type").val(category_top_type).change(function() {
|
|
1802
1798
|
Util.render_category_top_modal();
|
|
1803
1799
|
});
|
|
1804
1800
|
},
|
|
@@ -3046,16 +3042,17 @@ const Util = {
|
|
|
3046
3042
|
Util.render_money_inflow($(this), item);
|
|
3047
3043
|
});
|
|
3048
3044
|
}
|
|
3049
|
-
|
|
3050
|
-
|
|
3045
|
+
let remark_object = document.getElementById("remark_" + code);
|
|
3046
|
+
if (remark_object) {
|
|
3047
|
+
let remark = [];
|
|
3051
3048
|
if (item.is_bull_trend) {
|
|
3052
|
-
remark
|
|
3049
|
+
remark.push("<b>" + Util.pack_html_link(Util.get_url("trend_bull_trend"), "多头趋势") + "</b><br>");
|
|
3053
3050
|
}
|
|
3054
3051
|
if (item.is_kdj_cross) {
|
|
3055
|
-
remark
|
|
3052
|
+
remark.push("<b>" + Util.pack_html_link(Util.get_url("trend_kdj"), "KDJ金叉") + "</b><br>");
|
|
3056
3053
|
}
|
|
3057
3054
|
if (item.is_macd_cross) {
|
|
3058
|
-
remark
|
|
3055
|
+
remark.push("<b>" + Util.pack_html_link(Util.get_url("trend_macd_cross"), "MACD金叉") + "</b><br>");
|
|
3059
3056
|
}
|
|
3060
3057
|
if (item.kdj_trend && item.kdj_trend > 0) {
|
|
3061
3058
|
let kdj_name = "KDJ金叉";
|
|
@@ -3066,9 +3063,9 @@ const Util = {
|
|
|
3066
3063
|
} else {
|
|
3067
3064
|
kdj_url += "?date_type=2";
|
|
3068
3065
|
}
|
|
3069
|
-
remark
|
|
3066
|
+
remark.push("<b>" + Util.pack_html_link(kdj_url, kdj_name) + "</b><br>");
|
|
3070
3067
|
}
|
|
3071
|
-
|
|
3068
|
+
remark_object.innerHTML = remark.join("");
|
|
3072
3069
|
}
|
|
3073
3070
|
}
|
|
3074
3071
|
if (is_refresh === 1) {
|
|
@@ -3078,18 +3075,20 @@ const Util = {
|
|
|
3078
3075
|
}
|
|
3079
3076
|
let total_num = valid_code_list.length;
|
|
3080
3077
|
if (total_num > 0) { // 涨跌统计
|
|
3081
|
-
|
|
3078
|
+
let tips_object = document.getElementById(element_id + "_tips");
|
|
3079
|
+
if (tips_object) {
|
|
3082
3080
|
let average_change_percent = Math.round((total_change_percent / total_num) * 10000) / 100;
|
|
3083
3081
|
let average_year_change_percent = Math.round((total_year_change_percent / total_num) * 10000) / 100;
|
|
3084
3082
|
let average_d5_change_percent = Math.round((total_d5_change_percent / total_num) * 10000) / 100;
|
|
3085
|
-
|
|
3083
|
+
tips_object.innerHTML = '共 <span class="label label-info">' + total_num + '</span> 家 平均涨跌: ' + Util.parse_ratio(average_change_percent) + " 最近5日: " + Util.parse_ratio(average_d5_change_percent) + " 年初至今: " + Util.parse_ratio(average_year_change_percent);
|
|
3086
3084
|
}
|
|
3087
3085
|
}
|
|
3088
3086
|
Util.hide_tips();
|
|
3089
3087
|
});
|
|
3090
3088
|
} else {
|
|
3091
|
-
|
|
3092
|
-
|
|
3089
|
+
let tips_object = document.getElementById(element_id + "_tips");
|
|
3090
|
+
if (tips_object) {
|
|
3091
|
+
tips_object.innerHTML = '';
|
|
3093
3092
|
}
|
|
3094
3093
|
}
|
|
3095
3094
|
},
|