sbd-npm 1.1.15 → 1.1.16

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/package.json +1 -1
  2. package/util.js +5 -5
  3. package/.npmignore +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -247,8 +247,8 @@ let Util = {
247
247
  * @param obj
248
248
  * @param interval 循环间隔
249
249
  */
250
- refresh_price: function (obj, interval = 0) {
251
- let code_list = Util.get_code_list(obj);
250
+ refresh_price: function (element_id, interval = 0) {
251
+ let code_list = Util.get_code_list($("#" + element_id));
252
252
  if (code_list.length > 0) {
253
253
  $.post("/action", {action: "price", code_list: code_list.join("-")}, function (j) {
254
254
  $.each(j, function (code, item) {
@@ -257,7 +257,7 @@ let Util = {
257
257
  if (interval > 0 && Util.is_trade_time()) {
258
258
  interval = parseInt(interval > 4321 ? interval : 4321);
259
259
  setTimeout(function () {
260
- Util.refresh_price(obj, interval);
260
+ Util.refresh_price(element_id, interval);
261
261
  }, interval);
262
262
  }
263
263
  }, "json");
@@ -1145,8 +1145,8 @@ let Util = {
1145
1145
  },
1146
1146
 
1147
1147
  table_sort: function (element_id = "") {
1148
- let css_filter = element_id === "" ? ".table_sort" : ("#" + element_id + " .table_sort");
1149
- $(css_filter).each(function () {
1148
+ let selector = element_id === "" ? ".table_sort" : ("#" + element_id + " .table_sort");
1149
+ $(selector).each(function () {
1150
1150
  let is_append = 0;
1151
1151
  $(this).find("i").each(function () {
1152
1152
  if ($(this).hasClass("fa")) {
package/.npmignore DELETED
@@ -1 +0,0 @@
1
- sbd-npm.md