sbd-npm 1.2.53 → 1.2.55

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 CHANGED
@@ -50,8 +50,6 @@ const MenuList = [
50
50
  {'key': 'trend_fund_hold', 'name': '基金数持股变化', 'url': '/067740976f85ec14ddae02b51829ce35'},
51
51
  {'key': 'trend_week_minimum', 'name': '周成交低点', 'url': '/722d94429b8e689fe78dca1cf67a4c67'},
52
52
  {'key': 'trend_margin', 'name': '融资融券余额涨幅', 'url': '/1964a6bc56dc3ce6825b23667c7fb588'},
53
- {'key': 'trend_down', 'name': '当前连跌个股', 'url': '/07fb907c7e7572fbeae98bacf5c44593'},
54
- {'key': 'trend_down_analysis', 'name': '连跌反弹概率', 'url': '/e9a32e4601fca33a9c3b68103f61c3bc'},
55
53
  {'key': 'trend_index_month', 'name': '指数每年月份涨跌', 'url': '/86691e421938098bab7679e43bea67a6'},
56
54
  {'key': 'trend_ma', 'name': '均线近似重合', 'url': '/712e8f604264dd718f5fccd173418b67'},
57
55
  {'key': 'trend_k_compare', 'name': 'K线对比', 'url': '/413957dbd93723d1bad2071da463c551'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.53",
3
+ "version": "1.2.55",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -198,13 +198,6 @@ let Stock = {
198
198
  }
199
199
  // 备注
200
200
  let remark_html = [];
201
- if (item["down_day"] > 0) {
202
- let down_ratio = "";
203
- if (item["down_ratio"] > 0) {
204
- down_ratio = "(" + item["down_ratio"] + "%)";
205
- }
206
- remark_html.push("<b class='text-success'>" + item["down_day"] + "天连跌" + down_ratio + "</b>");
207
- }
208
201
  if (item["is_down_macd"] === 1) {
209
202
  remark_html.push("<b class='text-success'>MACD 下行</b>");
210
203
  }
package/util.js CHANGED
@@ -331,13 +331,15 @@ const Util = {
331
331
  */
332
332
  get_code_list: function (element_id) {
333
333
  let code_list = [];
334
- $("#" + element_id).find(".code_item").each(function () {
335
- let code = $(this).text();
336
- if (/^HK[0-9]+$/.test(code.toUpperCase())) {
337
- code = code.replace(/[^0-9]/ig, "");
338
- }
339
- code_list.push(code);
340
- });
334
+ if (element_id.length > 0) {
335
+ $("#" + element_id).find(".code_item").each(function () {
336
+ let code = $(this).text();
337
+ if (/^HK[0-9]+$/.test(code.toUpperCase())) {
338
+ code = code.replace(/[^0-9]/ig, "");
339
+ }
340
+ code_list.push(code);
341
+ });
342
+ }
341
343
  return code_list;
342
344
  },
343
345
 
@@ -877,6 +879,22 @@ const Util = {
877
879
  });
878
880
  },
879
881
 
882
+ /**
883
+ * 板块个股数量数据
884
+ * @param code_zone_id
885
+ * @param classify_id
886
+ * @param callback_func
887
+ */
888
+ fetch_classify_num: function (code_zone_id, classify_id, callback_func) {
889
+ let code_list = Util.get_code_list(code_zone_id);
890
+ code_list = code_list.length > 0 ? code_list.join("-") : "all";
891
+ Util.post("/action", {action: "classify_num", code_list: code_list}, function (j) {
892
+ if (j["data"]) {
893
+ Util.render_classify_html(classify_id, j["data"], callback_func);
894
+ }
895
+ });
896
+ },
897
+
880
898
  /**
881
899
  * 初始分类股票的显示表格
882
900
  * @param stock_category
@@ -2170,13 +2188,6 @@ const Util = {
2170
2188
  }
2171
2189
  if ($("#remark_" + code).length) {
2172
2190
  let remark = "";
2173
- if (parseInt(item["down_day"]) > 0) {
2174
- let down_ratio = "";
2175
- if (item["down_ratio"] > 0) {
2176
- down_ratio = "(" + item["down_ratio"] + "%)";
2177
- }
2178
- remark += "<b>" + item["down_day"] + "天连跌" + down_ratio + "</b><br />";
2179
- }
2180
2191
  if (parseInt(item["ma_trend"]) > 0) {
2181
2192
  remark += "<b>低于 " + item["ma_trend"] + " 日均线</b><br />";
2182
2193
  }