sbd-npm 1.1.86 → 1.1.87

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 +7 -4
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.86",
3
+ "version": "1.1.87",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1951,13 +1951,16 @@ const Util = {
1951
1951
  valid_code_list.forEach(function (code) {
1952
1952
  code_price_dict[code] = j[code]["price"];
1953
1953
  });
1954
- Util.post("/action", {action: "code_5d_price", code_list: code_list.join("-")}, function (j) {
1954
+ Util.post("/action", {action: "code_d5_price", code_list: code_list.join("-")}, function (j) {
1955
1955
  let total_num = 0;
1956
1956
  let total_week_change_percent = 0;
1957
- $.each(j, function (code, price_5d) {
1958
- if (price_5d > 0 && code_price_dict[code]) {
1957
+ $.each(j, function (code, d5_price) {
1958
+ if (d5_price > 0 && code_price_dict[code]) {
1959
1959
  total_num += 1;
1960
- total_week_change_percent += ((code_price_dict[code] - price_5d) / price_5d);
1960
+ total_week_change_percent += ((code_price_dict[code] - d5_price) / d5_price);
1961
+ $(".d5_price_" + code).each(function () {
1962
+ $(this).html(Util.year_price_rate(code_price_dict[code], d5_price));
1963
+ });
1961
1964
  }
1962
1965
  });
1963
1966
  if (total_num > 0) {