sbd-npm 1.2.92 → 1.2.93

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/util.js +19 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.92",
3
+ "version": "1.2.93",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -496,7 +496,7 @@ const Util = {
496
496
  html.push("<td>", Util.stock_url(item["code"], name), "</td>");
497
497
  html.push("<td>", (item["sector"] ? item["sector"] : "--"), "</td>");
498
498
  html.push("<td>", Util.industry_url(item["code"], item["industry"]), "</td>");
499
- html.push("<td>", Util.map_url(item["registered"]), "</td>");
499
+ html.push("<td>", Util.google_map_url(item["registered"]), "</td>");
500
500
  html.push("<td>", Util.to_float((item["pe_ttm"] ? item["pe_ttm"] : item["pe"]), 2), "</td>");
501
501
  html.push("<td>", Util.to_float(item["total_shares"], 2), "亿</td>");
502
502
  html.push("<td>", Util.to_float(item["market_capital"], 3), "亿</td>");
@@ -1155,7 +1155,12 @@ const Util = {
1155
1155
  }
1156
1156
  }
1157
1157
  });
1158
- let payload = {action: "public_fund_stock", fund_code: fund_code, date: date, pre_date: pre_date};
1158
+ let payload = {
1159
+ action: "public_fund_stock",
1160
+ fund_code: fund_code,
1161
+ date: date,
1162
+ pre_date: pre_date
1163
+ };
1159
1164
  Util.post(Util.get_url("fund_public"), payload, function (j) {
1160
1165
  $("." + component_tr).each(function () {
1161
1166
  $(this).remove();
@@ -2344,8 +2349,18 @@ const Util = {
2344
2349
  if (tips_obj.length) {
2345
2350
  tips_obj.html('共 <span class="label label-info">' + code_list.length + '</span> 家');
2346
2351
  }
2347
- //获取股票详情数据
2348
- Util.post("/action", {action: "code_detail", code_list: code_list.join("-")}, function (j) {
2352
+ let payload = {action: "code_detail", code_list: code_list.join("-")};
2353
+ $("#" + element_id).parent().find('thead td').each(function() {
2354
+ let title = $(this).text();
2355
+ if (title === "股东数") {
2356
+ payload["is_holder"] = 1;
2357
+ } else if (title === "基金数") {
2358
+ payload["is_fund"] = 1;
2359
+ } else if (title === "主力资金") {
2360
+ payload["is_money_inflow"] = 1;
2361
+ }
2362
+ });
2363
+ Util.post("/action", payload, function (j) {
2349
2364
  let valid_code_list = [];
2350
2365
  let total_change_percent = 0, total_year_change_percent = 0, total_d5_change_percent = 0;
2351
2366
  $.each(j, function (code, item) {