sbd-npm 1.3.38 → 1.3.40
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/constant.js +1 -1
- package/package.json +1 -1
- package/stock_basics.js +20 -2
- package/util.js +14 -10
package/constant.js
CHANGED
@@ -21,7 +21,7 @@ const MenuList = [
|
|
21
21
|
'icon': 'th',
|
22
22
|
'menu': [
|
23
23
|
{'key': 'daily_price_top', 'name': '每日新高', 'url': '/0x4bbed40927b5114222156b38c74fdb908e51289f'},
|
24
|
-
{'key': '
|
24
|
+
{'key': 'daily_price_limit_up', 'name': '每日涨停', 'url': '/0x7e05ba643accb5fc6fb4ed5962e560182bfbe782'},
|
25
25
|
{'key': 'daily_margin', 'name': '融资融券', 'url': '/0x346eb98b16e29800315ad99545be9d391d0bdcf1'},
|
26
26
|
{'key': 'daily_volume', 'name': '成交量(大量)', 'url': '/0xd92468b610939a0a904069b4293afd7f2e8c4411'},
|
27
27
|
{'key': 'daily_gap', 'name': '缺口', 'url': '/0xc09193d6aa6e30481598783ef22d3bf5d0f79aad'},
|
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -329,7 +329,25 @@ let Stock = {
|
|
329
329
|
Util.parse_value_trend("sell_amount-td");
|
330
330
|
Util.parse_value_trend("rzmre-td");
|
331
331
|
Util.parse_value_trend("rzye-td");
|
332
|
-
|
332
|
+
let stock_hist_summary = "";
|
333
|
+
if (j["high_amount"] && j["high_amount"] > 0) {
|
334
|
+
stock_hist_summary += "<b>历史最高成交额(<a class='hist_summary_link' href='#'>" + Util.seconds_to_format(j["high_amount_date"], "%Y-%m-%d") + "</a>):<span class='label label-danger'>" + Util.to_unit(j["high_amount"]) + "</span></b>,";
|
335
|
+
}
|
336
|
+
if (j["high_volume"] && j["high_volume"] > 0) {
|
337
|
+
stock_hist_summary += "<b>历史最高成交量(<a class='hist_summary_link' href='#'>" + Util.seconds_to_format(j["high_volume_date"], "%Y-%m-%d") + "</a>):<span class='label label-danger'>" + Util.to_unit(j["high_volume"]) + "手</span></b>,";
|
338
|
+
}
|
339
|
+
stock_hist_summary += "<b>时间区间内总成交额: <span class='label label-info'>" + Util.to_unit(total_amount) + "</span>,总成交量: <span class='label label-info'>" + Util.to_unit(total_volume) + "</span> 股,平均成交价: <span class='label label-warning'>" + Util.to_float(total_amount / total_volume, 2) + "</span></b>";
|
340
|
+
$("#stock_hist_summary").html(stock_hist_summary);
|
341
|
+
$("#stock_hist_summary .hist_summary_link").each(function() {
|
342
|
+
$(this).click(function() {
|
343
|
+
let summary_date = $(this).text();
|
344
|
+
if (Util.regexp_date_yyyy_mm_dd(summary_date)) {
|
345
|
+
$("#hist_start_date").val(summary_date);
|
346
|
+
$("#hist_end_date").val(summary_date);
|
347
|
+
Stock.fetch_hist_data();
|
348
|
+
}
|
349
|
+
});
|
350
|
+
});
|
333
351
|
Util.hide_tips();
|
334
352
|
});
|
335
353
|
},
|
@@ -1161,7 +1179,7 @@ let Stock = {
|
|
1161
1179
|
margin_summary += ' 历史最低: ' + Util.to_unit(j["low"]["rzye"], 3) + '(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')';
|
1162
1180
|
}
|
1163
1181
|
if (j["less_rate"]) {
|
1164
|
-
margin_summary += '  
|
1182
|
+
margin_summary += ' 当前最新融资余额超过历史 <span style="color: #FFF;" class="label label-info">' + j["less_rate"] + '%</span> 分位水平';
|
1165
1183
|
}
|
1166
1184
|
$("#margin_summary").html(margin_summary);
|
1167
1185
|
Stock["rzye_chart"] = Util.multi_axis_line(Stock["rzye_chart"], "rzye_line_canvas", date_data, '融资余额(单位:亿)', rzye_data, '股价', price_data);
|
package/util.js
CHANGED
@@ -51,9 +51,9 @@ const Util = {
|
|
51
51
|
},
|
52
52
|
|
53
53
|
sbd_init: function () {
|
54
|
-
|
54
|
+
this.show_loading();
|
55
55
|
|
56
|
-
|
56
|
+
this.init_menu();
|
57
57
|
|
58
58
|
$("[data-toggle='tooltip']").tooltip();
|
59
59
|
|
@@ -523,8 +523,8 @@ const Util = {
|
|
523
523
|
}
|
524
524
|
if (item["high"]) {
|
525
525
|
let high_price = Util.digit_compare_trend(item["high"], item["previous_price"]);
|
526
|
-
let
|
527
|
-
high_price = high_price.replace(/title='(.*?)'/, "title='" +
|
526
|
+
let limit_up_price = Math.floor((item["previous_price"] * 1.1) * 100) / 100;
|
527
|
+
high_price = high_price.replace(/title='(.*?)'/, "title='" + limit_up_price + "'");
|
528
528
|
$("#high_" + code).html(high_price);
|
529
529
|
}
|
530
530
|
if (item["low"]) {
|
@@ -922,12 +922,16 @@ const Util = {
|
|
922
922
|
tz_obj.html(_html.join(""));
|
923
923
|
}
|
924
924
|
if ((Util.is_mobile() || Util.is_small_screen()) && !tz_obj.hasClass("table-responsive")) {
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
925
|
+
if (tz_obj.hasClass("panel")) {
|
926
|
+
tz_obj.addClass("table-responsive");
|
927
|
+
} else {
|
928
|
+
let tz_obj_parent = tz_obj.parent();
|
929
|
+
if (!tz_obj_parent.hasClass("table-responsive")) {
|
930
|
+
if (tz_obj_parent.hasClass("row")) {
|
931
|
+
tz_obj_parent.addClass("table-responsive");
|
932
|
+
} else {
|
933
|
+
tz_obj.addClass("table-responsive");
|
934
|
+
}
|
931
935
|
}
|
932
936
|
}
|
933
937
|
}
|