sbd-npm 1.1.53 → 1.1.57
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 +2 -2
- package/package.json +1 -1
- package/util.js +34 -5
package/menu.js
CHANGED
@@ -64,6 +64,7 @@ const MenuList = [
|
|
64
64
|
'name': '宏观数据',
|
65
65
|
'icon': 'globe',
|
66
66
|
'menu': [
|
67
|
+
{'key': 'macro_global_economy', 'name': '全球经济总览', 'url': '/b8fd4bd44505109d47a52f30d0f79fe5'},
|
67
68
|
{'key': 'macro_bond_yield', 'name': '十年国债收益率', 'url': '/b3481c3916ef5e907f329c32ad87f7ce'},
|
68
69
|
{'key': 'macro_money_supply', 'name': '货币供应量', 'url': '/30cb50c21d82b67d4442df16cffde341'},
|
69
70
|
{'key': 'macro_currency', 'name': '货币汇率', 'url': '/58ec93ac74847aaec304e4a577c15799'},
|
@@ -124,10 +125,10 @@ const MenuList = [
|
|
124
125
|
'name': '概念股',
|
125
126
|
'icon': 'retweet',
|
126
127
|
'menu': [
|
127
|
-
{'key': 'concept_week_recommend', 'name': '每周精选', 'url': '/9c3fbc44e6ad96fbd8a57b227771eea0'},
|
128
128
|
{'key': 'concept_recommend', 'name': '关注', 'url': '/27ca098faad33a8e4d109efe0112fd16'},
|
129
129
|
{'key': 'concept_bellwether', 'name': '龙头股', 'url': '/2995afdea420471e00c536182e711bef'},
|
130
130
|
{'key': 'concept_market_situation', 'name': '市值风云', 'url': '/02fdaf4d66cdecb092bcd65f569aa493'},
|
131
|
+
{'key': 'concept_down_top', 'name': '15-21年的超跌股', 'url': '/ae3bbf97a358392cfaa0ceb35cb3fb57'},
|
131
132
|
{'key': 'concept_cannon', 'name': '黄家礼炮', 'url': '/d6128a3ad91d545f2920fa2e324c37e1'},
|
132
133
|
{'key': 'concept_cloud', 'name': '心似白云常自在', 'url': '/1d883188398a3a8c743748c5eb81fe7b'},
|
133
134
|
{'key': 'concept_niu', 'name': '老曾阿牛', 'url': '/0f4a2714971424024c1ddd8651c26569'},
|
@@ -138,7 +139,6 @@ const MenuList = [
|
|
138
139
|
{'key': 'concept_us', 'name': '美股', 'url': '/f986a81550e4d8a902f8bc0ef07757a6'},
|
139
140
|
{'key': 'concept_chip', 'name': '芯片', 'url': '/491de7096b1cb9355766e5ffdd7018b6'},
|
140
141
|
{'key': 'concept_military', 'name': '军工', 'url': '/1eb37c30e6be05148ba47c8ca6498a48'},
|
141
|
-
{'key': 'concept_msci', 'name': 'MSCI', 'url': '/ff6c00cf10a8f17ae0e4fb1ca444f7fc'},
|
142
142
|
{'key': 'concept_hkscc', 'name': '港交所', 'url': '/f23d044c3944d827d799f77da41a911e'},
|
143
143
|
{'key': 'concept_ah', 'name': 'AH股', 'url': '/16f12053b288726b5d4720de879c3b5c'},
|
144
144
|
{'key': 'concept_st', 'name': 'ST股', 'url': '/e0eb8a51da63f7ceb16a769d7d20bada'},
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -261,13 +261,32 @@ const Util = {
|
|
261
261
|
return location;
|
262
262
|
}
|
263
263
|
if (location_name === "") {
|
264
|
-
location_name = location.length >
|
264
|
+
location_name = location.length > 10 ? location.substr(0, 10) : location;
|
265
265
|
}
|
266
266
|
return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://map.baidu.com/m?fr=ps01000&word=" + location + "'>" + location_name + "</a>";
|
267
267
|
}
|
268
268
|
return "--";
|
269
269
|
},
|
270
270
|
|
271
|
+
/**
|
272
|
+
* 谷歌Google地图链接地址
|
273
|
+
* @param location
|
274
|
+
* @param location_name
|
275
|
+
* @returns {string}
|
276
|
+
*/
|
277
|
+
google_map_url: function (location, location_name = "") {
|
278
|
+
if (location) {
|
279
|
+
if (location === "--") {
|
280
|
+
return location;
|
281
|
+
}
|
282
|
+
if (location_name === "") {
|
283
|
+
location_name = location.length > 10 ? location.substr(0, 10) : location;
|
284
|
+
}
|
285
|
+
return "<a target='_blank' class='link_cls map_link' rel='noopener noreferrer nofollow' href='https://www.google.com/maps?&hl=zh-Hans&q=" + location + "'>" + location_name + "</a>";
|
286
|
+
}
|
287
|
+
return "--";
|
288
|
+
},
|
289
|
+
|
271
290
|
/**
|
272
291
|
* 返回股票代码列表
|
273
292
|
* @param obj
|
@@ -620,6 +639,11 @@ const Util = {
|
|
620
639
|
let is_table_sort = 0;
|
621
640
|
let is_tooltip = 0;
|
622
641
|
let _html = [];
|
642
|
+
if (options["alert"]) {
|
643
|
+
_html.push('<div class="alert alert-info" role="alert">');
|
644
|
+
_html.push(options["alert"]);
|
645
|
+
_html.push('</div>');
|
646
|
+
}
|
623
647
|
let table_class = options["table_class"] ? options["table_class"] : "table table-bordered table-hover table-striped text-center";
|
624
648
|
_html.push('<table class="' + table_class + '">');
|
625
649
|
if (options["caption"]) {
|
@@ -762,8 +786,9 @@ const Util = {
|
|
762
786
|
* 初始分类股票的显示表格
|
763
787
|
* @param stock_category
|
764
788
|
* @param table_id
|
789
|
+
* @param alert_tips
|
765
790
|
*/
|
766
|
-
init_stock_category_data: function (stock_category, table_id) {
|
791
|
+
init_stock_category_data: function (stock_category, table_id, alert_tips = "") {
|
767
792
|
Util.show_tips("Loading...");
|
768
793
|
let head_cols = [
|
769
794
|
{"name": "代码"},
|
@@ -780,15 +805,19 @@ const Util = {
|
|
780
805
|
];
|
781
806
|
if (stock_category !== "us") {
|
782
807
|
head_cols.push({"name": "成交金额", "table_sort": 1});
|
783
|
-
head_cols.push({"name": "成交均价"});
|
808
|
+
head_cols.push({"name": "成交均价", "table_sort": 1});
|
784
809
|
head_cols.push({"name": "股东数", "table_sort": 1});
|
785
810
|
head_cols.push({"name": "备注", "id": "remark_title"});
|
786
811
|
}
|
787
|
-
|
812
|
+
let table_options = {
|
788
813
|
"element_id": table_id,
|
789
814
|
"caption": '<caption><span id="index_data"></span><div class="pull-right" id="' + table_id + '_body_tips"></div></caption>',
|
790
815
|
"head_cols": head_cols
|
791
|
-
}
|
816
|
+
};
|
817
|
+
if (alert_tips.length > 0) {
|
818
|
+
table_options["alert"] = alert_tips;
|
819
|
+
}
|
820
|
+
Util.init_table_skeleton(table_options);
|
792
821
|
Util.post(location.pathname, {active_div: stock_category}, function (j) {
|
793
822
|
let _html = [];
|
794
823
|
let total_num = 0;
|