sbd-npm 1.3.29 → 1.3.31

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 +8 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.29",
3
+ "version": "1.3.31",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1862,6 +1862,7 @@ const Util = {
1862
1862
  */
1863
1863
  format_to_second: function (format) {
1864
1864
  if (Util.regexp_date_yyyymmdd(format)) {
1865
+ format = format + "";
1865
1866
  let year = format.slice(0, 4);
1866
1867
  let month = format.slice(4, 6);
1867
1868
  let day = format.slice(6, 8);
@@ -2310,7 +2311,7 @@ const Util = {
2310
2311
 
2311
2312
  /**
2312
2313
  * 对表格每一行排序
2313
- * @param td_obj 表格里的单元格对象
2314
+ * @param td_obj 表格里的单元格(td)对象
2314
2315
  */
2315
2316
  sort_table_row: function (td_obj) {
2316
2317
  let table = td_obj.parents('table').eq(0);
@@ -2617,6 +2618,12 @@ const Util = {
2617
2618
  $("#" + element_id + "_tips").html('共 <span class="label label-info">' + total_num + '</span> 家 平均涨跌: ' + Util.parse_ratio(average_change_percent) + " 最近5日: " + Util.parse_ratio(average_d5_change_percent) + " 年初至今: " + Util.parse_ratio(average_year_change_percent));
2618
2619
  }
2619
2620
  }
2621
+ $("#" + element_id).parent().find('thead td').each(function() {
2622
+ if ($(this).hasClass("info") && $(this).text() === "当前价") {
2623
+ Util.asc = true;
2624
+ Util.sort_table_row($(this));
2625
+ }
2626
+ });
2620
2627
  Util.hide_tips();
2621
2628
  });
2622
2629
  } else {