sbd-npm 1.5.45 → 1.5.46

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.5.45",
3
+ "version": "1.5.46",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/snowball_tool.js CHANGED
@@ -42,8 +42,8 @@ $(function () {
42
42
  if (j.user) {
43
43
  $("#snowball-data").removeClass("hide");
44
44
 
45
- $("#user_id").html(Util.pack_html_link("https://xueqiu.com/u/" + j.user.id, j.user.id));
46
- let user_api_url = "https://xueqiu.com/user/show.json?id=" + j.user.id + "&_=" + Util.now();
45
+ $("#user_id").html(Util.pack_html_link("https://www.xueqiu.com/u/" + j.user.id, j.user.id));
46
+ let user_api_url = "https://www.xueqiu.com/user/show.json?id=" + j.user.id + "&_=" + Util.now();
47
47
  j.user.screen_name = j.user.screen_name ? j.user.screen_name : "--";
48
48
  let name_html = Util.pack_html_link(user_api_url, j.user.screen_name);
49
49
  if (j.user.name_list) {
@@ -65,17 +65,17 @@ $(function () {
65
65
  $("#ip_location").html(j.user.ip_location ? Util.map_url(j.user.ip_location) : "--");
66
66
  $("#gender").html(j.user.gender === "f" ? "女" : "男");
67
67
  if (j.user.friends_count) {
68
- $("#friends_count").html(Util.pack_html_link("https://xueqiu.com/u/" + j.user.id + "#/follow", j.user.friends_count));
68
+ $("#friends_count").html(Util.pack_html_link("https://www.xueqiu.com/u/" + j.user.id + "#/follow", j.user.friends_count));
69
69
  } else {
70
70
  $("#friends_count").html(j.user.friends_count);
71
71
  }
72
72
  if (j.user.followers_count) {
73
- $("#followers_count").html(Util.pack_html_link("https://xueqiu.com/u/" + j.user.id + "#/fans", j.user.followers_count));
73
+ $("#followers_count").html(Util.pack_html_link("https://www.xueqiu.com/u/" + j.user.id + "#/fans", j.user.followers_count));
74
74
  } else {
75
75
  $("#followers_count").html(j.user.followers_count);
76
76
  }
77
77
  if (j.user.status_count) {
78
- $("#status_count").html(Util.pack_html_link("https://xueqiu.com/v4/statuses/user_timeline.json?&user_id=" + j.user.id + "&type=0&count=20", j.user.status_count));
78
+ $("#status_count").html(Util.pack_html_link("https://www.xueqiu.com/v4/statuses/user_timeline.json?&user_id=" + j.user.id + "&type=0&count=20", j.user.status_count));
79
79
  } else {
80
80
  $("#status_count").html(0);
81
81
  }
@@ -129,7 +129,7 @@ $(function () {
129
129
  }
130
130
  }
131
131
  if (j.stocks) {
132
- $("#total_stock_num").html(j.stocks.length > 0 ? Util.pack_html_link("https://xueqiu.com/u/" + j.user.id + "#/stock", j.stocks.length) : "--");
132
+ $("#total_stock_num").html(j.stocks.length > 0 ? Util.pack_html_link("https://www.xueqiu.com/u/" + j.user.id + "#/stock", j.stocks.length) : "--");
133
133
  SnowballTool.init_stock_data(j.stocks);
134
134
  }
135
135
  SnowballTool.render_snowball_html();
package/snowball_tweet.js CHANGED
@@ -196,14 +196,14 @@ $(function () {
196
196
  } else {
197
197
  if (item.uid > 0) {
198
198
  if (item.mark.includes("/")) {
199
- url = "https://xueqiu.com/" + item.mark;
199
+ url = "https://www.xueqiu.com/" + item.mark;
200
200
  } else {
201
- url = "https://xueqiu.com/" + item.uid + "/" + item.id;
201
+ url = "https://www.xueqiu.com/" + item.uid + "/" + item.id;
202
202
  }
203
- user_url = "https://xueqiu.com/u/" + item.uid;
203
+ user_url = "https://www.xueqiu.com/u/" + item.uid;
204
204
  } else {
205
- url = "https://xueqiu.com/S/" + item.mark + "/" + item.id;
206
- user_url = "https://xueqiu.com/S/" + item.mark;
205
+ url = "https://www.xueqiu.com/S/" + item.mark + "/" + item.id;
206
+ user_url = "https://www.xueqiu.com/S/" + item.mark;
207
207
  item.user_name = (item.content.includes("公告及通告") || item.content.includes("自愿公告")) ? "公告" : "资讯";
208
208
  }
209
209
  }
@@ -245,7 +245,7 @@ $(function () {
245
245
  }
246
246
  let user_name = "";
247
247
  if (item.mark && SnowballTweet.user_data[item.mark]) {
248
- user_name = Util.pack_html_link("https://xueqiu.com/S/" + item.mark, SnowballTweet.user_data[item.mark]) + " - ";
248
+ user_name = Util.pack_html_link("https://www.xueqiu.com/S/" + item.mark, SnowballTweet.user_data[item.mark]) + " - ";
249
249
  if (item.user_name) {
250
250
  user_name += Util.pack_html_link(user_url, item.user_name);
251
251
  } else if (SnowballTweet.user_data[item.uid]) {
package/stock_basics.js CHANGED
@@ -574,9 +574,9 @@ let Stock = {
574
574
  $("#main_holder_tips").html(main_tips);
575
575
  let symbol = Util.code_to_symbol(Stock.code);
576
576
  Util.render_table_html("circulation_holder_table_body", circulation_html);
577
- $("#circulation_holder_url").attr("href", "https://xueqiu.com/snowman/S/" + symbol + "/detail#/LTGD");
577
+ $("#circulation_holder_url").attr("href", "https://www.xueqiu.com/snowman/S/" + symbol + "/detail#/LTGD");
578
578
  Util.render_table_html("main_holder_table_body", main_html);
579
- $("#main_holder_url").attr("href", "https://xueqiu.com/snowman/S/" + symbol + "/detail#/SDGD");
579
+ $("#main_holder_url").attr("href", "https://www.xueqiu.com/snowman/S/" + symbol + "/detail#/SDGD");
580
580
  if (j.date_list) {
581
581
  let date_html = [];
582
582
  j.date_list.forEach(function (date) {
package/summary_daily.js CHANGED
@@ -30,7 +30,7 @@ $(function () {
30
30
  key_cache: "SBD_CACHE",
31
31
  index_hist_data: [
32
32
  {"code": "ths_all_a", "name": "同花顺全A指数", "url": "https://m.10jqka.com.cn/stockpage/48_883957/"},
33
- {"code": "000902", "name": "中证流通", "url": "https://xueqiu.com/S/SH000902"},
33
+ {"code": "000902", "name": "中证流通", "url": "https://www.xueqiu.com/S/SH000902"},
34
34
  ],
35
35
 
36
36
  get_cache: function () {
package/util.js CHANGED
@@ -160,7 +160,7 @@ const Util = {
160
160
  let html = [];
161
161
  html.push('<div class="menu_section">');
162
162
  html.push('<ul class="nav side-menu">');
163
- if (typeof MenuList != "undefined") {
163
+ if (typeof MenuList === "object") {
164
164
  MenuList.forEach(function (menu) {
165
165
  html.push('<li><a><i class="fa fa-', menu["icon"], '"></i> ', menu["name"], ' <span class="fa fa-chevron-down"></span></a>');
166
166
  html.push('<ul class="nav child_menu">');
@@ -175,7 +175,7 @@ const Util = {
175
175
  }
176
176
  html.push('</div>');
177
177
  html.push('</div>');
178
- $("#sidebar-menu").html(html.join(""));
178
+ document.getElementById("sidebar-menu").innerHTML = html.join("");
179
179
  },
180
180
 
181
181
  /**
@@ -362,7 +362,7 @@ const Util = {
362
362
  } else {
363
363
  stock_symbol = Util.code_to_symbol(code);
364
364
  }
365
- let snowball_url = "https://xueqiu.com/S/" + stock_symbol;
365
+ let snowball_url = "https://www.xueqiu.com/S/" + stock_symbol;
366
366
  return "<a class='code_item' target='_blank' rel='noopener noreferrer nofollow' href='" + snowball_url + "'>" + code_name + "</a>";
367
367
  },
368
368
 
@@ -1589,7 +1589,7 @@ const Util = {
1589
1589
  let public_date = j.public_date > 0 ? Util.seconds_to_format(j.public_date, "%Y-%m-%d") : "--";
1590
1590
  let issue_date = j.issue_date > 0 ? Util.seconds_to_format(j.issue_date, "%Y-%m-%d") : "--";
1591
1591
  html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j.update_time, "%Y-%m-%d"), "' class='info'><th colspan='15' style='text-align: center;'>基金概况</th></tr>");
1592
- html.push("<tr><td colspan='3'>基金代码</td><td colspan='4'>", Util.pack_html_link('https://xueqiu.com/S/' + Util.code_to_fund_symbol(j.fund_code), j.fund_code), "</td><td colspan='3'>基金名</td><td colspan='5'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j.fund_code + '.html', j.fund_name), "</td></tr>");
1592
+ html.push("<tr><td colspan='3'>基金代码</td><td colspan='4'>", Util.pack_html_link('https://www.xueqiu.com/S/' + Util.code_to_fund_symbol(j.fund_code), j.fund_code), "</td><td colspan='3'>基金名</td><td colspan='5'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j.fund_code + '.html', j.fund_name), "</td></tr>");
1593
1593
  html.push("<tr><td colspan='3'>基金类型</td><td colspan='4'>", (j.fund_type ? j.fund_type : "--"), "</td><td colspan='3'>投资类型</td><td colspan='5'>", (j.invest_type ? j.invest_type : "--"), "</td></tr>");
1594
1594
  html.push("<tr><td colspan='3'>单位净值</td><td colspan='4'>", net, "</td><td colspan='3'>资产规模</td><td colspan='5'>", assets, "</td></tr>");
1595
1595
  html.push("<tr><td colspan='3'>成立日期</td><td colspan='4'>", public_date, "</td><td colspan='3'>发行日期</td><td colspan='5'>", issue_date, "</td></tr>");
@@ -1815,7 +1815,7 @@ const Util = {
1815
1815
  } else if (category_top_type === 3) {
1816
1816
  cole_url = "https://www.swsresearch.com/institute_sw/allIndex/releasedIndex/releasedetail?code=" + item.code + "&name=" + item.code;
1817
1817
  } else {
1818
- cole_url = "https://xueqiu.com/S/" + Util.code_to_fund_symbol(item.code);
1818
+ cole_url = "https://www.xueqiu.com/S/" + Util.code_to_fund_symbol(item.code);
1819
1819
  }
1820
1820
  html.push("<td>", Util.pack_html_link(cole_url, item.name), "</td>");
1821
1821
  html.push("<td>", item.num, "</td>");