sbd-npm 1.1.64 → 1.1.65

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 (3) hide show
  1. package/.npmignore +1 -0
  2. package/package.json +1 -1
  3. package/util.js +4 -3
package/.npmignore ADDED
@@ -0,0 +1 @@
1
+ sbd-npm.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.1.64",
3
+ "version": "1.1.65",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1852,7 +1852,7 @@ const Util = {
1852
1852
  Util.post("/action", {action: "code_detail", code_list: code_list.join("-")}, function (j) {
1853
1853
  $.each(j, function (code, item) {
1854
1854
  Util.render_price(item);
1855
- if (item["holder_num"] && item["holder_num"] > 0 && item["pre_holder_num"]) {
1855
+ if (item["holder_num"] && item["holder_num"] > 0) {
1856
1856
  $(".holder_" + code).each(function () {
1857
1857
  $(this).html(Util.pack_holder_num(item));
1858
1858
  });
@@ -2110,9 +2110,10 @@ const Util = {
2110
2110
  * @returns {string}
2111
2111
  */
2112
2112
  pack_holder_num: function (item) {
2113
- if (item["holder_num"] && item["holder_num"] > 0 && item["pre_holder_num"]) {
2113
+ if (item["holder_num"] && item["holder_num"] > 0) {
2114
2114
  let url = Util.get_url("holder_num") + "?code=" + item["code"];
2115
- return Util.pack_html_link(url, Util.digit_compare_trend(item["holder_num"], item["pre_holder_num"]));
2115
+ le pre_holder_num = item["pre_holder_num"] ? item["pre_holder_num"] : 0;
2116
+ return Util.pack_html_link(url, Util.digit_compare_trend(item["holder_num"], pre_holder_num));
2116
2117
  }
2117
2118
  return "--";
2118
2119
  },