sbd-npm 1.3.72 → 1.3.74
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 +1 -1
- package/package.json +1 -1
- package/stock_basics.js +11 -6
- package/summary_daily.js +27 -18
- package/util.js +10 -10
package/constant.js
CHANGED
@@ -140,6 +140,7 @@ const MenuList = [
|
|
140
140
|
'icon': 'retweet',
|
141
141
|
'menu': [
|
142
142
|
{'key': 'portfolio_recommend', 'name': '关注', 'url': '/0x2da99e58e28de94b670c4200657ac7e26dd8dceb'},
|
143
|
+
{'key': 'portfolio_week', 'name': '周观察股', 'url': '/0xa97a3f551b5fddd48384952bbd0eb63b7c4636d0'},
|
143
144
|
{'key': 'portfolio_chen', 'name': '陈营长极品投资', 'url': '/0x3f8cbeeeb38138a626e935017a4cc25f47ce3dbe'},
|
144
145
|
{'key': 'portfolio_vegetable', 'name': 'Veget', 'url': '/0x671dd9dcfca7dbc220c8164c92a74d2c561c6464'},
|
145
146
|
{'key': 'portfolio_follow', 'name': '跟我走吧14', 'url': '/0x4aa68e74a66297c0ece1bb05fad20c32ee1db9e4'},
|
@@ -147,7 +148,6 @@ const MenuList = [
|
|
147
148
|
{'key': 'portfolio_tianjin', 'name': '天津股侠', 'url': '/0xb8428e42237a7485a787e2ab1b5ae0f057258f18'},
|
148
149
|
{'key': 'portfolio_zan', 'name': 'zangyn', 'url': '/0xccb07ddaf4f1219b7b5ae64780e7905206927873'},
|
149
150
|
{'key': 'portfolio_peng', 'name': '吴小朋同学', 'url': '/0x4f1a316c05731e365ec1b7ef454d98206fa973f6'},
|
150
|
-
{'key': 'portfolio_penny', 'name': '梁斌penny', 'url': '/0x34ec770b56fbd946e2a3467664efbe674d04f6ec'},
|
151
151
|
{'key': 'portfolio_wen', 'name': '李健2013', 'url': '/0xe09c047550390159bda66d6315743427dd7ccae4'},
|
152
152
|
{'key': 'portfolio_patience', 'name': '耐力投资', 'url': '/0x55ecbeeabd7ad78dba8c38a9325b2889798622b3'},
|
153
153
|
{'key': 'portfolio_star50', 'name': '科创50', 'url': '/0x378b2601d83c467f81f1d4e323c8bfbc72f6cc0d'},
|
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -367,6 +367,7 @@ let Stock = {
|
|
367
367
|
"element_id": "big_deal_summary_table",
|
368
368
|
"head_cols": [
|
369
369
|
{"name": "主力总净流入", "link": money_inflow_url},
|
370
|
+
{"name": "60日主力净流入"},
|
370
371
|
{"name": "20日主力净流入", "link": money_inflow_url + "?money_inflow_type=5"},
|
371
372
|
{"name": "10日主力净流入", "link": money_inflow_url + "?money_inflow_type=4"},
|
372
373
|
{"name": "5日主力净流入", "link": money_inflow_url + "?money_inflow_type=3"},
|
@@ -394,7 +395,7 @@ let Stock = {
|
|
394
395
|
}
|
395
396
|
if (j["money_net_inflow"]) {
|
396
397
|
let _html = [], i = 0, total_net_inflow = 0;
|
397
|
-
let day3_net_inflow = 0, day5_net_inflow = 0, day10_net_inflow = 0, day20_net_inflow = 0
|
398
|
+
let day3_net_inflow = 0, day5_net_inflow = 0, day10_net_inflow = 0, day20_net_inflow = 0, day60_net_inflow = 0;
|
398
399
|
j["money_net_inflow"].forEach(function (item) {
|
399
400
|
i++;
|
400
401
|
total_net_inflow += item["main_net_inflow"];
|
@@ -410,6 +411,9 @@ let Stock = {
|
|
410
411
|
if (i <= 20) {
|
411
412
|
day20_net_inflow += item["main_net_inflow"];
|
412
413
|
}
|
414
|
+
if (i <= 60) {
|
415
|
+
day60_net_inflow += item["main_net_inflow"];
|
416
|
+
}
|
413
417
|
_html.push("<tr>");
|
414
418
|
_html.push("<td>", Util.seconds_to_format(item["date"], "%Y-%m-%d"), "</td>");
|
415
419
|
_html.push("<td><b class='", Util.text_color(item["price_change"]), "'>", item["price"], "(", item["price_change"], "%)</b></td>");
|
@@ -425,11 +429,12 @@ let Stock = {
|
|
425
429
|
Util.render_table_html("big_deal_table_body", _html);
|
426
430
|
_html = [];
|
427
431
|
_html.push("<tr>");
|
428
|
-
_html.push("<td><b class='", Util.text_color(total_net_inflow), "'>", Util.to_unit(total_net_inflow,
|
429
|
-
_html.push("<td><b class='", Util.text_color(
|
430
|
-
_html.push("<td><b class='", Util.text_color(
|
431
|
-
_html.push("<td><b class='", Util.text_color(
|
432
|
-
_html.push("<td><b class='", Util.text_color(
|
432
|
+
_html.push("<td><b class='", Util.text_color(total_net_inflow), "'>", Util.to_unit(total_net_inflow, 3), "</b></td>");
|
433
|
+
_html.push("<td><b class='", Util.text_color(day60_net_inflow), "'>", Util.to_unit(day60_net_inflow, 3), "</b></td>");
|
434
|
+
_html.push("<td><b class='", Util.text_color(day20_net_inflow), "'>", Util.to_unit(day20_net_inflow, 3), "</b></td>");
|
435
|
+
_html.push("<td><b class='", Util.text_color(day10_net_inflow), "'>", Util.to_unit(day10_net_inflow, 3), "</b></td>");
|
436
|
+
_html.push("<td><b class='", Util.text_color(day5_net_inflow), "'>", Util.to_unit(day5_net_inflow, 3), "</b></td>");
|
437
|
+
_html.push("<td><b class='", Util.text_color(day3_net_inflow), "'>", Util.to_unit(day3_net_inflow, 3), "</b></td>");
|
433
438
|
_html.push("</tr>");
|
434
439
|
Util.render_table_html("big_deal_summary_table_body", _html);
|
435
440
|
}
|
package/summary_daily.js
CHANGED
@@ -46,6 +46,7 @@ $(function () {
|
|
46
46
|
|
47
47
|
load_cache: function () {
|
48
48
|
DailySummary["hsgt_money_flow_chart"] = Util.show_chart_loading(DailySummary["hsgt_money_flow_chart"], "hsgt_money_flow_line");
|
49
|
+
DailySummary["big_deal_pie_chart"] = Util.show_chart_loading(DailySummary["big_deal_pie_chart"], "big_deal_pie");
|
49
50
|
try {
|
50
51
|
Util.set_table_loading("market_overview_zone");
|
51
52
|
let cache = DailySummary.get_cache();
|
@@ -55,9 +56,6 @@ $(function () {
|
|
55
56
|
if (cache.hasOwnProperty("change_percent")) {
|
56
57
|
DailySummary.pack_change_percent(cache["change_percent"]);
|
57
58
|
}
|
58
|
-
if (cache.hasOwnProperty("big_deal")) {
|
59
|
-
DailySummary.pack_big_deal(cache["big_deal"], 0);
|
60
|
-
}
|
61
59
|
if (cache.hasOwnProperty("news")) {
|
62
60
|
DailySummary.pack_news_data(cache["news"]);
|
63
61
|
}
|
@@ -110,7 +108,7 @@ $(function () {
|
|
110
108
|
let index_name = item["href"] ? Util.pack_html_link(item["href"], item["name"]) : item["name"];
|
111
109
|
_html.push('<span class="count_top"><i class="fa"></i> ', index_name, '</span>');
|
112
110
|
_html.push('<div class="count ', cls, '">', item["value"], '</div>');
|
113
|
-
_html.push('<span class="count_bottom"><i class="', cls, '"><i class="fa ', sort, '"></i>', item["change"], '(<span id="', change_rate_id, '">', item["change_rate"], '</span>%)</i></span>');
|
111
|
+
_html.push('<span class="count_bottom"><i class="', cls, '"><i class="fa ', sort, '"></i>', item["change"], '(<span id="', change_rate_id, '">', Util.to_float(item["change_rate"], 2), '</span>%)</i></span>');
|
114
112
|
_html.push('</div>');
|
115
113
|
});
|
116
114
|
$("#index_summary_data").html(_html.join(""));
|
@@ -167,22 +165,25 @@ $(function () {
|
|
167
165
|
|
168
166
|
/**
|
169
167
|
* 大单交易
|
170
|
-
* @param
|
168
|
+
* @param big_deal_data
|
171
169
|
* @param big_deal_date
|
172
170
|
*/
|
173
|
-
pack_big_deal: function (
|
171
|
+
pack_big_deal: function (big_deal_data, big_deal_date) {
|
172
|
+
if (DailySummary["big_deal_pie_chart"]) {
|
173
|
+
DailySummary["big_deal_pie_chart"].hideLoading();
|
174
|
+
}
|
174
175
|
let bd_obj = $('#big_deal_pie');
|
175
176
|
if (bd_obj.length) {
|
176
177
|
if (big_deal_date > 0) {
|
177
178
|
$("#big_deal_date").html("(" + Util.seconds_to_format(big_deal_date, "%Y-%m-%d") + ")");
|
178
179
|
}
|
179
|
-
if (DailySummary.big_deal === {} || DailySummary.big_deal["buy1000"] !==
|
180
|
-
|| DailySummary.big_deal["buy600"] !==
|
181
|
-
|| DailySummary.big_deal["sell400"] !==
|
182
|
-
|| DailySummary.big_deal["sell800"] !==
|
180
|
+
if (DailySummary.big_deal === {} || DailySummary.big_deal["buy1000"] !== big_deal_data["buy1000"] || DailySummary.big_deal["buy800"] !== big_deal_data["buy800"]
|
181
|
+
|| DailySummary.big_deal["buy600"] !== big_deal_data["buy600"] || DailySummary.big_deal["buy400"] !== big_deal_data["buy400"]
|
182
|
+
|| DailySummary.big_deal["sell400"] !== big_deal_data["sell400"] || DailySummary.big_deal["sell600"] !== big_deal_data["sell600"]
|
183
|
+
|| DailySummary.big_deal["sell800"] !== big_deal_data["sell800"] || DailySummary.big_deal["sell1000"] !== big_deal_data["sell1000"]) {
|
183
184
|
bd_obj.css("height", "300px");
|
184
|
-
Util.big_deal_pie('big_deal_pie',
|
185
|
-
DailySummary.big_deal =
|
185
|
+
Util.big_deal_pie('big_deal_pie', big_deal_data);
|
186
|
+
DailySummary.big_deal = big_deal_data;
|
186
187
|
}
|
187
188
|
}
|
188
189
|
},
|
@@ -372,7 +373,6 @@ $(function () {
|
|
372
373
|
DailySummary.pack_news_data(j["news"]);
|
373
374
|
DailySummary.set_cache("index", j["index"]);
|
374
375
|
DailySummary.set_cache("change_percent", j["change_percent"]);
|
375
|
-
DailySummary.set_cache("big_deal", j["big_deal"]);
|
376
376
|
DailySummary.set_cache("news", j["news"]);
|
377
377
|
DailySummary.hide_loaded();
|
378
378
|
if (DailySummary.is_trade_time === 1) {
|
@@ -438,6 +438,7 @@ $(function () {
|
|
438
438
|
// 指数历史行情数据
|
439
439
|
render_index_hist_modal: function() {
|
440
440
|
Util.show_loading();
|
441
|
+
Util.set_table_loading("index_hist_modal_body_body");
|
441
442
|
let payload = {
|
442
443
|
action: "index_hist",
|
443
444
|
index_code: "ths_all_a",
|
@@ -450,12 +451,20 @@ $(function () {
|
|
450
451
|
_html.push("<tr>");
|
451
452
|
_html.push("<td>", Util.seconds_to_format(item["date"], "%Y-%m-%d"), "</td>");
|
452
453
|
_html.push("<td>", item["open"], "</td>");
|
453
|
-
_html.push("<td>", item["close"], "</td>");
|
454
454
|
_html.push("<td>", item["low"], "</td>");
|
455
455
|
_html.push("<td>", item["high"], "</td>");
|
456
|
+
_html.push("<td data-val='", item["close"], "'><b class='", Util.text_color(item["p_change_rate"]), "'>", item["close"], "</b></td>");
|
456
457
|
_html.push("<td>", Util.parse_ratio(item["p_change_rate"]), "</td>");
|
457
458
|
_html.push("<td data-val='", item["volume"], "'>", Util.to_unit(item["volume"]), "股</td>");
|
458
|
-
|
459
|
+
let amount = Util.to_unit(item["amount"], 3);
|
460
|
+
if (item["pre_amount"]) {
|
461
|
+
if (item["amount"] > item["pre_amount"]) {
|
462
|
+
amount += "<b class='text-danger'>(+" + Util.to_unit(item["amount"] - item["pre_amount"], 3) + ")</b>";
|
463
|
+
} else if (item["amount"] < item["pre_amount"]) {
|
464
|
+
amount += "<b class='text-success'>(" + Util.to_unit(item["amount"] - item["pre_amount"], 3) + ")</b>";
|
465
|
+
}
|
466
|
+
}
|
467
|
+
_html.push("<td data-val='", item["amount"], "'>", amount, "</td>");
|
459
468
|
_html.push("</tr>");
|
460
469
|
});
|
461
470
|
Util.render_table_html("index_hist_modal_body_body", _html);
|
@@ -624,13 +633,13 @@ $(function () {
|
|
624
633
|
$("#index_hist_modal_title").html(Util.pack_html_link("https://m.10jqka.com.cn/stockpage/48_883957/", "同花顺全A指数"));
|
625
634
|
Util.init_table_skeleton({
|
626
635
|
"element_id": "index_hist_modal_body",
|
627
|
-
"caption": '<caption class="text-right"><div class="form-inline"><div class="form-group" id="index_hist_modal_start_end_date"></div><button class="btn btn-default" id="index_hist_modal_query">查 询</button></div></caption>',
|
636
|
+
"caption": '<caption class="text-right" style="margin-top: -10px; padding-bottom: 10px;"><div class="form-inline"><div class="form-group" id="index_hist_modal_start_end_date"></div><button class="btn btn-default" id="index_hist_modal_query">查 询</button></div></caption>',
|
628
637
|
"head_cols": [
|
629
|
-
{"name": "日期", "table_sort": 1},
|
638
|
+
{"name": "日期", "class": "info", "table_sort": 1},
|
630
639
|
{"name": "开盘价", "table_sort": 1},
|
631
|
-
{"name": "收盘价", "table_sort": 1},
|
632
640
|
{"name": "最低价", "table_sort": 1},
|
633
641
|
{"name": "最高价", "table_sort": 1},
|
642
|
+
{"name": "收盘价", "table_sort": 1},
|
634
643
|
{"name": "涨跌", "table_sort": 1},
|
635
644
|
{"name": "成交量", "table_sort": 1},
|
636
645
|
{"name": "成交额", "table_sort": 1},
|
package/util.js
CHANGED
@@ -1636,9 +1636,9 @@ const Util = {
|
|
1636
1636
|
Util.init_modal_skeleton(component_id);
|
1637
1637
|
Util.init_table_skeleton({
|
1638
1638
|
"element_id": component_id + "_body",
|
1639
|
-
"caption": '<caption class="text-right"><div class="form-inline"><div class="form-group" id="currency_modal_start_end_date"></div><button class="btn btn-default" id="' + component_id + '_query">查 询</button></div></caption>',
|
1639
|
+
"caption": '<caption class="text-right" style="margin-top: -10px;"><div class="form-inline"><div class="form-group" id="currency_modal_start_end_date"></div><button class="btn btn-default" id="' + component_id + '_query">查 询</button></div></caption>',
|
1640
1640
|
"head_cols": [
|
1641
|
-
{"name": "日期", "table_sort": 1},
|
1641
|
+
{"name": "日期", "class": "info", "table_sort": 1},
|
1642
1642
|
{"name": "价格", "table_sort": 1},
|
1643
1643
|
{"name": "最低价", "table_sort": 1},
|
1644
1644
|
{"name": "最高价", "table_sort": 1},
|
@@ -1724,13 +1724,13 @@ const Util = {
|
|
1724
1724
|
Util.init_modal_skeleton(component_id);
|
1725
1725
|
Util.init_table_skeleton({
|
1726
1726
|
"element_id": component_id + "_body",
|
1727
|
-
"caption": '<caption class="text-right"><div class="form-inline"><div class="form-group" id="' + component_id + '_start_end_date"></div><button class="btn btn-default" id="' + component_id + '_query">查 询</button></div></caption>',
|
1727
|
+
"caption": '<caption class="text-right" style="margin-top: -10px;"><div class="form-inline"><div class="form-group" id="' + component_id + '_start_end_date"></div><button class="btn btn-default" id="' + component_id + '_query">查 询</button></div></caption>',
|
1728
1728
|
"head_cols": [
|
1729
|
-
{"name": "日期", "table_sort": 1},
|
1729
|
+
{"name": "日期", "class": "info", "table_sort": 1},
|
1730
1730
|
{"name": "开盘价", "table_sort": 1},
|
1731
|
-
{"name": "收盘价", "table_sort": 1},
|
1732
1731
|
{"name": "最低价", "table_sort": 1},
|
1733
1732
|
{"name": "最高价", "table_sort": 1},
|
1733
|
+
{"name": "收盘价", "table_sort": 1},
|
1734
1734
|
{"name": "涨跌", "table_sort": 1},
|
1735
1735
|
{"name": "成交额", "table_sort": 1},
|
1736
1736
|
{"name": "总市值", "table_sort": 1},
|
@@ -1791,9 +1791,9 @@ const Util = {
|
|
1791
1791
|
}
|
1792
1792
|
_html.push("<td>", Util.seconds_to_format(item["date"], "%Y-%m-%d"), "</td>");
|
1793
1793
|
_html.push("<td>", item["open"], "</td>");
|
1794
|
-
_html.push("<td>", item["price"], "</td>");
|
1795
1794
|
_html.push("<td>", item["low"], "</td>");
|
1796
1795
|
_html.push("<td>", item["high"], "</td>");
|
1796
|
+
_html.push("<td>", item["price"], "</td>");
|
1797
1797
|
_html.push("<td>", Util.parse_ratio(item["p_change"]), "</td>");
|
1798
1798
|
_html.push("<td>", Util.to_unit(item["amount"]), "</td>");
|
1799
1799
|
_html.push("<td>", Util.to_unit(item["market_capital"]), "</td>");
|
@@ -2186,8 +2186,8 @@ const Util = {
|
|
2186
2186
|
_html.push('<option value="7">最近30日</option>');
|
2187
2187
|
_html.push('<option value="8">最近60日</option>');
|
2188
2188
|
_html.push('<option value="9">最近90日</option>');
|
2189
|
-
_html.push('<option value="10"
|
2190
|
-
_html.push('<option value="11"
|
2189
|
+
_html.push('<option value="10">最近半年</option>');
|
2190
|
+
_html.push('<option value="11">最近一年</option>');
|
2191
2191
|
_html.push('<option value="99">所有时间</option>');
|
2192
2192
|
_html.push('<option value="100">还原</option>');
|
2193
2193
|
_html.push('<option value="101">置空</option>');
|
@@ -2254,12 +2254,12 @@ const Util = {
|
|
2254
2254
|
sd_obj.val(Util.seconds_to_format(pre_90day_second, "%Y-%m-%d"));
|
2255
2255
|
ed_obj.val(Util.seconds_to_format(midnight_second, "%Y-%m-%d"));
|
2256
2256
|
break;
|
2257
|
-
case "10": //
|
2257
|
+
case "10": // 最近半年
|
2258
2258
|
let pre_half_year_second = midnight_second - (365 / 2) * Util.one_day_second;
|
2259
2259
|
sd_obj.val(Util.seconds_to_format(pre_half_year_second, "%Y-%m-%d"));
|
2260
2260
|
ed_obj.val(Util.seconds_to_format(midnight_second, "%Y-%m-%d"));
|
2261
2261
|
break;
|
2262
|
-
case "11": //
|
2262
|
+
case "11": // 最近一年
|
2263
2263
|
let pre_one_year_second = midnight_second - 365 * Util.one_day_second;
|
2264
2264
|
sd_obj.val(Util.seconds_to_format(pre_one_year_second, "%Y-%m-%d"));
|
2265
2265
|
ed_obj.val(Util.seconds_to_format(midnight_second, "%Y-%m-%d"));
|