sbd-npm 1.2.12 → 1.2.13

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/stock_basics.js +5 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -1248,6 +1248,8 @@ let Stock = {
1248
1248
  volume_data.push(item["volume"]);
1249
1249
  price_data.push(item["price"]);
1250
1250
  });
1251
+ let hhs_obj = $("#hkex_holding_summary");
1252
+ let hkex_holding_summary = "[" + Util.pack_html_link(j["url"], hhs_obj.text()) + "]";
1251
1253
  if (!Stock.hkex_holding_chart && j["latest"].length > 0) {
1252
1254
  let circulation_stock = $("#circulation_stock").attr("data-val");
1253
1255
  let latest_html = "";
@@ -1269,14 +1271,10 @@ let Stock = {
1269
1271
  let holding_rate = Math.round((holding_num / circulation_stock) * 10000) / 100;
1270
1272
  latest_html = "最新(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + holding_num + "亿股" + dist_tips + ", 占 <b>" + holding_rate + "%</b> 流通股, ";
1271
1273
  }
1272
- let hhs_obj = $("#hkex_holding_summary");
1273
- let hkex_holding_summary = hhs_obj.text();
1274
- hkex_holding_summary = '[<a target="_blank" rel="noopener noreferrer nofollow" class="link_cls" href="' + j["url"] + '">' +
1275
- hkex_holding_summary + "</a>]" + latest_html + ' 最高: ' + Util.to_unit(j["high"]["volume"]) +
1276
- '股(' + Util.seconds_to_format(j["high"]["date"], "%Y-%m-%d") +
1277
- ') 最低: ' + Util.to_unit(j["low"]["volume"]) + '股(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')';
1278
- hhs_obj.html(hkex_holding_summary);
1274
+ hkex_holding_summary += (latest_html + ' 最高: ' + Util.to_unit(j["high"]["volume"]) + '股(' + Util.seconds_to_format(j["high"]["date"], "%Y-%m-%d") +
1275
+ ') 最低: ' + Util.to_unit(j["low"]["volume"]) + '股(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')');
1279
1276
  }
1277
+ hhs_obj.html(hkex_holding_summary);
1280
1278
  Stock["hkex_holding_chart"] = Util.multi_axis_line(Stock["hkex_holding_chart"], "hkex_holding_line_canvas", date_data, '持股数', volume_data, '股价', price_data);
1281
1279
  let flow_data = [];
1282
1280
  date_data = [];