sbd-npm 1.4.1 → 1.4.3

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/constant.js CHANGED
@@ -201,6 +201,7 @@ const MenuList = [
201
201
  {'key': 'us_qqq', 'name': '纳斯达克100', 'url': '/0xcab775d9229a1e5ab101fcf9971ee8246ab539bf'},
202
202
  {'key': 'us_cn', 'name': '中国概念股', 'url': '/0x50b6fa90ffcfb88a735215c583c60392818f5265'},
203
203
  {'key': 'us_buffett', 'name': '巴菲特持仓', 'url': '/0xe51dc830e90a6ca5bbae5d867ebd69d57aa85208'},
204
+ {'key': 'us_biotechnology', 'name': '生物科技', 'url': '/0x88bee1b829887f7c2fbfeea7a3c60c330d477f62'},
204
205
  {'key': 'us_dollar_index', 'name': '美元指数', 'url': '/0x99533982f67f489dce7c0738c2e2a94239e35cde'},
205
206
  {'key': 'us_bond_yield', 'name': '美十年国债收益率', 'url': '/0xdf01c6a366340dce84867ca34e7dd6fc6ed5e631'},
206
207
  {'key': 'us_usd_cnh', 'name': '美元离岸人民币汇率', 'url': '/0x6010e54df39e6e00b255d6271d9972fb8c9faf11'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -851,10 +851,10 @@ let Stock = {
851
851
  $("#notice_url").attr("href", "https://vip.stock.finance.sina.com.cn/corp/view/vCB_BulletinGather.php?stock_str=" + symbol);
852
852
  Util.post("/stock/" + Stock["code"], {action: "notice"}, function (j) {
853
853
  let _html = [];
854
- j["data"].forEach(function (item, i) {
854
+ j["data"].forEach(function (item, index) {
855
855
  _html.push("<tr title='", item["title"], "'>");
856
- _html.push("<td>", i + 1, "</td>");
857
- _html.push("<td><a target='_blank' rel='noopener noreferrer nofollow' href='", item["url"], "'>", Util.sub_str(item["title"], 70), "</a></td>");
856
+ _html.push("<td>", (index + 1), "</td>");
857
+ _html.push("<td>", Util.pack_html_link(item["url"], Util.sub_str(item["title"], 70)), "</td>");
858
858
  _html.push("<td>", Util.seconds_to_format(item["date"], "%Y-%m-%d"), "</td>");
859
859
  _html.push("</tr>");
860
860
  });
package/util.js CHANGED
@@ -1117,7 +1117,7 @@ const Util = {
1117
1117
  {"name": "资产规模", "table_sort": 1},
1118
1118
  {"name": "基金类型"},
1119
1119
  {"name": "投资类型"},
1120
- {"name": "基金公司"},
1120
+ {"name": "基金经理"},
1121
1121
  {"name": "成立日期", "table_sort": 1},
1122
1122
  {"name": "持有量", "table_sort": 1, "class": "info"},
1123
1123
  {"name": "持仓市值", "table_sort": 1},
@@ -1209,7 +1209,7 @@ const Util = {
1209
1209
  _html.push("<td>", item["assets"], "亿</td>");
1210
1210
  _html.push("<td>", item["fund_type"], "</td>");
1211
1211
  _html.push("<td>", item["invest_type"], "</td>");
1212
- _html.push("<td>", Util.pack_fund_administrator(item), "</td>");
1212
+ _html.push("<td>", Util.pack_fund_manager(item), "</td>");
1213
1213
  _html.push("<td>", public_date, "</td>");
1214
1214
  _html.push("<td data-val='", item["stock_num"], "' title='", item["stock_num"], "'>", Util.to_unit(item["stock_num"], 3), "股</td>");
1215
1215
  _html.push("<td data-val='", item["market_capital"], "' title='", item["market_capital"], "'>", Util.to_unit(item["market_capital"], 3), "</td>");
@@ -1492,7 +1492,7 @@ const Util = {
1492
1492
  let assets = j["assets"] > 0 ? (j["assets"] + "亿") : "--";
1493
1493
  let public_date = j["public_date"] > 0 ? Util.seconds_to_format(j["public_date"], "%Y-%m-%d") : "--";
1494
1494
  let issue_date = j["issue_date"] > 0 ? Util.seconds_to_format(j["issue_date"], "%Y-%m-%d") : "--";
1495
- _html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j["update_time"], "%Y-%m-%d"), "' class='info'><th colspan='14' text-align='center'>基金概况</th></tr>");
1495
+ _html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j["update_time"], "%Y-%m-%d"), "' class='info'><th colspan='14' style='text-align: center;'>基金概况</th></tr>");
1496
1496
  _html.push("<tr><td colspan='3'>基金代码</td><td colspan='4'>", Util.pack_html_link('https://xueqiu.com/S/' + Util.code_to_fund_symbol(j["fund_code"]), j["fund_code"]), "</td><td colspan='3'>基金名</td><td colspan='4'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j["fund_code"] + '.html', j["fund_name"]), "</td></tr>");
1497
1497
  _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>");
1498
1498
  _html.push("<tr><td colspan='3'>单位净值</td><td colspan='4'>", net, "</td><td colspan='3'>资产规模</td><td colspan='4'>", assets, "</td></tr>");
@@ -1503,7 +1503,7 @@ const Util = {
1503
1503
  _html.push("<tr><td colspan='3'>近一周</td><td colspan='4'>", Util.parse_ratio(j["one_week_change"]), "</td><td colspan='3'>近一月</td><td colspan='4'>", Util.parse_ratio(j["one_month_change"]), "</td></tr>");
1504
1504
  _html.push("<tr><td colspan='3'>近一年</td><td colspan='4'>", Util.parse_ratio(j["one_year_change"]), "</td><td colspan='3'>年初至今</td><td colspan='4'>", Util.pack_html_link('https://fundf10.eastmoney.com/jdzf_' + j["fund_code"] + '.html', Util.parse_ratio(j["ytd_change"])), "</td></tr>");
1505
1505
  _html.push("<tr><td colspan='5'>成立以来</td><td colspan='9'>", Util.parse_ratio(j["establish_change"]), "</td></tr>");
1506
- _html.push("<tr class='info'><th colspan='14' text-align='center'>", Util.pack_html_link("http://fund.eastmoney.com/f10/ccmx_" + j["fund_code"] + ".html", "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
1506
+ _html.push("<tr class='info'><th colspan='14' style='text-align: center;'>", Util.pack_html_link("http://fund.eastmoney.com/f10/ccmx_" + j["fund_code"] + ".html", "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
1507
1507
  _html.push("<tr id='" + component_id + "_head'><th>序号</th><th>股票代码</th><th>股票名</th><th>PE</th><th>总市值</th><th>行业</th><th>地区</th><th>价格</th><th>年初至今</th><th>近5日</th><th>股东数</th><th>持有量</th><th class='info'>占比</th><th>持仓市值</th></tr>");
1508
1508
  _html.push("<tr class='" + component_id + "_tr'><td colspan='14'>暂无数据</td></tr>");
1509
1509
  Util.render_table_html(component_id + "_body_body", _html);
@@ -3242,8 +3242,14 @@ const Util = {
3242
3242
  */
3243
3243
  pack_fund_manager: function (item) {
3244
3244
  if (item["managers"] && item["managers"] !== "---") {
3245
- let managers = item["managers"].replace(/、/g, " ");
3246
- return Util.pack_html_link("https://www.howbuy.com/search/quicksearch.htm?skey=" + managers, item["managers"]);
3245
+ let html = [];
3246
+ let managers = item["managers"].replace(/、/g, " ").replace(/,/g, " ").split(" ");
3247
+ managers.forEach(function(manager) {
3248
+ if (manager) {
3249
+ html.push(Util.pack_html_link("https://www.howbuy.com/search/quicksearch.htm?skey=" + manager, manager));
3250
+ }
3251
+ });
3252
+ return html.join(" ");
3247
3253
  }
3248
3254
  return "--";
3249
3255
  },