sbd-npm 1.4.42 → 1.4.43

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.4.42",
3
+ "version": "1.4.43",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -634,20 +634,21 @@ $(function () {
634
634
  machine_html.push('</select>');
635
635
  machine_html.push('</div>');
636
636
  machine_html.push('&nbsp;&nbsp;<a href="#" data-toggle="modal" data-target=".machine_action_modal" data-type="2" class="btn btn-warning">添加任务</a>');
637
- machine_html.push('<a href="#" data-toggle="modal" data-target=".client_cookie_modal" class="btn btn-warning">雪球Cookie</a>');
637
+ machine_html.push('<a href="#" data-toggle="modal" data-target=".machine_cookie_modal" class="btn btn-warning">雪球Cookie</a>');
638
638
  machine_html.push('<a href="#" id="machine_refresh" class="btn btn-warning">刷新Machine</a>');
639
639
  machine_html.push('</form>');
640
640
  machine_html.push('<div id="machine_process_div"></div>');
641
641
  $("#machine_div").html(machine_html.join(""));
642
642
  if (!document.getElementById("machine_action_add")) {
643
643
  Status.init_machine_action_modal();
644
- Status.init_client_cookie_modal();
644
+ Status.init_machine_cookie_modal();
645
645
  $("#machine_refresh").click(function() {
646
646
  if (confirm("是否确定要“ 刷新Machine ” ?")) {
647
647
  Util.show_loading();
648
648
  $("#machine_refresh").attr("disabled", true).html("正在处理中...");
649
649
  Util.post(location.pathname, {active_div: "machine_refresh"}, function (j) {
650
650
  setTimeout(function () {
651
+ $('#machine_process_div').html('');
651
652
  $('#machines').html('<option value="">暂无Machine</option>');
652
653
  $("#machine_refresh").html("刷新Machine").attr("disabled", false);
653
654
  Util.hide_tips();
@@ -851,78 +852,78 @@ $(function () {
851
852
  });
852
853
  },
853
854
 
854
- init_client_cookie_modal: function () {
855
- Util.init_modal_skeleton("client_cookie_modal");
856
- $("#client_cookie_modal_title").html("雪球Cookie");
855
+ init_machine_cookie_modal: function () {
856
+ Util.init_modal_skeleton("machine_cookie_modal");
857
+ $("#machine_cookie_modal_title").html("雪球Cookie");
857
858
  let html = [];
858
859
  html.push('<form data-parsley-validate class="form-horizontal form-label-left">');
859
860
  html.push('<div class="form-group" id="action_machine_div">');
860
861
  html.push('<label class="control-label col-md-3 col-sm-3 col-xs-12">Machine </label>');
861
862
  html.push('<div class="col-md-6 col-sm-6 col-xs-12">');
862
- html.push('<select id="client_cookie_machine" class="form-control col-md-7 col-xs-12">');
863
+ html.push('<select id="machine_cookie_machine" class="form-control col-md-7 col-xs-12">');
863
864
  html.push('<option value="">Loading...</option>');
864
865
  html.push('</select>');
865
866
  html.push('</div>');
866
867
  html.push('</div>');
867
868
  html.push('<div class="form-group">');
868
- html.push('<label class="control-label col-md-3 col-sm-3 col-xs-12" for="client_cookie_content">Cookie </label>');
869
+ html.push('<label class="control-label col-md-3 col-sm-3 col-xs-12" for="machine_cookie_content">Cookie </label>');
869
870
  html.push('<div class="col-md-6 col-sm-6 col-xs-12">');
870
- html.push('<textarea class="form-control" rows="10" id="client_cookie_content"></textarea>');
871
+ html.push('<textarea class="form-control" rows="10" id="machine_cookie_content"></textarea>');
871
872
  html.push('</div>');
872
873
  html.push('</div>');
873
874
  html.push('<div class="form-group">');
874
875
  html.push('<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">');
875
- html.push('<button id="client_cookie_add" type="button" class="btn btn-success">添 加</button>');
876
- html.push('<span id="client_cookie_tips"></span>');
876
+ html.push('<button id="machine_cookie_add" type="button" class="btn btn-success">添 加</button>');
877
+ html.push('<span id="machine_cookie_tips"></span>');
877
878
  html.push('</div>');
878
879
  html.push('</div>');
879
880
  html.push('</form>');
880
- let ccmb_obj = $("#client_cookie_modal_body");
881
+ let ccmb_obj = $("#machine_cookie_modal_body");
881
882
  ccmb_obj.html(html.join(""));
882
883
  ccmb_obj.parent().parent().removeClass("modal-xlg");
883
- let ccm_obj = $('#client_cookie_modal');
884
+ let ccm_obj = $('#machine_cookie_modal');
884
885
  ccm_obj.on('show.bs.modal', function (e) {
885
886
  Util.show_loading();
886
887
  Util.post(location.pathname, {active_div: "machine_action", action_type: 2}, function (j) {
887
888
  if (j["machines"]) {
888
- Status.pack_machine_component("client_cookie_machine", j["machines"]);
889
+ Status.pack_machine_component("machine_cookie_machine", j["machines"]);
889
890
  let machine = $("#machines").val();
890
891
  if (machine) {
891
- $("#client_cookie_machine").find("option[value='" + machine + "']").attr("selected", true);
892
+ $("#machine_cookie_machine").find("option[value='" + machine + "']").attr("selected", true);
892
893
  }
893
894
  }
894
895
  Util.hide_tips();
895
896
  });
896
897
  });
897
898
  ccm_obj.on('hidden.bs.modal', function () {
898
- $("#client_cookie_content").val("");
899
- $("#client_cookie_tips").html("");
899
+ $("#machine_cookie_content").val("");
900
+ $("#machine_cookie_tips").html("");
900
901
  Util.hide_tips();
901
902
  });
902
- $("#client_cookie_add").click(function() {
903
- let machine_id = $("#client_cookie_machine").val();
903
+ $("#machine_cookie_add").click(function() {
904
+ let machine_id = $("#machine_cookie_machine").val();
904
905
  if (machine_id) {
905
- let client_cookie = $("#client_cookie_content").val();
906
- if (client_cookie) {
906
+ let machine_cookie = $("#machine_cookie_content").val();
907
+ if (machine_cookie) {
907
908
  Util.show_loading();
908
- $("#client_cookie_tips").html("");
909
- $("#client_cookie_add").attr("disabled", true);
910
- Util.post(location.pathname, {active_div: "client_cookie_add", "machine_id": machine_id, "cookie": client_cookie}, function (j) {
911
- $("#client_cookie_add").attr("disabled", false);
909
+ $("#machine_cookie_tips").html("");
910
+ $("#machine_cookie_add").attr("disabled", true);
911
+ Util.post(location.pathname, {active_div: "machine_cookie_add", "machine_id": machine_id, "cookie": machine_cookie}, function (j) {
912
+ $("#machine_cookie_add").attr("disabled", false);
912
913
  if (j["code"] && j["code"] === 1) {
913
- $("#client_cookie_tips").html("<b class='text-success'>Cookie添加成功!</b>");
914
+ $("#machine_cookie_tips").html("<b class='text-success'>Cookie添加成功!</b>");
914
915
  } else if (j["code"] && j["code"] === 2) {
915
- $("#client_cookie_tips").html("<b class='text-danger'>Machine 不存在!</b>");
916
+ $("#machine_cookie_tips").html("<b class='text-danger'>Machine 不存在!</b>");
916
917
  } else {
917
- $("#client_cookie_tips").html("<b class='text-danger'>Cookie异常!</b>");
918
+ $("#machine_cookie_tips").html("<b class='text-danger'>Cookie异常!</b>");
918
919
  }
919
920
  Util.hide_tips();
920
921
  });
921
922
  } else {
922
- $("#client_cookie_tips").html("<b class='text-danger'>Cookie不能为空!</b>");
923
+ $("#machine_cookie_tips").html("<b class='text-danger'>Cookie不能为空!</b>");
923
924
  }
924
925
  } else {
925
- $("#client_cookie_tips").html("<b class='text-danger'>Machine 异常!</b>");
926
+ $("#machine_cookie_tips").html("<b class='text-danger'>Machine 异常!</b>");
926
927
  }
927
928
  return false;
928
929
  });
package/summary_daily.js CHANGED
@@ -534,7 +534,7 @@ $(function () {
534
534
  },
535
535
 
536
536
  render_market_overview_modal: function (obj) {
537
- let title = $.trim($(obj).text());
537
+ let title = $(obj).text().trim();
538
538
  $("#at_title").html("[" + title + "]数据");
539
539
  Util.set_table_loading("market_overview_load_status");
540
540
  if (Modal.mo_end_time === 0) {
package/util.js CHANGED
@@ -60,7 +60,7 @@ const Util = {
60
60
  $("[data-toggle='tooltip']").tooltip();
61
61
 
62
62
  $("#search-stock").click(function () {
63
- let code = $("#stock").val();
63
+ let code = $("#stock").val().trim();
64
64
  if (code) {
65
65
  if (window.location.pathname === "/status" && $("#word").hasClass('active') && (Util.is_alphabet(code) || Util.is_chinese(code))) {
66
66
  Util.fetch_word_data(0, "", code);