sbd-npm 1.2.99 → 1.2.101

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/util.js +11 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.2.99",
3
+ "version": "1.2.101",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/util.js CHANGED
@@ -1257,13 +1257,21 @@ const Util = {
1257
1257
 
1258
1258
  render_category_top_modal: function() {
1259
1259
  Util.show_loading();
1260
- Util.post(location.pathname, {"action": "category_top_statistics", "type": $("#category_top_type").val()}, function (j) {
1260
+ let category_top_type = $("#category_top_type").val();
1261
+ Util.post(location.pathname, {"action": "category_top_statistics", "type": category_top_type}, function (j) {
1261
1262
  let _html = [];
1262
1263
  j["data"].forEach(function (item) {
1263
- let date_data = [];
1264
+ let date_data = [], cole_url = "";
1264
1265
  _html.push("<tr>");
1265
1266
  item["name"] = item["name"] + "(" + item["code"] + ")";
1266
- _html.push("<td>", Util.pack_html_link("https://xueqiu.com/S/" + Util.code_to_fund_symbol(item["code"]), item["name"]), "</td>");
1267
+ if (category_top_type === 2) {
1268
+ cole_url = "http://q.10jqka.com.cn/thshy/detail/code/" + item["code"];
1269
+ } else if (category_top_type === 3) {
1270
+ cole_url = "https://www.swsresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=" + item["code"] + "&name=" + item["code"];
1271
+ } else {
1272
+ cole_url = "https://xueqiu.com/S/" + Util.code_to_fund_symbol(item["code"]);
1273
+ }
1274
+ _html.push("<td>", Util.pack_html_link(cole_url, item["name"]), "</td>");
1267
1275
  _html.push("<td>", item["num"], "</td>");
1268
1276
  _html.push("<td data-val='", item["interval_day"], "'>", (item["interval_day"] < 10000 ? (item["interval_day"] + "天") : "--"), "</td>");
1269
1277
  if (item["dist_day"] < item["interval_day"]) {