sbd-npm 1.1.83 → 1.1.86
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 -1
- package/package.json +1 -1
- package/util.js +30 -10
package/menu.js
CHANGED
@@ -21,6 +21,7 @@ const MenuList = [
|
|
21
21
|
'icon': 'th',
|
22
22
|
'menu': [
|
23
23
|
{'key': 'daily_price_top', 'name': '每日新高', 'url': '/947b66233a7bddda51a0ae0bb735ef3d'},
|
24
|
+
{'key': 'daily_price_up_limit', 'name': '每日涨停', 'url': '/393762e465bc20efd911d25518754caa'},
|
24
25
|
{'key': 'daily_margin', 'name': '融资融券', 'url': '/b3c3792c371ad62f28b1eacc1d6edf31'},
|
25
26
|
{'key': 'daily_volume', 'name': '成交量(大量)', 'url': '/5f3f29dc703951cd66f5c6320fa369ae'},
|
26
27
|
{'key': 'daily_gap', 'name': '缺口', 'url': '/d058569e38097c2e55539d181a135552'},
|
@@ -44,6 +45,7 @@ const MenuList = [
|
|
44
45
|
'name': '趋势分析',
|
45
46
|
'icon': 'edit',
|
46
47
|
'menu': [
|
48
|
+
{'key': 'trend_price', 'name': '股价阶段涨跌幅度', 'url': '/43ef6aeb36475f8f8f44d477b1990390'},
|
47
49
|
{'key': 'trend_boll', 'name': '布林线', 'url': '/0c9b231a72e40475d6f985fd67bdb718'},
|
48
50
|
{'key': 'trend_ma20_60', 'name': '20、60日均线交叉', 'url': '/4bf72713d83469ad6ec1d9fc3be8886f'},
|
49
51
|
{'key': 'trend_macd_down', 'name': 'MACD下行', 'url': '/ff97a31b4ffbabe71315e75c4fd62047'},
|
@@ -53,7 +55,6 @@ const MenuList = [
|
|
53
55
|
{'key': 'trend_fund_hold', 'name': '基金持股变化', 'url': '/067740976f85ec14ddae02b51829ce35'},
|
54
56
|
{'key': 'trend_week_minimum', 'name': '周成交低点', 'url': '/722d94429b8e689fe78dca1cf67a4c67'},
|
55
57
|
{'key': 'trend_margin', 'name': '融资融券余额涨幅', 'url': '/1964a6bc56dc3ce6825b23667c7fb588'},
|
56
|
-
{'key': 'trend_price', 'name': '股价涨跌幅度', 'url': '/43ef6aeb36475f8f8f44d477b1990390'},
|
57
58
|
{'key': 'trend_down', 'name': '当前连跌个股', 'url': '/07fb907c7e7572fbeae98bacf5c44593'},
|
58
59
|
{'key': 'trend_down_analysis', 'name': '连跌反弹概率', 'url': '/e9a32e4601fca33a9c3b68103f61c3bc'},
|
59
60
|
{'key': 'trend_index_month', 'name': '指数每年月份涨跌', 'url': '/86691e421938098bab7679e43bea67a6'},
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -233,8 +233,9 @@ const Util = {
|
|
233
233
|
*/
|
234
234
|
stock_basics_html: function (html, item) {
|
235
235
|
let symbol = Util.is_alpha(item["code"]) ? item["code"].toUpperCase() : item["code"];
|
236
|
+
let name = item["cname"] ? item["cname"] : (item["name"] ? item["name"].substr(0, 10) : symbol);
|
236
237
|
html.push("<td>", Util.snowball_url(symbol), "</td>");
|
237
|
-
html.push("<td>", Util.stock_url(item["code"],
|
238
|
+
html.push("<td>", Util.stock_url(item["code"], name), "</td>");
|
238
239
|
html.push("<td>", (item["pe_ttm"] ? item["pe_ttm"] : item["pe"]), "</td>");
|
239
240
|
html.push("<td>", (item["market_capital"] ? (Util.to_float(item["market_capital"], 2) + "亿") : "--"), "</td>");
|
240
241
|
html.push("<td>", Util.industry_url(item["code"], item["industry"]), "</td>");
|
@@ -306,7 +307,7 @@ const Util = {
|
|
306
307
|
|
307
308
|
/**
|
308
309
|
* 获取价格数据
|
309
|
-
* @param
|
310
|
+
* @param element_id
|
310
311
|
* @param interval 循环间隔
|
311
312
|
*/
|
312
313
|
refresh_price: function (element_id, interval = 0) {
|
@@ -763,11 +764,13 @@ const Util = {
|
|
763
764
|
/**
|
764
765
|
* 表格加载状态
|
765
766
|
* @param element_id
|
767
|
+
* @param load_text
|
766
768
|
*/
|
767
|
-
set_table_loading: function (element_id) {
|
769
|
+
set_table_loading: function (element_id, load_text = "") {
|
768
770
|
let obj = $("#" + element_id);
|
769
771
|
let td_num = obj.parent().find('thead td').length;
|
770
|
-
|
772
|
+
load_text = load_text.length > 0 ? load_text : "Loading...";
|
773
|
+
obj.html('<tr><td colspan="' + td_num + '">' + load_text + '</td></tr>');
|
771
774
|
},
|
772
775
|
|
773
776
|
/**
|
@@ -2179,6 +2182,16 @@ const Util = {
|
|
2179
2182
|
return index_html;
|
2180
2183
|
},
|
2181
2184
|
|
2185
|
+
/**
|
2186
|
+
* 组装 HTML 超链接
|
2187
|
+
* @param url
|
2188
|
+
* @param title
|
2189
|
+
* @returns {string}
|
2190
|
+
*/
|
2191
|
+
pack_html_link: function (url, title) {
|
2192
|
+
return "<a target='_blank' class='link_cls' rel='noopener noreferrer nofollow' href='" + url + "'>" + title + "</a>";
|
2193
|
+
},
|
2194
|
+
|
2182
2195
|
/**
|
2183
2196
|
* 组装股东数据
|
2184
2197
|
* @param item
|
@@ -2194,13 +2207,20 @@ const Util = {
|
|
2194
2207
|
},
|
2195
2208
|
|
2196
2209
|
/**
|
2197
|
-
*
|
2198
|
-
* @param
|
2199
|
-
* @param title
|
2200
|
-
* @returns {string}
|
2210
|
+
* 获取股东数据
|
2211
|
+
* @param element_id
|
2201
2212
|
*/
|
2202
|
-
|
2203
|
-
|
2213
|
+
fetch_holder_num: function (element_id) {
|
2214
|
+
let code_list = Util.get_code_list(element_id);
|
2215
|
+
if (code_list.length > 0) {
|
2216
|
+
Util.post("/action", {action: "holder_num", code_list: code_list.join("-")}, function (j) {
|
2217
|
+
$.each(j, function (code, item) {
|
2218
|
+
$(".holder_" + code).each(function () {
|
2219
|
+
$(this).html(Util.pack_holder_num(item));
|
2220
|
+
});
|
2221
|
+
});
|
2222
|
+
});
|
2223
|
+
}
|
2204
2224
|
},
|
2205
2225
|
|
2206
2226
|
/**
|