sbd-npm 1.5.57 → 1.5.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/util.js +15 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.5.57",
3
+ "version": "1.5.58",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/util.js CHANGED
@@ -629,14 +629,13 @@ const Util = {
629
629
  html.push("<td class='hk_industry'>", item.industry, "</td>");
630
630
  html.push("<td>", Util.map_url(item.province_city), "</td>");
631
631
  html.push("<td>", Util.to_float((item.pe_ttm ? item.pe_ttm : item.pe), 2), "</td>");
632
- html.push("<td>", Util.to_float(item.pb, 2), "</td>");
633
- html.push("<td>", Util.to_float(item.total_shares, 2), "亿</td>");
634
632
  html.push("<td>", Util.to_float(item.market_capital, 3), "亿</td>");
635
633
  html.push("<td class='price_", item.code, "'>", item.price, "</td>");
636
634
  html.push("<td>", Util.year_price_rate(item.price, item.year_price), "</td>");
637
635
  html.push("<td>", Util.year_price_rate(item.price, item.d5_price), "</td>");
638
636
  html.push("<td>", Util.digit_compare_trend(item.high_52week, item.price), "</td>");
639
637
  html.push("<td>", Util.digit_compare_trend(item.low_52week, item.price), "</td>");
638
+ html.push("<td>", Util.pack_fund_num(item), "</td>");
640
639
  return html;
641
640
  },
642
641
 
@@ -3357,15 +3356,21 @@ const Util = {
3357
3356
  */
3358
3357
  pack_fund_num: function (item) {
3359
3358
  let fund_info = "--";
3360
- if (item.cur_fund_num && item.cur_fund_num > 0) {
3361
- if (item.pre_fund_num && item.pre_fund_num > 0) {
3362
- fund_info = Util.digit_compare_trend(item.cur_fund_num, item.pre_fund_num);
3363
- } else {
3364
- fund_info = item.cur_fund_num;
3359
+ if (item.code && Util.is_hk(item.code)) {
3360
+ if (item.snowball_follower) {
3361
+ return item.snowball_follower;
3362
+ }
3363
+ } else {
3364
+ if (item.cur_fund_num && item.cur_fund_num > 0) {
3365
+ if (item.pre_fund_num && item.pre_fund_num > 0) {
3366
+ fund_info = Util.digit_compare_trend(item.cur_fund_num, item.pre_fund_num);
3367
+ } else {
3368
+ fund_info = item.cur_fund_num;
3369
+ }
3370
+ }
3371
+ if (item.code && Util.is_cn(item.code)) {
3372
+ return Util.pack_html_link("/stock/" + item.code + "?tab=public_fund", fund_info);
3365
3373
  }
3366
- }
3367
- if (item.code && Util.is_cn(item.code)) {
3368
- return Util.pack_html_link("/stock/" + item.code + "?tab=public_fund", fund_info);
3369
3374
  }
3370
3375
  return fund_info;
3371
3376
  },