sbd-npm 1.5.48 → 1.5.49

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.48",
3
+ "version": "1.5.49",
4
4
  "description": "Stock Big Data",
5
5
  "author": "DHQ <dhq314@gmail.com>",
6
6
  "license": "ISC",
package/snowball_tweet.js CHANGED
@@ -103,6 +103,7 @@ $(function () {
103
103
  html.push('<a class="btn btn-default" data-val="', item.uid, '" style="margin-bottom: 10px;" href="#">', item.name, '(', item_num, ')</a>');
104
104
  });
105
105
  html.push('</div>');
106
+ html.push('<div class="clearfix"></div>');
106
107
  html.push('<div class="form-group" style="margin: 10px 0;">');
107
108
  html.push('<button type="button" class="btn btn-info" disabled>共 ', total_num, ' 条</button>');
108
109
  html.push('</div>');
package/util.js CHANGED
@@ -781,7 +781,7 @@ const Util = {
781
781
  * @returns {boolean}
782
782
  */
783
783
  is_bse: function (code) {
784
- return ["4", "8"].includes(code.charAt(0));
784
+ return ["4", "8", "9"].includes(code.charAt(0));
785
785
  },
786
786
 
787
787
  /**
@@ -3683,20 +3683,22 @@ const Util = {
3683
3683
  */
3684
3684
  render_type_option: function (obj, data, type, change_func) {
3685
3685
  let option_object = {};
3686
- data.forEach(function (item) {
3687
- if (item[type]) {
3688
- if (item.num) {
3689
- option_object[item[type]] = item.num;
3690
- } else {
3691
- if (option_object[item[type]]) {
3692
- option_object[item[type]] += 1;
3686
+ if (typeof data === 'object') {
3687
+ data.forEach(function (item) {
3688
+ if (item[type]) {
3689
+ if (item.num) {
3690
+ option_object[item[type]] = item.num;
3693
3691
  } else {
3694
- option_object[item[type]] = 1;
3692
+ if (option_object[item[type]]) {
3693
+ option_object[item[type]] += 1;
3694
+ } else {
3695
+ option_object[item[type]] = 1;
3696
+ }
3695
3697
  }
3696
3698
  }
3697
- }
3698
- });
3699
- option_object = Util.sort_object_properties(option_object);
3699
+ });
3700
+ option_object = Util.sort_object_properties(option_object);
3701
+ }
3700
3702
  let html = [];
3701
3703
  if (obj.children('option').eq(0).length) {
3702
3704
  let first_option = obj.children('option').eq(0);