sbd-npm 1.3.56 → 1.3.58

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.56",
3
+ "version": "1.3.58",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -86,9 +86,6 @@ 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
- });
92
89
  Stock.fetch_public_fund();
93
90
  break;
94
91
  case "public_fund_change":
@@ -934,7 +931,7 @@ let Stock = {
934
931
  {"name": "资产规模", "table_sort": 1},
935
932
  {"name": "基金类型"},
936
933
  {"name": "投资类型"},
937
- {"name": "基金管理公司"},
934
+ {"name": "基金公司"},
938
935
  {"name": "成立日期", "table_sort": 1},
939
936
  {"name": "持有量", "table_sort": 1, "class": "info"},
940
937
  {"name": "持仓市值", "table_sort": 1},
@@ -943,8 +940,7 @@ let Stock = {
943
940
  });
944
941
  let payload = {
945
942
  action: "public_fund",
946
- public_fund_date: $("#public_fund_date").val(),
947
- is_fund_ten: $("#is_fund_ten").prop("checked") ? 1 : 0
943
+ public_fund_date: $("#public_fund_date").val()
948
944
  };
949
945
  Util.post("/stock/" + Stock["code"], payload, function (j) {
950
946
  let _html = [], total_public_fund = 0, total_stock_num = 0, total_market_capital = 0;
@@ -969,7 +965,7 @@ let Stock = {
969
965
  _html.push("<td>", item["assets"], "亿</td>");
970
966
  _html.push("<td>", item["fund_type"], "</td>");
971
967
  _html.push("<td>", item["invest_type"], "</td>");
972
- _html.push("<td>", item["administrator"], "</td>");
968
+ _html.push("<td>", Util.pack_html_link("https://baike.baidu.com/item/" + item["administrator"].replace("基金管理", "基金"), item["administrator"]), "</td>");
973
969
  _html.push("<td>", public_date, "</td>");
974
970
  _html.push("<td data-val='", item["stock_num"], "' title='", item["stock_num"], "'>", Util.to_unit(item["stock_num"], 3), "股</td>");
975
971
  _html.push("<td data-val='", item["market_capital"], "' title='", item["market_capital"], "'>", Util.to_unit(item["market_capital"], 3), "</td>");
@@ -977,8 +973,15 @@ let Stock = {
977
973
  _html.push("</tr>");
978
974
  });
979
975
  Util.render_table_html("public_fund_table_body", _html);
980
- total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + total_public_fund + '</span>');
981
- $("#public_fund_tips").html('共 ' + total_public_fund + ' 家, <span class="label label-info">' + Util.to_unit(total_stock_num, 3) + '</span> 股,<span class="label label-info">' + Util.to_unit(total_market_capital, 3) + '</span>市值');
976
+ let public_fund_tips = "";
977
+ if (j["cur_fund_num"]) {
978
+ total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + j["cur_fund_num"] + '</span>');
979
+ public_fund_tips = '共 ' + total_public_fund + ' 家(' + Util.year_price_rate(j["cur_fund_num"], j["pre_fund_num"], 1) + '), <span class="label label-info">' + Util.to_unit(j["cur_stock_num"], 3) + '</span> 股(' + Util.year_price_rate(j["cur_stock_num"], j["pre_stock_num"], 1) + '),<span class="label label-info">' + Util.to_unit(j["hold_value"], 3) + '</span>市值';
980
+ } else {
981
+ total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + total_public_fund + '</span>');
982
+ public_fund_tips = '共 ' + total_public_fund + ' 家, <span class="label label-info">' + Util.to_unit(total_stock_num, 3) + '</span> 股,<span class="label label-info">' + Util.to_unit(total_market_capital, 3) + '</span>市值';
983
+ }
984
+ $("#public_fund_tips").html(public_fund_tips);
982
985
  if (j["date"] && j["date"] > 0) {
983
986
  $("#public_fund_title").find("a").each(function() {
984
987
  let t_text = $(this).text();
package/util.js CHANGED
@@ -1219,7 +1219,8 @@ const Util = {
1219
1219
  _html.push("<tr><td colspan='3'>基金类型</td><td colspan='4'>", j["fund_type"], "</td><td colspan='3'>投资类型</td><td colspan='4'>", j["invest_type"], "</td></tr>");
1220
1220
  _html.push("<tr><td colspan='3'>单位净值</td><td colspan='4'>", net, "</td><td colspan='3'>资产规模</td><td colspan='4'>", assets, "</td></tr>");
1221
1221
  _html.push("<tr><td colspan='3'>成立日期</td><td colspan='4'>", public_date, "</td><td colspan='3'>发行日期</td><td colspan='4'>", issue_date, "</td></tr>");
1222
- _html.push("<tr><td colspan='3'>基金管理公司</td><td colspan='4'>", j["administrator"], "</td><td colspan='3'>基金经理</td><td colspan='4'>", j["managers"], "</td></tr>");
1222
+ let administrator = Util.pack_html_link("https://baike.baidu.com/item/" + j["administrator"].replace("基金管理", "基金"), j["administrator"]);
1223
+ _html.push("<tr><td colspan='3'>基金管理公司</td><td colspan='4'>", administrator, "</td><td colspan='3'>基金经理</td><td colspan='4'>", j["managers"], "</td></tr>");
1223
1224
  _html.push("<tr><td colspan='5'>基金托管人</td><td colspan='9'>", (j["custodian"] ? j["custodian"] : "--"), "</td></tr>");
1224
1225
  _html.push("<tr><td colspan='5'>经办律师事务所</td><td colspan='9'>", (j["lawyer"] ? j["lawyer"] : "--"), "</td></tr>");
1225
1226
  _html.push("<tr><td colspan='5'>会计师事务所</td><td colspan='9'>", (j["accounting"] ? j["accounting"] : "--"), "</td></tr>");