sbd-npm 1.1.89 → 1.1.92
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/menu.js +9 -9
- package/package.json +1 -1
- package/util.js +18 -1
package/menu.js
CHANGED
@@ -32,15 +32,6 @@ const MenuList = [
|
|
32
32
|
{'key': 'daily_block', 'name': '大宗交易', 'url': '/3eec763b6402d5327a2f1d8964f78c93'},
|
33
33
|
]
|
34
34
|
},
|
35
|
-
{
|
36
|
-
'name': '沪深港股通',
|
37
|
-
'icon': 'cogs',
|
38
|
-
'menu': [
|
39
|
-
{'key': 'hsgt_flow', 'name': '资金流向', 'url': '/e0c6105a6de37e91aa886c70d2227948'},
|
40
|
-
{'key': 'hsgt_trade_stock', 'name': '成交股统计', 'url': '/521e408d5c995460426beba4d039df06'},
|
41
|
-
{'key': 'hsgt_hkex_holding', 'name': '港资持股比例', 'url': '/4cb33e167aca1978b304af3bbe6ea2dd'},
|
42
|
-
]
|
43
|
-
},
|
44
35
|
{
|
45
36
|
'name': '趋势分析',
|
46
37
|
'icon': 'edit',
|
@@ -62,6 +53,15 @@ const MenuList = [
|
|
62
53
|
{'key': 'trend_query', 'name': '趋势查询', 'url': '/7a7cec0124836383ad76faa457d19403'},
|
63
54
|
]
|
64
55
|
},
|
56
|
+
{
|
57
|
+
'name': '沪深港股通',
|
58
|
+
'icon': 'cogs',
|
59
|
+
'menu': [
|
60
|
+
{'key': 'hsgt_flow', 'name': '资金流向', 'url': '/e0c6105a6de37e91aa886c70d2227948'},
|
61
|
+
{'key': 'hsgt_trade_stock', 'name': '成交股统计', 'url': '/521e408d5c995460426beba4d039df06'},
|
62
|
+
{'key': 'hsgt_hkex_holding', 'name': '港资持股比例', 'url': '/4cb33e167aca1978b304af3bbe6ea2dd'},
|
63
|
+
]
|
64
|
+
},
|
65
65
|
{
|
66
66
|
'name': '宏观数据',
|
67
67
|
'icon': 'globe',
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -368,6 +368,16 @@ const Util = {
|
|
368
368
|
}
|
369
369
|
}
|
370
370
|
});
|
371
|
+
$(".d5_price_" + code).each(function () {
|
372
|
+
if (item["d5_price"]) {
|
373
|
+
$(this).html(Util.year_price_rate(item["price"], item["d5_price"]));
|
374
|
+
} else {
|
375
|
+
let d5_price = $(this).attr("data-val");
|
376
|
+
if (d5_price) {
|
377
|
+
$(this).html(Util.year_price_rate(item["price"], Util.to_float(d5_price)));
|
378
|
+
}
|
379
|
+
}
|
380
|
+
});
|
371
381
|
if (item["high_52week"]) {
|
372
382
|
$(".high_52week_" + code).each(function () {
|
373
383
|
$(this).html(Util.year_price_rate(item["price"], item["high_52week"]));
|
@@ -641,6 +651,7 @@ const Util = {
|
|
641
651
|
if (options["head_cols"]) {
|
642
652
|
let is_table_sort = 0;
|
643
653
|
let is_tooltip = 0;
|
654
|
+
let head_length = options["head_cols"].length;
|
644
655
|
let _html = [];
|
645
656
|
if (options["alert"]) {
|
646
657
|
_html.push('<div class="alert alert-info" role="alert">');
|
@@ -687,6 +698,12 @@ const Util = {
|
|
687
698
|
if (col["class"]) {
|
688
699
|
td_class.push(col["class"]);
|
689
700
|
}
|
701
|
+
if (col["colspan"]) {
|
702
|
+
if (col["colspan"] > 1) {
|
703
|
+
head_length += (col["colspan"] - 1);
|
704
|
+
}
|
705
|
+
td_attr += ' colspan="' + col["colspan"] + '"';
|
706
|
+
}
|
690
707
|
if (col["table_sort"]) {
|
691
708
|
is_table_sort = 1;
|
692
709
|
td_class.push("table_sort");
|
@@ -715,7 +732,7 @@ const Util = {
|
|
715
732
|
});
|
716
733
|
_html.push('</tr></thead>');
|
717
734
|
_html.push('<tbody id="', options["element_id"], '_body"><tr>');
|
718
|
-
_html.push('<td class="text-center" colspan="',
|
735
|
+
_html.push('<td class="text-center" colspan="', head_length, '">', (options["body_tips"] ? options["body_tips"] : "Loading..."), '</td>');
|
719
736
|
_html.push('</tr></tbody>');
|
720
737
|
_html.push('</table>');
|
721
738
|
let tz_obj = $("#" + options["element_id"]);
|