sbd-npm 1.1.92 → 1.1.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/.npmignore +1 -0
- package/menu.js +1 -0
- package/package.json +1 -1
- package/util.js +24 -18
package/.npmignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
sbd-npm.md
|
package/menu.js
CHANGED
@@ -37,6 +37,7 @@ const MenuList = [
|
|
37
37
|
'icon': 'edit',
|
38
38
|
'menu': [
|
39
39
|
{'key': 'trend_price', 'name': '股价阶段涨跌幅度', 'url': '/43ef6aeb36475f8f8f44d477b1990390'},
|
40
|
+
{'key': 'trend_money_inflow', 'name': '资金流入历史最高', 'url': '/dc1303ba221de0c4fb85cd3cb513c547'},
|
40
41
|
{'key': 'trend_boll', 'name': '布林线', 'url': '/0c9b231a72e40475d6f985fd67bdb718'},
|
41
42
|
{'key': 'trend_ma20_60', 'name': '20、60日均线交叉', 'url': '/4bf72713d83469ad6ec1d9fc3be8886f'},
|
42
43
|
{'key': 'trend_macd_down', 'name': 'MACD下行', 'url': '/ff97a31b4ffbabe71315e75c4fd62047'},
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -833,6 +833,7 @@ const Util = {
|
|
833
833
|
{"name": "最高价"},
|
834
834
|
{"name": "最低价"},
|
835
835
|
{"name": "年初至今", "table_sort": 1},
|
836
|
+
{"name": "近5日", "table_sort": 1},
|
836
837
|
{"name": "52周最高", "table_sort": 1}
|
837
838
|
];
|
838
839
|
if (stock_category !== "us") {
|
@@ -883,6 +884,7 @@ const Util = {
|
|
883
884
|
_html.push("<td id='high_", item["code"], "'>0</td>");
|
884
885
|
_html.push("<td id='low_", item["code"], "'>0</td>");
|
885
886
|
_html.push("<td class='year_price_", item["code"], "'>", (item["stock_price"] ? Util.year_price_rate(item["stock_price"], item["year_price"]) : "--"), "</td>");
|
887
|
+
_html.push("<td class='d5_price_", item["code"], "'>", (item["stock_price"] ? Util.year_price_rate(item["stock_price"], item["d5_price"]) : "--"), "</td>");
|
886
888
|
_html.push("<td class='high_52week_", item["code"], "'>--</td>");
|
887
889
|
if (is_us === 0) {
|
888
890
|
_html.push("<td id='amount_", item["code"], "'>--</td>");
|
@@ -1715,27 +1717,31 @@ const Util = {
|
|
1715
1717
|
let td_index = $(this).index();
|
1716
1718
|
let get_td_value = function (row) {
|
1717
1719
|
let td_obj = $(row).children('td').eq(td_index);
|
1718
|
-
|
1719
|
-
|
1720
|
-
if (Util.regexp_date_yyyy_mm_dd(td_val)) {
|
1721
|
-
return Util.format_to_second(td_val);
|
1720
|
+
if (td_obj.attr("data-val")) {
|
1721
|
+
return td_obj.attr("data-val");
|
1722
1722
|
} else {
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
if (match_arr.length >= 2) {
|
1728
|
-
return match_arr[1];
|
1729
|
-
}
|
1730
|
-
return 0;
|
1723
|
+
let td_val = td_obj.text();
|
1724
|
+
// 2017-12-7 这种时间格式
|
1725
|
+
if (Util.regexp_date_yyyy_mm_dd(td_val)) {
|
1726
|
+
return Util.format_to_second(td_val);
|
1731
1727
|
} else {
|
1732
|
-
//
|
1733
|
-
let
|
1734
|
-
match_arr =
|
1735
|
-
if ($.isArray(match_arr)
|
1736
|
-
|
1728
|
+
// 174.36(+0.79%) 括号里的数字
|
1729
|
+
let bracket_re = /\(([-+]?\d*\.?\d+|[-+]?\d+|\d+)\%?\)/;
|
1730
|
+
let match_arr = bracket_re.exec(td_val);
|
1731
|
+
if ($.isArray(match_arr)) {
|
1732
|
+
if (match_arr.length >= 2) {
|
1733
|
+
return match_arr[1];
|
1734
|
+
}
|
1735
|
+
return 0;
|
1736
|
+
} else {
|
1737
|
+
// 匹配数字
|
1738
|
+
let digit_re = /([-+]?\d*\.?\d+|[-+]?\d+|\d+)/;
|
1739
|
+
match_arr = digit_re.exec(td_val);
|
1740
|
+
if ($.isArray(match_arr) && match_arr[0]) {
|
1741
|
+
return match_arr[0];
|
1742
|
+
}
|
1743
|
+
return Util.filter_chinese(td_val).replace("%", "");
|
1737
1744
|
}
|
1738
|
-
return Util.filter_chinese(td_val).replace("%", "");
|
1739
1745
|
}
|
1740
1746
|
}
|
1741
1747
|
};
|