sbd-npm 1.5.59 → 1.5.61

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.5.59",
3
+ "version": "1.5.61",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/snowball_tool.js CHANGED
@@ -374,7 +374,15 @@ $(function () {
374
374
  html.push("<td class='code_item'>", Util.snowball_url(Util.is_alphabet(item.code) ? item.code.toUpperCase() : item.code), "</td>");
375
375
  html.push("<td>", Util.stock_url(item.code, item.name ? item.name : item.code.toUpperCase()), "</td>");
376
376
  html.push("<td>", Util.map_url((item.province_city && item.province_city !== "None") ? item.province_city : item.area), "</td>");
377
- html.push("<td>", item.industry ? item.industry.slice(0, 6) : "--", "</td>");
377
+ if (item.industry) {
378
+ if (item.industry.length > 6) {
379
+ html.push("<td title='", item.industry, "'>", item.industry.slice(0, 6), "</td>");
380
+ } else {
381
+ html.push("<td>", item.industry, "</td>");
382
+ }
383
+ } else {
384
+ html.push("<td>--</td>");
385
+ }
378
386
  html.push("<td class='price_", item.code.toLowerCase(), "'>", item.stock_price, "</td>");
379
387
  html.push("<td>", Util.year_price_rate(item.stock_price, item.year_price), "</td>");
380
388
  html.push("<td>", Util.year_price_rate(item.stock_price, item.d5_price), "</td>");
package/status.js CHANGED
@@ -211,7 +211,12 @@ $(function () {
211
211
  html.push("<td>", ip_num, "</td>");
212
212
  }
213
213
  html.push("<td>", Util.pack_html_link(Status.ip_url(item.ip), item.ip), "</td>");
214
- html.push("<td>", Status.map_url(Status.convert_ip_address(item)), "</td>");
214
+ let ip_address = Status.convert_ip_address(item);
215
+ if (ip_address) {
216
+ html.push("<td>", Status.map_url(ip_address), "</td>");
217
+ } else {
218
+ html.push("<td><a href='#' class='check_ip'>--</a></td>");
219
+ }
215
220
  html.push("<td>", item.times, "</td>");
216
221
  html.push("<td data-val='", item.first_time, "'>", Util.seconds_to_format(item.first_time), "</td>");
217
222
  html.push("<td data-val='", item.latest_time, "'>", Util.seconds_to_format(item.latest_time), "</td>");
@@ -226,6 +231,31 @@ $(function () {
226
231
  Status.do_block_ip(ip, ip_address);
227
232
  });
228
233
  });
234
+ $("#mysql_ssh_modal_body_body .check_ip").each(function() {
235
+ $(this).click(function() {
236
+ let this_object = $(this);
237
+ let td_text = this_object.text();
238
+ if (!td_text.includes("checking")) {
239
+ this_object.text("checking...")
240
+ this_object.parent().addClass("info");
241
+ let ip = this_object.parent().parent().children('td').eq(1).text();
242
+ Util.post(location.pathname, {"action": "check_ip", "ip": ip}, function (ip_data) {
243
+ this_object.parent().removeClass("info");
244
+ if (typeof ip_data === "object") {
245
+ let ip_address = Status.convert_ip_address(ip_data);
246
+ if (ip_address) {
247
+ this_object.off('click');
248
+ this_object.parent().html(Status.map_url(ip_address));
249
+ } else {
250
+ this_object.text("--");
251
+ }
252
+ } else {
253
+ this_object.text("--");
254
+ }
255
+ });
256
+ }
257
+ });
258
+ });
229
259
  Util.hide_tips();
230
260
  });
231
261
  },
package/stock_basics.js CHANGED
@@ -119,7 +119,6 @@ let Stock = {
119
119
  {"name": "成交均价"},
120
120
  {"name": "成交量", "sort_type": "volume"},
121
121
  {"name": "量比", "sort_type": "volume_ratio", "tooltip": "当日成交量与过去5日平均成交量的比"},
122
- {"name": "量比30", "sort_type": "volume_ratio30", "tooltip": "当日成交量与过去30日平均成交量的比"},
123
122
  {"name": "成交额", "sort_type": "amount"},
124
123
  {"name": "换手率", "sort_type": "turnover"},
125
124
  ]
