sbd-npm 1.2.59 → 1.2.61

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.
Files changed (3) hide show
  1. package/constant.js +1 -1
  2. package/package.json +1 -1
  3. package/util.js +14 -2
package/constant.js CHANGED
@@ -6,9 +6,9 @@ const MenuList = [
6
6
  {'key': 'summary_daily', 'name': '每日概要', 'url': '/3f39b5b1a564070ba651b0fea119ef98'},
7
7
  {'key': 'summary_week', 'name': '每周概要', 'url': '/041dd556cd72d41ce3c6fd2a50340cd6'},
8
8
  {'key': 'summary_breadth', 'name': '市场宽度', 'url': '/6263b0820aa0c1b0b27e10e855b8ea1b'},
9
+ {'key': 'summary_industry', 'name': '板块涨跌', 'url': '/ce5c0a4d19ebf14830d0a05cdf7c0eb9'},
9
10
  {'key': 'summary_dashboard', 'name': '市场全景', 'url': '/dffbe86a3353af37e3471cc6a72266e9'},
10
11
  {'key': 'summary_market', 'name': '市场概要', 'url': '/1251bb015654040ba8dc38b563817586'},
11
- {'key': 'summary_industry', 'name': '板块涨跌', 'url': '/ce5c0a4d19ebf14830d0a05cdf7c0eb9'},
12
12
  {'key': 'summary_etf', 'name': 'ETF分析', 'url': '/5e7eb433adbda09db931b9a4a3371fd5'},
13
13
  {'key': 'summary_repurchase', 'name': '闲钱流向', 'url': '/8d810d466cca69c6a91afb7fd468df93'},
14
14
  {'key': 'summary_margin_lever', 'name': '融资杠杠率', 'url': '/c0e5faf52d3f6a8a0a85100957420be0'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.59",
3
+ "version": "1.2.61",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1405,20 +1405,32 @@ const Util = {
1405
1405
 
1406
1406
  /**
1407
1407
  * 获取时间戳所在的月份
1408
+ * @param seconds
1408
1409
  * @returns {*|number}
1409
1410
  */
1410
1411
  get_month: function (seconds = 0) {
1411
1412
  seconds = seconds > 0 ? seconds : Util.now();
1412
- return parseInt(seconds_to_format(seconds, "%m"));
1413
+ return parseInt(Util.seconds_to_format(seconds, "%m"));
1413
1414
  },
1414
1415
 
1415
1416
  /**
1416
1417
  * 获取时间戳所在的年份
1418
+ * @param seconds
1417
1419
  * @returns {*|number}
1418
1420
  */
1419
1421
  get_year: function (seconds = 0) {
1420
1422
  seconds = seconds > 0 ? seconds : Util.now();
1421
- return parseInt(seconds_to_format(seconds, "%Y"));
1423
+ return parseInt(Util.seconds_to_format(seconds, "%Y"));
1424
+ },
1425
+
1426
+ /**
1427
+ * 获取每年刚开始的时间戳
1428
+ * @param seconds
1429
+ * @returns {*|number}
1430
+ */
1431
+ get_year_second: function(seconds = 0) {
1432
+ let year = Util.get_year(seconds);
1433
+ return Util.format_to_second(year + "-01-01");
1422
1434
  },
1423
1435
 
1424
1436
  /**