sbd-npm 1.3.16 → 1.3.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.16",
3
+ "version": "1.3.17",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -1177,9 +1177,7 @@ let Stock = {
1177
1177
  };
1178
1178
  Util.post("/stock/" + Stock["code"], payload, function (j) {
1179
1179
  Stock["hkex_holding_chart"].hideLoading();
1180
- let date_data = [];
1181
- let volume_data = [];
1182
- let price_data = [];
1180
+ let date_data = [], volume_data = [], price_data = [];
1183
1181
  j["data"].forEach(function (item) {
1184
1182
  date_data.push(Util.seconds_to_format(item["date"], "%Y-%m-%d"));
1185
1183
  volume_data.push(item["volume"]);
@@ -1191,7 +1189,7 @@ let Stock = {
1191
1189
  let circulation_stock = $("#circulation_stock").attr("data-val");
1192
1190
  let latest_html = "";
1193
1191
  if (j["latest"].length === 1) {
1194
- let holding_num = Util.to_hundred_million(j["latest"][0]["volume"], 3);
1192
+ let holding_num = Util.to_hundred_million(j["latest"][0]["volume"], 4);
1195
1193
  let holding_rate = Math.round((holding_num / circulation_stock) * 10000) / 100;
1196
1194
  latest_html = "最新(" + Util.seconds_to_format(j["latest"][0]["date"], "%Y-%m-%d") + "): " + holding_num + "亿股, 占 <b>" + holding_rate + "%</b> 流通股, ";
1197
1195
  } else if (j["latest"].length === 2) {
@@ -1204,7 +1202,7 @@ let Stock = {
1204
1202
  } else if (difference < 0) {
1205
1203
  dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["volume"])) + "股' style='color: #3c763d;'>" + Util.strip_html(Util.to_unit(difference)) + "股</b>)";
1206
1204
  }
1207
- let holding_num = Util.to_hundred_million(d1["volume"]);
1205
+ let holding_num = Util.to_hundred_million(d1["volume"], 4);
1208
1206
  let holding_rate = Math.round((holding_num / circulation_stock) * 10000) / 100;
1209
1207
  latest_html = "最新(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + holding_num + "亿股" + dist_tips + ", 占 <b>" + holding_rate + "%</b> 流通股, ";
1210
1208
  }
package/util.js CHANGED
@@ -1091,8 +1091,8 @@ const Util = {
1091
1091
  Util.render_type_option($("#stock_category_industry"), j["data"], "industry", Util.render_stock_category_html);
1092
1092
  Util.render_type_option($("#stock_category_area"), j["data"], "area", Util.render_stock_category_html);
1093
1093
  Util.render_stock_category_html();
1094
- if (j["concept_url"]) {
1095
- $("#stock_category_remark_title").html(Util.pack_html_link(j["concept_url"], "备注<i class='glyphicon glyphicon-link'></i>"));
1094
+ if (j["portfolio_url"]) {
1095
+ $("#stock_category_remark_title").html(Util.pack_html_link(j["portfolio_url"], "备注<i class='glyphicon glyphicon-link'></i>"));
1096
1096
  }
1097
1097
  Util.hide_tips();
1098
1098
  });
@@ -2210,6 +2210,7 @@ const Util = {
2210
2210
  if (sort_type === Obj[sort_key].toString()) {
2211
2211
  let sort_cls = Obj[sort_order] === 0 ? "fa-sort-desc" : "fa-sort-asc";
2212
2212
  $("<i class='fa fa-fw " + sort_cls + "'></i>").insertAfter($(this));
2213
+ $(this).parent().addClass("info");
2213
2214
  } else {
2214
2215
  $("<i class='fa fa-fw fa-sort'></i>").insertAfter($(this));
2215
2216
  }