sbd-npm 1.3.46 → 1.3.48
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/package.json +1 -1
- package/stock_basics.js +9 -4
- package/util.js +7 -4
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -217,14 +217,17 @@ let Stock = {
|
|
217
217
|
if (item["price"] > 0 && item["price"] < item["block_trade_price"]) {
|
218
218
|
remark_html.push("<b class='text-danger'>当前价小于最近<a href='" + Util.get_url("daily_block") + "?code=" + item["code"] + "&start_date=" + Util.seconds_to_format(Stock.ttm_second, "%Y-%m-%d") + "'>大宗交易价(" + item["block_trade_price"] + ")</a></b>, ");
|
219
219
|
}
|
220
|
+
if (remark_html.length > 0) {
|
221
|
+
remark_html.push("<br>");
|
222
|
+
}
|
220
223
|
if (item["desc"]) {
|
221
|
-
remark_html.push("<br><
|
224
|
+
remark_html.push("<br><p>" + item["desc"] + "</p>");
|
222
225
|
}
|
223
226
|
remark_html = remark_html.join("");
|
224
227
|
// 同花顺|申万行业板块数据
|
225
228
|
if (item["industry_data"] && item["industry_data"].length > 0) {
|
226
229
|
if (remark_html.length > 0) {
|
227
|
-
remark_html += "<br
|
230
|
+
remark_html += "<br>";
|
228
231
|
}
|
229
232
|
remark_html += " <b>行业板块:</b> ";
|
230
233
|
item["industry_data"].forEach(function (i_d) {
|
@@ -233,8 +236,10 @@ let Stock = {
|
|
233
236
|
});
|
234
237
|
}
|
235
238
|
if (item["is_star50"]) {
|
236
|
-
|
237
|
-
|
239
|
+
remark_html += " <a href='" + (Util.get_url("summary_index") + "?index_code=SH000688") + "' class='btn btn-xs btn-warning'>科创50</a>";
|
240
|
+
}
|
241
|
+
if (item["is_hs300"]) {
|
242
|
+
remark_html += " <a href='" + (Util.get_url("summary_index") + "?index_code=SH000300") + "' class='btn btn-xs btn-warning'>沪深300</a>";
|
238
243
|
}
|
239
244
|
if (item["links"]) {
|
240
245
|
if (remark_html.length > 0) {
|
package/util.js
CHANGED
@@ -557,6 +557,9 @@ const Util = {
|
|
557
557
|
*/
|
558
558
|
stock_hk_html: function (html, item) {
|
559
559
|
html.push("<td>", Util.snowball_url(item["code"]), "</td>");
|
560
|
+
if (item["name"] && item["name"].length > 5) {
|
561
|
+
item["name"] = item["name"].replace("有限公司", "").replace("集团", "").replace("股份", "");
|
562
|
+
}
|
560
563
|
html.push("<td>", Util.stock_url(item["code"], item["name"]), "</td>");
|
561
564
|
html.push("<td class='hk_industry'>", item["industry"], "</td>");
|
562
565
|
html.push("<td>", Util.map_url(item["province_city"]), "</td>");
|
@@ -2884,7 +2887,7 @@ const Util = {
|
|
2884
2887
|
holder_info = Util.digit_compare_trend(item["holder_num"], 0);
|
2885
2888
|
}
|
2886
2889
|
}
|
2887
|
-
let holder_url =
|
2890
|
+
let holder_url = "/stock/" + item["code"] + "?tab=holder_data";
|
2888
2891
|
return Util.pack_html_link(holder_url, holder_info);
|
2889
2892
|
},
|
2890
2893
|
|
@@ -2914,9 +2917,9 @@ const Util = {
|
|
2914
2917
|
if (item["code"]) {
|
2915
2918
|
url += "&code=" + item["code"];
|
2916
2919
|
}
|
2917
|
-
|
2918
|
-
|
2919
|
-
$("
|
2920
|
+
$("#snowball_follower").html(Util.pack_html_link(url, snowball_follower_rank));
|
2921
|
+
let tooltip = "雪球共有 " + item["snowball_follower"] + " 人关注,关注排名第 " + item["snowball_follower_rank"] + " 位";
|
2922
|
+
$("#snowball_follower_info").attr("data-original-title", tooltip);
|
2920
2923
|
}
|
2921
2924
|
},
|
2922
2925
|
|