sbd-npm 1.2.81 → 1.2.83

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 +2 -2
  2. package/package.json +1 -1
  3. package/util.js +27 -17
package/constant.js CHANGED
@@ -7,12 +7,12 @@ const MenuList = [
7
7
  {'key': 'summary_week', 'name': '每周概要', 'url': '/041dd556cd72d41ce3c6fd2a50340cd6'},
8
8
  {'key': 'summary_breadth', 'name': '市场宽度', 'url': '/6263b0820aa0c1b0b27e10e855b8ea1b'},
9
9
  {'key': 'summary_industry', 'name': '板块涨跌', 'url': '/ce5c0a4d19ebf14830d0a05cdf7c0eb9'},
10
+ {'key': 'summary_momentum', 'name': '板块动量', 'url': '/6bde52a3162b3973ed96f52ef0a57d0e'},
10
11
  {'key': 'summary_dashboard', 'name': '市场全景', 'url': '/dffbe86a3353af37e3471cc6a72266e9'},
11
12
  {'key': 'summary_market', 'name': '市场概要', 'url': '/1251bb015654040ba8dc38b563817586'},
12
13
  {'key': 'summary_etf', 'name': 'ETF分析', 'url': '/5e7eb433adbda09db931b9a4a3371fd5'},
13
14
  {'key': 'summary_repurchase', 'name': '闲钱流向', 'url': '/8d810d466cca69c6a91afb7fd468df93'},
14
15
  {'key': 'summary_margin_lever', 'name': '融资杠杠率', 'url': '/c0e5faf52d3f6a8a0a85100957420be0'},
15
- {'key': 'summary_momentum', 'name': '板块动量', 'url': '/6bde52a3162b3973ed96f52ef0a57d0e'},
16
16
  {'key': 'summary_index', 'name': '指数', 'url': '/60fbd3c53b23705212efb6bf010ed957'},
17
17
  ]
18
18
  },
