sbd-npm 1.3.57 → 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.57",
3
+ "version": "1.3.58",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -965,7 +965,7 @@ let Stock = {
965
965
  _html.push("<td>", item["assets"], "亿</td>");
966
966
  _html.push("<td>", item["fund_type"], "</td>");
967
967
  _html.push("<td>", item["invest_type"], "</td>");
968
- _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>");
969
969
  _html.push("<td>", public_date, "</td>");
970
970
  _html.push("<td data-val='", item["stock_num"], "' title='", item["stock_num"], "'>", Util.to_unit(item["stock_num"], 3), "股</td>");
971
971
  _html.push("<td data-val='", item["market_capital"], "' title='", item["market_capital"], "'>", Util.to_unit(item["market_capital"], 3), "</td>");
@@ -974,10 +974,9 @@ let Stock = {
974
974
  });
975
975
  Util.render_table_html("public_fund_table_body", _html);
976
976
  let public_fund_tips = "";
977
- if (j["statistics"] && j["statistics"]["cur_fund_num"]) {
978
- let sf = j["statistics"];
979
- total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + sf["cur_fund_num"] + '</span>');
980
- public_fund_tips = '共 ' + total_public_fund + ' 家(' + Util.year_price_rate(sf["cur_fund_num"], sf["pre_fund_num"], 1) + '), <span class="label label-info">' + Util.to_unit(total_stock_num, 3) + '</span> 股(' + Util.year_price_rate(sf["cur_stock_num"], sf["pre_stock_num"], 1) + '),<span class="label label-info">' + Util.to_unit(total_market_capital, 3) + '</span>市值';
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>市值';
981
980
  } else {
982
981
  total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + total_public_fund + '</span>');
983
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>市值';
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>");