sbd-npm 1.5.47 → 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 +1 -1
- package/snowball_tweet.js +2 -1
- package/status.js +11 -5
- package/util.js +14 -12
package/package.json
CHANGED
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>');
|
|
@@ -128,7 +129,7 @@ $(function () {
|
|
|
128
129
|
});
|
|
129
130
|
});
|
|
130
131
|
ttsm_object.on('hidden.bs.modal', function () {
|
|
131
|
-
$("#today_tweet_statistics_modal_body").html("");
|
|
132
|
+
// $("#today_tweet_statistics_modal_body").html("");
|
|
132
133
|
Util.hide_tips();
|
|
133
134
|
});
|
|
134
135
|
}
|
package/status.js
CHANGED
|
@@ -196,14 +196,20 @@ $(function () {
|
|
|
196
196
|
let html = [], ip_num = 0;
|
|
197
197
|
j.data.forEach(function (item) {
|
|
198
198
|
ip_num++;
|
|
199
|
+
let is_trigger_block_ip = 0;
|
|
199
200
|
if (item.type === 1) {
|
|
200
201
|
html.push("<tr class='success'>");
|
|
201
202
|
} else if (item.type === 2) {
|
|
202
203
|
html.push("<tr class='danger'>");
|
|
203
204
|
} else {
|
|
205
|
+
is_trigger_block_ip = 1;
|
|
204
206
|
html.push("<tr>");
|
|
205
207
|
}
|
|
206
|
-
|
|
208
|
+
if (is_trigger_block_ip === 1) {
|
|
209
|
+
html.push("<td><a href='#' class='block_ip'>", ip_num, "</a></td>");
|
|
210
|
+
} else {
|
|
211
|
+
html.push("<td>", ip_num, "</td>");
|
|
212
|
+
}
|
|
207
213
|
html.push("<td>", Util.pack_html_link(Status.ip_url(item.ip), item.ip), "</td>");
|
|
208
214
|
html.push("<td>", Status.map_url(Status.convert_ip_address(item)), "</td>");
|
|
209
215
|
html.push("<td>", item.times, "</td>");
|
|
@@ -665,11 +671,11 @@ $(function () {
|
|
|
665
671
|
} else {
|
|
666
672
|
Status.task_status = 0;
|
|
667
673
|
if (j.code === 2) {
|
|
668
|
-
|
|
669
|
-
$("#task_tips").html("<b class='text-danger'>已添加新任务" + do_content + "在处理中!</b>");
|
|
674
|
+
$("#task_tips").html("<b class='text-danger'>已添加新任务" + (j.do_content ? ("(" + j.do_content + ")") : "") + "在处理中!</b>");
|
|
670
675
|
} else if (j.code === 3) {
|
|
671
|
-
|
|
672
|
-
|
|
676
|
+
$("#task_tips").html("<b class='text-danger'>有任务" + (j.doing_content ? ("(" + j.doing_content + ")") : "") + "在执行中!</b>");
|
|
677
|
+
} else if (j.code === 4) {
|
|
678
|
+
$("#task_tips").html("<b class='text-danger'>任务 `" + (j.done_content ? j.done_content : "") + "` 已经执行过!</b>");
|
|
673
679
|
} else {
|
|
674
680
|
$("#task_tips").html("<b class='text-danger'>参数异常!</b>");
|
|
675
681
|
}
|
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
|
-
|
|
3687
|
-
|
|
3688
|
-
if (item
|
|
3689
|
-
|
|
3690
|
-
|
|
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]]
|
|
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
|
-
|
|
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);
|