sbd-npm 1.3.65 → 1.3.67

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
@@ -27,7 +27,7 @@ const MenuList = [
27
27
  {'key': 'trend_kdj', 'name': 'KDJ金叉', 'url': '/0x3382bdaec4e8715ce27ca2b538dce09a2f8f5e50'},
28
28
  {'key': 'trend_macd_cross', 'name': 'MACD金叉', 'url': '/0x277bc35fcd21059103dd7917c8bfe0c474880b85'},
29
29
  {'key': 'trend_bull_trend', 'name': '多头趋势', 'url': '/0x37b24777154ee090926e57bfa5602efa5c89b8a8'},
30
- {'key': 'trend_fund_hold', 'name': '基金数持股变化', 'url': '/0x706c0e77ca3e314b5186c763e6ee857b744e9880'},
30
+ {'key': 'trend_fund_hold', 'name': '基金持股变化', 'url': '/0x706c0e77ca3e314b5186c763e6ee857b744e9880'},
31
31
  {'key': 'trend_money_inflow', 'name': '资金流入历史最高', 'url': '/0xfbfc92be1eebe9ccf5b2f14b9a2ea25f2cc941b8'},
32
32
  {'key': 'trend_boll', 'name': '布林线', 'url': '/0x7f2c6b9542ce7626669ab4910cbf7e8812883fea'},
33
33
  {'key': 'trend_holder_minimum', 'name': '股东数历史最少', 'url': '/0xf0c0c360a283689c83ae216c6bbb03777d8068ca'},
@@ -184,7 +184,7 @@ const MenuList = [
184
184
  {'key': 'hk_hsm100', 'name': '恒生中国100指数', 'url': '/0x759fcb84a0a322125df6748dffad66d7b2b44c2d'},
185
185
  {'key': 'hk_biotechnology', 'name': '生物科技', 'url': '/0xa131be85db2beb939e93207d0966c3710c7b761a'},
186
186
  {'key': 'hk_sell_short', 'name': '沽空排行', 'url': '/0x4ecddc987891875a42d206620cd97ca382613485'},
187
- {'key': 'hk_stock_exchange', 'name': '港股通持股排行', 'url': '/0x7549960a2de98a41a1b78e63202003a175b93dbb'},
187
+ {'key': 'hk_mutual', 'name': '港股通持股排行', 'url': '/0x310a47a6abd868f19cd3fdbf2f2566813cb45d57'},
188
188
  ]
189
189
  },
