sbd-npm 1.3.10 → 1.3.11

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 +6 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -910,7 +910,8 @@ let Stock = {
910
910
  let _html = [];
911
911
  _html.push('<select id="public_fund_date">');
912
912
  j["data"].forEach(function (item) {
913
- _html.push('<option value="', item["date"], '">', item["date"], '</option>');
913
+ let date_format = Util.seconds_to_format(item["date"], "%Y-%m-%d");
914
+ _html.push('<option value="', date_format, '">', date_format, '(', item["num"], ')</option>');
914
915
  });
915
916
  _html.push('</select>');
916
917
  $("#public_fund_date_zone").html(_html.join(""));
@@ -1121,9 +1122,10 @@ let Stock = {
1121
1122
  rzye_high = Math.max(rzye_high, item["rzye"]);
1122
1123
  date_data.push(Util.seconds_to_format(item["date"], "%Y-%m-%d"));
1123
1124
  rzye_data.push(Util.to_hundred_million(item["rzye"], 3));
1124
- rqye_data.push(Util.to_float(item["rqye"] / 10000, 2));
1125
+ rqye_data.push(Util.to_float(item["rqye"], 2));
1125
1126
  price_data.push(item["price"]);
1126
1127
  });
1128
+ $("#margin_title").html(Util.pack_html_link(j["url"], "[" + Stock.name + "]融资余额"));
1127
1129
  let margin_summary = "";
1128
1130
  if (j["latest"].length > 0) {
1129
1131
  if (j["latest"].length === 1) {
@@ -1141,7 +1143,7 @@ let Stock = {
1141
1143
  margin_summary = " 最新(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + Util.to_unit(d1["rzye"], 3) + dist_tips;
1142
1144
  }
1143
1145
  }
1144
- margin_summary = Util.pack_html_link(j["url"], "[" + Stock.name + "]融资余额(单位:亿)") + margin_summary + ' 最高: ' + Util.to_unit(rzye_high, 3) + ' 最低: ' + Util.to_unit(rzye_low, 3);
1146
+ margin_summary = margin_summary + ' 最高: ' + Util.to_unit(rzye_high, 3) + ' 最低: ' + Util.to_unit(rzye_low, 3);
1145
1147
  if (j["high"] && j["high"]["date"] && j["high"]["date"] > 0) {
1146
1148
  margin_summary += ' 历史最高: ' + Util.to_unit(j["high"]["rzye"], 3) + '(' + Util.seconds_to_format(j["high"]["date"], "%Y-%m-%d") + ')';
1147
1149
  }
@@ -1149,7 +1151,7 @@ let Stock = {
1149
1151
  margin_summary += ' 历史最低: ' + Util.to_unit(j["low"]["rzye"], 3) + '(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')';
1150
1152
  }
1151
1153
  $("#margin_summary").html(margin_summary);
1152
- Stock["rzye_chart"] = Util.multi_axis_line(Stock["rzye_chart"], "rzye_line_canvas", date_data, '融资余额', rzye_data, '股价', price_data);
1154
+ Stock["rzye_chart"] = Util.multi_axis_line(Stock["rzye_chart"], "rzye_line_canvas", date_data, '融资余额(单位:亿)', rzye_data, '股价', price_data);
1153
1155
  let flow_data = [], color_data = [];
1154
1156
  date_data = [];
1155
1157
  j["flow_data"].forEach(function (item) {