sbd-npm 1.2.3 → 1.2.6

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.2.3",
3
+ "version": "1.2.6",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -235,6 +235,7 @@ let Stock = {
235
235
  remark_html.push("<br><br><p>" + item["desc"] + "</p>");
236
236
  }
237
237
  remark_html = remark_html.join(", ");
238
+ // 同花顺|申万行业板块数据
238
239
  if (item["industry_data"] && item["industry_data"].length > 0) {
239
240
  if (remark_html.length > 0) {
240
241
  remark_html += "<br><br>";
@@ -277,7 +278,8 @@ let Stock = {
277
278
  let usd_exchange_rate = Util.to_float((market_capital * 100) / item["usd_exchange_rate"], 2);
278
279
  $("#usd_market_capital").html("($" + usd_exchange_rate + "亿)");
279
280
  }
280
-
281
+ // 雪球人数关注排名数据
282
+ Util.pack_snowball_follower(item);
281
283
  // 股东户数
282
284
  let holder_num_url = Util.get_url("holder_num");
283
285
  Util.post(holder_num_url, {action: "holder_num_info", code: Stock.code}, function (j) {
package/util.js CHANGED
@@ -2241,6 +2241,22 @@ const Util = {
2241
2241
  return "--";
2242
2242
  },
2243
2243
 
2244
+ /**
2245
+ * 雪球人数关注排名数据
2246
+ * @param item
2247
+ * @returns {string}
2248
+ */
2249
+ pack_snowball_follower: function(item) {
2250
+ if (item["snowball_follower"] && item["snowball_follower"] > 0) {
2251
+ let snowball_follower_rank = Util.to_unit(item["snowball_follower"]) + "(" + item["snowball_follower_rank"] + ")";
2252
+ let market_type = Util.is_hk(item["code"]) ? "hk" : "cn";
2253
+ snowball_follower_rank = Util.pack_html_link(Util.get_url("rank_holder") + "?sort_type=snowball_follower&market_type=" + market_type, snowball_follower_rank);
2254
+ let tooltip = item["snowball_follower"] + " 人关注,关注排名第 " + item["snowball_follower_rank"] + " 位";
2255
+ $("#snowball_follower").html(snowball_follower_rank + ' <i class="glyphicon glyphicon-info-sign" data-toggle="tooltip" data-placement="top" data-original-title="' + tooltip + '"></i>');
2256
+ $("[data-toggle='tooltip']").tooltip();
2257
+ }
2258
+ },
2259
+
2244
2260
  /**
2245
2261
  * 组装主力资金数据
2246
2262
  * @param obj
package/.npmignore DELETED
@@ -1 +0,0 @@
1
- sbd-npm.md