sbd-npm 1.4.46 → 1.4.48

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.46",
3
+ "version": "1.4.48",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/status.js CHANGED
@@ -235,7 +235,7 @@ $(function () {
235
235
  }
236
236
  Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
237
237
  let html = [], ip_num = j["num"];
238
- $("#ip_num").html("共 <span class='label label-info'>" + j["num"] + "</span> 条(" + j["total_ip_num"] + ")");
238
+ $("#ip_num").html("共 <span class='label label-info'>" + j["num"] + "</span> 条(" + j["total_ip_num"] + ")&nbsp;");
239
239
  j["data"].forEach(function (item) {
240
240
  html.push("<tr>");
241
241
  html.push("<td>", ip_num, "</td>");
@@ -1006,7 +1006,7 @@ $(function () {
1006
1006
  if (j["word"]) {
1007
1007
  $("#word_value").val(j["word"]);
1008
1008
  $("#word_chinese").val(j["chinese"]);
1009
- $("#word_modal_title").html(Util.pack_html_link("https://cn.bing.com/dict/search?q=" + j["word"], "随机单词"));
1009
+ $("#word_modal_title").html(Util.pack_html_link("https://cn.bing.com/dict/search?q=" + j["word"], "随机单词") + " <span style='color: #BDBDBD;'>(" + Util.seconds_to_format(j["date"]) + ")</span>");
1010
1010
  }
1011
1011
  });
1012
1012
  } else {
@@ -1290,6 +1290,37 @@ $(function () {
1290
1290
 
1291
1291
  };
1292
1292
 
1293
+ Util.init_modal_skeleton("ip_modal");
1294
+ $("#ip_modal_title").html("IP查询");
1295
+ let ip_html = [];
1296
+ ip_html.push('<form data-parsley-validate class="form-horizontal form-label-left">');
1297
+ ip_html.push('<div class="form-group">');
1298
+ ip_html.push('<label class="control-label col-md-3 col-sm-3 col-xs-12" for="search_ip">IP地址 </label>');
1299
+ ip_html.push('<div class="col-md-6 col-sm-6 col-xs-12">');
1300
+ ip_html.push('<input type="text" id="search_ip" name="search_ip" placeholder="IP地址(支持模糊查询)" class="form-control col-md-7 col-xs-12">');
1301
+ ip_html.push('</div>');
1302
+ ip_html.push('</div>');
1303
+ ip_html.push('<div class="form-group">');
1304
+ ip_html.push('<label class="control-label col-md-3 col-sm-3 col-xs-12" for="search_location">地址信息 </label>');
1305
+ ip_html.push('<div class="col-md-6 col-sm-6 col-xs-12">');
1306
+ ip_html.push('<input type="text" id="search_location" name="search_location" placeholder="地址信息" class="form-control col-md-7 col-xs-12">');
1307
+ ip_html.push('</div>');
1308
+ ip_html.push('</div>');
1309
+ ip_html.push('<div class="form-group">');
1310
+ ip_html.push('<label class="control-label col-md-3 col-sm-3 col-xs-12" for="search_referer">访问来源 </label>');
1311
+ ip_html.push('<div class="col-md-6 col-sm-6 col-xs-12">');
1312
+ ip_html.push('<input type="text" id="search_referer" name="search_referer" placeholder="访问来源" class="form-control col-md-7 col-xs-12">');
1313
+ ip_html.push('</div>');
1314
+ ip_html.push('</div>');
1315
+ ip_html.push('<div class="form-group">');
1316
+ ip_html.push('<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">');
1317
+ ip_html.push('<button id="ip_daily_search" type="button" class="btn btn-success">查 询</button>');
1318
+ ip_html.push('</div>');
1319
+ ip_html.push('</div>');
1320
+ ip_html.push('</form>');
1321
+ let imb_obj = $("#ip_modal_body");
1322
+ imb_obj.html(ip_html.join(""));
1323
+ imb_obj.parent().parent().removeClass("modal-xlg");
1293
1324
  let ip_obj = $('#ip_modal');
1294
1325
  // 此事件在模态框已经显示出来触发
1295
1326
  ip_obj.on('show.bs.modal', function (e) {
package/stock_basics.js CHANGED
@@ -287,9 +287,18 @@ let Stock = {
287
287
  sort_order: Stock.sort_order,
288
288
  start_date: $("#hist_start_date").val(),
289
289
  end_date: $("#hist_end_date").val(),
290
- hist_type: hist_type
290
+ hist_type: hist_type,
291
+ is_init: Stock.data.hasOwnProperty(localStorage[Stock.tab_token]) ? 1 : 0
291
292
  };
292
293
  Util.post("/stock/" + Stock["code"], payload, function (j) {
294
+ if (j["init_start_date"]) {
295
+ let init_start_date = Util.seconds_to_format(j["init_start_date"], "%Y-%m-%d");
296
+ $("#hist_start_date").val(init_start_date).data('daterangepicker').setStartDate(init_start_date);
297
+ }
298
+ if (j["init_end_date"]) {
299
+ let init_end_date = Util.seconds_to_format(j["init_end_date"], "%Y-%m-%d");
300
+ $("#hist_end_date").val(init_end_date).data('daterangepicker').setStartDate(init_end_date);
301
+ }
293
302
  Stock.hist_type = "";
294
303
  let html = [], hist_low_price = 0, hist_high_price = 0, total_amount = 0, total_volume = 0;
295
304
  j["data"].forEach(function (item) {