sbd-npm 1.3.36 → 1.3.38

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 +17 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.36",
3
+ "version": "1.3.38",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -199,25 +199,28 @@ let Stock = {
199
199
  // 备注
200
200
  let remark_html = [];
201
201
  if (item["is_bull_trend"]) {
202
- remark_html.push("<a href='" + Util.get_url("trend_bull_trend") + "'><b class='text-danger'>多头趋势</b></a>");
202
+ remark_html.push("<a class='btn btn-xs btn-danger' href='" + Util.get_url("trend_bull_trend") + "'>多头趋势</a>");
203
203
  }
204
204
  if (item["is_kdj_cross"]) {
205
- remark_html.push("<a href='" + Util.get_url("trend_kdj") + "'><b class='text-danger'>KDJ金叉</b></a>");
205
+ remark_html.push("<a class='btn btn-xs btn-danger' href='" + Util.get_url("trend_kdj") + "'>KDJ金叉</a>");
206
206
  }
207
207
  if (item["is_macd_cross"]) {
208
- remark_html.push("<a href='" + Util.get_url("trend_macd_cross") + "'><b class='text-danger'>MACD金叉</b></a>");
208
+ remark_html.push("<a class='btn btn-xs btn-danger' href='" + Util.get_url("trend_macd_cross") + "'>MACD金叉</a>");
209
+ }
210
+ if (item["is_margin_minimum"]) {
211
+ remark_html.push("<a class='btn btn-xs btn-danger' href='" + Util.get_url("rank_margin_minimum") + "'>融资余额创新低</a>");
209
212
  }
210
213
  if (item["xsg_date"] > 0) {
211
214
  let xsg_date = Util.seconds_to_format(item["xsg_date"], "%Y-%m-%d");
212
- remark_html.push("<b class='text-success'>最近解禁<a href='" + Util.get_url("holder_restricted") + "?tab=xsg_list&date=" + xsg_date + "'>" + xsg_date + "</a></b>");
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>, ");
213
216
  }
214
217
  if (item["price"] > 0 && item["price"] < item["block_trade_price"]) {
215
- 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"] + "'>大宗交易价(" + item["block_trade_price"] + ")</a></b>, ");
216
219
  }
217
220
  if (item["desc"]) {
218
221
  remark_html.push("<br><br><p>" + item["desc"] + "</p>");
219
222
  }
220
- remark_html = remark_html.join("");
223
+ remark_html = remark_html.join("");
221
224
  // 同花顺|申万行业板块数据
222
225
  if (item["industry_data"] && item["industry_data"].length > 0) {
223
226
  if (remark_html.length > 0) {
@@ -1109,6 +1112,11 @@ let Stock = {
1109
1112
 
1110
1113
  fetch_margin: function () {
1111
1114
  Stock["rzye_chart"] = Util.show_chart_loading(Stock["rzye_chart"], "rzye_line_canvas");
1115
+ let margin_url = "http://www.szse.cn/disclosure/margin/margin/index.html";
1116
+ if (Util.is_sh(Stock["code"])) {
1117
+ margin_url = "http://www.sse.com.cn/market/othersdata/margin/detail/";
1118
+ }
1119
+ $("#margin_panel_title").html(Util.pack_html_link(margin_url, "[" + Stock.name + "]融资余额"));
1112
1120
  let payload = {
1113
1121
  action: "margin",
1114
1122
  date_type: $("#margin_date_type").val(),
@@ -1128,7 +1136,6 @@ let Stock = {
1128
1136
  rqye_data.push(Util.to_float(item["rqye"], 2));
1129
1137
  price_data.push(item["price"]);
1130
1138
  });
1131
- $("#margin_title").html(Util.pack_html_link(j["url"], "[" + Stock.name + "]融资余额"));
1132
1139
  let margin_summary = "";
1133
1140
  if (j["latest"].length > 0) {
1134
1141
  if (j["latest"].length === 1) {
@@ -1153,6 +1160,9 @@ let Stock = {
1153
1160
  if (j["low"] && j["low"]["date"] && j["low"]["date"] > 0) {
1154
1161
  margin_summary += ' 历史最低: ' + Util.to_unit(j["low"]["rzye"], 3) + '(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')';
1155
1162
  }
1163
+ if (j["less_rate"]) {
1164
+ margin_summary += '&nbsp;&nbsp;当前融资余额超过历史 <span style="color: #FFF;" class="label label-info">' + j["less_rate"] + '%</span> 分位水平';
1165
+ }
1156
1166
  $("#margin_summary").html(margin_summary);
1157
1167
  Stock["rzye_chart"] = Util.multi_axis_line(Stock["rzye_chart"], "rzye_line_canvas", date_data, '融资余额(单位:亿)', rzye_data, '股价', price_data);
1158
1168
  let flow_data = [], color_data = [];