sbd-npm 1.2.96 → 1.2.98

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 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.96",
3
+ "version": "1.2.98",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -316,7 +316,7 @@ const Util = {
316
316
  location_name = location.length > 20 ? location.substr(0, 20) : location;
317
317
  }
318
318
  //return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://map.baidu.com/m?fr=ps01000&word=" + location + "'>" + location_name + "</a>";
319
- return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://www.amap.com/search?query=" + location + ""'>" + location_name + "</a>";
319
+ return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://www.amap.com/search?query=" + location + "'>" + location_name + "</a>";
320
320
  }
321
321
  return "--";
322
322
  },
@@ -993,7 +993,7 @@ const Util = {
993
993
  }
994
994
  let table_options = {
995
995
  "element_id": table_id,
996
- "caption": '<caption><span id="index_data"></span><div class="pull-right" id="' + table_id + '_body_tips"></div></caption>',
996
+ "caption": '<caption><a href="#"><i class="glyphicon glyphicon-cog" style="color: #bdbdbd;"></i></a> <span id="index_data"></span><div class="pull-right" id="' + table_id + '_body_tips"></div></caption>',
997
997
  "head_cols": head_cols
998
998
  };
999
999
  if (alert_tips.length > 0) {
@@ -1003,6 +1003,7 @@ const Util = {
1003
1003
  Util["stock_category_table_id"] = table_id;
1004
1004
  Util.post(location.pathname, {active_div: stock_category}, function (j) {
1005
1005
  Util["stock_category_data"] = j["data"];
1006
+ Util["stock_category_index"] = j["index_list"] ? j["index_list"] : [];
1006
1007
  Util.render_type_option($("#stock_category_industry"), j["data"], "industry", Util.render_stock_category_html);
1007
1008
  Util.render_type_option($("#stock_category_area"), j["data"], "area", Util.render_stock_category_html);
1008
1009
  Util.render_stock_category_html();
@@ -1010,9 +1011,6 @@ const Util = {
1010
1011
  $("#stock_category_remark_title").html(Util.pack_html_link(j["concept_url"], "备注<i class='glyphicon glyphicon-link'></i>"));
1011
1012
  }
1012
1013
  Util.hide_tips();
1013
- let index_list = j["index_list"] ? j["index_list"] : [];
1014
- let is_us = stock_category === "us" ? 1 : 0;
1015
- Util.init_stock_stuff(table_id + "_body", index_list, is_us);
1016
1014
  });
1017
1015
  },
1018
1016
 
@@ -1048,13 +1046,16 @@ const Util = {
1048
1046
  }
1049
1047
  });
1050
1048
  }
1051
- Util.render_table_html(Util["stock_category_table_id"] + "_body", _html);
1049
+ let table_body_id = Util["stock_category_table_id"] + "_body";
1050
+ Util.render_table_html(table_body_id, _html);
1052
1051
  if (is_us === 1) {
1053
1052
  $("img").on("error", function () {
1054
1053
  $(this).attr("src", "https://storage.googleapis.com/iex/api/logos/LI.png");
1055
1054
  });
1056
1055
  }
1057
- $("#" + Util["stock_category_table_id"] + "_body_tips").html('共 <span class="label label-info">' + total_num + '</span> 家');
1056
+ $("#" + table_body_id + "_tips").html('共 <span class="label label-info">' + total_num + '</span> 家');
1057
+ let index_list = Util["stock_category_index"] ? Util["stock_category_index"] : [];
1058
+ Util.init_stock_stuff(table_body_id, index_list, is_us);
1058
1059
  }
1059
1060
  },
1060
1061