sbd-npm 1.3.49 → 1.3.50

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.49",
3
+ "version": "1.3.50",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -605,12 +605,12 @@ let Stock = {
605
605
  "element_id": "profit_table",
606
606
  "head_cols": [
607
607
  {"name": "年份季度"},
608
- {"name": "ROE", "tooltip": "净资产收益率(Return On Equity)"},
609
608
  {"name": "净利率(%)"},
610
609
  {"name": "毛利率"},
611
- {"name": "净利润"},
612
610
  {"name": "EPS", "tooltip": "每股收益(Earnings Per Share)"},
611
+ {"name": "ROE", "tooltip": "净资产收益率(Return On Equity)"},
613
612
  {"name": "营业收入"},
613
+ {"name": "净利润"},
614
614
  {"name": "每股主营业务收入"},
615
615
  ]
616
616
  });
@@ -692,12 +692,12 @@ let Stock = {
692
692
  let tr_cls = (quarter === 0 && item["quarter"] === 4) ? "success" : "";
693
693
  _html.push("<tr class='", tr_cls, "'>");
694
694
  _html.push("<td>", item["year"], "-", item["quarter"], "</td>");
695
- _html.push("<td>", item["roe"], "</td>");
696
695
  _html.push("<td>", item["net_profit_ratio"], "</td>");
697
696
  _html.push("<td>", Util.to_float(item["gross_profit_rate"], 2), "%</td>");
698
- _html.push("<td>", Util.to_unit(item["net_profits"] * 1000000), "</td>");
699
- _html.push("<td>", Util.to_float(item["eps"], 3), "元</td>");
697
+ _html.push("<td>", Util.to_float(item["eps"], 2), "元</td>");
698
+ _html.push("<td>", item["roe"], "%</td>");
700
699
  _html.push("<td>", Util.to_unit(item["business_income"] * 1000000), "</td>");
700
+ _html.push("<td>", Util.to_unit(item["net_profits"] * 1000000, 3), "</td>");
701
701
  _html.push("<td>", Util.to_float(item["bips"], 2), "元</td>");
702
702
  _html.push("</tr>");
703
703
  }
package/summary_daily.js CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- $(document).ready(function () {
16
+ $(function () {
17
17
 
18
18
  let DailySummary = {
19
19
 
package/util.js CHANGED
@@ -112,7 +112,8 @@ const Util = {
112
112
  _html.push('<div class="list-group">');
113
113
  if (j.data.length > 0) {
114
114
  $.each(j.data, function (index, item) {
115
- _html.push('<a target="_blank" rel="noopener noreferrer nofollow" class="list-group-item" href="/stock/', item["code"].toUpperCase(), '">', item["name"], '(', item["code"], ')', '</a>');
115
+ let upper_code = item["code"].toUpperCase();
116
+ _html.push('<a target="_blank" rel="noopener noreferrer nofollow" class="list-group-item" href="/stock/', upper_code, '">', (item["name"] ? item["name"] : upper_code), '(', upper_code, ')</a>');
116
117
  });
117
118
  } else {
118
119
  _html.push('<a href="#" class="list-group-item disabled">无数据</a>');