sbd-npm 1.1.65 → 1.1.69
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/menu.js +1 -2
- package/package.json +1 -1
- package/summary_daily.js +31 -20
- package/util.js +52 -28
- package/.npmignore +0 -1
package/menu.js
CHANGED
@@ -53,7 +53,7 @@ const MenuList = [
|
|
53
53
|
{'key': 'trend_fund_hold', 'name': '基金持股变化', 'url': '/067740976f85ec14ddae02b51829ce35'},
|
54
54
|
{'key': 'trend_week_minimum', 'name': '周成交低点', 'url': '/722d94429b8e689fe78dca1cf67a4c67'},
|
55
55
|
{'key': 'trend_margin', 'name': '融资融券余额涨幅', 'url': '/1964a6bc56dc3ce6825b23667c7fb588'},
|
56
|
-
{'key': 'trend_price', 'name': '
|
56
|
+
{'key': 'trend_price', 'name': '股价涨跌幅度', 'url': '/43ef6aeb36475f8f8f44d477b1990390'},
|
57
57
|
{'key': 'trend_down', 'name': '当前连跌个股', 'url': '/07fb907c7e7572fbeae98bacf5c44593'},
|
58
58
|
{'key': 'trend_down_analysis', 'name': '连跌反弹概率', 'url': '/e9a32e4601fca33a9c3b68103f61c3bc'},
|
59
59
|
{'key': 'trend_index_month', 'name': '指数每年月份涨跌', 'url': '/86691e421938098bab7679e43bea67a6'},
|
@@ -191,7 +191,6 @@ const MenuList = [
|
|
191
191
|
{'key': 'snowball_trend', 'name': '自选趋势', 'url': '/08c40d908dd87e29a607b6945309edf0'},
|
192
192
|
{'key': 'snowball_user', 'name': '用户列表', 'url': '/97339b8453883dd27e6087ae7db6f62a'},
|
193
193
|
{'key': 'snowball_tweet', 'name': '推文', 'url': '/9a9aef7fced3f15ff7647de75d70798c'},
|
194
|
-
{'key': 'snowball_red_packet', 'name': '红包数据', 'url': '/23d88182f12431fe67f658b725cbaf1d'},
|
195
194
|
{'key': 'snowball_tool', 'name': '搜索工具', 'url': '/ac88ee85f27e11aa06f2b8f46b03a0eb'},
|
196
195
|
]
|
197
196
|
},
|
package/package.json
CHANGED
package/summary_daily.js
CHANGED
@@ -442,10 +442,11 @@ $(document).ready(function () {
|
|
442
442
|
});
|
443
443
|
// 成交概况数据
|
444
444
|
let Modal = {
|
445
|
-
data_type: "",
|
446
445
|
|
446
|
+
data_type: "",
|
447
447
|
mo_start_time: 0,
|
448
448
|
mo_end_time: 0,
|
449
|
+
p_change_data: [],
|
449
450
|
|
450
451
|
render_market_overview_line: function (data, key, element_id, title, chart_instance) {
|
451
452
|
let line_id = element_id + "_chart";
|
@@ -523,25 +524,8 @@ $(document).ready(function () {
|
|
523
524
|
Util.post(location.pathname, payload, function (j) {
|
524
525
|
Util.render_type_option($("#p_change_industry"), j["data"], "industry", Modal.render_stock_rate_html);
|
525
526
|
Util.render_type_option($("#p_change_area"), j["data"], "area", Modal.render_stock_rate_html);
|
526
|
-
|
527
|
-
|
528
|
-
let area = $("#p_change_area").val();
|
529
|
-
let index = 0;
|
530
|
-
j["data"].forEach(function (item) {
|
531
|
-
if (Util.is_industry_area(item, industry, area)) {
|
532
|
-
index++;
|
533
|
-
_html.push("<tr>");
|
534
|
-
_html.push("<td>", index, "</td>");
|
535
|
-
_html = Util.stock_basics_html(_html, item);
|
536
|
-
if (item["continue_top_day"]) {
|
537
|
-
_html.push("<td title='连续涨停" + item["continue_top_day"] + "天'>", Util.parse_ratio(item["p_change"]), " <span class='badge alert-danger'>" + item["continue_top_day"] + "<span></td>");
|
538
|
-
} else {
|
539
|
-
_html.push("<td>", Util.parse_ratio(item["p_change"]), "</td>");
|
540
|
-
}
|
541
|
-
_html.push("</tr>");
|
542
|
-
}
|
543
|
-
});
|
544
|
-
Util.render_table_html("stock_rate_table_body", _html);
|
527
|
+
Modal["p_change_data"] = j["data"];
|
528
|
+
Modal.render_stock_rate_html();
|
545
529
|
$("#p_change_type").change(function () {
|
546
530
|
if (!DailySummary.is_load) {
|
547
531
|
$("#stock_rate_table_body").html("<tr><td colspan='9'>Loading...</td></tr>");
|
@@ -552,6 +536,31 @@ $(document).ready(function () {
|
|
552
536
|
});
|
553
537
|
},
|
554
538
|
|
539
|
+
render_stock_rate_html: function() {
|
540
|
+
let _html = [];
|
541
|
+
let industry = $("#p_change_industry").val();
|
542
|
+
let area = $("#p_change_area").val();
|
543
|
+
let index = 0;
|
544
|
+
Modal["p_change_data"].forEach(function (item) {
|
545
|
+
if (Util.is_industry_area(item, industry, area)) {
|
546
|
+
index++;
|
547
|
+
_html.push("<tr>");
|
548
|
+
_html.push("<td>", index, "</td>");
|
549
|
+
_html = Util.stock_basics_html(_html, item);
|
550
|
+
_html.push("<td>", Util.year_price_rate(item["stock_price"], item["year_price"]), "</td>");
|
551
|
+
_html.push("<td class='holder_", item["code"], "'>--</td>");
|
552
|
+
if (item["continue_top_day"]) {
|
553
|
+
_html.push("<td title='连续涨停" + item["continue_top_day"] + "天'>", Util.parse_ratio(item["p_change"]), " <span class='badge alert-danger'>" + item["continue_top_day"] + "<span></td>");
|
554
|
+
} else {
|
555
|
+
_html.push("<td>", Util.parse_ratio(item["p_change"]), "</td>");
|
556
|
+
}
|
557
|
+
_html.push("</tr>");
|
558
|
+
}
|
559
|
+
});
|
560
|
+
Util.render_table_html("stock_rate_table_body", _html);
|
561
|
+
Util.init_stock_stuff("stock_rate_table_body", [], 0, 0);
|
562
|
+
},
|
563
|
+
|
555
564
|
render_news_modal: function () {
|
556
565
|
Util.show_tips("Loading...");
|
557
566
|
Util.post(location.pathname, {action: "pbc_news"}, function (j) {
|
@@ -591,6 +600,8 @@ $(document).ready(function () {
|
|
591
600
|
{"name": "行业", "select_id": "p_change_industry"},
|
592
601
|
{"name": "地区", "select_id": "p_change_area"},
|
593
602
|
{"name": "当前价", "table_sort": 1},
|
603
|
+
{"name": "年初至今", "table_sort": 1},
|
604
|
+
{"name": "股东数", "table_sort": 1},
|
594
605
|
{
|
595
606
|
"name": "类型",
|
596
607
|
"select_id": "p_change_type",
|
package/util.js
CHANGED
@@ -793,8 +793,8 @@ const Util = {
|
|
793
793
|
{"name": "名称"},
|
794
794
|
{"name": "PE", "title": "市盈率(Price Earnings Ratio)", "table_sort": 1},
|
795
795
|
{"name": "总市值", "table_sort": 1},
|
796
|
-
{"name": "行业"},
|
797
|
-
{"name": "地区"},
|
796
|
+
{"name": "行业", "select_id": "stock_category_industry"},
|
797
|
+
{"name": "地区", "select_id": "stock_category_area"},
|
798
798
|
{"name": "当前价", "table_sort": 1},
|
799
799
|
{"name": "最高价"},
|
800
800
|
{"name": "最低价"},
|
@@ -805,7 +805,7 @@ const Util = {
|
|
805
805
|
head_cols.push({"name": "成交金额", "table_sort": 1});
|
806
806
|
head_cols.push({"name": "成交均价", "table_sort": 1});
|
807
807
|
head_cols.push({"name": "股东数", "table_sort": 1});
|
808
|
-
head_cols.push({"name": "备注", "id": "
|
808
|
+
head_cols.push({"name": "备注", "id": "stock_category_remark_title"});
|
809
809
|
}
|
810
810
|
let table_options = {
|
811
811
|
"element_id": table_id,
|
@@ -816,30 +816,14 @@ const Util = {
|
|
816
816
|
table_options["alert"] = alert_tips;
|
817
817
|
}
|
818
818
|
Util.init_table_skeleton(table_options);
|
819
|
+
Util["stock_category_table_id"] = table_id;
|
819
820
|
Util.post(location.pathname, {active_div: stock_category}, function (j) {
|
820
|
-
|
821
|
-
|
822
|
-
j["data"].
|
823
|
-
|
824
|
-
_html.push("<tr>");
|
825
|
-
item["code"] = item["code"].toLowerCase();
|
826
|
-
_html = Util.stock_basics_html(_html, item);
|
827
|
-
_html.push("<td id='high_", item["code"], "'>0</td>");
|
828
|
-
_html.push("<td id='low_", item["code"], "'>0</td>");
|
829
|
-
_html.push("<td data-val='", item["year_price"], "' class='year_price_", item["code"], "'>--</td>");
|
830
|
-
_html.push("<td class='high_52week_", item["code"], "'>--</td>");
|
831
|
-
if (stock_category !== "us") {
|
832
|
-
_html.push("<td id='amount_", item["code"], "'>--</td>");
|
833
|
-
_html.push("<td id='average_", item["code"], "'>--</td>");
|
834
|
-
_html.push("<td class='holder_", item["code"], "'>--</td>");
|
835
|
-
_html.push("<td id='remark_", item["code"], "'></td>");
|
836
|
-
}
|
837
|
-
_html.push("</tr>");
|
838
|
-
});
|
839
|
-
Util.render_table_html(table_id + "_body", _html);
|
840
|
-
$("#" + table_id + "_body_tips").html('共 <span class="label label-info">' + total_num + '</span> 家');
|
821
|
+
Util["stock_category_data"] = j["data"];
|
822
|
+
Util.render_type_option($("#stock_category_industry"), j["data"], "industry", Util.render_stock_category_html);
|
823
|
+
Util.render_type_option($("#stock_category_area"), j["data"], "area", Util.render_stock_category_html);
|
824
|
+
Util.render_stock_category_html();
|
841
825
|
if (j["concept_url"]) {
|
842
|
-
$("#
|
826
|
+
$("#stock_category_remark_title").html(Util.pack_html_link(j["concept_url"], "备注<i class='glyphicon glyphicon-link'></i>"));
|
843
827
|
}
|
844
828
|
Util.hide_tips();
|
845
829
|
let index_list = j["index_list"] ? j["index_list"] : [];
|
@@ -848,6 +832,39 @@ const Util = {
|
|
848
832
|
});
|
849
833
|
},
|
850
834
|
|
835
|
+
render_stock_category_html: function() {
|
836
|
+
if (Util["stock_category_table_id"]) {
|
837
|
+
let _html = [];
|
838
|
+
let total_num = 0;
|
839
|
+
if (Util["stock_category_data"]) {
|
840
|
+
let industry = $("#stock_category_industry").val();
|
841
|
+
let area = $("#stock_category_area").val();
|
842
|
+
let is_us = $("#stock_category_remark_title").length === 0 ? 1 : 0;
|
843
|
+
Util["stock_category_data"].forEach(function (item) {
|
844
|
+
if (Util.is_industry_area(item, industry, area)) {
|
845
|
+
total_num++;
|
846
|
+
_html.push("<tr>");
|
847
|
+
item["code"] = item["code"].toLowerCase();
|
848
|
+
_html = Util.stock_basics_html(_html, item);
|
849
|
+
_html.push("<td id='high_", item["code"], "'>0</td>");
|
850
|
+
_html.push("<td id='low_", item["code"], "'>0</td>");
|
851
|
+
_html.push("<td data-val='", item["year_price"], "' class='year_price_", item["code"], "'>--</td>");
|
852
|
+
_html.push("<td class='high_52week_", item["code"], "'>--</td>");
|
853
|
+
if (is_us === 0) {
|
854
|
+
_html.push("<td id='amount_", item["code"], "'>--</td>");
|
855
|
+
_html.push("<td id='average_", item["code"], "'>--</td>");
|
856
|
+
_html.push("<td class='holder_", item["code"], "'>--</td>");
|
857
|
+
_html.push("<td id='remark_", item["code"], "'></td>");
|
858
|
+
}
|
859
|
+
_html.push("</tr>");
|
860
|
+
}
|
861
|
+
});
|
862
|
+
}
|
863
|
+
Util.render_table_html(Util["stock_category_table_id"] + "_body", _html);
|
864
|
+
$("#" + Util["stock_category_table_id"] + "_body_tips").html('共 <span class="label label-info">' + total_num + '</span> 家');
|
865
|
+
}
|
866
|
+
},
|
867
|
+
|
851
868
|
/**
|
852
869
|
* 初始公募基金组件
|
853
870
|
* @param component_id
|
@@ -882,7 +899,14 @@ const Util = {
|
|
882
899
|
let _html = [];
|
883
900
|
if (j["fund_code"]) {
|
884
901
|
$("#" + component_id + "_title").html(Util.pack_html_link("http://fundf10.eastmoney.com/jbgk_" + j["fund_code"] + ".html", j["fund_name"]));
|
885
|
-
let net =
|
902
|
+
let net = "--";
|
903
|
+
if (j["net"] > 0) {
|
904
|
+
net = j["net"];
|
905
|
+
let net_cls = Util.text_color(j["change_percent"])
|
906
|
+
if (net_cls !== "") {
|
907
|
+
net = "<b class='" + net_cls + "'>" + net + "(" + Util.to_float(j["change_percent"], 2) + "%)</b>";
|
908
|
+
}
|
909
|
+
}
|
886
910
|
let assets = j["assets"] > 0 ? (j["assets"] + "亿") : "--";
|
887
911
|
let public_date = j["public_date"] > 0 ? Util.seconds_to_format(j["public_date"], "%Y-%m-%d") : "--";
|
888
912
|
let issue_date = j["issue_date"] > 0 ? Util.seconds_to_format(j["issue_date"], "%Y-%m-%d") : "--";
|
@@ -2112,7 +2136,7 @@ const Util = {
|
|
2112
2136
|
pack_holder_num: function (item) {
|
2113
2137
|
if (item["holder_num"] && item["holder_num"] > 0) {
|
2114
2138
|
let url = Util.get_url("holder_num") + "?code=" + item["code"];
|
2115
|
-
|
2139
|
+
let pre_holder_num = item["pre_holder_num"] ? item["pre_holder_num"] : 0;
|
2116
2140
|
return Util.pack_html_link(url, Util.digit_compare_trend(item["holder_num"], pre_holder_num));
|
2117
2141
|
}
|
2118
2142
|
return "--";
|
@@ -2274,7 +2298,7 @@ const Util = {
|
|
2274
2298
|
html.push('<option value="">', obj.children('option').eq(0).text(), '</option>');
|
2275
2299
|
}
|
2276
2300
|
$.each(option_data, function (val, val_num) {
|
2277
|
-
html.push('<option value="', val, '">', (val.substr(0,
|
2301
|
+
html.push('<option value="', val, '">', (val.substr(0, 6)), '(', val_num, ')</option>');
|
2278
2302
|
});
|
2279
2303
|
obj.html(html.join(""));
|
2280
2304
|
obj.change(function () {
|
package/.npmignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
sbd-npm.md
|