@@ -138,9 +138,9 @@ const MenuList = [
138
138
  {'key': 'concept_vegetable', 'name': 'Veget', 'url': '/b1769a58f0f3d4a92bad61c97a2232f0'},
139
139
  {'key': 'concept_zan', 'name': 'zangyn', 'url': '/860a3a9647efad436894b4aa3843da42'},
140
140
  {'key': 'concept_peng', 'name': '吴小朋同学', 'url': '/8aa7536ca01724a5d2b580b22dea15de'},
141
+ {'key': 'concept_xiong', 'name': '王朝雄', 'url': '/f1d1315e5ce6b25c7e220e4d6ed9c06e'},
141
142
  {'key': 'concept_penny', 'name': '梁斌penny', 'url': '/8c1660155f89650a471edf54414cac49'},
142
143
  {'key': 'concept_wen', 'name': '崇文不尚武', 'url': '/b6fd64a2c54250b8ac039123e74e9b7e'},
143
- {'key': 'concept_dao', 'name': '成长股事(大道)', 'url': '/7b7ea877f6793752e2b981d82da81e1b'},
144
144
  {'key': 'concept_patience', 'name': '耐力投资', 'url': '/d3e193cf9cdba853133c046ca3406867'},
145
145
  {'key': 'concept_bellwether', 'name': '龙头股', 'url': '/2995afdea420471e00c536182e711bef'},
146
146
  {'key': 'concept_market_situation', 'name': '市值风云', 'url': '/02fdaf4d66cdecb092bcd65f569aa493'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.81",
3
+ "version": "1.2.83",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -904,22 +904,34 @@ const Util = {
904
904
  /**
905
905
  * 股价相对强度(Relative Price Strength)
906
906
  * @param code
907
+ * @param zone_id
907
908
  */
908
- fetch_rps_data: function (code) {
909
+ fetch_rps_data: function (code, zone_id) {
909
910
  Util.show_loading();
910
- $("#rps_head").html(Util.pack_html_link("https://bafybeibav23h2xcyzevh4o26kb7mpz5j2ra3uryqycpkstuvsddfjgffwy.ipfs.dweb.link/欧奈尔RPS指标.html", "股价相对强度(Relative Price Strength)"));
911
- Util.init_table_skeleton({
912
- "element_id": "rps_table",
913
- "head_cols": [
914
- {"name": "时间"},
915
- {"name": "RPS20", "tooltip": "20日股价相对强度,表示过去20个交易日内,该股票的价格涨幅超过了市场上多少的股票,该值为85,表示该股在过去20日内的价格涨幅超过了市场上85%的股票"},
916
- {"name": "20日涨跌"},
917
- {"name": "RPS60", "tooltip": "60日股价相对强度,表示过去60个交易日内,该股票的价格涨幅超过了市场上多少的股票,该值为85,表示该股在过去60日内的价格涨幅超过了市场上85%的股票"},
918
- {"name": "60日涨跌"},
919
- {"name": "RPS120", "tooltip": "120日股价相对强度,表示过去120个交易日内,该股票的价格涨幅超过了市场上多少的股票,该值为85,表示该股在过去120日内的价格涨幅超过了市场上85%的股票"},
920
- {"name": "120日涨跌"},
921
- ]
922
- });
911
+ if ($("#rps_table").length <= 0) {
912
+ let rps_html = [];
913
+ rps_html.push('<div class="x_panel">');
914
+ rps_html.push('<div class="x_title">');
915
+ rps_html.push('<h2>', Util.pack_html_link("https://bafybeibav23h2xcyzevh4o26kb7mpz5j2ra3uryqycpkstuvsddfjgffwy.ipfs.dweb.link/欧奈尔RPS指标.html", "股价相对强度(Relative Price Strength)"), '</h2>');
916
+ rps_html.push('<div class="clearfix"></div>');
917
+ rps_html.push('</div>');
918
+ rps_html.push('<div class="x_content2" id="rps_table"></div>');
919
+ rps_html.push('</div>');
920
+ $("#" + zone_id).html(rps_html.join(""));
921
+ Util.init_table_skeleton({
922
+ "element_id": "rps_table",
923
+ "caption": "none",
924
+ "head_cols": [
925
+ {"name": "时间"},
926
+ {"name": "RPS20", "tooltip": "20日股价相对强度,表示过去20个交易日内,该股票的价格涨幅超过了市场上多少的股票,该值为85,表示该股在过去20日内的价格涨幅超过了市场上85%的股票"},
927
+ {"name": "20日涨跌"},
928
+ {"name": "RPS60", "tooltip": "60日股价相对强度,表示过去60个交易日内,该股票的价格涨幅超过了市场上多少的股票,该值为85,表示该股在过去60日内的价格涨幅超过了市场上85%的股票"},
929
+ {"name": "60日涨跌"},
930
+ {"name": "RPS120", "tooltip": "120日股价相对强度,表示过去120个交易日内,该股票的价格涨幅超过了市场上多少的股票,该值为85,表示该股在过去120日内的价格涨幅超过了市场上85%的股票"},
931
+ {"name": "120日涨跌"},
932
+ ]
933
+ });
934
+ }
923
935
  Util.post("/stock/" + code, {action: "rps"}, function (j) {
924
936
  let _html = [];
925
937
  j["data"].forEach(function (item) {
@@ -2526,9 +2538,7 @@ const Util = {
2526
2538
  * @returns {string}
2527
2539
  */
2528
2540
  digit_compare_trend1: function (digit, previous_digit) {
2529
- let cls = "";
2530
- let trend_ratio = "";
2531
- let ratio_val = 0;
2541
+ let cls = "", trend_ratio = "", ratio_val = 0;
2532
2542
  if (digit > 0 && previous_digit > 0) {
2533
2543
  if (digit > previous_digit) {
2534
2544
  cls = "text-danger";