sbd-npm 1.3.43 → 1.3.45

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/constant.js CHANGED
@@ -139,9 +139,10 @@ const MenuList = [
139
139
  'icon': 'retweet',
140
140
  'menu': [
141
141
  {'key': 'portfolio_recommend', 'name': '关注', 'url': '/0x2da99e58e28de94b670c4200657ac7e26dd8dceb'},
142
- {'key': 'portfolio_cloud', 'name': '心似白云常自在', 'url': '/0x9ea6081b57418a7f987775631043f7f924e25cff'},
142
+ {'key': 'portfolio_chen', 'name': '陈营长极品投资', 'url': '/0x3f8cbeeeb38138a626e935017a4cc25f47ce3dbe'},
143
143
  {'key': 'portfolio_vegetable', 'name': 'Veget', 'url': '/0x671dd9dcfca7dbc220c8164c92a74d2c561c6464'},
144
144
  {'key': 'portfolio_follow', 'name': '跟我走吧14', 'url': '/0x4aa68e74a66297c0ece1bb05fad20c32ee1db9e4'},
145
+ {'key': 'portfolio_cloud', 'name': '心似白云常自在', 'url': '/0x9ea6081b57418a7f987775631043f7f924e25cff'},
145
146
  {'key': 'portfolio_tianjin', 'name': '天津股侠', 'url': '/0xb8428e42237a7485a787e2ab1b5ae0f057258f18'},
146
147
  {'key': 'portfolio_zan', 'name': 'zangyn', 'url': '/0xccb07ddaf4f1219b7b5ae64780e7905206927873'},
147
148
  {'key': 'portfolio_peng', 'name': '吴小朋同学', 'url': '/0x4f1a316c05731e365ec1b7ef454d98206fa973f6'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.43",
3
+ "version": "1.3.45",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -215,7 +215,7 @@ let Stock = {
215
215
  remark_html.push("<b class='text-success'>最近解禁<a href='" + Util.get_url("holder_restricted") + "?tab=xsg_list&date=" + xsg_date + "'>" + xsg_date + "</a></b>, ");
216
216
  }
217
217
  if (item["price"] > 0 && item["price"] < item["block_trade_price"]) {
218
- remark_html.push("<b class='text-danger'>当前价小于最近<a href='" + Util.get_url("daily_block") + "?code=" + item["code"] + "'>大宗交易价(" + item["block_trade_price"] + ")</a></b>, ");
218
+ remark_html.push("<b class='text-danger'>当前价小于最近<a href='" + Util.get_url("daily_block") + "?code=" + item["code"] + "&start_date=" + Util.seconds_to_format(Stock.ttm_second, "%Y-%m-%d") + "'>大宗交易价(" + item["block_trade_price"] + ")</a></b>, ");
219
219
  }
220
220
  if (item["desc"]) {
221
221
  remark_html.push("<br><br><p>" + item["desc"] + "</p>");
@@ -1155,15 +1155,15 @@ let Stock = {
1155
1155
  };
1156
1156
  Util.post("/stock/" + Stock["code"], payload, function (j) {
1157
1157
  Stock["rzye_chart"].hideLoading();
1158
- let date_data = [], rzye_data = [], rqye_data = [], price_data = [], rqye_color_data = [], rzye_low = 0, rzye_high = 0;
1158
+ let date_data = [], rzye_data = [], rqye_data = [], price_data = [], rqye_color_data = [], rzye_low = Number.MAX_SAFE_INTEGER, rzye_high = 0, rqye_low = Number.MAX_SAFE_INTEGER, rqye_high = 0;
1159
1159
  j["data"].forEach(function (item) {
1160
- if (rzye_low === 0 || item["rzye"] < rzye_low) {
1161
- rzye_low = item["rzye"];
1162
- }
1163
- rzye_high = Math.max(rzye_high, item["rzye"]);
1164
1160
  date_data.push(Util.seconds_to_format(item["date"], "%Y-%m-%d"));
1161
+ rzye_low = Math.min(rzye_low, item["rzye"]);
1162
+ rzye_high = Math.max(rzye_high, item["rzye"]);
1165
1163
  rzye_data.push(Util.to_hundred_million(item["rzye"], 3));
1166
- rqye_data.push(Util.to_ten_thousand(item["rqye"], 2));
1164
+ rqye_low = Math.min(rqye_low, item["rqye"]);
1165
+ rqye_high = Math.max(rqye_high, item["rqye"]);
1166
+ rqye_data.push(Util.to_ten_thousand(item["rqye"], 3));
1167
1167
  price_data.push(item["price"]);
1168
1168
  rqye_color_data.push("#E74C3C");
1169
1169
  });
@@ -1190,23 +1190,24 @@ let Stock = {
1190
1190
  rqye_summary = " 最新融券余额(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + Util.to_unit(d1["rqye"], 3) + rqye_dist_tips;
1191
1191
  }
1192
1192
  }
1193
- margin_summary = margin_summary + ' 当前最高: ' + Util.to_unit(rzye_high, 3) + ' 当前最低: ' + Util.to_unit(rzye_low, 3);
1193
+ margin_summary += ' 当前最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(rzye_high, 3)) + '</span> 当前最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(rzye_low, 3)) + "</span>";
1194
1194
  if (j["rzye_high"] && j["rzye_high"]["date"] && j["rzye_high"]["date"] > 0) {
1195
- margin_summary += ' 历史最高: ' + Util.to_unit(j["rzye_high"]["rzye"], 3) + '(' + Util.seconds_to_format(j["rzye_high"]["date"], "%Y-%m-%d") + ')';
1195
+ margin_summary += ' 历史最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(j["rzye_high"]["rzye"], 3)) + '</span>(' + Util.seconds_to_format(j["rzye_high"]["date"], "%Y-%m-%d") + ')';
1196
1196
  }
1197
1197
  if (j["rzye_low"] && j["rzye_low"]["date"] && j["rzye_low"]["date"] > 0) {
1198
- margin_summary += ' 历史最低: ' + Util.to_unit(j["rzye_low"]["rzye"], 3) + '(' + Util.seconds_to_format(j["rzye_low"]["date"], "%Y-%m-%d") + ')';
1198
+ margin_summary += ' 历史最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(j["rzye_low"]["rzye"], 3)) + '</span>(' + Util.seconds_to_format(j["rzye_low"]["date"], "%Y-%m-%d") + ')';
1199
1199
  }
1200
1200
  if (j["less_rate"]) {
1201
1201
  margin_summary += '&nbsp;&nbsp;当前最新融资余额超过历史 <span style="color: #FFF;" class="label label-info">' + j["less_rate"] + '%</span> 分位水平';
1202
1202
  }
1203
1203
  $("#margin_summary").html(margin_summary);
1204
1204
  Stock["rzye_chart"] = Util.multi_axis_line(Stock["rzye_chart"], "rzye_line_canvas", date_data, '融资余额(单位:亿)', rzye_data, '股价', price_data);
1205
+ rqye_summary += ' 当前最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(rqye_high, 3)) + '</span> 当前最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(rqye_low, 3)) + "</span>";
1205
1206
  if (j["rqye_high"] && j["rqye_high"]["date"] && j["rqye_high"]["date"] > 0) {
1206
- rqye_summary += ' 历史最高: ' + Util.to_unit(j["rqye_high"]["rqye"], 3) + '(' + Util.seconds_to_format(j["rqye_high"]["date"], "%Y-%m-%d") + ')';
1207
+ rqye_summary += ' 历史最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(j["rqye_high"]["rqye"], 3)) + '</span>(' + Util.seconds_to_format(j["rqye_high"]["date"], "%Y-%m-%d") + ')';
1207
1208
  }
1208
1209
  if (j["rqye_low"] && j["rqye_low"]["date"] && j["rqye_low"]["date"] > 0) {
1209
- rqye_summary += ' 历史最低: ' + Util.to_unit(j["rqye_low"]["rqye"], 3) + '(' + Util.seconds_to_format(j["rqye_low"]["date"], "%Y-%m-%d") + ')';
1210
+ rqye_summary += ' 历史最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(j["rqye_low"]["rqye"], 3)) + '</span>(' + Util.seconds_to_format(j["rqye_low"]["date"], "%Y-%m-%d") + ')';
1210
1211
  }
1211
1212
  $("#rqye_summary").html(" [" + rqye_summary + " ]");
1212
1213
  Stock["rqye_chart"] = Util.chart_bar_line(Stock["rqye_chart"], "rqye_line_canvas", date_data, rqye_data, '融券余额(单位:万)', rqye_color_data, price_data, '股价');
package/util.js CHANGED
@@ -37,6 +37,8 @@ const Util = {
37
37
  one_week_second: 604800,
38
38
  // 1年的秒数(365 * 86400)
39
39
  one_year_second: 31536000,
40
+ // 32位最大数字(Number.MAX_SAFE_INTEGER:2^53 - 1,即 9007199254740991,Number.MAX_VALUE:1.7976931348623157e+308)
41
+ max_32bit_integer: 4294967295,
40
42
 
41
43
  // https://omnipotent.net/jquery.sparkline/
42
44
  SparkOptions: {