sbd-npm 1.3.1 → 1.3.3
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 +2 -0
- package/package.json +1 -1
- package/util.js +15 -12
package/constant.js
CHANGED
@@ -177,6 +177,8 @@ const MenuList = [
|
|
177
177
|
{'key': 'hk_hsm25', 'name': '恒生中国25指数', 'url': '/0x51c9cebe97e898875fba107e53fad29c79e1a1bb'},
|
178
178
|
{'key': 'hk_hsh35', 'name': '恒生香港35指数', 'url': '/0x5eff66742c612a2423c451e7d112014ecccc6af9'},
|
179
179
|
{'key': 'hk_hsm100', 'name': '恒生中国100指数', 'url': '/0x759fcb84a0a322125df6748dffad66d7b2b44c2d'},
|
180
|
+
{'key': 'hk_biotechnology', 'name': '生物科技', 'url': '/0xa131be85db2beb939e93207d0966c3710c7b761a'},
|
181
|
+
{'key': 'hk_sell_short', 'name': '沽空排行', 'url': '/0x4ecddc987891875a42d206620cd97ca382613485'},
|
180
182
|
]
|
181
183
|
},
|
182
184
|
{
|
package/package.json
CHANGED
package/util.js
CHANGED
@@ -474,14 +474,10 @@ const Util = {
|
|
474
474
|
* @returns {*}
|
475
475
|
*/
|
476
476
|
stock_hk_html: function (html, item, exchange_rate) {
|
477
|
-
let name = item["name"];
|
478
|
-
if (item["english_name"] && item["english_name"] != "NULL") {
|
479
|
-
name = item["name"] + "(" + item["english_name"] + ")";
|
480
|
-
}
|
481
477
|
let market_capital_hkd = Util.to_float(item["market_capital"], 2);
|
482
478
|
let market_capital_cny = Util.to_float((item["market_capital"] * exchange_rate) / 100, 2);
|
483
479
|
html.push("<td>", Util.snowball_url(item["code"]), "</td>");
|
484
|
-
html.push("<td>", Util.stock_url(item["code"], name), "</td>");
|
480
|
+
html.push("<td>", Util.stock_url(item["code"], item["name"]), "</td>");
|
485
481
|
html.push("<td class='hk_industry'>", item["industry"], "</td>");
|
486
482
|
html.push("<td>", Util.map_url(item["province_city"]), "</td>");
|
487
483
|
html.push("<td>", Util.to_float((item["pe_ttm"] ? item["pe_ttm"] : item["pe"]), 2), "</td>");
|
@@ -2647,7 +2643,7 @@ const Util = {
|
|
2647
2643
|
if (digit > previous_digit) {
|
2648
2644
|
cls = "text-danger";
|
2649
2645
|
ratio_val = Math.round(((digit - previous_digit) / previous_digit) * 10000) / 100;
|
2650
|
-
trend_ratio = "(+" + ratio_val + "%)";
|
2646
|
+
trend_ratio = "(+" + Math.min(ratio_val, 999) + "%)";
|
2651
2647
|
} else if (digit < previous_digit) {
|
2652
2648
|
cls = "text-success";
|
2653
2649
|
ratio_val = Math.round(((previous_digit - digit) / previous_digit) * 10000) / 100;
|
@@ -2770,12 +2766,7 @@ const Util = {
|
|
2770
2766
|
let holder_url = Util.get_url("holder_num") + "?code=" + item["code"];
|
2771
2767
|
let holder_info = "";
|
2772
2768
|
if (item["pre_holder_num"] && item["pre_holder_num"] > 0) {
|
2773
|
-
|
2774
|
-
if (rate > 9) {
|
2775
|
-
holder_info = '<b data-val="900" title="' + item["pre_holder_num"] + '" class="text-danger">' + item["holder_num"] + '(+900%)</b>';
|
2776
|
-
} else {
|
2777
|
-
holder_info = Util.digit_compare_trend(item["holder_num"], item["pre_holder_num"]);
|
2778
|
-
}
|
2769
|
+
holder_info = Util.digit_compare_trend(item["holder_num"], item["pre_holder_num"]);
|
2779
2770
|
} else {
|
2780
2771
|
holder_info = Util.digit_compare_trend(item["holder_num"], 0);
|
2781
2772
|
}
|
@@ -3574,6 +3565,18 @@ const Util = {
|
|
3574
3565
|
}
|
3575
3566
|
chart_instance.clear();
|
3576
3567
|
chart_instance.setOption({
|
3568
|
+
//graphic: [{ // 如何给echarts的图表加上水印
|
3569
|
+
// type: 'text',
|
3570
|
+
//left: 'center',
|
3571
|
+
//top: 'center',
|
3572
|
+
//position: 'fixed',
|
3573
|
+
//z: 100,
|
3574
|
+
//style: {
|
3575
|
+
//fill: '#000',
|
3576
|
+
//text: '这是一个水印',
|
3577
|
+
//font: 'bold 20px Microsoft YaHei'
|
3578
|
+
//}
|
3579
|
+
//}],
|
3577
3580
|
"legend": {},
|
3578
3581
|
"grid": {"x": 40, "y": 60, "x2": 40, "y2": 20},
|
3579
3582
|
"tooltip": {
|