sbd-npm 1.3.47 → 1.3.49

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
@@ -86,6 +86,7 @@ const MenuList = [
86
86
  {'key': 'macro_gold', 'name': '黄金ETF(GLD)', 'url': '/0xb2bd8a25b4ac0846b99767603ff2e4be42dc56d1'},
87
87
  {'key': 'macro_crude', 'name': '原油', 'url': '/0xa5dd55db58c43a3c3e05cc08afc7e614e73ad3ba'},
88
88
  {'key': 'macro_commodity', 'name': '碳酸锂', 'url': '/0x2017e1b6e861b785dae944020014379d89d3c2db'},
89
+ {'key': 'macro_panel', 'name': '面板价格', 'url': '/0x135c54084cd514316bcd4b5ef876133af30d1e6a'},
89
90
  ]
90
91
  },
91
92
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.47",
3
+ "version": "1.3.49",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -217,14 +217,17 @@ let Stock = {
217
217
  if (item["price"] > 0 && item["price"] < item["block_trade_price"]) {
218
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
+ if (remark_html.length > 0) {
221
+ remark_html.push("<br>");
222
+ }
220
223
  if (item["desc"]) {
221
- remark_html.push("<br><br><p>" + item["desc"] + "</p>");
224
+ remark_html.push("<br><p>" + item["desc"] + "</p>");
222
225
  }
223
226
  remark_html = remark_html.join("");
224
227
  // 同花顺|申万行业板块数据
225
228
  if (item["industry_data"] && item["industry_data"].length > 0) {
226
229
  if (remark_html.length > 0) {
227
- remark_html += "<br><br>";
230
+ remark_html += "<br>";
228
231
  }
229
232
  remark_html += "&nbsp;&nbsp;<b>行业板块:</b> ";
230
233
  item["industry_data"].forEach(function (i_d) {
@@ -233,8 +236,10 @@ let Stock = {
233
236
  });
234
237
  }
235
238
  if (item["is_star50"]) {
236
- let summary_index_url = Util.get_url("summary_index") + "?index_code=SH000688";
237
- remark_html += " <a href='" + summary_index_url + "' class='btn btn-xs btn-warning'>科创50</a>";
239
+ remark_html += " <a href='" + (Util.get_url("summary_index") + "?index_code=SH000688") + "' class='btn btn-xs btn-warning'>科创50</a>";
240
+ }
241
+ if (item["is_hs300"]) {
242
+ remark_html += " <a href='" + (Util.get_url("summary_index") + "?index_code=SH000300") + "' class='btn btn-xs btn-warning'>沪深300</a>";
238
243
  }
239
244
  if (item["links"]) {
240
245
  if (remark_html.length > 0) {
package/util.js CHANGED
@@ -557,6 +557,9 @@ const Util = {
557
557
  */
558
558
  stock_hk_html: function (html, item) {
559
559
  html.push("<td>", Util.snowball_url(item["code"]), "</td>");
560
+ if (item["name"] && item["name"].length > 5) {
561
+ item["name"] = item["name"].replace("有限公司", "").replace("集团", "").replace("股份", "");
562
+ }
560
563
  html.push("<td>", Util.stock_url(item["code"], item["name"]), "</td>");
561
564
  html.push("<td class='hk_industry'>", item["industry"], "</td>");
562
565
  html.push("<td>", Util.map_url(item["province_city"]), "</td>");