sbd-npm 1.2.38 → 1.2.41
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/stock_basics.js +10 -8
- package/util.js +22 -3
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -86,6 +86,9 @@ let Stock = {
|
|
86
86
|
Stock.fetch_report_organization();
|
87
87
|
break;
|
88
88
|
case "public_fund":
|
89
|
+
$("#is_fund_ten").click(function () {
|
90
|
+
Stock.fetch_public_fund();
|
91
|
+
});
|
89
92
|
Stock.fetch_public_fund();
|
90
93
|
break;
|
91
94
|
case "public_fund_change":
|
@@ -348,7 +351,7 @@ let Stock = {
|
|
348
351
|
Util.init_table_skeleton({
|
349
352
|
"element_id": "big_deal_summary_table",
|
350
353
|
"head_cols": [
|
351
|
-
{"name": "
|
354
|
+
{"name": "主力总净流入"},
|
352
355
|
{"name": "20日主力净流入"},
|
353
356
|
{"name": "10日主力净流入"},
|
354
357
|
{"name": "5日主力净流入"},
|
@@ -911,14 +914,13 @@ let Stock = {
|
|
911
914
|
{"name": ""},
|
912
915
|
]
|
913
916
|
});
|
914
|
-
|
917
|
+
let payload = {
|
915
918
|
action: "public_fund",
|
916
|
-
public_fund_date: $("#public_fund_date").val()
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
let total_stock_num = 0;
|
921
|
-
let total_market_capital = 0;
|
919
|
+
public_fund_date: $("#public_fund_date").val(),
|
920
|
+
is_fund_ten: $("#is_fund_ten").prop("checked") ? 1 : 0
|
921
|
+
};
|
922
|
+
Util.post("/stock/" + Stock["code"], payload, function (j) {
|
923
|
+
let _html = [], total_public_fund = 0, total_stock_num = 0, total_market_capital = 0;
|
922
924
|
j["data"].forEach(function (item) {
|
923
925
|
total_public_fund++;
|
924
926
|
total_stock_num += item["stock_num"];
|
package/util.js
CHANGED
@@ -876,6 +876,7 @@ const Util = {
|
|
876
876
|
head_cols.push({"name": "成交金额", "table_sort": 1});
|
877
877
|
head_cols.push({"name": "成交均价", "table_sort": 1});
|
878
878
|
head_cols.push({"name": "股东数", "table_sort": 1});
|
879
|
+
head_cols.push({"name": "基金数", "table_sort": 1});
|
879
880
|
head_cols.push({"name": "备注", "id": "stock_category_remark_title"});
|
880
881
|
} else {
|
881
882
|
head_cols.unshift({"name": ""});
|
@@ -930,6 +931,7 @@ const Util = {
|
|
930
931
|
_html.push("<td id='amount_", item["code"], "'>--</td>");
|
931
932
|
_html.push("<td id='average_", item["code"], "'>--</td>");
|
932
933
|
_html.push("<td class='holder_", item["code"], "'>--</td>");
|
934
|
+
_html.push("<td class='fund_", item["code"], "'>--</td>");
|
933
935
|
_html.push("<td id='remark_", item["code"], "'></td>");
|
934
936
|
}
|
935
937
|
_html.push("</tr>");
|
@@ -2092,9 +2094,7 @@ const Util = {
|
|
2092
2094
|
//获取股票详情数据
|
2093
2095
|
Util.post("/action", {action: "code_detail", code_list: code_list.join("-")}, function (j) {
|
2094
2096
|
let valid_code_list = [];
|
2095
|
-
let total_change_percent = 0;
|
2096
|
-
let total_year_change_percent = 0;
|
2097
|
-
let total_d5_change_percent = 0;
|
2097
|
+
let total_change_percent = 0, total_year_change_percent = 0, total_d5_change_percent = 0;
|
2098
2098
|
$.each(j, function (code, item) {
|
2099
2099
|
if (item["price"] && item["previous_price"] && item["price"] > 0 && item["previous_price"] > 0) {
|
2100
2100
|
valid_code_list.push(item["code"]);
|
@@ -2113,6 +2113,12 @@ const Util = {
|
|
2113
2113
|
$(this).attr("data-val", item["holder_num"]);
|
2114
2114
|
});
|
2115
2115
|
}
|
2116
|
+
if (item["cur_fund_num"] && item["cur_fund_num"] > 0) {
|
2117
|
+
$(".fund_" + code).each(function () {
|
2118
|
+
$(this).html(Util.pack_fund_num(item));
|
2119
|
+
$(this).attr("data-val", item["cur_fund_num"]);
|
2120
|
+
});
|
2121
|
+
}
|
2116
2122
|
if (item["money_net_inflow"] && item["money_net_inflow"] !== 0) {
|
2117
2123
|
$(".money_inflow_" + code).each(function () {
|
2118
2124
|
Util.render_money_inflow($(this), item);
|
@@ -2397,6 +2403,19 @@ const Util = {
|
|
2397
2403
|
return "--";
|
2398
2404
|
},
|
2399
2405
|
|
2406
|
+
/**
|
2407
|
+
* 组装基金数据
|
2408
|
+
* @param item
|
2409
|
+
* @returns {string}
|
2410
|
+
*/
|
2411
|
+
pack_fund_num: function (item) {
|
2412
|
+
if (item["cur_fund_num"] && item["cur_fund_num"] > 0) {
|
2413
|
+
let fund_num = Util.digit_compare_trend(item["cur_fund_num"], item["pre_fund_num"]);
|
2414
|
+
return Util.pack_html_link("/stock/" + item["code"] + "?tab=public_fund", fund_num);
|
2415
|
+
}
|
2416
|
+
return "--";
|
2417
|
+
},
|
2418
|
+
|
2400
2419
|
/**
|
2401
2420
|
* 雪球人数关注排名数据
|
2402
2421
|
* @param item
|