sbd-npm 1.3.81 → 1.3.82

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
@@ -286,5 +286,6 @@ const IndexList = [
286
286
  {'code': 'hsci', 'name': '恒生综合指数', 'is_industry': 1, 'is_key': 1},
287
287
  {'code': 'hstech', 'name': '恒生科技指数', 'is_industry': 0, 'is_key': 1},
288
288
  {'code': 'sp500', 'name': '标普500指数', 'is_industry': 1, 'is_key': 1},
289
+ {'code': 'ths_all_a', 'name': '同花顺全A指数', 'is_industry': 0, 'is_key': 0},
289
290
  {'code': 'usdcnh', 'name': '美元离岸人民币汇率', 'is_industry': 0, 'is_key': 0},
290
291
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.81",
3
+ "version": "1.3.82",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -1055,7 +1055,9 @@ let Stock = {
1055
1055
  Util.post("/stock/" + Stock["code"], payload, function (j) {
1056
1056
  Stock["rzye_chart"].hideLoading();
1057
1057
  let date_data = [], rzye_data = [], rqye_data = [], price_data = [], rqye_color_data = [], rzye_low = Number.MAX_SAFE_INTEGER, rzye_high = 0, rqye_low = Number.MAX_SAFE_INTEGER, rqye_high = 0;
1058
+ let latest_date = 0, margin_summary = "", rqye_summary = "";
1058
1059
  j["data"].forEach(function (item) {
1060
+ latest_date = Math.max(latest_date, item["date"]);
1059
1061
  date_data.push(Util.seconds_to_format(item["date"], "%Y-%m-%d"));
1060
1062
  rzye_low = Math.min(rzye_low, item["rzye"]);
1061
1063
  rzye_high = Math.max(rzye_high, item["rzye"]);
@@ -1066,7 +1068,8 @@ let Stock = {
1066
1068
  price_data.push(item["price"]);
1067
1069
  rqye_color_data.push("#E74C3C");
1068
1070
  });
1069
- let margin_summary = "", rqye_summary = "";
1071
+ latest_date = Util.seconds_to_format(latest_date, "%Y-%m-%d");
1072
+ $("#stock_margin_url").attr("href", Util.get_url("trend_margin") + "?start_date=" + latest_date + "&end_date=" + latest_date);
1070
1073
  if (j["latest"].length > 0) {
1071
1074
  if (j["latest"].length === 1) {
1072
1075
  margin_summary = " 最新融资余额(" + Util.seconds_to_format(j["latest"][0]["date"], "%Y-%m-%d") + "): " + Util.to_unit(j["latest"][0]["rzye"], 3);