sbd-npm 1.2.33 → 1.2.36

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
@@ -239,7 +239,9 @@ const ClassifyList = [
239
239
  '中证500',
240
240
  '中证100',
241
241
  '科创50',
242
- '科创',
242
+ '上证',
243
+ '深证',
244
+ '科创板',
243
245
  '中小板',
244
246
  '创业板',
245
247
  '创业板50',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.33",
3
+ "version": "1.2.36",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/summary_daily.js CHANGED
@@ -581,8 +581,7 @@ $(document).ready(function () {
581
581
  render_news_modal: function () {
582
582
  Util.show_loading();
583
583
  Util.post(location.pathname, {action: "pbc_news"}, function (j) {
584
- let _html = [];
585
- let index = 0;
584
+ let _html = [], index = 0;
586
585
  j["data"].forEach(function (item) {
587
586
  index++;
588
587
  _html.push("<tr title='", item["content"], "'>");
package/util.js CHANGED
@@ -25,6 +25,7 @@ const Util = {
25
25
  load_token: "loading_div",
26
26
  interval_timer: null,
27
27
  stock_timer_id: 0,
28
+ is_init: 0,
28
29
  // 1年的天数
29
30
  one_year_day: 365,
30
31
  // 一天的秒数
@@ -486,7 +487,7 @@ const Util = {
486
487
  * @param code
487
488
  * @returns {*}
488
489
  */
489
- us_logo_html: function(code) {
490
+ us_logo_html: function (code) {
490
491
  code = code.toUpperCase();
491
492
  let logo_url = "https://storage.googleapis.com/iex/api/logos/" + code + ".png";
492
493
  return '<a rel="noopener noreferrer nofollow" href="' + logo_url + '" target="_blank"><img alt="' + code + '" width="20px" src="' + logo_url + '"/><a>';
@@ -990,23 +991,23 @@ const Util = {
990
991
  let assets = j["assets"] > 0 ? (j["assets"] + "亿") : "--";
991
992
  let public_date = j["public_date"] > 0 ? Util.seconds_to_format(j["public_date"], "%Y-%m-%d") : "--";
992
993
  let issue_date = j["issue_date"] > 0 ? Util.seconds_to_format(j["issue_date"], "%Y-%m-%d") : "--";
993
- _html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j["update_time"], "%Y-%m-%d"), "' class='info'><th colspan='12' text-align='center'>基金概况</th></tr>");
994
- _html.push("<tr><td colspan='3'>基金代码</td><td colspan='3'>", Util.pack_html_link('https://fund.eastmoney.com/' + j["fund_code"] + '.html', j["fund_code"]), "</td><td colspan='2'>基金名</td><td colspan='4'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j["fund_code"] + '.html', j["fund_name"]), "</td></tr>");
995
- _html.push("<tr><td colspan='3'>基金类型</td><td colspan='3'>", j["fund_type"], "</td><td colspan='2'>投资类型</td><td colspan='4'>", j["invest_type"], "</td></tr>");
996
- _html.push("<tr><td colspan='3'>单位净值</td><td colspan='3'>", net, "</td><td colspan='2'>资产规模</td><td colspan='4'>", assets, "</td></tr>");
997
- _html.push("<tr><td colspan='3'>成立日期</td><td colspan='3'>", public_date, "</td><td colspan='2'>发行日期</td><td colspan='4'>", issue_date, "</td></tr>");
998
- _html.push("<tr><td colspan='3'>基金管理公司</td><td colspan='3'>", j["administrator"], "</td><td colspan='2'>基金经理</td><td colspan='4'>", j["managers"], "</td></tr>");
999
- _html.push("<tr><td colspan='4'>基金托管人</td><td colspan='8'>", j["custodian"], "</td></tr>");
1000
- _html.push("<tr><td colspan='4'>经办律师事务所</td><td colspan='8'>", j["lawyer"], "</td></tr>");
1001
- _html.push("<tr><td colspan='4'>会计师事务所</td><td colspan='8'>", j["accounting"], "</td></tr>");
1002
- _html.push("<tr><td colspan='4'>注册地址</td><td colspan='8'>", Util.map_url(j["location"], j["location"]), "</td></tr>");
994
+ _html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j["update_time"], "%Y-%m-%d"), "' class='info'><th colspan='14' text-align='center'>基金概况</th></tr>");
995
+ _html.push("<tr><td colspan='3'>基金代码</td><td colspan='4'>", Util.pack_html_link('https://fund.eastmoney.com/' + j["fund_code"] + '.html', 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>");
996
+ _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>");
997
+ _html.push("<tr><td colspan='3'>单位净值</td><td colspan='4'>", net, "</td><td colspan='3'>资产规模</td><td colspan='4'>", assets, "</td></tr>");
998
+ _html.push("<tr><td colspan='3'>成立日期</td><td colspan='4'>", public_date, "</td><td colspan='3'>发行日期</td><td colspan='4'>", issue_date, "</td></tr>");
999
+ _html.push("<tr><td colspan='3'>基金管理公司</td><td colspan='4'>", j["administrator"], "</td><td colspan='3'>基金经理</td><td colspan='4'>", j["managers"], "</td></tr>");
1000
+ _html.push("<tr><td colspan='5'>基金托管人</td><td colspan='9'>", (j["custodian"] ? j["custodian"] : "--"), "</td></tr>");
1001
+ _html.push("<tr><td colspan='5'>经办律师事务所</td><td colspan='9'>", (j["lawyer"] ? j["lawyer"] : "--"), "</td></tr>");
1002
+ _html.push("<tr><td colspan='5'>会计师事务所</td><td colspan='9'>", (j["accounting"] ? j["accounting"] : "--"), "</td></tr>");
1003
+ _html.push("<tr><td colspan='5'>注册地址</td><td colspan='9'>", Util.map_url(j["location"], j["location"]), "</td></tr>");
1003
1004
  let fund_stock_url = "https://fund.eastmoney.com/" + j["fund_code"] + ".html";
1004
1005
  if (j["type"] === 2) {
1005
1006
  fund_stock_url = "http://fund.eastmoney.com/f10/ccmx_" + j["fund_code"] + ".html";
1006
1007
  }
1007
- _html.push("<tr class='info'><th colspan='12' text-align='center'>", Util.pack_html_link(fund_stock_url, "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
1008
- _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>持有量</th><th>占比</th><th>持仓市值</th></tr>");
1009
- _html.push("<tr class='" + component_id + "_tr'><td colspan='12'>暂无数据</td></tr>");
1008
+ _html.push("<tr class='info'><th colspan='14' text-align='center'>", Util.pack_html_link(fund_stock_url, "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
1009
+ _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>占比</th><th>持仓市值</th></tr>");
1010
+ _html.push("<tr class='" + component_id + "_tr'><td colspan='14'>暂无数据</td></tr>");
1010
1011
  Util.render_table_html(component_id + "_body_body", _html);
1011
1012
  if (j["date_list"]) {
1012
1013
  _html = [];
@@ -1023,7 +1024,7 @@ const Util = {
1023
1024
  Util.fetch_public_fund_stock(j["fund_code"], fsd_obj.val(), component_id);
1024
1025
  }
1025
1026
  } else {
1026
- _html.push("<tr><td colspan='11'>暂无数据</td></tr>");
1027
+ _html.push("<tr><td colspan='14'>暂无数据</td></tr>");
1027
1028
  Util.render_table_html(component_id + "_body_body", _html);
1028
1029
  }
1029
1030
  });
@@ -1063,7 +1064,9 @@ const Util = {
1063
1064
  _html.push("<tr class='" + component_tr + "'>");
1064
1065
  _html.push("<td>", index + 1, "</td>");
1065
1066
  _html = Util.stock_basics_html(_html, item);
1066
- _html.push("<td class='year_price_", item["code"], "'>", (item["stock_price"] ? Util.year_price_rate(item["stock_price"], item["year_price"]) : "--"), "</td>");
1067
+ _html.push("<td>", Util.year_price_rate(item["stock_price"], item["year_price"]), "</td>");
1068
+ _html.push("<td>", Util.year_price_rate(item["stock_price"], item["d5_price"]), "</td>");
1069
+ _html.push("<td>", Util.pack_holder_num(item), "</td>");
1067
1070
  let stock_num_tips = "";
1068
1071
  if (item["stock_num"] > 0 && item["pre_stock_num"] > 0) {
1069
1072
  let gap_stock_num = item["stock_num"] - item["pre_stock_num"];
@@ -1085,7 +1088,7 @@ const Util = {
1085
1088
  _html.push("</tr>");
1086
1089
  });
1087
1090
  } else {
1088
- _html.push("<tr class='" + component_tr + "'><td colspan='12'>暂无数据</td></tr>");
1091
+ _html.push("<tr class='" + component_tr + "'><td colspan='14'>暂无数据</td></tr>");
1089
1092
  }
1090
1093
  $(_html.join("")).insertAfter("#" + component_id + "_head");
1091
1094
  Util.hide_tips();