sbd-npm 1.1.70 → 1.1.74
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 +1 -0
- package/package.json +1 -1
- package/util.js +23 -7
package/menu.js
CHANGED
@@ -228,6 +228,7 @@ const MenuList = [
|
|
228
228
|
{'key': 'other_bond', 'name': '地方债数据', 'url': '/fbe79af9b125b8952d05801dcf1ea4c1'},
|
229
229
|
{'key': 'other_convertible_bond', 'name': '可转债数据', 'url': '/cf21d0fe6fe66c94488dab9cfef16c0a'},
|
230
230
|
{'key': 'other_fortune500', 'name': '财富500强', 'url': '/04d4033d33ea4c0cdd0d874dde23ef2c'},
|
231
|
+
{'key': 'other_material', 'name': '资料', 'url': '/384dd1f2f7cbfc1739f78d047ef22350'},
|
231
232
|
]
|
232
233
|
},
|
233
234
|
];
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -391,15 +391,11 @@ const Util = {
|
|
391
391
|
$("#average_" + code).html(Util.to_float(item["amount"] / item["volume"], 2));
|
392
392
|
}
|
393
393
|
let remark_obj = $("#remark_" + code);
|
394
|
-
if (remark_obj.length > 0) {
|
394
|
+
if (remark_obj.length > 0 && ((item["buy"] && item["buy"] > 0) || (item["sell"] && item["sell"] > 0))) {
|
395
395
|
remark_obj.removeClass("success");
|
396
396
|
remark_obj.removeClass("danger");
|
397
|
-
|
398
|
-
|
399
|
-
remark_obj.attr("title", "五档卖出: " + Util.to_hundred_million(item["sell"]) + "亿\n 五档买入: " + Util.to_hundred_million(item["buy"]) + "亿");
|
400
|
-
} else {
|
401
|
-
remark_obj.attr("title", "");
|
402
|
-
}
|
397
|
+
remark_obj.addClass(item["buy"] > item["sell"] ? "danger" : "success");
|
398
|
+
remark_obj.attr("title", "五档卖出: " + Util.to_hundred_million(item["sell"]) + "亿\n 五档买入: " + Util.to_hundred_million(item["buy"]) + "亿");
|
403
399
|
}
|
404
400
|
},
|
405
401
|
|
@@ -764,6 +760,16 @@ const Util = {
|
|
764
760
|
}
|
765
761
|
},
|
766
762
|
|
763
|
+
/**
|
764
|
+
* 表格加载状态
|
765
|
+
* @param element_id
|
766
|
+
*/
|
767
|
+
set_table_loading: function(element_id) {
|
768
|
+
let obj = $("#" + element_id);
|
769
|
+
let td_num = obj.parent().find('thead td').length;
|
770
|
+
obj.html('<tr><td colspan="' + td_num + '">Loading...</td></tr>');
|
771
|
+
},
|
772
|
+
|
767
773
|
/**
|
768
774
|
* 渲染板块内容
|
769
775
|
* @param classify_id
|
@@ -2362,6 +2368,16 @@ const Util = {
|
|
2362
2368
|
$("#" + localStorage[tab_token] + "_div").removeClass("hide");
|
2363
2369
|
},
|
2364
2370
|
|
2371
|
+
/**
|
2372
|
+
* 转为以万为单位的数值
|
2373
|
+
* @param digit
|
2374
|
+
* @param fraction
|
2375
|
+
* @returns {*|number}
|
2376
|
+
*/
|
2377
|
+
to_ten_thousand: function (digit, fraction = 2) {
|
2378
|
+
return Util.to_float(digit / 10000, fraction);
|
2379
|
+
},
|
2380
|
+
|
2365
2381
|
/**
|
2366
2382
|
* 转为以亿为单位的数值
|
2367
2383
|
* @param digit
|