sbd-npm 1.5.27 → 1.5.28

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/stock_basics.js +9 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.5.27",
3
+ "version": "1.5.28",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/stock_basics.js CHANGED
@@ -503,7 +503,7 @@ let Stock = {
503
503
  payload.date = date;
504
504
  }
505
505
  Util.post("/stock/" + Stock.code, payload, function (j) {
506
- let main_html = [], circulation_html = [];
506
+ let main_html = [], circulation_html = [], main_ratio = 0, circulation_ratio = 0;
507
507
  let main_volume = 0, pre_main_volume = 0, circulation_volume = 0, pre_circulation_volume = 0;
508
508
  j.data.forEach(function (item) {
509
509
  let change = item.change;
@@ -518,6 +518,7 @@ let Stock = {
518
518
  }
519
519
  if (parseInt(item.type) === 1) {
520
520
  main_volume += item.volume;
521
+ main_ratio += item.holder_ratio;
521
522
  main_html.push("<tr>");
522
523
  main_html.push("<td>", item.rank, "</td>");
523
524
  main_html.push("<td>", item.holder_name, "</td>");
@@ -528,6 +529,7 @@ let Stock = {
528
529
  main_html.push("</tr>");
529
530
  } else {
530
531
  circulation_volume += item.volume;
532
+ circulation_ratio += item.holder_ratio;
531
533
  circulation_html.push("<tr>");
532
534
  circulation_html.push("<td>", item.rank, "</td>");
533
535
  circulation_html.push("<td>", item.holder_name, "</td>");
@@ -547,21 +549,21 @@ let Stock = {
547
549
  });
548
550
  let circulation_tips = "", main_tips = "";
549
551
  if (circulation_volume > 0) {
550
- circulation_tips += " [ 当前十大流通股东总持股数: <span class='label label-info'>" + Util.to_unit(circulation_volume, 3) + "</span>";
552
+ circulation_tips += "[十大流通股东总持股数: <span class='label label-info'>" + Util.to_unit(circulation_volume, 3) + "股</span>(总占流比:<b class='text-primary'>" + circulation_ratio + "%</b>)";
551
553
  if (pre_circulation_volume > 0) {
552
- circulation_tips += ", 上一季度是: <span class='label label-info'>" + Util.to_unit(pre_circulation_volume, 3) + "</span>,";
553
- circulation_tips += " 持股数环比: " + Util.year_price_rate(circulation_volume, pre_circulation_volume, 1);
554
+ circulation_tips += ",上一季度: <span class='label label-info'>" + Util.to_unit(pre_circulation_volume, 3) + "股</span>,";
555
+ circulation_tips += "持股数环比: " + Util.year_price_rate(circulation_volume, pre_circulation_volume, 1);
554
556
  }
555
557
  if (j.date_price) {
556
558
  circulation_tips += ", 当时价: " + Util.digit_compare_trend1(Stock.price, j.date_price);
557
559
  }
558
- circulation_tips += " ]";
560
+ circulation_tips += "]";
559
561
  }
560
562
  $("#circulation_holder_tips").html(circulation_tips);
561
563
  if (main_volume > 0) {
562
- main_tips += " [ 当前十大主要股东总持股数: <span class='label label-info'>" + Util.to_unit(main_volume, 3) + "</span>";
564
+ main_tips += " [ 当前十大主要股东总持股数: <span class='label label-info'>" + Util.to_unit(main_volume, 3) + "股</span>(总占比:<b class='text-primary'>" + main_ratio + "%</b>)";
563
565
  if (pre_main_volume > 0) {
564
- main_tips += ", 上一季度是: <span class='label label-info'>" + Util.to_unit(pre_main_volume, 3) + "</span>,";
566
+ main_tips += ",上一季度: <span class='label label-info'>" + Util.to_unit(pre_main_volume, 3) + "股</span>,";
565
567
  main_tips += " 持股数环比: " + Util.year_price_rate(main_volume, pre_main_volume, 1);
566
568
  }
567
569
  main_tips += " ]";