sbd-npm 1.3.68 → 1.3.69

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 (2) hide show
  1. package/package.json +1 -1
  2. package/summary_daily.js +8 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.68",
3
+ "version": "1.3.69",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/summary_daily.js CHANGED
@@ -300,9 +300,7 @@ $(function () {
300
300
  * 市场成交概况
301
301
  */
302
302
  pack_market_overview: function (market_overview_dict) {
303
- let _html = [];
304
- let previous_mo_amount = 0;
305
- let mo_amount = 0;
303
+ let _html = [], previous_mo_amount = 0, mo_amount = 0, mo_amount_cls = "", mo_amount_sign = "";
306
304
  for (let market_type in market_overview_dict) {
307
305
  if (market_overview_dict.hasOwnProperty(market_type)) {
308
306
  let market = market_overview_dict[market_type];
@@ -322,13 +320,14 @@ $(function () {
322
320
  }
323
321
  }
324
322
  $("#market_overview_zone").html(_html.join(""));
325
- let mo_amount_cls = "";
326
- let mo_amount_sign = "";
327
- let dist_amount = Util.to_float(mo_amount - previous_mo_amount, 3);
328
- if (dist_amount > 0) {
323
+ if (market_overview_dict["total_amount_data"] && market_overview_dict["total_amount_data"].length === 2 && market_overview_dict["total_amount_data"][0]["amount"] > 0 && market_overview_dict["total_amount_data"][1]["amount"] > 0) {
324
+ mo_amount = Util.to_hundred_million(market_overview_dict["total_amount_data"][0]["amount"], 3)
325
+ previous_mo_amount = Util.to_hundred_million(market_overview_dict["total_amount_data"][1]["amount"], 3)
326
+ }
327
+ if (mo_amount > previous_mo_amount) {
329
328
  mo_amount_cls = "label-danger";
330
329
  mo_amount_sign = "+";
331
- } else if (dist_amount < 0) {
330
+ } else if (mo_amount < previous_mo_amount) {
332
331
  mo_amount_cls = "label-success";
333
332
  }
334
333
  let mo_amount_obj = $("#market_overview_amount");
@@ -338,7 +337,7 @@ $(function () {
338
337
  if (mo_amount_cls.length > 0) {
339
338
  mo_amount_obj.addClass(mo_amount_cls);
340
339
  }
341
- mo_amount_obj.html(Util.to_float(mo_amount, 3) + "(" + mo_amount_sign + dist_amount + ")");
340
+ mo_amount_obj.html(Util.to_float(mo_amount, 3) + "(" + mo_amount_sign + Util.to_float(mo_amount - previous_mo_amount, 3) + ")");
342
341
  DailySummary.set_cache("market_overview", market_overview_dict);
343
342
  },
344
343