sbd-npm 1.4.4 → 1.4.5
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/util.js +12 -3
package/package.json
CHANGED
package/util.js
CHANGED
@@ -1261,7 +1261,7 @@ const Util = {
|
|
1261
1261
|
{"name": "当时股价", "table_sort": 1, "title": "当季最后一个交易日的收盘价"},
|
1262
1262
|
{"name": "持股总数", "table_sort": 1},
|
1263
1263
|
{"name": "持仓基金数", "table_sort": 1},
|
1264
|
-
{"name": "持股进前10的基金数", "table_sort": 1, "title": "
|
1264
|
+
{"name": "持股进前10的基金数", "table_sort": 1, "title": "基金数以持股数占比进前十内的股票来统计"},
|
1265
1265
|
{"name": "持仓市值", "table_sort": 1, "title": "当时股价 * 持股总数"},
|
1266
1266
|
]
|
1267
1267
|
});
|
@@ -1273,7 +1273,7 @@ const Util = {
|
|
1273
1273
|
}
|
1274
1274
|
Util.post("/stock/" + code, {action: "public_fund_change"}, function (j) {
|
1275
1275
|
Util["pfc_stock_chart"].hideLoading();
|
1276
|
-
let date_data = [], fund_num_data = [], stock_num_data = [], price_data = [], _html = [], is_fund10_num = 0;
|
1276
|
+
let date_data = [], fund_num_data = [], stock_num_data = [], value_data = [], price_data = [], _html = [], is_fund10_num = 0;
|
1277
1277
|
if ($("#is_fund10_num").length > 0) {
|
1278
1278
|
is_fund10_num = $("#is_fund10_num").prop("checked") ? 1 : 0;
|
1279
1279
|
}
|
@@ -1286,6 +1286,8 @@ const Util = {
|
|
1286
1286
|
fund_num_data.push(item["fund_num"]);
|
1287
1287
|
}
|
1288
1288
|
stock_num_data.push(item["stock_num"]);
|
1289
|
+
let hold_value = Util.to_hundred_million(item["hold_value"], 3);
|
1290
|
+
value_data.push(hold_value);
|
1289
1291
|
price_data.push(item["price"]);
|
1290
1292
|
_html.push("<tr>");
|
1291
1293
|
_html.push("<td>", Util.pack_html_link("https://data.eastmoney.com/zlsj/detail/" + date_format + "-1-" + code + ".html", date_format), "</td>");
|
@@ -1309,15 +1311,17 @@ const Util = {
|
|
1309
1311
|
fund_rank_num_rate = "(" + Util.year_price_rate(item["fund_rank_num"], item["pre_fund_rank_num"], 1) + ")";
|
1310
1312
|
}
|
1311
1313
|
_html.push("<td data-val='", item["fund_rank_num"], "'>", item["fund_rank_num"], fund_rank_num_rate, "</td>");
|
1312
|
-
_html.push("<td data-val='", item["hold_value"], "' title='", item["hold_value"], "'>",
|
1314
|
+
_html.push("<td data-val='", item["hold_value"], "' title='", item["hold_value"], "'>", hold_value, "亿</td>");
|
1313
1315
|
_html.push("</tr>");
|
1314
1316
|
});
|
1315
1317
|
date_data = date_data.reverse();
|
1316
1318
|
fund_num_data = fund_num_data.reverse();
|
1317
1319
|
stock_num_data = stock_num_data.reverse();
|
1320
|
+
value_data = value_data.reverse();
|
1318
1321
|
price_data = price_data.reverse();
|
1319
1322
|
Util["pfc_stock_chart"] = Util.multi_axis_line(Util["pfc_stock_chart"], "pfc_stock_line_canvas", date_data, '总持股数', stock_num_data, '股价', price_data);
|
1320
1323
|
Util["pfc_fund_chart"] = Util.multi_axis_line(Util["pfc_fund_chart"], "pfc_fund_line_canvas", date_data, '持仓家数', fund_num_data, '股价', price_data);
|
1324
|
+
Util["pfc_value_chart"] = Util.multi_axis_line(Util["pfc_value_chart"], "pfc_value_line_canvas", date_data, '持仓市值', value_data, '股价', price_data);
|
1321
1325
|
if (j["data"].length > 1) {
|
1322
1326
|
let cur_stock_num = j["data"][0]["stock_num"];
|
1323
1327
|
let pre_stock_num = j["data"][1]["stock_num"];
|
@@ -1329,6 +1333,11 @@ const Util = {
|
|
1329
1333
|
if (cur_fund_num > 0 && pre_fund_num > 0) {
|
1330
1334
|
$("#pfc_fund_tips").html("(当前基金数: <b class='text-info'>" + cur_fund_num + "</b>, 环比: " + Util.year_price_rate(cur_fund_num, pre_fund_num) + ")");
|
1331
1335
|
}
|
1336
|
+
let cur_value_num = j["data"][0]["hold_value"];
|
1337
|
+
let pre_value_num = j["data"][1]["hold_value"];
|
1338
|
+
if (cur_value_num > 0 && pre_value_num > 0) {
|
1339
|
+
$("#pfc_value_tips").html("(当前持仓市值: <b class='text-info'>" + Util.to_unit(cur_value_num) + "</b>, 环比: " + Util.year_price_rate(cur_value_num, pre_value_num) + ")");
|
1340
|
+
}
|
1332
1341
|
}
|
1333
1342
|
Util.render_table_html("pfc_fund_table_body", _html);
|
1334
1343
|
Util.hide_tips();
|