sbd-npm 1.1.98 → 1.2.1
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/.npmignore +1 -0
- package/custom.js +15 -0
- package/menu.js +15 -0
- package/package.json +1 -1
- package/stock_basics.js +15 -6
- package/summary_daily.js +15 -0
- package/util.js +52 -11
package/.npmignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
sbd-npm.md
|
package/custom.js
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (C) 2015-present dhq <dhq314@gmail.com>
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
1
16
|
function init_sidebar() {
|
2
17
|
var a = function () {
|
3
18
|
$RIGHT_COL.css("min-height", $(window).height());
|
package/menu.js
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (C) 2015-present dhq <dhq314@gmail.com>
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
1
16
|
const MenuList = [
|
2
17
|
{
|
3
18
|
'name': '概要',
|
package/package.json
CHANGED
package/stock_basics.js
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (C) 2015-present dhq <dhq314@gmail.com>
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
1
16
|
let Stock = {
|
2
17
|
|
3
18
|
code: "",
|
@@ -216,12 +231,6 @@ let Stock = {
|
|
216
231
|
if (item["price"] > 0 && item["price"] < item["block_trade_price"]) {
|
217
232
|
remark_html.push("<b class='text-danger'>当前价小于最近<a href='" + Util.get_url("daily_block") + "?code=" + item["code"] + "'>大宗交易价(" + item["block_trade_price"] + ")</a></b>");
|
218
233
|
}
|
219
|
-
if (item["is_hkscc"] === 1) {
|
220
|
-
remark_html.push("<b class='text-danger'>港交所成份股</b>");
|
221
|
-
}
|
222
|
-
if (item["is_hs300s"] === 1) {
|
223
|
-
remark_html.push("<b class='text-danger'>沪深300成份股</b>");
|
224
|
-
}
|
225
234
|
if (item["desc"]) {
|
226
235
|
remark_html.push("<br><br><p>" + item["desc"] + "</p>");
|
227
236
|
}
|
package/summary_daily.js
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright (C) 2015-present dhq <dhq314@gmail.com>
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
1
16
|
$(document).ready(function () {
|
2
17
|
|
3
18
|
let DailySummary = {
|
package/util.js
CHANGED
@@ -1,8 +1,24 @@
|
|
1
1
|
/**
|
2
2
|
* 通用工具函数
|
3
3
|
* Theme https://colorlib.com/polygon/gentelella/index.html
|
4
|
+
* [20 个杀手级 JavaScript 单行代码](https://segmentfault.com/a/1190000040721650)
|
5
|
+
*/
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Copyright (C) 2015-present dhq <dhq314@gmail.com>
|
9
|
+
*
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
11
|
+
* you may not use this file except in compliance with the License.
|
12
|
+
* You may obtain a copy of the License at
|
13
|
+
*
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
15
|
+
*
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
19
|
+
* See the License for the specific language governing permissions and
|
20
|
+
* limitations under the License.
|
4
21
|
*/
|
5
|
-
// [20 个杀手级 JavaScript 单行代码](https://segmentfault.com/a/1190000040721650)
|
6
22
|
const Util = {
|
7
23
|
|
8
24
|
tips_token: "util-tips-div",
|
@@ -1350,6 +1366,8 @@ const Util = {
|
|
1350
1366
|
_html.push('<option value="10">半年前</option>');
|
1351
1367
|
_html.push('<option value="11">一年前</option>');
|
1352
1368
|
_html.push('<option value="99">所有时间</option>');
|
1369
|
+
_html.push('<option value="100">还原</option>');
|
1370
|
+
_html.push('<option value="101">置空</option>');
|
1353
1371
|
select_obj.html(_html.join(""));
|
1354
1372
|
select_obj.change(function () {
|
1355
1373
|
let select_val = $("#" + select_id).val();
|
@@ -1427,8 +1445,18 @@ const Util = {
|
|
1427
1445
|
sd_obj.attr("disabled", true);
|
1428
1446
|
ed_obj.attr("disabled", true);
|
1429
1447
|
break;
|
1448
|
+
case "100": // 还原
|
1449
|
+
sd_obj.val(Obj.start_date);
|
1450
|
+
ed_obj.val(Obj.end_date);
|
1451
|
+
break;
|
1452
|
+
case "101": // 置空
|
1453
|
+
sd_obj.val("");
|
1454
|
+
ed_obj.val("");
|
1455
|
+
break;
|
1456
|
+
}
|
1457
|
+
if (select_val !== "101") {
|
1458
|
+
Util.init_range_picker_date(start_id, end_id);
|
1430
1459
|
}
|
1431
|
-
Util.init_range_picker_date(start_id, end_id);
|
1432
1460
|
if (select_val === "0") { // 记录之前的时间
|
1433
1461
|
Obj.start_date = sd_obj.val();
|
1434
1462
|
Obj.end_date = ed_obj.val();
|
@@ -1934,6 +1962,12 @@ const Util = {
|
|
1934
1962
|
if (item["holder_num"] && item["holder_num"] > 0) {
|
1935
1963
|
$(".holder_" + code).each(function () {
|
1936
1964
|
$(this).html(Util.pack_holder_num(item));
|
1965
|
+
$(this).attr("data-val", item["holder_num"]);
|
1966
|
+
});
|
1967
|
+
}
|
1968
|
+
if (item["money_net_inflow"] && item["money_net_inflow"] !== 0) {
|
1969
|
+
$(".money_inflow_" + code).each(function () {
|
1970
|
+
Util.render_money_inflow($(this), item);
|
1937
1971
|
});
|
1938
1972
|
}
|
1939
1973
|
if ($("#remark_" + code).length) {
|
@@ -1951,15 +1985,6 @@ const Util = {
|
|
1951
1985
|
if (parseInt(item["is_down_macd"]) > 0) {
|
1952
1986
|
remark += "<b>MACD 下行</b><br />";
|
1953
1987
|
}
|
1954
|
-
if (item["is_msci"] === 1) {
|
1955
|
-
remark += "<b>MSCI 成份股</b><br />";
|
1956
|
-
}
|
1957
|
-
if (item["is_hkscc"] === 1) {
|
1958
|
-
remark += "<b>港交所成份股</b><br />";
|
1959
|
-
}
|
1960
|
-
if (item["is_hs300s"] === 1) {
|
1961
|
-
remark += "<b>沪深300成份股</b><br />";
|
1962
|
-
}
|
1963
1988
|
$("#remark_" + code).html(remark);
|
1964
1989
|
}
|
1965
1990
|
});
|
@@ -2216,6 +2241,22 @@ const Util = {
|
|
2216
2241
|
return "--";
|
2217
2242
|
},
|
2218
2243
|
|
2244
|
+
/**
|
2245
|
+
* 组装主力资金数据
|
2246
|
+
* @param obj
|
2247
|
+
* @param item
|
2248
|
+
* @returns {string}
|
2249
|
+
*/
|
2250
|
+
render_money_inflow: function (obj, item) {
|
2251
|
+
if (item["money_net_inflow"] && item["money_net_inflow"] !== 0) {
|
2252
|
+
let money_net_inflow = "<b>" + Util.to_unit(item["money_net_inflow"]) + "</b>";
|
2253
|
+
money_net_inflow = Util.pack_html_link("/stock/" + item["code"] + "?tab=big_deal", money_net_inflow);
|
2254
|
+
obj.html(Util.pack_html_link("/stock/" + item["code"] + "?tab=big_deal", money_net_inflow));
|
2255
|
+
obj.attr("data-val", item["money_net_inflow"]);
|
2256
|
+
obj.find("span").first().addClass(Util.text_color(item["money_net_inflow"]));
|
2257
|
+
}
|
2258
|
+
},
|
2259
|
+
|
2219
2260
|
/**
|
2220
2261
|
* 获取股东数据
|
2221
2262
|
* @param element_id
|