190
190
  {
@@ -277,6 +277,7 @@ const IndexList = [
277
277
  {'code': 'SH000906', 'name': '中证800', 'is_industry': 1, 'is_key': 1},
278
278
  {'code': 'SH000852', 'name': '中证1000', 'is_industry': 1, 'is_key': 1},
279
279
  {'code': 'SZ399303', 'name': '国证2000', 'is_industry': 0, 'is_key': 1},
280
+ {'code': 'SZ399441', 'name': '生物医药指数', 'is_industry': 0, 'is_key': 0},
280
281
  {'code': 'SZ399959', 'name': '军工指数', 'is_industry': 0, 'is_key': 0},
281
282
  {'code': 'SH000985', 'name': '中证全指', 'is_industry': 0, 'is_key': 0},
282
283
  {'code': 'SH000922', 'name': '中证红利', 'is_industry': 0, 'is_key': 0},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.65",
3
+ "version": "1.3.67",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/stock_basics.js CHANGED
@@ -238,6 +238,11 @@ let Stock = {
238
238
  if (item["is_hs300"]) {
239
239
  remark_html += " <a href='" + (Util.get_url("summary_index") + "?index_code=SH000300") + "' class='btn btn-xs btn-warning'>沪深300</a>";
240
240
  }
241
+ if (item["etf_data"]) {
242
+ item["etf_data"].forEach(function (etf) {
243
+ remark_html += " <a class='btn btn-xs btn-warning' data-toggle='modal' data-target='.public_fund_modal' data-val='" + etf["etf_code"] + "'>" + etf["etf_name"] + "</a>";
244
+ });
245
+ }
241
246
  if (item["links"]) {
242
247
  if (remark_html.length > 0) {
243
248
  remark_html += "<br>";
@@ -1199,7 +1204,7 @@ let Stock = {
1199
1204
  {"name": "持股比例", "table_sort": 1, "title": "内地港股通账户持仓股数 / 流通股本数"},
1200
1205
  ]
1201
1206
  });
1202
- Util.post("/stock/" + Stock["code"], {action: "hk_stock_exchange"}, function (j) {
1207
+ Util.post("/stock/" + Stock["code"], {action: "hk_mutual"}, function (j) {
1203
1208
  let _html = [];
1204
1209
  j["data"].forEach(function (item, index) {
1205
1210
  _html.push("<tr>");
package/util.js CHANGED
@@ -351,7 +351,7 @@ const Util = {
351
351
  let name = symbol;
352
352
  if (item["cname"]) {
353
353
  if (Util.is_us(item["code"])) {
354
- name = item["cname"].replace("公司", "").replace("•", "").replace("&#8226;", "");
354
+ name = item["cname"].replace("有限公司", "").replace("公司", "").replace("•", "").replace("&#8226;", "");
355
355
  } else {
356
356
  name = item["cname"];
357
357
  }
@@ -1227,9 +1227,9 @@ const Util = {
1227
1227
  Util.init_table_skeleton({
1228
1228
  "element_id": "pfc_fund_table",
1229
1229
  "head_cols": [
1230
- {"name": "时间", "class": "info", "table_sort": 1},
1231
- {"name": "当时股价", "table_sort": 1},
1232
- {"name": "总持股数", "table_sort": 1},
1230
+ {"name": "季度时间", "class": "info", "table_sort": 1},
1231
+ {"name": "当时股价", "table_sort": 1, "title": "当季最后一个交易日的收盘价"},
1232
+ {"name": "持股总数", "table_sort": 1},
1233
1233
  {"name": "持仓家数", "table_sort": 1},
1234
1234
  {"name": "持仓市值", "table_sort": 1, "title": "当时股价 * 总持股数"},
1235
1235
  ]
@@ -1431,7 +1431,6 @@ const Util = {
1431
1431
  let public_date = j["public_date"] > 0 ? Util.seconds_to_format(j["public_date"], "%Y-%m-%d") : "--";
1432
1432
  let issue_date = j["issue_date"] > 0 ? Util.seconds_to_format(j["issue_date"], "%Y-%m-%d") : "--";
1433
1433
  _html.push("<tr title='最后更新时间: ", Util.seconds_to_format(j["update_time"], "%Y-%m-%d"), "' class='info'><th colspan='14' text-align='center'>基金概况</th></tr>");
1434
- //_html.push("<tr><td colspan='3'>基金代码</td><td colspan='4'>", Util.pack_html_link('https://fund.eastmoney.com/' + j["fund_code"] + '.html', j["fund_code"]), "</td><td colspan='3'>基金名</td><td colspan='4'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j["fund_code"] + '.html', j["fund_name"]), "</td></tr>");
1435
1434
  _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='4'>", Util.pack_html_link('https://fundf10.eastmoney.com/jbgk_' + j["fund_code"] + '.html', j["fund_name"]), "</td></tr>");
1436
1435
  _html.push("<tr><td colspan='3'>基金类型</td><td colspan='4'>", j["fund_type"], "</td><td colspan='3'>投资类型</td><td colspan='4'>", j["invest_type"], "</td></tr>");
1437
1436
  _html.push("<tr><td colspan='3'>单位净值</td><td colspan='4'>", net, "</td><td colspan='3'>资产规模</td><td colspan='4'>", assets, "</td></tr>");
@@ -1441,11 +1440,7 @@ const Util = {
1441
1440
  _html.push("<tr><td colspan='5'>经办律师事务所</td><td colspan='9'>", (j["lawyer"] ? j["lawyer"] : "--"), "</td></tr>");
1442
1441
  _html.push("<tr><td colspan='5'>会计师事务所</td><td colspan='9'>", (j["accounting"] ? j["accounting"] : "--"), "</td></tr>");
1443
1442
  _html.push("<tr><td colspan='5'>注册地址</td><td colspan='9'>", Util.map_url(j["location"], j["location"]), "</td></tr>");
1444
- let fund_stock_url = "https://fund.eastmoney.com/" + j["fund_code"] + ".html";
1445
- if (j["type"] === 2) {
1446
- fund_stock_url = "http://fund.eastmoney.com/f10/ccmx_" + j["fund_code"] + ".html";
1447
- }
1448
- _html.push("<tr class='info'><th colspan='14' text-align='center'>", Util.pack_html_link(fund_stock_url, "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
1443
+ _html.push("<tr class='info'><th colspan='14' text-align='center'>", Util.pack_html_link("http://fund.eastmoney.com/f10/ccmx_" + j["fund_code"] + ".html", "持股明细"), " <span id='fund_stock_date_zone'></span></th></tr>");
1449
1444
  _html.push("<tr id='" + component_id + "_head'><th>序号</th><th>股票代码</th><th>股票名</th><th>PE</th><th>总市值</th><th>行业</th><th>地区</th><th>价格</th><th>年初至今</th><th>近5日</th><th>股东数</th><th>持有量</th><th class='info'>占比</th><th>持仓市值</th></tr>");
1450
1445
  _html.push("<tr class='" + component_id + "_tr'><td colspan='14'>暂无数据</td></tr>");
1451
1446
  Util.render_table_html(component_id + "_body_body", _html);
@@ -3120,7 +3115,7 @@ const Util = {
3120
3115
  */
3121
3116
  pack_holder_num: function (item) {
3122
3117
  let holder_info = "--";
3123
- if (item["code"] && Util.is_hk(item["code"])) {
3118
+ if (item["code"] && !Util.is_cn(item["code"])) {
3124
3119
  return holder_info;
3125
3120
  }
3126
3121
  if (item["holder_num"] && item["holder_num"] > 0) {
@@ -3141,6 +3136,9 @@ const Util = {
3141
3136
  */
3142
3137
  pack_fund_num: function (item) {
3143
3138
  let fund_num = "--";
3139
+ if (item["code"] && !Util.is_cn(item["code"])) {
3140
+ return fund_num;
3141
+ }
3144
3142
  if (item["cur_fund_num"] && item["cur_fund_num"] > 0) {
3145
3143
  fund_num = Util.digit_compare_trend(item["cur_fund_num"], item["pre_fund_num"]);
3146
3144
  }
@@ -3153,7 +3151,7 @@ const Util = {
3153
3151
  * @returns {string}
3154
3152
  */
3155
3153
  pack_fund_administrator: function (item) {
3156
- if (item["administrator"]) {
3154
+ if (item["administrator"] && item["administrator"] !== "---") {
3157
3155
  let url = "";
3158
3156
  if (item["administrator_code"]) {
3159
3157
  url = "https://fund.eastmoney.com/company/" + item["administrator_code"] + ".html";
@@ -3171,7 +3169,7 @@ const Util = {
3171
3169
  * @returns {string}
3172
3170
  */
3173
3171
  pack_fund_manager: function (item) {
3174
- if (item["managers"]) {
3172
+ if (item["managers"] && item["managers"] !== "---") {
3175
3173
  let managers = item["managers"].replace(/、/g, " ");
3176
3174
  return Util.pack_html_link("https://www.howbuy.com/search/quicksearch.htm?skey=" + managers, item["managers"]);
3177
3175
  }