sbd-npm 1.3.95 → 1.3.98

Sign up to get free protection for your applications and to get access to all the features.
package/constant.js CHANGED
@@ -93,7 +93,7 @@ const MenuList = [
93
93
  ]
94
94
  },
95
95
  {
96
- 'name': '数字币',
96
+ 'name': '加密货币',
97
97
  'icon': 'btc',
98
98
  'menu': [
99
99
  {'key': 'coin_summary', 'name': '币种概况', 'url': '/0xe244823c82ac550749d230e467b4b7045b3662a5'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.95",
3
+ "version": "1.3.98",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/summary_daily.js CHANGED
@@ -73,9 +73,12 @@ $(function () {
73
73
  return false;
74
74
  }
75
75
  Util.show_loading();
76
- Util.post(location.pathname, {date: $("#trade_date").val(), action: "market_overview"}, function (j) {
76
+ Util.post(location.pathname, {date: $("#trade_date").val(), action: "market_overview", is_init: Util.is_init}, function (j) {
77
77
  DailySummary.pack_market_overview(j["market_overview"]);
78
78
  DailySummary.fetch_statistics_daily();
79
+ if (j["date"] && !Util.is_mobile()) {
80
+ DailySummary.init_date_component(j["date"]);
81
+ }
79
82
  DailySummary.fetch_hsgt_ten(0);
80
83
  });
81
84
  },
@@ -492,6 +495,22 @@ $(function () {
492
495
  $("#index_hist_modal_url").attr("href", c["url"]);
493
496
  }
494
497
  });
498
+ },
499
+
500
+ init_date_component: function(trade_date) {
501
+ let date_html = [];
502
+ date_html.push('<ul class="nav navbar-nav" style="margin-top: 10px;"><li class="nav-item">');
503
+ date_html.push('<div class="form-group">');
504
+ date_html.push('<label for="trade_date"></label>');
505
+ date_html.push('<div class="col-md-6 col-sm-6 col-xs-12 form-group" style="width: 200px;">');
506
+ date_html.push('<input type="text" class="form-control has-feedback-left" id="trade_date" name="trade_date" title="时间" placeholder="时间" value="">');
507
+ date_html.push('<span class="fa fa-calendar-o form-control-feedback left" aria-hidden="true"></span>');
508
+ date_html.push('</div>');
509
+ date_html.push('</div>');
510
+ date_html.push('</li></ul>');
511
+ $('.top_nav .nav_menu nav div.toggle').after(date_html.join(""));
512
+ $("#trade_date").val(Util.seconds_to_format(trade_date, "%Y-%m-%d"));
513
+ Util.init_date_range_picker("trade_date", DailySummary.fetch_data);
495
514
  }
496
515
 
497
516
  };
package/util.js CHANGED
@@ -1439,15 +1439,22 @@ const Util = {
1439
1439
  * @param component_id
1440
1440
  */
1441
1441
  init_public_fund_component: function (component_id) {
1442
- let modal_content_html = '<table class="table table-bordered table-hover table-striped text-center"><caption></caption><tbody id="' + component_id + '_body_body"><tr><td colspan="2">Loading...</td></tr></tbody></table>';
1442
+ let modal_content_html = '<table class="table table-bordered table-hover table-striped text-center"><tbody id="' + component_id + '_body_body"><tr><td colspan="2">Loading...</td></tr></tbody></table>';
1443
1443
  Util.init_modal_skeleton(component_id, modal_content_html);
1444
1444
  let component_obj = $('#' + component_id);
1445
1445
  component_obj.on('shown.bs.modal', function (e) {
1446
1446
  let fund_code = $(e.relatedTarget).attr("data-val");
1447
- Util.fetch_public_fund_detail(fund_code, component_id);
1447
+ if (fund_code) {
1448
+ Util.fetch_public_fund_detail(fund_code, component_id);
1449
+ } else {
1450
+ let request_arguments = Util.request_arguments();
1451
+ if (request_arguments["fund_code"]) {
1452
+ Util.fetch_public_fund_detail(request_arguments["fund_code"], component_id);
1453
+ }
1454
+ }
1448
1455
  });
1449
1456
  component_obj.on('hidden.bs.modal', function () {
1450
- $("#" + component_id + "_body_body").html("<tr><td colspan='12'>Loading...</td></tr>");
1457
+ $("#" + component_id + "_body_body").html("<tr><td colspan='14'>Loading...</td></tr>");
1451
1458
  Util.hide_tips();
1452
1459
  });
1453
1460
  },
@@ -1461,7 +1468,7 @@ const Util = {
1461
1468
  if (!fund_code) {
1462
1469
  return;
1463
1470
  }
1464
- $("#" + component_id + "_body_body").html("<tr><td colspan='12'>Loading...</td></tr>");
1471
+ $("#" + component_id + "_body_body").html("<tr><td colspan='14'>Loading...</td></tr>");
1465
1472
  $("#" + component_id + "_title").html(fund_code);
1466
1473
  Util.post(Util.get_url("fund_public"), {action: "public_fund_detail", fund_code: fund_code}, function (j) {
1467
1474
  let _html = [];
@@ -1484,10 +1491,11 @@ const Util = {
1484
1491
  _html.push("<tr><td colspan='3'>单位净值</td><td colspan='4'>", net, "</td><td colspan='3'>资产规模</td><td colspan='4'>", assets, "</td></tr>");
1485
1492
  _html.push("<tr><td colspan='3'>成立日期</td><td colspan='4'>", public_date, "</td><td colspan='3'>发行日期</td><td colspan='4'>", issue_date, "</td></tr>");
1486
1493
  _html.push("<tr><td colspan='3'>基金管理公司</td><td colspan='4'>", Util.pack_fund_administrator(j), "</td><td colspan='3'>基金经理</td><td colspan='4'>", Util.pack_fund_manager(j), "</td></tr>");
1487
- _html.push("<tr><td colspan='5'>基金托管人</td><td colspan='9'>", (j["custodian"] ? j["custodian"] : "--"), "</td></tr>");
1488
- _html.push("<tr><td colspan='5'>经办律师事务所</td><td colspan='9'>", (j["lawyer"] ? j["lawyer"] : "--"), "</td></tr>");
1489
- _html.push("<tr><td colspan='5'>会计师事务所</td><td colspan='9'>", (j["accounting"] ? j["accounting"] : "--"), "</td></tr>");
1490
- _html.push("<tr><td colspan='5'>注册地址</td><td colspan='9'>", Util.map_url(j["location"], j["location"]), "</td></tr>");
1494
+ _html.push("<tr><td colspan='3'>基金托管人</td><td colspan='4'>", (j["custodian"] ? j["custodian"] : "--"), "</td><td colspan='3'>经办律师事务所</td><td colspan='4'>", (j["lawyer"] ? j["lawyer"] : "--"), "</td></tr>");
1495
+ _html.push("<tr><td colspan='3'>会计师事务所</td><td colspan='4'>", (j["accounting"] ? j["accounting"] : "--"), "</td><td colspan='3'>注册地址</td><td colspan='4'>", Util.map_url(j["location"], j["location"]), "</td></tr>");
1496
+ _html.push("<tr><td colspan='3'>近一周</td><td colspan='4'>", Util.parse_ratio(j["one_week_change"]), "</td><td colspan='3'>近一月</td><td colspan='4'>", Util.parse_ratio(j["one_month_change"]), "</td></tr>");
1497
+ _html.push("<tr><td colspan='3'>近一年</td><td colspan='4'>", Util.parse_ratio(j["one_year_change"]), "</td><td colspan='3'>年初至今</td><td colspan='4'>", Util.pack_html_link('https://fundf10.eastmoney.com/jdzf_' + j["fund_code"] + '.html', Util.parse_ratio(j["ytd_change"])), "</td></tr>");
1498
+ _html.push("<tr><td colspan='5'>成立以来</td><td colspan='9'>", Util.parse_ratio(j["establish_change"]), "</td></tr>");
1491
1499
  _html.push("<tr class='info'><th colspan='14' text-align='center'>", Util.pack_html_link("http://fund.eastmoney.com/f10/ccmx_" + j["fund_code"] + ".html", "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
1492
1500
  _html.push("<tr id='" + component_id + "_head'><th>序号</th><th>股票代码</th><th>股票名</th><th>PE</th><th>总市值</th><th>行业</th><th>地区</th><th>价格</th><th>年初至今</th><th>近5日</th><th>股东数</th><th>持有量</th><th class='info'>占比</th><th>持仓市值</th></tr>");
1493
1501
  _html.push("<tr class='" + component_id + "_tr'><td colspan='14'>暂无数据</td></tr>");