sbd-npm 1.4.96 → 1.4.98
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 +1 -1
- package/status.js +159 -157
- package/stock_basics.js +192 -192
- package/summary_daily.js +32 -32
- package/util.js +44 -44
package/summary_daily.js
CHANGED
|
@@ -74,7 +74,7 @@ $(function () {
|
|
|
74
74
|
}
|
|
75
75
|
Util.show_loading();
|
|
76
76
|
Util.post(location.pathname, {date: $("#trade_date").val(), action: "market_overview", is_init: Util.is_init}, function (j) {
|
|
77
|
-
DailySummary.pack_market_overview(j
|
|
77
|
+
DailySummary.pack_market_overview(j.market_overview);
|
|
78
78
|
DailySummary.fetch_statistics_daily();
|
|
79
79
|
if (j.date && !Util.is_mobile()) {
|
|
80
80
|
DailySummary.init_date_component(j.date);
|
|
@@ -90,10 +90,10 @@ $(function () {
|
|
|
90
90
|
let html = [], change_color_data = [];
|
|
91
91
|
index_data.forEach(function (item) {
|
|
92
92
|
let cls = "", sort = "";
|
|
93
|
-
if (item
|
|
93
|
+
if (item.change > 0) {
|
|
94
94
|
cls = "red";
|
|
95
95
|
sort = "fa-sort-asc";
|
|
96
|
-
} else if (item
|
|
96
|
+
} else if (item.change < 0) {
|
|
97
97
|
cls = "green";
|
|
98
98
|
sort = "fa-sort-desc";
|
|
99
99
|
}
|
|
@@ -111,14 +111,14 @@ $(function () {
|
|
|
111
111
|
let index_name = item.href ? Util.pack_html_link(item.href, item.name) : item.name;
|
|
112
112
|
html.push('<span class="count_top"><i class="fa"></i> ', index_name, '</span>');
|
|
113
113
|
html.push('<div class="count ', cls, '">', item.value, '</div>');
|
|
114
|
-
html.push('<span class="count_bottom"><i class="', cls, '"><i class="fa ', sort, '"></i>', item
|
|
114
|
+
html.push('<span class="count_bottom"><i class="', cls, '"><i class="fa ', sort, '"></i>', item.change, '(<span id="', change_rate_id, '">', Util.to_float(item.change_rate, 2), '</span>%)</i></span>');
|
|
115
115
|
html.push('</div>');
|
|
116
116
|
});
|
|
117
117
|
$("#index_summary_data").html(html.join(""));
|
|
118
118
|
change_color_data.forEach(function (item) {
|
|
119
119
|
let change_rate_obj = $("#change_rate_" + item.key);
|
|
120
|
-
change_rate_obj.css("background-color", item
|
|
121
|
-
change_rate_obj.animate({backgroundColor: item
|
|
120
|
+
change_rate_obj.css("background-color", item.new);
|
|
121
|
+
change_rate_obj.animate({backgroundColor: item.origin}, 2000);
|
|
122
122
|
});
|
|
123
123
|
},
|
|
124
124
|
|
|
@@ -270,12 +270,12 @@ $(function () {
|
|
|
270
270
|
news_data.forEach(function (item) {
|
|
271
271
|
html.push('<li><div class="block"><div class="block_content">');
|
|
272
272
|
let title = item.title.replace(/\\/g, ""); // JavaScript 中斜杠和反斜杠的替换
|
|
273
|
-
if (item
|
|
273
|
+
if (item.is_pbc && parseInt(item.is_pbc) === 1) {
|
|
274
274
|
title = "<b class='text-danger'>" + title + "</b>";
|
|
275
275
|
}
|
|
276
276
|
html.push('<h2 class="title">', Util.pack_html_link(item.url, title), '</h2>');
|
|
277
277
|
html.push('<div class="byline"><span>', Util.seconds_to_format(item.ctime), '</span></div>');
|
|
278
|
-
html.push('<p class="excerpt">', item
|
|
278
|
+
html.push('<p class="excerpt">', item.content, '</p>');
|
|
279
279
|
html.push('</div></div></li>');
|
|
280
280
|
});
|
|
281
281
|
$("#news_list").html(html.join(""));
|
|
@@ -361,14 +361,14 @@ $(function () {
|
|
|
361
361
|
news_type: $("#news_type").val()
|
|
362
362
|
};
|
|
363
363
|
Util.post(location.pathname, payload, function (j) {
|
|
364
|
-
DailySummary.pack_index_summary_data(j
|
|
364
|
+
DailySummary.pack_index_summary_data(j.index);
|
|
365
365
|
DailySummary.pack_change_percent(j.change_percent);
|
|
366
|
-
DailySummary.pack_big_deal(j
|
|
367
|
-
DailySummary.pack_hsgt_money_flow(j
|
|
368
|
-
DailySummary.pack_news_data(j
|
|
369
|
-
DailySummary.set_cache("index", j
|
|
366
|
+
DailySummary.pack_big_deal(j.big_deal, j.big_deal_date);
|
|
367
|
+
DailySummary.pack_hsgt_money_flow(j.hmf);
|
|
368
|
+
DailySummary.pack_news_data(j.news);
|
|
369
|
+
DailySummary.set_cache("index", j.index);
|
|
370
370
|
DailySummary.set_cache("change_percent", j.change_percent);
|
|
371
|
-
DailySummary.set_cache("news", j
|
|
371
|
+
DailySummary.set_cache("news", j.news);
|
|
372
372
|
Util.hide_tips();
|
|
373
373
|
if (DailySummary.is_trade_time === 1) {
|
|
374
374
|
setTimeout(DailySummary.fetch_statistics_daily, 9876);
|
|
@@ -387,8 +387,8 @@ $(function () {
|
|
|
387
387
|
Util.show_loading();
|
|
388
388
|
let date = $("#trade_date").val();
|
|
389
389
|
Util.post(location.pathname, {date: date, action: "hsgt_stock", "hsgt_type": hsgt_type}, function (j) {
|
|
390
|
-
DailySummary.pack_hsgt_ten(j.data, "hgt", j
|
|
391
|
-
DailySummary.pack_hsgt_ten(j.data, "sgt", j
|
|
390
|
+
DailySummary.pack_hsgt_ten(j.data, "hgt", j.url);
|
|
391
|
+
DailySummary.pack_hsgt_ten(j.data, "sgt", j.url);
|
|
392
392
|
let date_format = Util.seconds_to_format(j.date, "%Y-%m-%d");
|
|
393
393
|
if (date !== date_format) {
|
|
394
394
|
$("#hgt_zone_tips").html("(" + date_format + ")");
|
|
@@ -419,7 +419,7 @@ $(function () {
|
|
|
419
419
|
return d1["value"] > d2["value"] ? -1 : 1;
|
|
420
420
|
});
|
|
421
421
|
new_data.forEach(function (item) {
|
|
422
|
-
let stock_url = "<td title='" + item
|
|
422
|
+
let stock_url = "<td title='" + item.code + "'><a href='#' data-code='" + item.code + "' data-toggle='modal' data-target='.hsgt_stock_detail_modal'>" + item.name + "</a></td>";
|
|
423
423
|
let buy = "<td title='买入金额-" + item.buy + "'>" + Util.to_hundred_million(item.buy) + "亿</td>";
|
|
424
424
|
let sell = "<td title='卖出金额-" + item.sell + "'>" + Util.to_hundred_million(item.sell) + "亿</td>";
|
|
425
425
|
let value = "<td>" + Util.to_hundred_million(item.value) + "亿</td>";
|
|
@@ -455,15 +455,15 @@ $(function () {
|
|
|
455
455
|
html.push("<td>", item.open, "</td>");
|
|
456
456
|
html.push("<td>", item.low, "</td>");
|
|
457
457
|
html.push("<td>", item.high, "</td>");
|
|
458
|
-
html.push("<td data-val='", item.close, "'><b class='", Util.text_color(item
|
|
459
|
-
html.push("<td>", Util.parse_ratio(item
|
|
458
|
+
html.push("<td data-val='", item.close, "'><b class='", Util.text_color(item.p_change_rate), "'>", item.close, "</b></td>");
|
|
459
|
+
html.push("<td>", Util.parse_ratio(item.p_change_rate), "</td>");
|
|
460
460
|
html.push("<td data-val='", item.volume, "'>", Util.to_unit(item.volume), "股</td>");
|
|
461
461
|
let amount = Util.to_unit(item.amount, 3);
|
|
462
|
-
if (item
|
|
463
|
-
if (item.amount > item
|
|
464
|
-
amount += "<b class='text-danger'>(+" + Util.to_unit(item.amount - item
|
|
465
|
-
} else if (item.amount < item
|
|
466
|
-
amount += "<b class='text-success'>(" + Util.to_unit(item.amount - item
|
|
462
|
+
if (item.pre_amount) {
|
|
463
|
+
if (item.amount > item.pre_amount) {
|
|
464
|
+
amount += "<b class='text-danger'>(+" + Util.to_unit(item.amount - item.pre_amount, 3) + ")</b>";
|
|
465
|
+
} else if (item.amount < item.pre_amount) {
|
|
466
|
+
amount += "<b class='text-success'>(" + Util.to_unit(item.amount - item.pre_amount, 3) + ")</b>";
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
html.push("<td data-val='", item.amount, "'>", amount, "</td>");
|
|
@@ -548,7 +548,7 @@ $(function () {
|
|
|
548
548
|
if (data_type === "amount") {
|
|
549
549
|
let total_data = [];
|
|
550
550
|
j.data.forEach(function (item) {
|
|
551
|
-
let total_val = Util.to_float(item
|
|
551
|
+
let total_val = Util.to_float(item.sh + item.szm + item.sme + item.gem, 2);
|
|
552
552
|
total_data.push({"date": item.date, "total": total_val});
|
|
553
553
|
});
|
|
554
554
|
DailySummary.mo_total_chart = Modal.render_market_overview_line(total_data, "total", "market_overview_total", "总" + title, DailySummary.mo_total_chart);
|
|
@@ -610,8 +610,8 @@ $(function () {
|
|
|
610
610
|
html = Util.stock_basics_html(html, item);
|
|
611
611
|
html.push("<td>", Util.year_price_rate(item.stock_price, item.year_price), "</td>");
|
|
612
612
|
html.push("<td class='holder_", item.code, "'>--</td>");
|
|
613
|
-
if (item
|
|
614
|
-
html.push("<td title='连续涨停" + item
|
|
613
|
+
if (item.continue_top_day) {
|
|
614
|
+
html.push("<td title='连续涨停" + item.continue_top_day + "天'>", Util.parse_ratio(item.p_change), " <span class='badge alert-danger'>" + item.continue_top_day + "<span></td>");
|
|
615
615
|
} else {
|
|
616
616
|
html.push("<td>", Util.parse_ratio(item.p_change), "</td>");
|
|
617
617
|
}
|
|
@@ -628,10 +628,10 @@ $(function () {
|
|
|
628
628
|
let html = [], index = 0;
|
|
629
629
|
j.data.forEach(function (item) {
|
|
630
630
|
index++;
|
|
631
|
-
html.push("<tr title='", item
|
|
631
|
+
html.push("<tr title='", item.content, "'>");
|
|
632
632
|
html.push('<td>' + Util.pack_html_link(item.url, item.title.replace(/\\/g, "")) + '</td>');
|
|
633
633
|
html.push("<td>", Util.seconds_to_format(item.ctime), "</td>");
|
|
634
|
-
html.push("<td>", Util.substring(item
|
|
634
|
+
html.push("<td>", Util.substring(item.content, 40), "</td>");
|
|
635
635
|
html.push("</tr>");
|
|
636
636
|
});
|
|
637
637
|
Util.render_table_html("news_modal_body_body", html);
|
|
@@ -770,9 +770,9 @@ $(function () {
|
|
|
770
770
|
let news_type = parseInt($("#news_type").val());
|
|
771
771
|
let payload = {action: "news", limit_num: DailySummary.limit_num(), news_type: news_type};
|
|
772
772
|
Util.post(location.pathname, payload, function (j) {
|
|
773
|
-
DailySummary.pack_news_data(j
|
|
774
|
-
if (news_type === 2 && j
|
|
775
|
-
$("#news_type").attr("title", Util.seconds_to_format(j
|
|
773
|
+
DailySummary.pack_news_data(j.news_data);
|
|
774
|
+
if (news_type === 2 && j.news_time) {
|
|
775
|
+
$("#news_type").attr("title", Util.seconds_to_format(j.news_time));
|
|
776
776
|
} else {
|
|
777
777
|
$("#news_type").removeAttr("title");
|
|
778
778
|
}
|
package/util.js
CHANGED
|
@@ -85,8 +85,8 @@ const Util = {
|
|
|
85
85
|
}
|
|
86
86
|
} else {
|
|
87
87
|
Util.post("/action", {action: "rand_stock", stock_type: "cn"}, function (j) {
|
|
88
|
-
if (j
|
|
89
|
-
window.open("/stock/" + j
|
|
88
|
+
if (j.code) {
|
|
89
|
+
window.open("/stock/" + j.code, "_blank");
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
}
|
|
@@ -186,7 +186,7 @@ const Util = {
|
|
|
186
186
|
Util.post("/action", {action: "search", key_word: $("#stock").val()}, function (j) {
|
|
187
187
|
let key_word = $("#stock").val().trim();
|
|
188
188
|
if (key_word) {
|
|
189
|
-
if (key_word === j
|
|
189
|
+
if (key_word === j.key_word) {
|
|
190
190
|
let html = [];
|
|
191
191
|
html.push('<div class="list-group">');
|
|
192
192
|
if (j.data && j.data.length > 0) {
|
|
@@ -666,8 +666,8 @@ const Util = {
|
|
|
666
666
|
$(this).attr("disabled", true);
|
|
667
667
|
Util.post("/action", {action: "rand_stock", stock_type: stock_type}, function (j) {
|
|
668
668
|
$("#" + rand_btn_id).attr("disabled", false);
|
|
669
|
-
if (j
|
|
670
|
-
window.open("/stock/" + j
|
|
669
|
+
if (j.code) {
|
|
670
|
+
window.open("/stock/" + j.code, "_blank");
|
|
671
671
|
}
|
|
672
672
|
});
|
|
673
673
|
return false;
|
|
@@ -1308,9 +1308,9 @@ const Util = {
|
|
|
1308
1308
|
});
|
|
1309
1309
|
Util.render_table_html("public_fund_table_body", html);
|
|
1310
1310
|
let public_fund_tips = "";
|
|
1311
|
-
if (j
|
|
1312
|
-
total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + j
|
|
1313
|
-
public_fund_tips = '共 ' + total_public_fund + ' 家(' + Util.year_price_rate(j
|
|
1311
|
+
if (j.cur_fund_num) {
|
|
1312
|
+
total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + j.cur_fund_num + '</span>');
|
|
1313
|
+
public_fund_tips = '共 ' + total_public_fund + ' 家(' + Util.year_price_rate(j.cur_fund_num, j.pre_fund_num, 1) + '), <span class="label label-info">' + Util.to_unit(j.cur_stock_num, 3) + '</span> 股(' + Util.year_price_rate(j.cur_stock_num, j.pre_stock_num, 1) + '),<span class="label label-info">' + Util.to_unit(j.hold_value, 3) + '</span>市值';
|
|
1314
1314
|
} else {
|
|
1315
1315
|
total_public_fund = Util.pack_html_link(Util.get_url("trend_fund_hold"), '<span class="label label-info">' + total_public_fund + '</span>');
|
|
1316
1316
|
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>市值';
|
|
@@ -1477,12 +1477,12 @@ const Util = {
|
|
|
1477
1477
|
Util["portfolio_table_id"] = table_id;
|
|
1478
1478
|
Util.post(location.pathname, {active_div: portfolio}, function (j) {
|
|
1479
1479
|
Util["portfolio_data"] = j.data ? j.data : [];
|
|
1480
|
-
Util["portfolio_index"] = j
|
|
1480
|
+
Util["portfolio_index"] = j.index_list ? j.index_list : [];
|
|
1481
1481
|
Util.render_type_option($("#portfolio_industry"), j.data, "industry", Util.render_portfolio_html);
|
|
1482
1482
|
Util.render_type_option($("#portfolio_area"), j.data, "area", Util.render_portfolio_html);
|
|
1483
1483
|
Util.render_portfolio_html();
|
|
1484
|
-
if (j
|
|
1485
|
-
$("#portfolio_remark_title").html(Util.pack_html_link(j
|
|
1484
|
+
if (j.portfolio_url) {
|
|
1485
|
+
$("#portfolio_remark_title").html(Util.pack_html_link(j.portfolio_url, "备注<i class='glyphicon glyphicon-link'></i>"));
|
|
1486
1486
|
}
|
|
1487
1487
|
Util.hide_tips();
|
|
1488
1488
|
});
|
|
@@ -1579,37 +1579,37 @@ const Util = {
|
|
|
1579
1579
|
Util.post(Util.get_url("fund_public"), {action: "public_fund_detail", fund_code: fund_code}, function (j) {
|
|
1580
1580
|
let html = [];
|
|
1581
1581
|
if (j.fund_code) {
|
|
1582
|
-
$("#" + component_id + "_title").html(Util.pack_html_link("https://fundf10.eastmoney.com/jbgk_" + j.fund_code + ".html", j
|
|
1582
|
+
$("#" + component_id + "_title").html(Util.pack_html_link("https://fundf10.eastmoney.com/jbgk_" + j.fund_code + ".html", j.fund_name));
|
|
1583
1583
|
let net = "--";
|
|
1584
|
-
if (j
|
|
1585
|
-
net = j
|
|
1584
|
+
if (j.net > 0) {
|
|
1585
|
+
net = j.net;
|
|
1586
1586
|
let net_cls = Util.text_color(j.change_percent);
|
|
1587
1587
|
if (net_cls !== "") {
|
|
1588
1588
|
net = "<b class='" + net_cls + "'>" + net + "(" + Util.to_float(j.change_percent, 2) + "%)</b>";
|
|
1589
1589
|
}
|
|
1590
1590
|
}
|
|
1591
|
-
let assets = j
|
|
1592
|
-
let public_date = j
|
|
1593
|
-
let issue_date = j
|
|
1594
|
-
html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j
|
|
1595
|
-
html.push("<tr><td colspan='3'>基金代码</td><td colspan='4'>", Util.pack_html_link('https://xueqiu.com/S/' + Util.code_to_fund_symbol(j.fund_code), j.fund_code), "</td><td colspan='3'>基金名</td><td colspan='5'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j.fund_code + '.html', j
|
|
1596
|
-
html.push("<tr><td colspan='3'>基金类型</td><td colspan='4'>", (j
|
|
1591
|
+
let assets = j.assets > 0 ? (j.assets + "亿") : "--";
|
|
1592
|
+
let public_date = j.public_date > 0 ? Util.seconds_to_format(j.public_date, "%Y-%m-%d") : "--";
|
|
1593
|
+
let issue_date = j.issue_date > 0 ? Util.seconds_to_format(j.issue_date, "%Y-%m-%d") : "--";
|
|
1594
|
+
html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j.update_time, "%Y-%m-%d"), "' class='info'><th colspan='15' style='text-align: center;'>基金概况</th></tr>");
|
|
1595
|
+
html.push("<tr><td colspan='3'>基金代码</td><td colspan='4'>", Util.pack_html_link('https://xueqiu.com/S/' + Util.code_to_fund_symbol(j.fund_code), j.fund_code), "</td><td colspan='3'>基金名</td><td colspan='5'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j.fund_code + '.html', j.fund_name), "</td></tr>");
|
|
1596
|
+
html.push("<tr><td colspan='3'>基金类型</td><td colspan='4'>", (j.fund_type ? j.fund_type : "--"), "</td><td colspan='3'>投资类型</td><td colspan='5'>", (j.invest_type ? j.invest_type : "--"), "</td></tr>");
|
|
1597
1597
|
html.push("<tr><td colspan='3'>单位净值</td><td colspan='4'>", net, "</td><td colspan='3'>资产规模</td><td colspan='5'>", assets, "</td></tr>");
|
|
1598
1598
|
html.push("<tr><td colspan='3'>成立日期</td><td colspan='4'>", public_date, "</td><td colspan='3'>发行日期</td><td colspan='5'>", issue_date, "</td></tr>");
|
|
1599
1599
|
html.push("<tr><td colspan='3'>基金管理公司</td><td colspan='4'>", Util.pack_fund_administrator(j), "</td><td colspan='3'>基金经理</td><td colspan='5'>", Util.pack_fund_manager(j), "</td></tr>");
|
|
1600
|
-
html.push("<tr><td colspan='3'>基金托管人</td><td colspan='4'>", (j
|
|
1601
|
-
html.push("<tr><td colspan='3'>会计师事务所</td><td colspan='4'>", (j
|
|
1602
|
-
html.push("<tr><td colspan='3'>近一周</td><td colspan='4'>", Util.parse_ratio(j
|
|
1603
|
-
html.push("<tr><td colspan='3'>近一年</td><td colspan='4'>", Util.parse_ratio(j
|
|
1604
|
-
html.push("<tr><td colspan='5'>成立以来</td><td colspan='10'>", Util.parse_ratio(j
|
|
1600
|
+
html.push("<tr><td colspan='3'>基金托管人</td><td colspan='4'>", (j.custodian ? j.custodian : "--"), "</td><td colspan='3'>经办律师事务所</td><td colspan='5'>", (j.lawyer ? j.lawyer : "--"), "</td></tr>");
|
|
1601
|
+
html.push("<tr><td colspan='3'>会计师事务所</td><td colspan='4'>", (j.accounting ? j.accounting : "--"), "</td><td colspan='3'>注册地址</td><td colspan='5'>", Util.map_url(j.location, j.location), "</td></tr>");
|
|
1602
|
+
html.push("<tr><td colspan='3'>近一周</td><td colspan='4'>", Util.parse_ratio(j.one_week_change), "</td><td colspan='3'>近一月</td><td colspan='5'>", Util.parse_ratio(j.one_month_change), "</td></tr>");
|
|
1603
|
+
html.push("<tr><td colspan='3'>近一年</td><td colspan='4'>", Util.parse_ratio(j.one_year_change), "</td><td colspan='3'>年初至今</td><td colspan='5'>", Util.pack_html_link('https://fundf10.eastmoney.com/jdzf_' + j.fund_code + '.html', Util.parse_ratio(j.ytd_change)), "</td></tr>");
|
|
1604
|
+
html.push("<tr><td colspan='5'>成立以来</td><td colspan='10'>", Util.parse_ratio(j.establish_change), "</td></tr>");
|
|
1605
1605
|
html.push("<tr class='info'><th colspan='15' style='text-align: center;'>", Util.pack_html_link("https://fund.eastmoney.com/f10/ccmx_" + j.fund_code + ".html", "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
|
|
1606
1606
|
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><th>持仓市值</th></tr>");
|
|
1607
1607
|
html.push("<tr class='" + component_id + "_tr'><td colspan='15'>暂无数据</td></tr>");
|
|
1608
1608
|
Util.render_table_html(component_id + "_body_body", html);
|
|
1609
|
-
if (j
|
|
1609
|
+
if (j.date_list) {
|
|
1610
1610
|
html = [];
|
|
1611
1611
|
html.push("<select id='fund_stock_date'>");
|
|
1612
|
-
j
|
|
1612
|
+
j.date_list.forEach(function (date) {
|
|
1613
1613
|
html.push("<option value='", date, "'>", Util.seconds_to_format(date, "%Y-%m-%d"), "</option>");
|
|
1614
1614
|
});
|
|
1615
1615
|
html.push("</select>");
|
|
@@ -1729,10 +1729,10 @@ const Util = {
|
|
|
1729
1729
|
});
|
|
1730
1730
|
Util.render_table_html("word_process_div_body", html);
|
|
1731
1731
|
$("#word_num").html(" 共 <span class='label label-info'>" + index + "</span> 条");
|
|
1732
|
-
if (j
|
|
1732
|
+
if (j.day_num) {
|
|
1733
1733
|
let day_num_html = [];
|
|
1734
1734
|
day_num_html.push('<option value="">全部</option>');
|
|
1735
|
-
j
|
|
1735
|
+
j.day_num.forEach(function (item) {
|
|
1736
1736
|
day_num_html.push('<option value="', item.day, '">', item.day, '(', item.num, ')</option>');
|
|
1737
1737
|
});
|
|
1738
1738
|
let wdn_obj = $("#word_day_num");
|
|
@@ -1924,12 +1924,12 @@ const Util = {
|
|
|
1924
1924
|
html.push("</tr>");
|
|
1925
1925
|
});
|
|
1926
1926
|
Util.render_table_html("currency_modal_body_body", html);
|
|
1927
|
-
let currency_modal_summary = "历史最低:<span class='label label-success'>" + j
|
|
1928
|
-
"</span> 历史最高:<span class='label label-danger'>" + j
|
|
1929
|
-
"</span> 年初至今:" + Util.digit_compare_trend1(j.exchange_rate, j
|
|
1930
|
-
" 52周最高:" + Util.digit_compare_trend1(j.exchange_rate, j
|
|
1931
|
-
" 52周最低:" + Util.digit_compare_trend1(j.exchange_rate, j
|
|
1932
|
-
let title = j
|
|
1927
|
+
let currency_modal_summary = "历史最低:<span class='label label-success'>" + j.hist_low +
|
|
1928
|
+
"</span> 历史最高:<span class='label label-danger'>" + j.hist_high +
|
|
1929
|
+
"</span> 年初至今:" + Util.digit_compare_trend1(j.exchange_rate, j.year_exchange_rate) +
|
|
1930
|
+
" 52周最高:" + Util.digit_compare_trend1(j.exchange_rate, j.week52high) +
|
|
1931
|
+
" 52周最低:" + Util.digit_compare_trend1(j.exchange_rate, j.week52low);
|
|
1932
|
+
let title = j.name !== currency ? (j.name + "(" + currency.toUpperCase() + ")") : j.name;
|
|
1933
1933
|
title = '<i class="fa fa-' + currency + '"></i> ' + title;
|
|
1934
1934
|
title = Util.pack_html_link("https://cn.investing.com/currencies/" + currency + "-cny", title);
|
|
1935
1935
|
$("#currency_modal_title").html(title + " " + currency_modal_summary);
|
|
@@ -2021,11 +2021,11 @@ const Util = {
|
|
|
2021
2021
|
html.push("</tr>");
|
|
2022
2022
|
});
|
|
2023
2023
|
Util.render_table_html("btc_modal_body_body", html);
|
|
2024
|
-
let btc_title = j
|
|
2025
|
-
btc_title += " <small>历史最低:<span class='label label-success'>" + j
|
|
2026
|
-
"</span> 年初至今:" + Util.digit_compare_trend1(j
|
|
2027
|
-
" 52周最高:" + Util.digit_compare_trend1(j
|
|
2028
|
-
" 52周最低:" + Util.digit_compare_trend1(j
|
|
2024
|
+
let btc_title = j.cn_name + "(" + Util.pack_html_link('https://www.binance.com/zh-CN/trade/' + j.short_name + '_USDT?theme=dark', j.short_name) + ", " + Util.pack_html_link("https://www.feixiaohao.com/currencies/" + j.coin, j.coin) + ")";
|
|
2025
|
+
btc_title += " <small>历史最低:<span class='label label-success'>" + j.hist_low + "</span> 历史最高:<span class='label label-danger'>" + j.hist_high +
|
|
2026
|
+
"</span> 年初至今:" + Util.digit_compare_trend1(j.price, j.year_price) +
|
|
2027
|
+
" 52周最高:" + Util.digit_compare_trend1(j.price, j.week52high) +
|
|
2028
|
+
" 52周最低:" + Util.digit_compare_trend1(j.price, j.week52low) + "</small>";
|
|
2029
2029
|
$("#btc_modal_title").html(btc_title);
|
|
2030
2030
|
Util.hide_tips();
|
|
2031
2031
|
});
|
|
@@ -2084,7 +2084,7 @@ const Util = {
|
|
|
2084
2084
|
html.push("</tr>");
|
|
2085
2085
|
});
|
|
2086
2086
|
Util.render_table_html(component_id + "_body_body", html);
|
|
2087
|
-
$("#" + component_id + "_title").html("[" + Util.stock_url(code, j
|
|
2087
|
+
$("#" + component_id + "_title").html("[" + Util.stock_url(code, j.stock_name) + "]资金流向明细(<span>净买入:<b title='" + summary_inflow + "' class='" + Util.text_color(summary_inflow) + "'>" + Util.to_unit(summary_inflow) + "</b>, 上榜次数:<b class='text-info'>" + total_times + "</b>, 买入次数:<b class='text-danger'>" + buy_times + "</b>, 卖出次数:<b class='text-success'>" + sell_times + "</b></span>)");
|
|
2088
2088
|
});
|
|
2089
2089
|
}
|
|
2090
2090
|
});
|
|
@@ -3146,8 +3146,8 @@ const Util = {
|
|
|
3146
3146
|
$("#index_data").html(index_data_html);
|
|
3147
3147
|
}
|
|
3148
3148
|
code_list.forEach(function (code) {
|
|
3149
|
-
if (j
|
|
3150
|
-
Util.render_price(j
|
|
3149
|
+
if (j.price_data.hasOwnProperty(code)) {
|
|
3150
|
+
Util.render_price(j.price_data[code]);
|
|
3151
3151
|
} else {
|
|
3152
3152
|
$(".price_" + code).each(function () {
|
|
3153
3153
|
let price = $(this).text();
|
|
@@ -3169,7 +3169,7 @@ const Util = {
|
|
|
3169
3169
|
}, "text");
|
|
3170
3170
|
}
|
|
3171
3171
|
} else {
|
|
3172
|
-
if (is_refresh !== 0 && j
|
|
3172
|
+
if (is_refresh !== 0 && j.is_holiday === 0) {
|
|
3173
3173
|
if (Util.is_trade_time()) {
|
|
3174
3174
|
Util.countdown_refresh_index_price(5, element_id, index_list, is_us, is_refresh);
|
|
3175
3175
|
}
|