sbd-npm 1.2.39 → 1.2.42
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 +1 -0
- package/package.json +1 -1
- package/util.js +22 -3
package/constant.js
CHANGED
@@ -40,6 +40,7 @@ const MenuList = [
|
|
40
40
|
{'key': 'trend_money_inflow', 'name': '资金流入历史最高', 'url': '/dc1303ba221de0c4fb85cd3cb513c547'},
|
41
41
|
{'key': 'trend_month', 'name': '月线趋势', 'url': '/218cd8e3c5ea55629cac28ee0e543233'},
|
42
42
|
{'key': 'trend_boll', 'name': '布林线', 'url': '/0c9b231a72e40475d6f985fd67bdb718'},
|
43
|
+
{'key': 'trend_bull_trend', 'name': '多头趋势', 'url': '/11c801537253fbfc175fadf8f645721d'},
|
43
44
|
{'key': 'trend_ma20_60', 'name': '20、60日均线交叉', 'url': '/4bf72713d83469ad6ec1d9fc3be8886f'},
|
44
45
|
{'key': 'trend_macd_down', 'name': 'MACD下行', 'url': '/ff97a31b4ffbabe71315e75c4fd62047'},
|
45
46
|
{'key': 'trend_doji', 'name': '十字星', 'url': '/718eac2cccaef1c7968f2d121b5f3070'},
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -876,6 +876,7 @@ const Util = {
|
|
876
876
|
head_cols.push({"name": "成交金额", "table_sort": 1});
|
877
877
|
head_cols.push({"name": "成交均价", "table_sort": 1});
|
878
878
|
head_cols.push({"name": "股东数", "table_sort": 1});
|
879
|
+
head_cols.push({"name": "基金数", "table_sort": 1});
|
879
880
|
head_cols.push({"name": "备注", "id": "stock_category_remark_title"});
|
880
881
|
} else {
|
881
882
|
head_cols.unshift({"name": ""});
|
@@ -930,6 +931,7 @@ const Util = {
|
|
930
931
|
_html.push("<td id='amount_", item["code"], "'>--</td>");
|
931
932
|
_html.push("<td id='average_", item["code"], "'>--</td>");
|
932
933
|
_html.push("<td class='holder_", item["code"], "'>--</td>");
|
934
|
+
_html.push("<td class='fund_", item["code"], "'>--</td>");
|
933
935
|
_html.push("<td id='remark_", item["code"], "'></td>");
|
934
936
|
}
|
935
937
|
_html.push("</tr>");
|
@@ -2092,9 +2094,7 @@ const Util = {
|
|
2092
2094
|
//获取股票详情数据
|
2093
2095
|
Util.post("/action", {action: "code_detail", code_list: code_list.join("-")}, function (j) {
|
2094
2096
|
let valid_code_list = [];
|
2095
|
-
let total_change_percent = 0;
|
2096
|
-
let total_year_change_percent = 0;
|
2097
|
-
let total_d5_change_percent = 0;
|
2097
|
+
let total_change_percent = 0, total_year_change_percent = 0, total_d5_change_percent = 0;
|
2098
2098
|
$.each(j, function (code, item) {
|
2099
2099
|
if (item["price"] && item["previous_price"] && item["price"] > 0 && item["previous_price"] > 0) {
|
2100
2100
|
valid_code_list.push(item["code"]);
|
@@ -2113,6 +2113,12 @@ const Util = {
|
|
2113
2113
|
$(this).attr("data-val", item["holder_num"]);
|
2114
2114
|
});
|
2115
2115
|
}
|
2116
|
+
if (item["cur_fund_num"] && item["cur_fund_num"] > 0) {
|
2117
|
+
$(".fund_" + code).each(function () {
|
2118
|
+
$(this).html(Util.pack_fund_num(item));
|
2119
|
+
$(this).attr("data-val", item["cur_fund_num"]);
|
2120
|
+
});
|
2121
|
+
}
|
2116
2122
|
if (item["money_net_inflow"] && item["money_net_inflow"] !== 0) {
|
2117
2123
|
$(".money_inflow_" + code).each(function () {
|
2118
2124
|
Util.render_money_inflow($(this), item);
|
@@ -2397,6 +2403,19 @@ const Util = {
|
|
2397
2403
|
return "--";
|
2398
2404
|
},
|
2399
2405
|
|
2406
|
+
/**
|
2407
|
+
* 组装基金数据
|
2408
|
+
* @param item
|
2409
|
+
* @returns {string}
|
2410
|
+
*/
|
2411
|
+
pack_fund_num: function (item) {
|
2412
|
+
if (item["cur_fund_num"] && item["cur_fund_num"] > 0) {
|
2413
|
+
let fund_num = Util.digit_compare_trend(item["cur_fund_num"], item["pre_fund_num"]);
|
2414
|
+
return Util.pack_html_link("/stock/" + item["code"] + "?tab=public_fund", fund_num);
|
2415
|
+
}
|
2416
|
+
return "--";
|
2417
|
+
},
|
2418
|
+
|
2400
2419
|
/**
|
2401
2420
|
* 雪球人数关注排名数据
|
2402
2421
|
* @param item
|