sbd-npm 1.2.29 → 1.2.30
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/util.js +12 -3
package/package.json
CHANGED
package/util.js
CHANGED
@@ -876,6 +876,8 @@ 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": "备注", "id": "stock_category_remark_title"});
|
879
|
+
} else {
|
880
|
+
head_cols.unshift({"name": ""});
|
879
881
|
}
|
880
882
|
let table_options = {
|
881
883
|
"element_id": table_id,
|
@@ -904,17 +906,19 @@ const Util = {
|
|
904
906
|
|
905
907
|
render_stock_category_html: function () {
|
906
908
|
if (Util["stock_category_table_id"]) {
|
907
|
-
let _html = [];
|
908
|
-
let
|
909
|
+
let _html = [], total_num = 0;
|
910
|
+
let is_us = $("#stock_category_remark_title").length === 0 ? 1 : 0;
|
909
911
|
if (Util["stock_category_data"]) {
|
910
912
|
let industry = $("#stock_category_industry").val();
|
911
913
|
let area = $("#stock_category_area").val();
|
912
|
-
let is_us = $("#stock_category_remark_title").length === 0 ? 1 : 0;
|
913
914
|
Util["stock_category_data"].forEach(function (item) {
|
914
915
|
if (Util.is_industry_area(item, industry, area)) {
|
915
916
|
total_num++;
|
916
917
|
_html.push("<tr>");
|
917
918
|
item["code"] = item["code"].toLowerCase();
|
919
|
+
if (is_us === 1) {
|
920
|
+
_html.push('<td>', Util.us_logo_html(item["code"]), '</td>');
|
921
|
+
}
|
918
922
|
_html = Util.stock_basics_html(_html, item);
|
919
923
|
_html.push("<td id='high_", item["code"], "'>0</td>");
|
920
924
|
_html.push("<td id='low_", item["code"], "'>0</td>");
|
@@ -932,6 +936,11 @@ const Util = {
|
|
932
936
|
});
|
933
937
|
}
|
934
938
|
Util.render_table_html(Util["stock_category_table_id"] + "_body", _html);
|
939
|
+
if (is_us === 1) {
|
940
|
+
$("img").on("error", function () {
|
941
|
+
$(this).attr("src", "https://storage.googleapis.com/iex/api/logos/LI.png");
|
942
|
+
});
|
943
|
+
}
|
935
944
|
$("#" + Util["stock_category_table_id"] + "_body_tips").html('共 <span class="label label-info">' + total_num + '</span> 家');
|
936
945
|
}
|
937
946
|
},
|