sbd-npm 1.4.93 → 1.4.95
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 -1
- package/custom.js +1 -1
- package/package.json +1 -1
- package/status.js +4 -4
- package/stock_basics.js +3 -3
- package/summary_daily.js +1 -1
- package/util.js +39 -9
package/constant.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
9
|
*
|
|
10
10
|
* Unless required by applicable law or agreed to in writing, software
|
|
11
11
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
package/custom.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
9
|
*
|
|
10
10
|
* Unless required by applicable law or agreed to in writing, software
|
|
11
11
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
package/package.json
CHANGED
package/status.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
9
|
*
|
|
10
10
|
* Unless required by applicable law or agreed to in writing, software
|
|
11
11
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
@@ -1121,7 +1121,7 @@ $(function () {
|
|
|
1121
1121
|
Status.pack_machine_component("machine_instruction_machine", j["machines"]);
|
|
1122
1122
|
let machine = $("#machines").val();
|
|
1123
1123
|
if (machine) {
|
|
1124
|
-
$("#machine_instruction_machine").
|
|
1124
|
+
$("#machine_instruction_machine").val(machine);
|
|
1125
1125
|
}
|
|
1126
1126
|
}
|
|
1127
1127
|
if (j["instructions"]) {
|
|
@@ -1210,7 +1210,7 @@ $(function () {
|
|
|
1210
1210
|
Status.pack_machine_component("machine_cookie_machine", j["machines"]);
|
|
1211
1211
|
let machine = $("#machines").val();
|
|
1212
1212
|
if (machine) {
|
|
1213
|
-
$("#machine_cookie_machine").
|
|
1213
|
+
$("#machine_cookie_machine").val(machine);
|
|
1214
1214
|
}
|
|
1215
1215
|
}
|
|
1216
1216
|
Util.hide_tips();
|
|
@@ -1670,7 +1670,7 @@ $(function () {
|
|
|
1670
1670
|
"element_id": "mysql_access_modal_body",
|
|
1671
1671
|
"caption": '<caption class="' + (Util.is_mobile() ? "text-left" : "text-right") + '" id="mysql_access_summary"></caption>',
|
|
1672
1672
|
"head_columns": [
|
|
1673
|
-
{"name": "", "select_id": "mysql_access_filter", "select_options": [{"key": "0", "val": "全部"},{"key": "1", "val": "正常"},{"key": "2", "val": "屏蔽"}]},
|
|
1673
|
+
{"name": "", "select_id": "mysql_access_filter", "select_options": [{"key": "0", "val": "全部"},{"key": "1", "val": "正常"},{"key": "2", "val": "屏蔽"},{"key": "3", "val": "异常"}]},
|
|
1674
1674
|
{"name": "IP", "table_sort": 1, "tooltip": "IP地址(Internet Protocol Address)是指互联网协议地址"},
|
|
1675
1675
|
{"name": "地址信息", "table_sort": 1},
|
|
1676
1676
|
{"name": "连接次数", "table_sort": 1},
|
package/stock_basics.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
9
|
*
|
|
10
10
|
* Unless required by applicable law or agreed to in writing, software
|
|
11
11
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
@@ -179,9 +179,9 @@ let Stock = {
|
|
|
179
179
|
$("#price").html(Util.digit_compare_trend(item["price"], item["pre_close"]));
|
|
180
180
|
$("#year_price").html(Util.year_price_rate(item["price"], item["year_price"]));
|
|
181
181
|
let high_52week = $("#high_52week");
|
|
182
|
-
high_52week.html(Util.digit_compare_trend(high_52week.
|
|
182
|
+
high_52week.html(Util.digit_compare_trend(high_52week.text(), item["price"]));
|
|
183
183
|
let low_52week = $("#low_52week");
|
|
184
|
-
low_52week.html(Util.digit_compare_trend(low_52week.
|
|
184
|
+
low_52week.html(Util.digit_compare_trend(low_52week.text(), item["price"]));
|
|
185
185
|
if (item["high_history"]["close"]) {
|
|
186
186
|
let high_history = $("#high_history");
|
|
187
187
|
high_history.html(Util.digit_compare_trend(item["high_history"]["close"], item["price"]));
|
package/summary_daily.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
6
6
|
* You may obtain a copy of the License at
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
9
9
|
*
|
|
10
10
|
* Unless required by applicable law or agreed to in writing, software
|
|
11
11
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
package/util.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* you may not use this file except in compliance with the License.
|
|
13
13
|
* You may obtain a copy of the License at
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
16
16
|
*
|
|
17
17
|
* Unless required by applicable law or agreed to in writing, software
|
|
18
18
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
@@ -1028,7 +1028,7 @@ const Util = {
|
|
|
1028
1028
|
},
|
|
1029
1029
|
|
|
1030
1030
|
/**
|
|
1031
|
-
*
|
|
1031
|
+
* 渲染表格数据
|
|
1032
1032
|
* @param element_id
|
|
1033
1033
|
* @param html
|
|
1034
1034
|
*/
|
|
@@ -1042,6 +1042,36 @@ const Util = {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
},
|
|
1044
1044
|
|
|
1045
|
+
/**
|
|
1046
|
+
* 渲染 industry 下拉选择框数据
|
|
1047
|
+
* @param element_id
|
|
1048
|
+
* @param industry_data
|
|
1049
|
+
*/
|
|
1050
|
+
render_industry_select_html: function (element_id, industry_data) {
|
|
1051
|
+
let html = ['<option value="0">行业</option>'];
|
|
1052
|
+
if (Array.isArray(industry_data)) {
|
|
1053
|
+
industry_data.forEach(function (i) {
|
|
1054
|
+
html.push('<option value="', i["id"], '">', i["industry"], '(', i["num"], ')</option>');
|
|
1055
|
+
});
|
|
1056
|
+
}
|
|
1057
|
+
$("#" + element_id).html(html.join(""));
|
|
1058
|
+
},
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* 渲染 area 下拉选择框数据
|
|
1062
|
+
* @param element_id
|
|
1063
|
+
* @param area_data
|
|
1064
|
+
*/
|
|
1065
|
+
render_area_select_html: function (element_id, area_data) {
|
|
1066
|
+
let html = ['<option value="">地区</option>'];
|
|
1067
|
+
if (Array.isArray(area_data)) {
|
|
1068
|
+
area_data.forEach(function (a) {
|
|
1069
|
+
html.push('<option value="', a["area"], '">', a["area"], '(', a["num"], ')</option>');
|
|
1070
|
+
});
|
|
1071
|
+
}
|
|
1072
|
+
$("#" + element_id).html(html.join(""));
|
|
1073
|
+
},
|
|
1074
|
+
|
|
1045
1075
|
/**
|
|
1046
1076
|
* 表格加载状态
|
|
1047
1077
|
* @param element_id
|
|
@@ -1550,7 +1580,7 @@ const Util = {
|
|
|
1550
1580
|
Util.post(Util.get_url("fund_public"), {action: "public_fund_detail", fund_code: fund_code}, function (j) {
|
|
1551
1581
|
let html = [];
|
|
1552
1582
|
if (j["fund_code"]) {
|
|
1553
|
-
$("#" + component_id + "_title").html(Util.pack_html_link("
|
|
1583
|
+
$("#" + component_id + "_title").html(Util.pack_html_link("https://fundf10.eastmoney.com/jbgk_" + j["fund_code"] + ".html", j["fund_name"]));
|
|
1554
1584
|
let net = "--";
|
|
1555
1585
|
if (j["net"] > 0) {
|
|
1556
1586
|
net = j["net"];
|
|
@@ -1573,7 +1603,7 @@ const Util = {
|
|
|
1573
1603
|
html.push("<tr><td colspan='3'>近一周</td><td colspan='4'>", Util.parse_ratio(j["one_week_change"]), "</td><td colspan='3'>近一月</td><td colspan='5'>", Util.parse_ratio(j["one_month_change"]), "</td></tr>");
|
|
1574
1604
|
html.push("<tr><td colspan='3'>近一年</td><td colspan='4'>", Util.parse_ratio(j["one_year_change"]), "</td><td colspan='3'>年初至今</td><td colspan='5'>", Util.pack_html_link('https://fundf10.eastmoney.com/jdzf_' + j["fund_code"] + '.html', Util.parse_ratio(j["ytd_change"])), "</td></tr>");
|
|
1575
1605
|
html.push("<tr><td colspan='5'>成立以来</td><td colspan='10'>", Util.parse_ratio(j["establish_change"]), "</td></tr>");
|
|
1576
|
-
html.push("<tr class='info'><th colspan='15' style='text-align: center;'>", Util.pack_html_link("
|
|
1606
|
+
html.push("<tr class='info'><th colspan='15' style='text-align: center;'>", Util.pack_html_link("https://fund.eastmoney.com/f10/ccmx_" + j["fund_code"] + ".html", "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
|
|
1577
1607
|
html.push("<tr id='" + component_id + "_head'><th>序号</th><th>股票代码</th><th>股票名</th><th>PE</th><th>总市值</th><th>行业</th><th>地区</th><th>价格</th><th>年初至今</th><th>近5日</th><th>股东数</th><th>持有量</th><th class='info'>占比</th><th>占比变化</th><th>持仓市值</th></tr>");
|
|
1578
1608
|
html.push("<tr class='" + component_id + "_tr'><td colspan='15'>暂无数据</td></tr>");
|
|
1579
1609
|
Util.render_table_html(component_id + "_body_body", html);
|
|
@@ -1787,7 +1817,7 @@ const Util = {
|
|
|
1787
1817
|
html.push("<tr>");
|
|
1788
1818
|
item["name"] = item["name"] + "(" + item["code"] + ")";
|
|
1789
1819
|
if (category_top_type === 2) {
|
|
1790
|
-
cole_url = "
|
|
1820
|
+
cole_url = "https://q.10jqka.com.cn/thshy/detail/code/" + item["code"];
|
|
1791
1821
|
} else if (category_top_type === 3) {
|
|
1792
1822
|
cole_url = "https://www.swsresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=" + item["code"] + "&name=" + item["code"];
|
|
1793
1823
|
} else {
|
|
@@ -2661,7 +2691,7 @@ const Util = {
|
|
|
2661
2691
|
let val = $(this).text();
|
|
2662
2692
|
if (unit === "") {
|
|
2663
2693
|
let match_array = val.match(/[\u4e00-\u9fa5]+/);
|
|
2664
|
-
if (
|
|
2694
|
+
if (Array.isArray(match_array) && match_array[0]) {
|
|
2665
2695
|
unit = match_array[0];
|
|
2666
2696
|
}
|
|
2667
2697
|
}
|
|
@@ -2839,7 +2869,7 @@ const Util = {
|
|
|
2839
2869
|
// 174.36(+0.79%) 括号里的数字
|
|
2840
2870
|
let bracket_re = /\(([-+]?\d*\.?\d+|[-+]?\d+|\d+)\%?\)/;
|
|
2841
2871
|
let match_array = bracket_re.exec(td_val);
|
|
2842
|
-
if (
|
|
2872
|
+
if (Array.isArray(match_array)) {
|
|
2843
2873
|
if (match_array.length >= 2) {
|
|
2844
2874
|
return match_array[1];
|
|
2845
2875
|
}
|
|
@@ -2848,7 +2878,7 @@ const Util = {
|
|
|
2848
2878
|
// 匹配数字
|
|
2849
2879
|
let digit_re = /([-+]?\d*\.?\d+|[-+]?\d+|\d+)/;
|
|
2850
2880
|
match_array = digit_re.exec(td_val);
|
|
2851
|
-
if (
|
|
2881
|
+
if (Array.isArray(match_array) && match_array[0]) {
|
|
2852
2882
|
return match_array[0];
|
|
2853
2883
|
}
|
|
2854
2884
|
return td_val.replace("%", "");
|
|
@@ -3522,7 +3552,7 @@ const Util = {
|
|
|
3522
3552
|
let industry_url = Util.get_url("summary_industry");
|
|
3523
3553
|
data.forEach(function (item) {
|
|
3524
3554
|
html.push("<tr>");
|
|
3525
|
-
html.push("<td>", Util.pack_html_link("
|
|
3555
|
+
html.push("<td>", Util.pack_html_link("https://q.10jqka.com.cn/thshy/detail/code/" + item["code"], item["code"]), "</td>");
|
|
3526
3556
|
html.push("<td>", Util.pack_html_link(industry_url + "?code=" + item["code"], item["name"]), "</td>");
|
|
3527
3557
|
html.push("<td>", Util.year_price_rate(item["current_close"], item["year_close"], 1), "</td>");
|
|
3528
3558
|
html.push("<td>", Util.year_price_rate(item["current_close"], item["start_close"], 1), "</td>");
|