sbd-npm 1.1.51 → 1.1.55

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 (3) hide show
  1. package/menu.js +3 -0
  2. package/package.json +1 -1
  3. package/util.js +22 -3
package/menu.js CHANGED
@@ -49,6 +49,7 @@ const MenuList = [
49
49
  {'key': 'trend_macd_down', 'name': 'MACD下行', 'url': '/ff97a31b4ffbabe71315e75c4fd62047'},
50
50
  {'key': 'trend_doji', 'name': '十字星', 'url': '/718eac2cccaef1c7968f2d121b5f3070'},
51
51
  {'key': 'trend_ma510', 'name': '突破5、10日均线', 'url': '/4d6d7ee173c87b1f939fa454093a63c7'},
52
+ {'key': 'trend_holder_minimum', 'name': '股东数历史最少', 'url': '/a9e45d918bc565afd76047cafea25824'},
52
53
  {'key': 'trend_week_minimum', 'name': '周成交低点', 'url': '/722d94429b8e689fe78dca1cf67a4c67'},
53
54
  {'key': 'trend_margin', 'name': '融资融券余额涨幅', 'url': '/1964a6bc56dc3ce6825b23667c7fb588'},
54
55
  {'key': 'trend_price', 'name': '股价升跌幅度', 'url': '/43ef6aeb36475f8f8f44d477b1990390'},
@@ -63,6 +64,7 @@ const MenuList = [
63
64
  'name': '宏观数据',
64
65
  'icon': 'globe',
65
66
  'menu': [
67
+ {'key': 'macro_global_economy', 'name': '全球经济总览', 'url': '/b8fd4bd44505109d47a52f30d0f79fe5'},
66
68
  {'key': 'macro_bond_yield', 'name': '十年国债收益率', 'url': '/b3481c3916ef5e907f329c32ad87f7ce'},
67
69
  {'key': 'macro_money_supply', 'name': '货币供应量', 'url': '/30cb50c21d82b67d4442df16cffde341'},
68
70
  {'key': 'macro_currency', 'name': '货币汇率', 'url': '/58ec93ac74847aaec304e4a577c15799'},
@@ -150,6 +152,7 @@ const MenuList = [
150
152
  'menu': [
151
153
  {'key': 'query_list', 'name': '查询', 'url': '/16e6b2a63db7951f30e7ebab1852ea8c'},
152
154
  {'key': 'query_profit', 'name': '盈利查询', 'url': '/cc995fc524901f6b664f2a553d34f404'},
155
+ {'key': 'query_current_trade', 'name': '最新行情查询', 'url': '/bc85a7806ca69f9aebe7bae3c9e0b1cc'},
153
156
  ]
154
157
  },
155
158
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.1.51",
3
+ "version": "1.1.55",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -261,13 +261,32 @@ const Util = {
261
261
  return location;
262
262
  }
263
263
  if (location_name === "") {
264
- location_name = location.length > 8 ? location.substr(0, 8) : location;
264
+ location_name = location.length > 10 ? location.substr(0, 10) : location;
265
265
  }
266
266
  return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://map.baidu.com/m?fr=ps01000&word=" + location + "'>" + location_name + "</a>";
267
267
  }
268
268
  return "--";
269
269
  },
270
270
 
271
+ /**
272
+ * 谷歌Google地图链接地址
273
+ * @param location
274
+ * @param location_name
275
+ * @returns {string}
276
+ */
277
+ google_map_url: function (location, location_name = "") {
278
+ if (location) {
279
+ if (location === "--") {
280
+ return location;
281
+ }
282
+ if (location_name === "") {
283
+ location_name = location.length > 10 ? location.substr(0, 10) : location;
284
+ }
285
+ return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://www.google.com/maps?&hl=zh-Hans&q=" + location + "'>" + location_name + "</a>";
286
+ }
287
+ return "--";
288
+ },
289
+
271
290
  /**
272
291
  * 返回股票代码列表
273
292
  * @param obj
@@ -688,7 +707,7 @@ const Util = {
688
707
  });
689
708
  _html.push('</tr></thead>');
690
709
  _html.push('<tbody id="', options["element_id"], '_body"><tr>');
691
- _html.push('<td class="text-center" colspan="', options["head_cols"].length, '">Loading...</td>');
710
+ _html.push('<td class="text-center" colspan="', options["head_cols"].length, '">', (options["body_tips"] ? options["body_tips"] : "Loading..."), '</td>');
692
711
  _html.push('</tr></tbody>');
693
712
  _html.push('</table>');
694
713
  let tz_obj = $("#" + options["element_id"]);
@@ -780,7 +799,7 @@ const Util = {
780
799
  ];
781
800
  if (stock_category !== "us") {
782
801
  head_cols.push({"name": "成交金额", "table_sort": 1});
783
- head_cols.push({"name": "成交均价"});
802
+ head_cols.push({"name": "成交均价", "table_sort": 1});
784
803
  head_cols.push({"name": "股东数", "table_sort": 1});
785
804
  head_cols.push({"name": "备注", "id": "remark_title"});
786
805
  }