sbd-npm 1.2.42 → 1.2.43

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
@@ -137,11 +137,11 @@ const MenuList = [
137
137
  {'key': 'concept_recommend', 'name': '关注', 'url': '/27ca098faad33a8e4d109efe0112fd16'},
138
138
  {'key': 'concept_bellwether', 'name': '龙头股', 'url': '/2995afdea420471e00c536182e711bef'},
139
139
  {'key': 'concept_market_situation', 'name': '市值风云', 'url': '/02fdaf4d66cdecb092bcd65f569aa493'},
140
+ {'key': 'concept_wen', 'name': '崇文不尚武', 'url': '/b6fd64a2c54250b8ac039123e74e9b7e'},
141
+ {'key': 'concept_dao', 'name': '成长股事(大道)', 'url': '/7b7ea877f6793752e2b981d82da81e1b'},
140
142
  {'key': 'concept_down_top', 'name': '15-21年的超跌股', 'url': '/ae3bbf97a358392cfaa0ceb35cb3fb57'},
141
143
  {'key': 'concept_cloud', 'name': '心似白云常自在', 'url': '/1d883188398a3a8c743748c5eb81fe7b'},
142
- {'key': 'concept_wen', 'name': '崇文不尚武', 'url': '/b6fd64a2c54250b8ac039123e74e9b7e'},
143
144
  {'key': 'concept_niu', 'name': '老曾阿牛', 'url': '/0f4a2714971424024c1ddd8651c26569'},
144
- {'key': 'concept_dao', 'name': '成长股事(大道)', 'url': '/7b7ea877f6793752e2b981d82da81e1b'},
145
145
  {'key': 'concept_qian', 'name': '唐史主任司马迁', 'url': '/8b3e40fe74b4870244bc51125da7675a'},
146
146
  {'key': 'concept_dan', 'name': '但斌', 'url': '/3ac0a5857b1d9a111497c0e817e647a1'},
147
147
  {'key': 'concept_auto_intelligent', 'name': '智能电动车', 'url': '/cd7be404357809849d267f24fceebcd2'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.42",
3
+ "version": "1.2.43",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -495,16 +495,12 @@ let Stock = {
495
495
  payload["date"] = date;
496
496
  }
497
497
  Util.post("/stock/" + Stock["code"], payload, function (j) {
498
- let main_html = [];
499
- let circulation_html = [];
500
- let main_volume = 0;
501
- let pre_main_volume = 0;
502
- let circulation_volume = 0;
503
- let pre_circulation_volume = 0;
498
+ let main_html = [], circulation_html = [];
499
+ let main_volume = 0, pre_main_volume = 0, circulation_volume = 0, pre_circulation_volume = 0;
504
500
  j["data"].forEach(function (item) {
505
501
  let change = item["change"];
506
502
  if (change === "None") {
507
- change = "新增";
503
+ change = "<b class='text-danger'>新增</b>";
508
504
  } else if (parseInt(change) === 0) {
509
505
  change = "不变";
510
506
  } else if (parseFloat(change) > 0) {
package/util.js CHANGED
@@ -251,7 +251,17 @@ const Util = {
251
251
  */
252
252
  stock_basics_html: function (html, item) {
253
253
  let symbol = Util.is_alpha(item["code"]) ? item["code"].toUpperCase() : item["code"];
254
- let name = item["cname"] ? item["cname"] : (item["name"] ? item["name"].substr(0, 10) : symbol);
254
+ let name = symbol;
255
+ if (item["cname"]) {
256
+ name = item["cname"];
257
+ } else if (item["name"]) {
258
+ name = item["name"];
259
+ if (Util.is_us(item["code"]) && name.indexOf(' ') !== -1) {
260
+ let name_arr = name.split(' ');
261
+ name = name_arr[0] ? name_arr[0] : name;
262
+ }
263
+ name = name.substr(0, 10);
264
+ }
255
265
  html.push("<td>", Util.snowball_url(symbol), "</td>");
256
266
  html.push("<td>", Util.stock_url(item["code"], name), "</td>");
257
267
  html.push("<td>", Util.to_float((item["pe_ttm"] ? item["pe_ttm"] : item["pe"]), 2), "</td>");