sbd-npm 1.3.8 → 1.3.10
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/constant.js +2 -3
- package/package.json +1 -1
- package/stock_basics.js +26 -32
- package/summary_daily.js +4 -7
- package/util.js +1 -0
package/constant.js
CHANGED
@@ -108,7 +108,7 @@ const MenuList = [
|
|
108
108
|
]
|
109
109
|
},
|
110
110
|
{
|
111
|
-
'name': '
|
111
|
+
'name': '公告研报',
|
112
112
|
'icon': 'tasks',
|
113
113
|
'menu': [
|
114
114
|
{'key': 'notice_organization', 'name': '机构研报', 'url': '/0xa8ca8c2ac5ab28d5d5d083831008a7af474ce391'},
|
@@ -148,11 +148,10 @@ const MenuList = [
|
|
148
148
|
{'key': 'concept_star50', 'name': '科创50', 'url': '/0x9b4e2daac43b0391842cb8e62c8b9aa07662d8bd'},
|
149
149
|
{'key': 'concept_bellwether', 'name': '龙头股', 'url': '/0x4acb881cf7b392df48e10b52fe77115836d4cc10'},
|
150
150
|
{'key': 'concept_market_situation', 'name': '市值风云', 'url': '/0xa2df531f71114d2001427d83d9955d2ab0a50cdf'},
|
151
|
-
{'key': '
|
151
|
+
{'key': 'concept_chip', 'name': '芯片半导体', 'url': '/0xeaae1cab877b70e100512be6dbdb4a9b09afe732'},
|
152
152
|
{'key': 'concept_auto_intelligent', 'name': '智能电动车', 'url': '/0x4594dd03fe141df964e980080769c5e171243ef0'},
|
153
153
|
{'key': 'concept_hk', 'name': '港股', 'url': '/0xd63fedf985a711ff5b3b6567ee94e1ba49d3787c'},
|
154
154
|
{'key': 'concept_us', 'name': '美股', 'url': '/0x77b7acd63bd93517f933bf0a02dafe82260f4791'},
|
155
|
-
{'key': 'concept_chip', 'name': '芯片', 'url': '/0xeaae1cab877b70e100512be6dbdb4a9b09afe732'},
|
156
155
|
{'key': 'concept_military', 'name': '军工', 'url': '/0xe578dbe70c35bda0813a95ea97abd4a604733ed0'},
|
157
156
|
{'key': 'concept_ten', 'name': '十倍股', 'url': '/0x8b46e8304b225e4ff0f25216dfcdf217c4a6f720'},
|
158
157
|
]
|
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -1104,11 +1104,9 @@ let Stock = {
|
|
1104
1104
|
},
|
1105
1105
|
|
1106
1106
|
fetch_margin: function () {
|
1107
|
-
let is_summary = Stock["rzye_chart"] ? 0 : 1;
|
1108
1107
|
Stock["rzye_chart"] = Util.show_chart_loading(Stock["rzye_chart"], "rzye_line_canvas");
|
1109
1108
|
let payload = {
|
1110
1109
|
action: "margin",
|
1111
|
-
is_summary: is_summary,
|
1112
1110
|
date_type: $("#margin_date_type").val(),
|
1113
1111
|
start_date: $("#margin_start_date").val(),
|
1114
1112
|
end_date: $("#margin_end_date").val()
|
@@ -1127,7 +1125,7 @@ let Stock = {
|
|
1127
1125
|
price_data.push(item["price"]);
|
1128
1126
|
});
|
1129
1127
|
let margin_summary = "";
|
1130
|
-
if (
|
1128
|
+
if (j["latest"].length > 0) {
|
1131
1129
|
if (j["latest"].length === 1) {
|
1132
1130
|
margin_summary = " 最新(" + Util.seconds_to_format(j["latest"][0]["date"], "%Y-%m-%d") + "): " + Util.to_unit(j["latest"][0]["rzye"], 3);
|
1133
1131
|
} else if (j["latest"].length === 2) {
|
@@ -1143,7 +1141,7 @@ let Stock = {
|
|
1143
1141
|
margin_summary = " 最新(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + Util.to_unit(d1["rzye"], 3) + dist_tips;
|
1144
1142
|
}
|
1145
1143
|
}
|
1146
|
-
margin_summary = Util.pack_html_link(j["url"], "[" + Stock.name + "融资余额(单位:亿)
|
1144
|
+
margin_summary = Util.pack_html_link(j["url"], "[" + Stock.name + "]融资余额(单位:亿)") + margin_summary + ' 最高: ' + Util.to_unit(rzye_high, 3) + ' 最低: ' + Util.to_unit(rzye_low, 3);
|
1147
1145
|
if (j["high"] && j["high"]["date"] && j["high"]["date"] > 0) {
|
1148
1146
|
margin_summary += ' 历史最高: ' + Util.to_unit(j["high"]["rzye"], 3) + '(' + Util.seconds_to_format(j["high"]["date"], "%Y-%m-%d") + ')';
|
1149
1147
|
}
|
@@ -1168,11 +1166,9 @@ let Stock = {
|
|
1168
1166
|
},
|
1169
1167
|
|
1170
1168
|
fetch_hkex_holding: function () {
|
1171
|
-
let is_summary = Stock.hkex_holding_chart ? 0 : 1;
|
1172
1169
|
Stock["hkex_holding_chart"] = Util.show_chart_loading(Stock["hkex_holding_chart"], "hkex_holding_line_canvas");
|
1173
1170
|
let payload = {
|
1174
1171
|
action: "hkex_holding",
|
1175
|
-
is_summary: is_summary,
|
1176
1172
|
date_type: $("#hkex_holding_date_type").val(),
|
1177
1173
|
start_date: $("#hkex_start_date").val(),
|
1178
1174
|
end_date: $("#hkex_end_date").val()
|
@@ -1187,35 +1183,33 @@ let Stock = {
|
|
1187
1183
|
volume_data.push(item["volume"]);
|
1188
1184
|
price_data.push(item["price"]);
|
1189
1185
|
});
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["volume"])) + "股' style='color: #3c763d;'>" + Util.strip_html(Util.to_unit(difference)) + "股</b>)";
|
1209
|
-
}
|
1210
|
-
let holding_num = Util.to_hundred_million(d1["volume"]);
|
1211
|
-
let holding_rate = Math.round((holding_num / circulation_stock) * 10000) / 100;
|
1212
|
-
latest_html = "最新(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + holding_num + "亿股" + dist_tips + ", 占 <b>" + holding_rate + "%</b> 流通股, ";
|
1186
|
+
let hhs_obj = $("#hkex_holding_summary");
|
1187
|
+
let hkex_holding_summary = "[" + Util.pack_html_link(j["url"], hhs_obj.text()) + "]";
|
1188
|
+
if (j["latest"].length > 0) {
|
1189
|
+
let circulation_stock = $("#circulation_stock").attr("data-val");
|
1190
|
+
let latest_html = "";
|
1191
|
+
if (j["latest"].length === 1) {
|
1192
|
+
let holding_num = Util.to_hundred_million(j["latest"][0]["volume"], 3);
|
1193
|
+
let holding_rate = Math.round((holding_num / circulation_stock) * 10000) / 100;
|
1194
|
+
latest_html = "最新(" + Util.seconds_to_format(j["latest"][0]["date"], "%Y-%m-%d") + "): " + holding_num + "亿股, 占 <b>" + holding_rate + "%</b> 流通股, ";
|
1195
|
+
} else if (j["latest"].length === 2) {
|
1196
|
+
let d1 = j["latest"][0];
|
1197
|
+
let d2 = j["latest"][1];
|
1198
|
+
let difference = d1["volume"] - d2["volume"];
|
1199
|
+
let dist_tips = "";
|
1200
|
+
if (difference > 0) {
|
1201
|
+
dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["volume"])) + "股' style='color: #a94442;'>+" + Util.strip_html(Util.to_unit(difference)) + "股</b>)";
|
1202
|
+
} else if (difference < 0) {
|
1203
|
+
dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["volume"])) + "股' style='color: #3c763d;'>" + Util.strip_html(Util.to_unit(difference)) + "股</b>)";
|
1213
1204
|
}
|
1214
|
-
|
1215
|
-
|
1205
|
+
let holding_num = Util.to_hundred_million(d1["volume"]);
|
1206
|
+
let holding_rate = Math.round((holding_num / circulation_stock) * 10000) / 100;
|
1207
|
+
latest_html = "最新(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + holding_num + "亿股" + dist_tips + ", 占 <b>" + holding_rate + "%</b> 流通股, ";
|
1216
1208
|
}
|
1217
|
-
|
1209
|
+
hkex_holding_summary += (latest_html + ' 最高: ' + Util.to_unit(j["high"]["volume"]) + '股(' + Util.seconds_to_format(j["high"]["date"], "%Y-%m-%d") +
|
1210
|
+
') 最低: ' + Util.to_unit(j["low"]["volume"]) + '股(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')');
|
1218
1211
|
}
|
1212
|
+
hhs_obj.html(hkex_holding_summary);
|
1219
1213
|
Stock["hkex_holding_chart"] = Util.multi_axis_line(Stock["hkex_holding_chart"], "hkex_holding_line_canvas", date_data, '持股数', volume_data, '股价', price_data);
|
1220
1214
|
let flow_data = [];
|
1221
1215
|
date_data = [];
|
package/summary_daily.js
CHANGED
@@ -17,7 +17,6 @@ $(document).ready(function () {
|
|
17
17
|
|
18
18
|
let DailySummary = {
|
19
19
|
|
20
|
-
is_load: false,
|
21
20
|
is_trade_time: 0,
|
22
21
|
big_deal: {},
|
23
22
|
hsmf_data: {},
|
@@ -70,10 +69,9 @@ $(document).ready(function () {
|
|
70
69
|
},
|
71
70
|
|
72
71
|
fetch_data: function () {
|
73
|
-
if (
|
72
|
+
if (Util.is_load) {
|
74
73
|
return false;
|
75
74
|
}
|
76
|
-
DailySummary.is_load = true;
|
77
75
|
Util.show_loading();
|
78
76
|
Util.post(location.pathname, {date: $("#trade_date").val(), action: "market_overview"}, function (j) {
|
79
77
|
DailySummary.pack_market_overview(j["market_overview"]);
|
@@ -83,7 +81,6 @@ $(document).ready(function () {
|
|
83
81
|
},
|
84
82
|
|
85
83
|
hide_loaded: function () {
|
86
|
-
DailySummary.is_load = false;
|
87
84
|
Util.hide_tips();
|
88
85
|
},
|
89
86
|
|
@@ -453,7 +450,7 @@ $(document).ready(function () {
|
|
453
450
|
singleDatePicker: true,
|
454
451
|
singleClasses: "picker_2"
|
455
452
|
}, function () {
|
456
|
-
if (!
|
453
|
+
if (!Util.is_load) {
|
457
454
|
setTimeout(DailySummary.fetch_data, 123);
|
458
455
|
}
|
459
456
|
});
|
@@ -544,8 +541,8 @@ $(document).ready(function () {
|
|
544
541
|
Modal["p_change_data"] = j["data"];
|
545
542
|
Modal.render_stock_rate_html();
|
546
543
|
$("#p_change_type").change(function () {
|
547
|
-
if (!
|
548
|
-
|
544
|
+
if (!Util.is_load) {
|
545
|
+
Util.set_table_loading("stock_rate_table_body");
|
549
546
|
Modal.render_stock_rate_modal(obj);
|
550
547
|
}
|
551
548
|
});
|