sbd-npm 1.3.93 → 1.3.94
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/summary_daily.js +29 -2
package/package.json
CHANGED
package/summary_daily.js
CHANGED
@@ -28,6 +28,10 @@ $(function () {
|
|
28
28
|
mo_gem_chart: false,
|
29
29
|
mo_hk_chart: false,
|
30
30
|
key_cache: "SBD_CACHE",
|
31
|
+
index_hist_data: [
|
32
|
+
{"code": "ths_all_a", "name": "同花顺全A指数", "url": "https://m.10jqka.com.cn/stockpage/48_883957/"},
|
33
|
+
{"code": "000902", "name": "中证流通", "url": "https://xueqiu.com/S/SH000902"},
|
34
|
+
],
|
31
35
|
|
32
36
|
get_cache: function () {
|
33
37
|
let cache = localStorage[DailySummary.key_cache];
|
@@ -443,7 +447,7 @@ $(function () {
|
|
443
447
|
Util.set_table_loading("index_hist_modal_body_body");
|
444
448
|
let payload = {
|
445
449
|
action: "index_hist",
|
446
|
-
index_code: "
|
450
|
+
index_code: $("#index_hist_modal_code").val(),
|
447
451
|
start_date: $("#index_hist_modal_start_date").val(),
|
448
452
|
end_date: $("#index_hist_modal_end_date").val()
|
449
453
|
};
|
@@ -479,6 +483,15 @@ $(function () {
|
|
479
483
|
Util.render_table_html("index_hist_modal_body_body", _html);
|
480
484
|
Util.hide_tips();
|
481
485
|
});
|
486
|
+
},
|
487
|
+
|
488
|
+
init_index_hist_url: function() {
|
489
|
+
let index_code = $("#index_hist_modal_code").val();
|
490
|
+
DailySummary.index_hist_data.forEach(function (c) {
|
491
|
+
if (c["code"] === index_code) {
|
492
|
+
$("#index_hist_modal_url").attr("href", c["url"]);
|
493
|
+
}
|
494
|
+
});
|
482
495
|
}
|
483
496
|
|
484
497
|
};
|
@@ -639,7 +652,17 @@ $(function () {
|
|
639
652
|
});
|
640
653
|
|
641
654
|
Util.init_modal_skeleton("index_hist_modal", '');
|
642
|
-
|
655
|
+
let ihmt_html = [];
|
656
|
+
ihmt_html.push("<div class='form-inline'><div class='form-group'>");
|
657
|
+
ihmt_html.push("<select id='index_hist_modal_code' class='form-control'>");
|
658
|
+
DailySummary.index_hist_data.forEach(function (c) {
|
659
|
+
ihmt_html.push("<option value='", c["code"], "'>", c["name"], "</option>");
|
660
|
+
});
|
661
|
+
ihmt_html.push("</select>");
|
662
|
+
ihmt_html.push(" <a id='index_hist_modal_url' href='#' target='_blank' rel='noopener noreferrer nofollow'><i class='glyphicon glyphicon-link'></i></a>");
|
663
|
+
ihmt_html.push("</div></div>");
|
664
|
+
$("#index_hist_modal_title").html(ihmt_html.join(""));
|
665
|
+
DailySummary.init_index_hist_url();
|
643
666
|
Util.init_table_skeleton({
|
644
667
|
"element_id": "index_hist_modal_body",
|
645
668
|
"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>',
|
@@ -668,6 +691,10 @@ $(function () {
|
|
668
691
|
mam_obj.on('hidden.bs.modal', function () {
|
669
692
|
Util.hide_tips();
|
670
693
|
});
|
694
|
+
$("#index_hist_modal_code").change(function () {
|
695
|
+
DailySummary.init_index_hist_url();
|
696
|
+
DailySummary.render_index_hist_modal();
|
697
|
+
});
|
671
698
|
|
672
699
|
Util.init_modal_skeleton("stock_rate_modal", '');
|
673
700
|
$("#stock_rate_modal_title").html("<span id='cp_val'></span>涨跌幅");
|