sbd-npm 1.3.55 → 1.3.57

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.3.55",
3
+ "version": "1.3.57",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/status.js CHANGED
@@ -415,8 +415,10 @@ $(function () {
415
415
  if (md5) {
416
416
  Util.show_loading();
417
417
  $("#md5").prop('disabled', true);
418
+ $("#md5_encrypt").attr("disabled", true);
418
419
  Util.post("/action", {action: "md5", md5: md5}, function (md5_result) {
419
420
  $("#md5").prop('disabled', false);
421
+ $("#md5_encrypt").attr("disabled", false);
420
422
  $("#md5_result").html("<b class='text-success'>" + md5_result + "</b>");
421
423
  Util.hide_tips();
422
424
  }, "text");
@@ -578,8 +580,13 @@ $(function () {
578
580
  ip_obj.on('show.bs.modal', function (e) {
579
581
  $("#ip_daily_search").click(function() {
580
582
  Util.show_loading();
581
- let data = {active_div: "ip_daily_search", ip: $("#search_ip").val(), location: $("#search_location").val(), referer: $("#search_referer").val()};
582
- Util.post(location.pathname, data, function (j) {
583
+ let payload = {
584
+ active_div: "ip_daily_search",
585
+ ip: $("#search_ip").val(),
586
+ location: $("#search_location").val(),
587
+ referer: $("#search_referer").val()
588
+ };
589
+ Util.post(location.pathname, payload, function (j) {
583
590
  Status.render_ip_daily(j["ip_daily_data"]);
584
591
  Util.hide_tips();
585
592
  });
@@ -591,7 +598,6 @@ $(function () {
591
598
  $("#search_ip").val("");
592
599
  $("#search_location").val("");
593
600
  $("#search_referer").val("");
594
- Util.hide_tips();
595
601
  });
596
602
 
597
603
  let request_arguments = Util.request_arguments();
package/stock_basics.js CHANGED
@@ -86,9 +86,6 @@ let Stock = {
86
86
  Stock.fetch_report_organization();
87
87
  break;
88
88
  case "public_fund":
89
- $("#is_fund_ten").click(function () {
90
- Stock.fetch_public_fund();
91
- });
92
89
  Stock.fetch_public_fund();
93
90
  break;
94
91
  case "public_fund_change":
@@ -934,7 +931,7 @@ let Stock = {
934
931
  {"name": "资产规模", "table_sort": 1},
935
932
  {"name": "基金类型"},
936
933
  {"name": "投资类型"},
937
- {"name": "基金管理公司"},
934
+ {"name": "基金公司"},
938
935
  {"name": "成立日期", "table_sort": 1},
939
936
  {"name": "持有量", "table_sort": 1, "class": "info"},
940
937
  {"name": "持仓市值", "table_sort": 1},
@@ -943,8 +940,7 @@ let Stock = {
943
940
  });
944
941
  let payload = {
945
942
  action: "public_fund",
946
- public_fund_date: $("#public_fund_date").val(),
947
- is_fund_ten: $("#is_fund_ten").prop("checked") ? 1 : 0
943
+ public_fund_date: $("#public_fund_date").val()
948
944
  };
949
945
  Util.post("/stock/" + Stock["code"], payload, function (j) {
950
946
  let _html = [], total_public_fund = 0, total_stock_num = 0, total_market_capital = 0;
@@ -977,8 +973,16 @@ let Stock = {
977
973
  _html.push("</tr>");
978
974
  });
979
975
  Util.render_table_html("public_fund_table_body", _html);
980
- total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + total_public_fund + '</span>');
981
- $("#public_fund_tips").html('共 ' + total_public_fund + ' 家, <span class="label label-info">' + Util.to_unit(total_stock_num, 3) + '</span> 股,<span class="label label-info">' + Util.to_unit(total_market_capital, 3) + '</span>市值');
976
+ let public_fund_tips = "";
977
+ if (j["statistics"] && j["statistics"]["cur_fund_num"]) {
978
+ let sf = j["statistics"];
979
+ total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + sf["cur_fund_num"] + '</span>');
980
+ public_fund_tips = '共 ' + total_public_fund + ' 家(' + Util.year_price_rate(sf["cur_fund_num"], sf["pre_fund_num"], 1) + '), <span class="label label-info">' + Util.to_unit(total_stock_num, 3) + '</span> 股(' + Util.year_price_rate(sf["cur_stock_num"], sf["pre_stock_num"], 1) + '),<span class="label label-info">' + Util.to_unit(total_market_capital, 3) + '</span>市值';
981
+ } else {
982
+ total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + total_public_fund + '</span>');
983
+ public_fund_tips = '共 ' + total_public_fund + ' 家, <span class="label label-info">' + Util.to_unit(total_stock_num, 3) + '</span> 股,<span class="label label-info">' + Util.to_unit(total_market_capital, 3) + '</span>市值';
984
+ }
985
+ $("#public_fund_tips").html(public_fund_tips);
982
986
  if (j["date"] && j["date"] > 0) {
983
987
  $("#public_fund_title").find("a").each(function() {
984
988
  let t_text = $(this).text();
package/util.js CHANGED
@@ -1012,7 +1012,11 @@ const Util = {
1012
1012
  code_list = code_list.length > 0 ? code_list.join("-") : "all";
1013
1013
  Util.post("/action", {action: "classify_num", code_list: code_list}, function (j) {
1014
1014
  if (j["data"]) {
1015
+ let classify_val = $("#" + classify_id).val();
1015
1016
  Util.render_classify_html(classify_id, j["data"], callback_func);
1017
+ if (classify_val && classify_val !== "0") {
1018
+ $("#" + classify_id).val(classify_val);
1019
+ }
1016
1020
  }
1017
1021
  });
1018
1022
  },