sbd-npm 1.3.70 → 1.3.71
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 +28 -40
- package/util.js +1 -1
package/package.json
CHANGED
package/summary_daily.js
CHANGED
@@ -86,11 +86,9 @@ $(function () {
|
|
86
86
|
* 当前行情指数
|
87
87
|
*/
|
88
88
|
pack_index_data: function (index_data) {
|
89
|
-
let _html = [];
|
90
|
-
let change_color_data = [];
|
89
|
+
let _html = [], change_color_data = [];
|
91
90
|
index_data.forEach(function (item) {
|
92
|
-
let cls = "";
|
93
|
-
let sort = "";
|
91
|
+
let cls = "", sort = "";
|
94
92
|
if (item["change"] > 0) {
|
95
93
|
cls = "red";
|
96
94
|
sort = "fa-sort-asc";
|
@@ -145,7 +143,7 @@ $(function () {
|
|
145
143
|
_stock_rate_html.push('<span class="sr-only">', rate_width, '% Complete</span>');
|
146
144
|
_stock_rate_html.push('</div>');
|
147
145
|
_stock_rate_html.push('</div></div>');
|
148
|
-
_stock_rate_html.push('<div class="w_right w_20"><span><a href="#" data-toggle="modal" data-target=".
|
146
|
+
_stock_rate_html.push('<div class="w_right w_20"><span><a href="#" data-toggle="modal" data-target=".stock_rate_modal" data-cp="', rate_range, '">', rate, '</a></span></div>');
|
149
147
|
_stock_rate_html.push('</div>');
|
150
148
|
return _stock_rate_html.join("");
|
151
149
|
};
|
@@ -161,8 +159,8 @@ $(function () {
|
|
161
159
|
$("#stock_rate_bar").html(stock_rate_html.join(""));
|
162
160
|
let up_num = pr["r0_3"] + pr["r3_5"] + pr["r5_7"] + pr["r7_10"];
|
163
161
|
let down_num = pr["r10_7"] + pr["r7_5"] + pr["r5_3"] + pr["r3_0"];
|
164
|
-
let stock_rate_tips = '涨: <b style="color: #FFF;" class="label label-danger">' + up_num + '</b> (涨停:<b><a style="text-decoration: underline;" class="text-danger" href="#" data-toggle="modal" data-target=".
|
165
|
-
stock_rate_tips += '跌: <b style="color: #FFF;" class="label label-success">' + down_num + '</b> (跌停:<b><a style="text-decoration: underline;" class="text-success" href="#" data-toggle="modal" data-target=".
|
162
|
+
let stock_rate_tips = '涨: <b style="color: #FFF;" class="label label-danger">' + up_num + '</b> (涨停:<b><a style="text-decoration: underline;" class="text-danger" href="#" data-toggle="modal" data-target=".stock_rate_modal" data-cp="10% ~ 10%">' + pr["r10"] + '</a></b>), ';
|
163
|
+
stock_rate_tips += '跌: <b style="color: #FFF;" class="label label-success">' + down_num + '</b> (跌停:<b><a style="text-decoration: underline;" class="text-success" href="#" data-toggle="modal" data-target=".stock_rate_modal" data-cp="-10% ~ -10%">' + pr["r_10"] + '</a></b>), ';
|
166
164
|
stock_rate_tips += '涨跌比: <b style="color: #FFF;" class="label label-info">' + Util.to_float(up_num / down_num, 2) + '</b>';
|
167
165
|
$("#stock_rate_tips").html(stock_rate_tips);
|
168
166
|
},
|
@@ -309,18 +307,22 @@ $(function () {
|
|
309
307
|
}
|
310
308
|
_html.push("<tr>");
|
311
309
|
_html.push("<td style='padding: 18px 0;'>", Util.pack_html_link(market["url"], market["name"]), "</td>");
|
310
|
+
if (!market["item"]["market_capital"] && market["item"]["prev_market_capital"]) {
|
311
|
+
market["item"]["market_capital"] = market["item"]["prev_market_capital"];
|
312
|
+
}
|
312
313
|
_html.push("<td style='padding: 18px 0;'>", (market["item"]["market_capital"] ? (market["item"]["market_capital"] + "万亿") : "--"), "</td>");
|
314
|
+
if (!market["item"]["pe"] && market["item"]["prev_pe"]) {
|
315
|
+
market["item"]["pe"] = market["item"]["prev_pe"];
|
316
|
+
}
|
313
317
|
_html.push("<td style='padding: 18px 0;'>", (market["item"]["pe"] ? market["item"]["pe"] : "--"), "</td>");
|
314
318
|
_html.push("<td style='padding: 18px 0;'>", (market["item"]["volume"] ? (market["item"]["volume"] + "亿股") : "--"), "</td>");
|
315
319
|
let amount = "--";
|
316
320
|
if (market["item"]["amount"] && market["item"]["amount"] > 0) {
|
317
|
-
if (market["item"]["prev_amount"] && market["item"]["prev_amount"] > 0) {
|
321
|
+
if (market["item"]["prev_amount"] && market["item"]["prev_amount"] > 0 && market["item"]["amount"] !== market["item"]["prev_amount"]) {
|
318
322
|
if (market["item"]["amount"] > market["item"]["prev_amount"]) {
|
319
323
|
amount = "<b title='前值: " + market["item"]["prev_amount"] + "亿' class='text-danger'>" + market["item"]["amount"] + "亿</b>";
|
320
|
-
} else if (market["item"]["amount"] < market["item"]["prev_amount"]) {
|
321
|
-
amount = "<b title='前值: " + market["item"]["prev_amount"] + "亿' class='text-success'>" + market["item"]["amount"] + "亿</b>";
|
322
324
|
} else {
|
323
|
-
amount = market["item"]["
|
325
|
+
amount = "<b title='前值: " + market["item"]["prev_amount"] + "亿' class='text-success'>" + market["item"]["amount"] + "亿</b>";
|
324
326
|
}
|
325
327
|
} else {
|
326
328
|
amount = market["item"]["amount"] + "亿";
|
@@ -350,25 +352,6 @@ $(function () {
|
|
350
352
|
mo_amount_obj.addClass(mo_amount_cls);
|
351
353
|
}
|
352
354
|
mo_amount_obj.html(Util.to_float(mo_amount, 3) + "(" + mo_amount_sign + Util.to_float(mo_amount - previous_mo_amount, 3) + ")");
|
353
|
-
DailySummary.set_cache("market_overview", market_overview_dict);
|
354
|
-
},
|
355
|
-
|
356
|
-
pack_mo_item_html: function (market, key, unit) {
|
357
|
-
let _html = "<td>--</td>";
|
358
|
-
if (market["item"]) {
|
359
|
-
let val = market["item"][key];
|
360
|
-
if (val && val > 0) {
|
361
|
-
let prev_val = market["item"]["prev_" + key];
|
362
|
-
let mo_trend = "";
|
363
|
-
if (val > prev_val) {
|
364
|
-
mo_trend = "<b class='text-danger'> ↑</b>";
|
365
|
-
} else if (val < prev_val) {
|
366
|
-
mo_trend = "<b class='text-success'> ↓</b>";
|
367
|
-
}
|
368
|
-
_html = "<td title='" + prev_val + "'>" + val + unit + mo_trend + "</td>";
|
369
|
-
}
|
370
|
-
}
|
371
|
-
return _html;
|
372
355
|
},
|
373
356
|
|
374
357
|
/**
|
@@ -553,7 +536,7 @@ $(function () {
|
|
553
536
|
Modal.render_stock_rate_html();
|
554
537
|
$("#p_change_type").change(function () {
|
555
538
|
if (!Util.is_load) {
|
556
|
-
Util.set_table_loading("
|
539
|
+
Util.set_table_loading("stock_rate_modal_body_body");
|
557
540
|
Modal.render_stock_rate_modal(obj);
|
558
541
|
}
|
559
542
|
});
|
@@ -562,10 +545,9 @@ $(function () {
|
|
562
545
|
},
|
563
546
|
|
564
547
|
render_stock_rate_html: function() {
|
565
|
-
let _html = [];
|
548
|
+
let _html = [], index = 0;
|
566
549
|
let industry = $("#p_change_industry").val();
|
567
550
|
let area = $("#p_change_area").val();
|
568
|
-
let index = 0;
|
569
551
|
Modal["p_change_data"].forEach(function (item) {
|
570
552
|
if (Util.is_industry_area(item, industry, area)) {
|
571
553
|
index++;
|
@@ -582,8 +564,8 @@ $(function () {
|
|
582
564
|
_html.push("</tr>");
|
583
565
|
}
|
584
566
|
});
|
585
|
-
Util.render_table_html("
|
586
|
-
Util.init_stock_stuff("
|
567
|
+
Util.render_table_html("stock_rate_modal_body_body", _html);
|
568
|
+
Util.init_stock_stuff("stock_rate_modal_body_body", [], 0, 0);
|
587
569
|
},
|
588
570
|
|
589
571
|
render_news_modal: function () {
|
@@ -598,7 +580,7 @@ $(function () {
|
|
598
580
|
_html.push("<td>", Util.sub_str(item["content"], 40), "</td>");
|
599
581
|
_html.push("</tr>");
|
600
582
|
});
|
601
|
-
Util.render_table_html("
|
583
|
+
Util.render_table_html("news_modal_body_body", _html);
|
602
584
|
Util.hide_tips();
|
603
585
|
});
|
604
586
|
}
|
@@ -613,8 +595,11 @@ $(function () {
|
|
613
595
|
$("#market_overview_load_status").html("<tr><td colspan='6'>Loading...</td></tr>");
|
614
596
|
});
|
615
597
|
|
598
|
+
Util.init_modal_skeleton("stock_rate_modal", '');
|
599
|
+
$("#stock_rate_modal_title").html("<span id='cp_val'></span>涨跌幅");
|
616
600
|
Util.init_table_skeleton({
|
617
|
-
"element_id": "
|
601
|
+
"element_id": "stock_rate_modal_body",
|
602
|
+
"caption": "none",
|
618
603
|
"head_cols": [
|
619
604
|
{"name": "序号"},
|
620
605
|
{"name": "代码"},
|
@@ -639,12 +624,15 @@ $(function () {
|
|
639
624
|
});
|
640
625
|
srm_obj.on('hidden.bs.modal', function () {
|
641
626
|
$("#cp_val").html("");
|
627
|
+
Util.set_table_loading("stock_rate_modal_body_body");
|
642
628
|
Util.hide_tips();
|
643
|
-
$("#stock_rate_table_body").html("<tr><td colspan='9'>Loading...</td></tr>");
|
644
629
|
});
|
645
630
|
|
631
|
+
Util.init_modal_skeleton("news_modal", '');
|
632
|
+
$("#news_modal_title").html(Util.pack_html_link("http://www.pbc.gov.cn/zhengcehuobisi/125207/125213/125431/125475/index.html", "中国人民银行公开市场业务交易公告"));
|
646
633
|
Util.init_table_skeleton({
|
647
|
-
"element_id": "
|
634
|
+
"element_id": "news_modal_body",
|
635
|
+
"caption": "none",
|
648
636
|
"head_cols": [
|
649
637
|
{"name": "标题"},
|
650
638
|
{"name": "时间"},
|
@@ -656,8 +644,8 @@ $(function () {
|
|
656
644
|
Modal.render_news_modal();
|
657
645
|
});
|
658
646
|
news_obj.on('hidden.bs.modal', function () {
|
647
|
+
Util.set_table_loading("news_modal_body_body");
|
659
648
|
Util.hide_tips();
|
660
|
-
$("#news_modal_table_body").html("<tr><td colspan='3'>Loading...</td></tr>");
|
661
649
|
});
|
662
650
|
|
663
651
|
$("#hgt_bound").change(function () {
|
package/util.js
CHANGED
@@ -4197,7 +4197,7 @@ const Util = {
|
|
4197
4197
|
big_deal_pie: function (element_id, data) {
|
4198
4198
|
let buy = Util.to_unit(data["buy1000"] + data["buy800"] + data["buy600"] + data["buy400"]);
|
4199
4199
|
let sell = Util.to_unit(data["sell1000"] + data["sell800"] + data["sell600"] + data["sell400"]);
|
4200
|
-
$("#" + element_id + "_tips").html("
|
4200
|
+
$("#" + element_id + "_tips").html("流入:<b class='text-danger'>" + Util.strip_html(buy) + "</b>,流出:<b class='text-success'>" + Util.strip_html(sell) + "</b>");
|
4201
4201
|
let bd_data = [
|
4202
4202
|
{name: '超大单流入', value: Util.to_hundred_million(data["buy1000"])},
|
4203
4203
|
{name: '大单流入', value: Util.to_hundred_million(data["buy800"])},
|