sbd-npm 1.5.58 → 1.5.59

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 +12 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.5.58",
3
+ "version": "1.5.59",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/util.js CHANGED
@@ -635,7 +635,7 @@ const Util = {
635
635
  html.push("<td>", Util.year_price_rate(item.price, item.d5_price), "</td>");
636
636
  html.push("<td>", Util.digit_compare_trend(item.high_52week, item.price), "</td>");
637
637
  html.push("<td>", Util.digit_compare_trend(item.low_52week, item.price), "</td>");
638
- html.push("<td>", Util.pack_fund_num(item), "</td>");
638
+ html.push("<td>", Util.pack_holder_num(item), "</td>");
639
639
  return html;
640
640
  },
641
641
 
@@ -3336,6 +3336,9 @@ const Util = {
3336
3336
  */
3337
3337
  pack_holder_num: function (item) {
3338
3338
  let holder_info = "--";
3339
+ if (item.snowball_follower && item.code && Util.is_hk(item.code)) {
3340
+ return item.snowball_follower;
3341
+ }
3339
3342
  if (item.holder_num && item.holder_num > 0) {
3340
3343
  if (item.pre_holder_num && item.pre_holder_num > 0) {
3341
3344
  holder_info = Util.digit_compare_trend(item.holder_num, item.pre_holder_num);
@@ -3356,22 +3359,16 @@ const Util = {
3356
3359
  */
3357
3360
  pack_fund_num: function (item) {
3358
3361
  let fund_info = "--";
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);
3362
+ if (item.cur_fund_num && item.cur_fund_num > 0) {
3363
+ if (item.pre_fund_num && item.pre_fund_num > 0) {
3364
+ fund_info = Util.digit_compare_trend(item.cur_fund_num, item.pre_fund_num);
3365
+ } else {
3366
+ fund_info = item.cur_fund_num;
3373
3367
  }
3374
3368
  }
3369
+ if (item.code && Util.is_cn(item.code)) {
3370
+ return Util.pack_html_link("/stock/" + item.code + "?tab=public_fund", fund_info);
3371
+ }
3375
3372
  return fund_info;
3376
3373
  },
3377
3374