sbd-npm 1.2.93 → 1.2.95
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 +3 -1
- package/package.json +1 -1
- package/util.js +16 -17
package/constant.js
CHANGED
@@ -82,7 +82,7 @@ const MenuList = [
|
|
82
82
|
{'key': 'macro_new_investor', 'name': '新增投资者', 'url': '/2268c61c6d62cdc8c1c7143aa524e2f1'},
|
83
83
|
{'key': 'macro_gold', 'name': '黄金ETF(GLD)', 'url': '/584b9ceb0c85571831f7211903147d47'},
|
84
84
|
{'key': 'macro_crude', 'name': '原油', 'url': '/78f8b798631b52153ff029fd301f9b8a'},
|
85
|
-
{'key': '
|
85
|
+
{'key': 'macro_commodity', 'name': '碳酸锂', 'url': '/2d7b4ce104b014c79eb5f66513ff1833'},
|
86
86
|
]
|
87
87
|
},
|
88
88
|
{
|
@@ -144,6 +144,7 @@ const MenuList = [
|
|
144
144
|
{'key': 'concept_penny', 'name': '梁斌penny', 'url': '/8c1660155f89650a471edf54414cac49'},
|
145
145
|
{'key': 'concept_wen', 'name': '崇文不尚武', 'url': '/b6fd64a2c54250b8ac039123e74e9b7e'},
|
146
146
|
{'key': 'concept_patience', 'name': '耐力投资', 'url': '/d3e193cf9cdba853133c046ca3406867'},
|
147
|
+
{'key': 'concept_star50', 'name': '科创50', 'url': '/48c4e426c8869ea08e80c9b79c9849e0'},
|
147
148
|
{'key': 'concept_bellwether', 'name': '龙头股', 'url': '/2995afdea420471e00c536182e711bef'},
|
148
149
|
{'key': 'concept_market_situation', 'name': '市值风云', 'url': '/02fdaf4d66cdecb092bcd65f569aa493'},
|
149
150
|
{'key': 'concept_down_top', 'name': '15-21年的超跌股', 'url': '/ae3bbf97a358392cfaa0ceb35cb3fb57'},
|
@@ -187,6 +188,7 @@ const MenuList = [
|
|
187
188
|
{'key': 'us_sp500', 'name': '标普500', 'url': '/33f59986534947d63d6ca1dcebac15d7'},
|
188
189
|
{'key': 'us_qqq', 'name': '纳斯达克100', 'url': '/2ce5bc68a55b5671613b66093d93b40c'},
|
189
190
|
{'key': 'us_cn', 'name': '中国概念股', 'url': '/bff1b2e208757edb89df6e62385a8c1b'},
|
191
|
+
{'key': 'us_buffett', 'name': '巴菲特持仓', 'url': '/7140067ba3e1ed8834f72d353391e0bb'},
|
190
192
|
{'key': 'us_dollar_index', 'name': '美元指数', 'url': '/2cba34f3658ea00c047aba2f4b790877'},
|
191
193
|
{'key': 'us_bond_yield', 'name': '美十年国债收益率', 'url': '/3d1ba074a5d8e2e0162fce0db80753d4'},
|
192
194
|
{'key': 'us_usd_cnh', 'name': '美元离岸人民币汇率', 'url': '/f1e85a31b0829c6de701d5f6c0b97494'},
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -210,10 +210,9 @@ const Util = {
|
|
210
210
|
* @returns {string}
|
211
211
|
*/
|
212
212
|
snowball_url: function (code) {
|
213
|
-
let stock_symbol = code;
|
214
|
-
let code_name = code;
|
213
|
+
let stock_symbol = code, code_name = code;
|
215
214
|
if (Util.is_us(code)) {
|
216
|
-
|
215
|
+
code_name = code_name.toUpperCase();
|
217
216
|
} else if (Util.is_hk(code)) {
|
218
217
|
code_name = Util.code_to_symbol(code);
|
219
218
|
} else {
|
@@ -243,8 +242,18 @@ const Util = {
|
|
243
242
|
return "--";
|
244
243
|
}
|
245
244
|
if (industry) {
|
246
|
-
let
|
247
|
-
|
245
|
+
let url = "?industry=" + industry;
|
246
|
+
if (Util.is_us(code)) {
|
247
|
+
url = Util.get_url("us_list") + url
|
248
|
+
} else if (Util.is_hk(code)) {
|
249
|
+
url = Util.get_url("hk_list") + url
|
250
|
+
} else {
|
251
|
+
url = Util.get_url("query_list") + url
|
252
|
+
}
|
253
|
+
if (industry.length > 6) {
|
254
|
+
return "<a title='" + industry + "' target='_blank' class='industry_link' href='" + url + "'>" + industry.substr(0, 6) + "</a>";
|
255
|
+
}
|
256
|
+
return "<a target='_blank' class='industry_link' href='" + url + "'>" + industry + "</a>";
|
248
257
|
}
|
249
258
|
return "--";
|
250
259
|
},
|
@@ -492,7 +501,7 @@ const Util = {
|
|
492
501
|
stock_us_html: function (html, item) {
|
493
502
|
let code = item["code"].toUpperCase();
|
494
503
|
let name = item["cname"] ? item["cname"] : (item["name"] ? item["name"].substr(0, 10) : code);
|
495
|
-
html.push("<td
|
504
|
+
html.push("<td>", Util.snowball_url(code), "</td>");
|
496
505
|
html.push("<td>", Util.stock_url(item["code"], name), "</td>");
|
497
506
|
html.push("<td>", (item["sector"] ? item["sector"] : "--"), "</td>");
|
498
507
|
html.push("<td>", Util.industry_url(item["code"], item["industry"]), "</td>");
|
@@ -2896,7 +2905,7 @@ const Util = {
|
|
2896
2905
|
html.push('<option value="">', obj.children('option').eq(0).text(), '</option>');
|
2897
2906
|
}
|
2898
2907
|
$.each(option_data, function (val, val_num) {
|
2899
|
-
html.push('<option value="', val, '">',
|
2908
|
+
html.push('<option value="', val, '">', val.substr(0, 6), '(', val_num, ')</option>');
|
2900
2909
|
});
|
2901
2910
|
obj.html(html.join(""));
|
2902
2911
|
obj.change(function () {
|
@@ -2972,16 +2981,6 @@ const Util = {
|
|
2972
2981
|
return Util.to_float(digit / 100000000, fraction);
|
2973
2982
|
},
|
2974
2983
|
|
2975
|
-
/**
|
2976
|
-
* 转为以万为单位的数值
|
2977
|
-
* @param digit
|
2978
|
-
* @param fraction
|
2979
|
-
* @returns {*|number}
|
2980
|
-
*/
|
2981
|
-
to_ten_thousand: function (digit, fraction = 2) {
|
2982
|
-
return Util.to_float(digit / 10000, fraction);
|
2983
|
-
},
|
2984
|
-
|
2985
2984
|
/**
|
2986
2985
|
* 转为相应单位的数值
|
2987
2986
|
* @param digit
|