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.
- package/.npmignore +1 -0
- package/package.json +1 -1
- package/util.js +7 -4
package/.npmignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
sbd-npm.md
|
package/package.json
CHANGED
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: "
|
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,
|
1958
|
-
if (
|
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] -
|
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) {
|