@@ -148,10 +147,11 @@ let Stock = {
148
147
 
149
148
  let concept_object = $("#concept");
150
149
  if (concept_object.length > 0) {
151
- let concept_array = concept_object.html().split(",");
152
150
  html = [];
153
- concept_array.forEach(function (item) {
154
- html.push('<a target="_blank" rel="noopener noreferrer nofollow" href="', Util.get_url("query_list"), '?concept=', item, '" class="btn btn-xs btn-warning">', item, '</a> ');
151
+ let query_url = Util.get_url("query_list");
152
+ let concept_array = concept_object.html().split(",");
153
+ concept_array.forEach(function (concept) {
154
+ html.push('<a target="_blank" rel="noopener noreferrer nofollow" href="', query_url, '?concept=', concept, '" class="btn btn-xs btn-warning">', concept, '</a> ');
155
155
  });
156
156
  concept_object.html(html.join(""));
157
157
  }
@@ -339,7 +339,6 @@ let Stock = {
339
339
  html.push("<td>", Util.to_float(item.amount / (item.volume * 100), 2), "</td>");
340
340
  html.push("<td>", Util.to_float(item.volume / 10000, 2), "万手</td>");
341
341
  html.push("<td>", item.volume_ratio, "</td>");
342
- html.push("<td>", (item.volume_ratio30 ? item.volume_ratio30 : "--"), "</td>");
343
342
  html.push("<td>", Util.to_hundred_million(item.amount), "亿</td>");
344
343
  html.push("<td>", (item.turnover > 0 ? (item.turnover + "%") : "--"), "</td>");
345
344
  html.push("</tr>");
package/util.js CHANGED
@@ -463,7 +463,7 @@ const Util = {
463
463
  if (location_name === "") {
464
464
  location_name = location.length > 20 ? location.slice(0, 20) : location;
465
465
  }
466
- if (Util.is_has_chinese(location) && !/美国|德国|日本|印度|英国|法国|意大利|加拿大|巴西|俄罗斯|墨西哥|澳洲|西班牙|韩国|印尼|土耳其|沙特|荷兰|瑞士|波兰|比利时|阿根廷|瑞典|爱尔兰|新加坡|以色列|阿联酋|泰国|奥地利|挪威|越南|菲律宾|孟加拉|伊朗|丹麦|马来西亚|哥伦比亚|南非|埃及|罗马尼亚|巴基斯坦|捷克|智利|葡萄牙|芬兰|秘鲁|哈萨克|伊拉克|阿尔及利亚|新西兰|希腊|匈牙利|卡塔尔|乌克兰|尼日利亚|科威特|摩洛哥|斯洛伐克|波多黎各|肯尼亚|厄瓜多|多米尼加|乌兹别克斯坦|瓜地马拉|保加利亚|委内瑞拉|古巴|阿曼|斯里兰卡|哥斯达黎加|克罗地亚|卢森堡|安道尔|塞尔维亚|科特迪瓦|巴拿马|立陶宛|加纳|乌拉圭|安哥拉|坦桑尼亚|阿塞拜疆|缅甸|斯洛文尼亚|刚果|土库曼斯坦|乌干达|突尼斯|约旦|喀麦隆|玻利维亚|苏丹|巴林|利比亞|柬埔寨|拉脱维亚|巴拉圭|津巴布韦|尼泊尔|爱沙尼亚|洪都拉斯|塞浦路斯|萨尔瓦多|冰岛|巴布亚新几内亚|塞内加尔|波黑|赞比亚|特多|黎巴嫩|叙利亚|也门|马其顿|老挝|毛里求斯|塔吉克|几内亚|中非|开曼群岛|百慕大/.test(location)) {
466
+ if (Util.is_has_chinese(location) && !/美国|德国|日本|印度|英国|法国|意大利|加拿大|巴西|俄罗斯|墨西哥|澳洲|西班牙|韩国|印尼|土耳其|沙特|荷兰|瑞士|波兰|比利时|阿根廷|瑞典|爱尔兰|新加坡|以色列|阿联酋|泰国|奥地利|挪威|越南|菲律宾|孟加拉|伊朗|丹麦|马来西亚|哥伦比亚|南非|埃及|罗马尼亚|巴基斯坦|捷克|智利|葡萄牙|芬兰|秘鲁|哈萨克|伊拉克|阿尔及利亚|新西兰|希腊|匈牙利|卡塔尔|乌克兰|尼日利亚|科威特|摩洛哥|斯洛伐克|波多黎各|肯尼亚|厄瓜多|多米尼加|乌兹别克斯坦|瓜地马拉|保加利亚|委内瑞拉|古巴|阿曼|斯里兰卡|哥斯达黎加|克罗地亚|卢森堡|安道尔|塞尔维亚|科特迪瓦|巴拿马|立陶宛|加纳|乌拉圭|安哥拉|坦桑尼亚|埃塞俄比亚|阿塞拜疆|缅甸|斯洛文尼亚|刚果|土库曼斯坦|乌干达|突尼斯|约旦|喀麦隆|玻利维亚|苏丹|巴林|利比亚|柬埔寨|拉脱维亚|巴拉圭|津巴布韦|尼泊尔|爱沙尼亚|洪都拉斯|塞浦路斯|萨尔瓦多|冰岛|巴布亚新几内亚|塞内加尔|波黑|赞比亚|特多|黎巴嫩|叙利亚|也门|马其顿|老挝|毛里求斯|塔吉克|几内亚|中非|伯利兹|布基纳法索|索马里|开曼群岛|百慕大/.test(location)) {
467
467
  //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>";
468
468
  return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://www.amap.com/search?query=" + location + "'>" + location_name + "</a>";
469
469
  }
@@ -626,7 +626,11 @@ const Util = {
626
626
  item.name = item.name.replace("有限公司", "").replace("集团", "").replace("股份", "");
627
627
  }
628
628
  html.push("<td>", Util.stock_url(item.code, item.name), "</td>");
629
- html.push("<td class='hk_industry'>", item.industry, "</td>");
629
+ if (item.industry && item.industry.length > 6) {
630
+ html.push("<td class='hk_industry' title='", item.industry, "'>", item.industry.slice(0, 6), "</td>");
631
+ } else {
632
+ html.push("<td class='hk_industry'>", item.industry, "</td>");
633
+ }
630
634
  html.push("<td>", Util.map_url(item.province_city), "</td>");
631
635
  html.push("<td>", Util.to_float((item.pe_ttm ? item.pe_ttm : item.pe), 2), "</td>");
632
636
  html.push("<td>", Util.to_float(item.market_capital, 3), "亿</td>");
@@ -3335,10 +3339,10 @@ const Util = {
3335
3339
  * @returns {string}
3336
3340
  */
3337
3341
  pack_holder_num: function (item) {
3338
- let holder_info = "--";
3339
3342
  if (item.snowball_follower && item.code && Util.is_hk(item.code)) {
3340
3343
  return item.snowball_follower;
3341
3344
  }
3345
+ let holder_info = "--";
3342
3346
  if (item.holder_num && item.holder_num > 0) {
3343
3347
  if (item.pre_holder_num && item.pre_holder_num > 0) {
3344
3348
  holder_info = Util.digit_compare_trend(item.holder_num, item.pre_holder_num);