sbd-npm 1.3.53 → 1.3.55

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
@@ -222,7 +222,7 @@ const MenuList = [
222
222
  'menu': [
223
223
  {'key': 'rank_bias', 'name': '乖离率', 'url': '/0x14256fa2d80b7c32da6b9e39aed8e9c22b4ac769'},
224
224
  {'key': 'rank_margin_minimum', 'name': '融资余额创新低', 'url': '/0xcfabc097f26a2b9156061ac8096deef2d49da143'},
225
- {'key': 'rank_profit', 'name': '净利润/营业收入', 'url': '/0xaf9a83a251b7e71a4f321f09e6fb440fd7df05a5'},
225
+ {'key': 'rank_profit', 'name': '净利润/营收', 'url': '/0xaf9a83a251b7e71a4f321f09e6fb440fd7df05a5'},
226
226
  {'key': 'rank_roe', 'name': 'ROE(净资产收益率)', 'url': '/0xf56c10bc9ecc1ffe40a03d491c4cd6e2ac16a5c3'},
227
227
  {'key': 'rank_dividend', 'name': '股息', 'url': '/0xa609ef96b486b6896875a0be3272833693adf290'},
228
228
  {'key': 'rank_circulation_stock', 'name': '流通股份', 'url': '/0x04db78762bb6665105a17d74e7319dfe021fc0e9'},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sbd-npm",
3
- "version": "1.3.53",
3
+ "version": "1.3.55",
4
4
  "description": "Stock Big Data",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/status.js ADDED
@@ -0,0 +1,613 @@
1
+ $(function () {
2
+
3
+ let Status = {
4
+
5
+ tab_token: "status_nav",
6
+ data: {},
7
+
8
+ fetch_data: function () {
9
+ Util.show_loading();
10
+ let active_div = localStorage[Status.tab_token];
11
+ switch (active_div) {
12
+ case "status":
13
+ Status.handle_status();
14
+ break;
15
+ case "process":
16
+ Status.handle_process();
17
+ break;
18
+ case "block_ip":
19
+ Status.handle_block_ip();
20
+ break;
21
+ case "login_log":
22
+ Status.handle_login_log();
23
+ break;
24
+ case "database_table":
25
+ Status.handle_database_table();
26
+ break;
27
+ case "request_headers":
28
+ Status.handle_request_headers();
29
+ break;
30
+ case "environment":
31
+ Status.handle_environment();
32
+ break;
33
+ case "tool":
34
+ Status.handle_tool();
35
+ break;
36
+ case "site_map":
37
+ Status.handle_site_map();
38
+ break;
39
+ }
40
+ Status["data"][active_div] = 1;
41
+ },
42
+
43
+ handle_status: function () {
44
+ Util.post(location.pathname, {active_div: localStorage[Status.tab_token], date: $("#ip_date").val()}, function (j) {
45
+ let _html = [];
46
+ if (!$("#start_time").length) {
47
+ _html.push("<tr><th id='start_time' width='25%'>系统时区:</th><td>", Status.map_url(j["timezone"]), "</td>");
48
+ _html.push("<th id='start_time' width='25%'>服务器运行时间:</th><td colspan='3'>", Util.seconds_to_format(j["start_time"]), "(" + j["up_time"] + ")</td></tr>");
49
+ _html.push("<tr><th width='25%'>数据库最后同步时间:</th><td>", Util.seconds_to_format(j["sync_end_time"]), "</td>");
50
+ _html.push("<th width='20%'>数据库句柄更新时间:</th><td colspan='3'>", Util.seconds_to_format(j["db_time"]), "</td></tr>");
51
+ _html.push("<tr><th width='25%'>成交量最后同步时间:</th><td>", Util.seconds_to_format(j["sync_amount_time"]), "</td>");
52
+ _html.push("<th width='20%'>位置数据最后同步时间:</th><td colspan='3'>", Util.seconds_to_format(j["location_time"]), "</td></tr>");
53
+ $("#status_head").prepend(_html.join(""));
54
+ }
55
+ Status.render_ip_daily(j["ip_daily_data"]);
56
+ // 数据库
57
+ $("#db_version").html(j["db_version"]);
58
+ $("#max_files").html(j["max_files"] == "None" ? "--" : j["max_files"]);
59
+ $("#open_ports").html(j["open_ports"].join(", "));
60
+ if (j["mysql_remote_ip"]) {
61
+ let mysql_remote_ip = [];
62
+ j["mysql_remote_ip"].forEach(function (remote_ip) {
63
+ mysql_remote_ip.push(Status.pack_ip_link(remote_ip));
64
+ });
65
+ $("#mysql_remote_ip").prepend(mysql_remote_ip.join("、"));
66
+ }
67
+ _html = [];
68
+ let current_connections = 0, db_ip_array = [];
69
+ j["process_list"].forEach(function (item) {
70
+ let match_ip_data = Util.regexp_match_ip(item["Host"]);
71
+ if (match_ip_data && match_ip_data[0] && $.inArray(match_ip_data[0], db_ip_array) === -1) {
72
+ db_ip_array.push(match_ip_data[0]);
73
+ }
74
+ current_connections++;
75
+ _html.push("<tr>");
76
+ _html.push("<td>", item["Id"], "</td>");
77
+ _html.push("<td>", item["User"], "</td>");
78
+ _html.push("<td>", Status.pack_ip_link(item["Host"]), "</td>");
79
+ _html.push("<td>", item["db"], "</td>");
80
+ _html.push("<td>", item["Command"], "</td>");
81
+ _html.push("<td>", item["Time"], "</td>");
82
+ _html.push("<td>", item["State"], "</td>");
83
+ _html.push("<td>", item["Info"], "</td>");
84
+ _html.push("</tr>");
85
+ });
86
+ $("#max_connections").html("<span class='label label-info'>" + current_connections + "</span> / " + j["max_connections"]);
87
+ Util.render_table_html("process_list", _html);
88
+ if (db_ip_array.length > 0) {
89
+ let din_obj = $("#db_ip_num");
90
+ din_obj.html("(" + db_ip_array.length + ")");
91
+ din_obj.attr("title", db_ip_array.join("\n"));
92
+ }
93
+ if (j["phone_num"]) {
94
+ $("#phone_query_head").attr("title", j["phone_num"]);
95
+ }
96
+ if (j["ip_date"]) {
97
+ let id_obj = $("#ip_date");
98
+ id_obj.val(Util.seconds_to_format(j["ip_date"], "%Y-%m-%d"));
99
+ id_obj.daterangepicker({
100
+ locale: {format: 'YYYY-MM-DD'},
101
+ singleDatePicker: true,
102
+ singleClasses: "picker_2"
103
+ }, function () {
104
+ setTimeout(Status.fetch_data, 123);
105
+ });
106
+ id_obj.parent().attr("title", Util.seconds_to_format(j["ip_date"]));
107
+ }
108
+ Util.hide_tips();
109
+ });
110
+ },
111
+
112
+ render_ip_daily: function(ip_daily_data) {
113
+ let _html = [];
114
+ ip_daily_data.forEach(function (item) {
115
+ _html.push("<tr>");
116
+ _html.push("<td>", Status.pack_ip_link(item["ip"]), "</td>");
117
+ _html.push("<td>", Status.map_url(item['location']), "</td>");
118
+ item["referer"] = item["referer"].replace("?", "?");
119
+ _html.push("<td title='", item["referer"], "'>", Util.pack_html_link("http://" + item["referer"], Util.sub_str(item["referer"], 50)), "</td>");
120
+ _html.push("<td>", item["visit"], "</td>");
121
+ _html.push("<td>", Util.seconds_to_format(item["time"]), "</td>");
122
+ _html.push("</tr>");
123
+ });
124
+ Util.render_table_html("ip_daily_data", _html);
125
+ },
126
+
127
+ pack_ip_link: function(ip) {
128
+ let match_ip_data = Util.regexp_match_ip(ip);
129
+ if (match_ip_data && match_ip_data[0]) {
130
+ ip = Util.pack_html_link(Status.ip_url(match_ip_data[0]), ip);
131
+ }
132
+ return ip;
133
+ },
134
+
135
+ ip_url: function(ip) {
136
+ return "https://www.ip138.com/iplookup.asp?ip=" + ip + "&action=2";
137
+ },
138
+
139
+ handle_process: function () {
140
+ if (!document.getElementById("process_div_body")) {
141
+ Util.init_table_skeleton({
142
+ "element_id": "process_div",
143
+ "caption": '<caption class="text-right" id="process_num"></caption>',
144
+ "head_cols": [
145
+ {"name": "进程ID", "table_sort": 1},
146
+ {"name": "进程名", "table_sort": 1},
147
+ {"name": "用户名", "table_sort": 1},
148
+ {"name": "状态", "table_sort": 1},
149
+ {"name": "实际内存", "table_sort": 1, "title": "resident set size"},
150
+ {"name": "虚拟内存", "table_sort": 1},
151
+ {"name": "启动命令"},
152
+ {"name": "创建时间", "table_sort": 1},
153
+ ]
154
+ });
155
+ }
156
+ Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
157
+ let _html = [], process_num = 0;
158
+ j["data"].forEach(function (item) {
159
+ process_num++;
160
+ _html.push("<tr>");
161
+ _html.push("<td>", item["pid"], "</td>");
162
+ _html.push("<td>", item["name"], "</td>");
163
+ _html.push("<td>", item["username"], "</td>");
164
+ _html.push("<td>", item["status"], "</td>");
165
+ _html.push("<td data-val='", item["rss"], "'>", Util.trans_byte_size(item["rss"]), "</td>");
166
+ _html.push("<td data-val='", item["vms"], "'>", Util.trans_byte_size(item["vms"]), "</td>");
167
+ _html.push("<td title='", item["cmdline"], "'>", Util.sub_str(item["cmdline"], 50), "</td>");
168
+ _html.push("<td>", Util.seconds_to_format(item["create_time"]), "</td>");
169
+ _html.push("</tr>");
170
+ });
171
+ $("#process_div_body").html(_html.join(""));
172
+ $("#process_num").html("共 <span class='label label-info'>" + process_num + "</span> 进程");
173
+ Util.hide_tips();
174
+ });
175
+ },
176
+
177
+ handle_block_ip: function () {
178
+ if (!document.getElementById("block_ip_div_body")) {
179
+ Util.init_table_skeleton({
180
+ "element_id": "block_ip_div",
181
+ "caption": '<caption class="text-right" id="ip_num"></caption>',
182
+ "head_cols": [
183
+ {"name": "序号"},
184
+ {"name": "IP", "tooltip": "IP地址(Internet Protocol Address)是指互联网协议地址"},
185
+ {"name": "位置"},
186
+ ]
187
+ });
188
+ }
189
+ Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
190
+ let _html = [], ip_num = j["num"];
191
+ $("#ip_num").html("共 <span class='label label-info'>" + j["num"] + "</span> 条");
192
+ j["data"].forEach(function (item) {
193
+ _html.push("<tr>");
194
+ _html.push("<td>", ip_num, "</td>");
195
+ _html.push("<td>", Util.pack_html_link(Status.ip_url(item["ip"]), item["ip"]), "</td>");
196
+ _html.push("<td>", Status.map_url(Status.convert_ip_address(item)), "</td>");
197
+ _html.push("</tr>");
198
+ ip_num--;
199
+ });
200
+ Util.render_table_html("block_ip_div_body", _html);
201
+ Util.hide_tips();
202
+ });
203
+ },
204
+
205
+ handle_login_log: function () {
206
+ if (!document.getElementById("login_log_div_body")) {
207
+ Util.init_table_skeleton({
208
+ "element_id": "login_log_div",
209
+ "caption": '<caption class="text-right" id="login_log_num"></caption>',
210
+ "head_cols": [
211
+ {"name": "序号"},
212
+ {"name": "用户"},
213
+ {"name": "终端"},
214
+ {"name": "登录IP"},
215
+ {"name": "IP地址"},
216
+ {"name": "时间"},
217
+ ]
218
+ });
219
+ }
220
+ Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
221
+ let _html = [], login_num = 0;
222
+ j["data"].forEach(function (item) {
223
+ login_num++;
224
+ let cls = item["date"].indexOf('logged in') > -1 ? "danger" : "";
225
+ _html.push("<tr class='", cls, "'>");
226
+ _html.push("<td>", login_num, "</td>");
227
+ _html.push("<td>", item["user"], "</td>");
228
+ _html.push("<td>", item["terminal"], "</td>");
229
+ _html.push("<td>", Status.pack_ip_link(item["ip"]), "</td>");
230
+ _html.push("<td>", Status.map_url(Status.convert_ip_address(item)), "</td>");
231
+ _html.push("<td>", item["date"], "</td>");
232
+ _html.push("</tr>");
233
+ });
234
+ Util.render_table_html("login_log_div_body", _html);
235
+ $("#login_log_num").html("共 <span class='label label-info'>" + login_num + "</span> 条");
236
+ Util.hide_tips();
237
+ });
238
+ },
239
+
240
+ handle_database_table: function () {
241
+ if (!document.getElementById("database_table_div_body")) {
242
+ Util.init_table_skeleton({
243
+ "element_id": "database_table_div",
244
+ "caption": '<caption class="text-right" id="table_num"></caption>',
245
+ "head_cols": [
246
+ {"name": "序号", "table_sort": 1},
247
+ {"name": "表名", "table_sort": 1},
248
+ {"name": "表引擎", "table_sort": 1},
249
+ {"name": "行记录格式"},
250
+ {"name": "数据量", "table_sort": 1},
251
+ {"name": "数据大小", "table_sort": 1, "class": "info"},
252
+ {"name": "索引大小", "table_sort": 1},
253
+ {"name": "最后更新时间", "table_sort": 1},
254
+ {"name": "创建时间", "table_sort": 1},
255
+ {"name": "表注释"},
256
+ ]
257
+ });
258
+ }
259
+ Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
260
+ let _html = [], table_num = 0;
261
+ j["data"].forEach(function (item) {
262
+ table_num++;
263
+ _html.push("<tr>");
264
+ _html.push("<td>", table_num, "</td>");
265
+ _html.push("<td>", item["TABLE_NAME"], "</td>");
266
+ _html.push("<td>", item["ENGINE"], "</td>");
267
+ _html.push("<td>", item["ROW_FORMAT"], "</td>");
268
+ _html.push("<td>", item["TABLE_ROWS"], "</td>");
269
+ _html.push("<td>", item["data_size"], "</td>");
270
+ _html.push("<td>", item["index_size"], "</td>");
271
+ _html.push("<td>", item["UPDATE_TIME"], "</td>");
272
+ _html.push("<td>", item["CREATE_TIME"], "</td>");
273
+ _html.push("<td>", item["TABLE_COMMENT"], "</td>");
274
+ _html.push("</tr>");
275
+ });
276
+ Util.render_table_html("database_table_div_body", _html);
277
+ $("#table_num").html("共 <span class='label label-info'>" + table_num + "</span> 条");
278
+ Util.hide_tips();
279
+ });
280
+ },
281
+
282
+ handle_request_headers: function () {
283
+ if (!document.getElementById("request_headers_div_body")) {
284
+ Util.init_table_skeleton({
285
+ "element_id": "request_headers_div",
286
+ "caption": 'none',
287
+ "head_cols": [
288
+ {"name": "键"},
289
+ {"name": "值"},
290
+ ]
291
+ });
292
+ }
293
+ $.get("/action?action=request_headers", {}, function (j) {
294
+ let _html = [];
295
+ for (let key in j) {
296
+ if (j.hasOwnProperty(key)) {
297
+ _html.push("<tr>");
298
+ _html.push("<td class='text-right'>", key, "</td>");
299
+ _html.push("<td class='text-left' style='word-break: break-all'>", j[key], "</td>");
300
+ _html.push("</tr>");
301
+ }
302
+ }
303
+ _html.push("<tr><td class='text-right'>浏览器代号</td><td class='text-left' style='word-break: break-all'>" + navigator.appCodeName + "</td></tr>");
304
+ _html.push("<tr><td class='text-right'>浏览器名称</td><td class='text-left' style='word-break: break-all'>" + navigator.appName + "</td></tr>");
305
+ _html.push("<tr><td class='text-right'>浏览器版本</td><td class='text-left' style='word-break: break-all'>" + navigator.appVersion + "</td></tr>");
306
+ _html.push("<tr><td class='text-right'>启用Cookies</td><td class='text-left' style='word-break: break-all'>" + navigator.cookieEnabled + "</td></tr>");
307
+ _html.push("<tr><td class='text-right'>硬件平台</td><td class='text-left' style='word-break: break-all'>" + navigator.platform + "</td></tr>");
308
+ if (navigator.systemLanguage) {
309
+ _html.push("<tr><td class='text-right'>系统语言</td><td class='text-left' style='word-break: break-all'>" + navigator.systemLanguage + "</td></tr>");
310
+ }
311
+ Util.render_table_html("request_headers_div_body", _html);
312
+ Util.hide_tips();
313
+ });
314
+ },
315
+
316
+ handle_environment: function () {
317
+ if (!document.getElementById("environment_div_body")) {
318
+ Util.init_table_skeleton({
319
+ "element_id": "environment_div",
320
+ "caption": '<caption class="text-right" id="environment_num"></caption>',
321
+ "head_cols": [
322
+ {"name": "键"},
323
+ {"name": "值"},
324
+ ]
325
+ });
326
+ }
327
+ Util.post(location.pathname, {active_div: localStorage[Status.tab_token]}, function (j) {
328
+ let html = [], environment_num = 0;
329
+ j["data"].forEach(function (item) {
330
+ environment_num++;
331
+ html.push("<tr>");
332
+ html.push("<td class='text-right'>", item["key"], "</td>");
333
+ html.push("<td class='text-left' style='word-break: break-all'>", item["val"], "</td>");
334
+ html.push("</tr>");
335
+ });
336
+ Util.render_table_html("environment_div_body", html);
337
+ $("#environment_num").html("共 <span class='label label-info'>" + environment_num + "</span> 条");
338
+ Util.hide_tips();
339
+ });
340
+ },
341
+
342
+ handle_tool: function () {
343
+ let t_obj = $("#timestamp");
344
+ let t_val = t_obj.val();
345
+ if (Util.regexp_date_yyyymmdd(t_val) || Util.regexp_date_yyyy_mm_dd(t_val) || Util.regexp_date_yyyy_mm_dd_hh_mm_ss(t_val)) {
346
+ $("#date_format").val(Util.format_to_second(t_val));
347
+ } else if (/^[1-9]\d{3}$/.test(t_val)) { // 年份的字符串
348
+ $("#date_format").val(Util.format_to_second(t_val + "-01-01"));
349
+ } else if (!/^[\d]+$/.test(t_val)) {
350
+ let now = Util.now();
351
+ t_obj.val(now);
352
+ $("#date_format").val(Util.seconds_to_format(now));
353
+ }
354
+ $("#timestamp_convert").click(function () {
355
+ let t_obj = $("#timestamp");
356
+ let t_val = t_obj.val();
357
+ if (Util.regexp_date_yyyymmdd(t_val) || Util.regexp_date_yyyy_mm_dd(t_val) || Util.regexp_date_yyyy_mm_dd_hh_mm_ss(t_val)) {
358
+ $("#date_format").val(Util.format_to_second(t_val));
359
+ } else if (/^[1-9]\d{3}$/.test(t_val)) { // 年份的字符串
360
+ $("#date_format").val(Util.format_to_second(t_val + "-01-01"));
361
+ } else {
362
+ if (!/^[\d]+$/.test(t_val)) {
363
+ t_val = Util.now();
364
+ t_obj.val(t_val)
365
+ }
366
+ if (t_val.length >= 13) {
367
+ t_val = parseInt(t_val) / 1000;
368
+ }
369
+ $("#date_format").val(Util.seconds_to_format(t_val));
370
+ }
371
+ return false;
372
+ });
373
+ $("#ip_query").click(function () {
374
+ let ip = $("#ip").val().trim();
375
+ if (ip) {
376
+ let match_ip_data = Util.regexp_match_ip(ip);
377
+ if (!match_ip_data) {
378
+ match_ip_data = ip.match(/(([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\.)+[a-zA-Z]{2,})/);
379
+ }
380
+ if (match_ip_data) {
381
+ Util.show_loading();
382
+ $("#ip").prop('disabled', true);
383
+ $("#ip_query").attr("disabled", true);
384
+ ip = match_ip_data[0];
385
+ $("#ip").val(ip);
386
+ Util.post("/action", {action: "ip_query", ip: ip}, function (j) {
387
+ $("#ip").prop('disabled', false);
388
+ $("#ip_query").attr("disabled", false);
389
+ if (j["ip"]) {
390
+ $("#ip").val(j["ip"]);
391
+ let ip_address = Status.convert_ip_address(j);
392
+ if (ip_address.length > 0) {
393
+ let map_url = Status.map_url(ip_address, "<i class='glyphicon glyphicon-map-marker'></i>");
394
+ $("#ip_result").html(Util.pack_html_link(Status.ip_url(j["ip"]), "<b class='text-success'>" + ip_address + "</b>") + "&nbsp;&nbsp;" + map_url);
395
+ } else {
396
+ $("#ip_result").html(Util.pack_html_link(Status.ip_url(ip), "<b class='text-danger'>找不到结果!</b>"));
397
+ }
398
+ } else {
399
+ $("#ip_result").html(Util.pack_html_link(Status.ip_url(ip), "<b class='text-danger'>找不到结果!</b>"));
400
+ }
401
+ Util.hide_tips();
402
+ });
403
+ } else {
404
+ $("#ip_result").html("<b class='text-danger'>请输入正确的 IP 地址!</b>");
405
+ }
406
+ } else {
407
+ $("#ip_result").html("<b class='text-danger'>请输入要查询的 IP 地址!</b>");
408
+ }
409
+ });
410
+ $("#phone_query").click(function () {
411
+ Status.phone_query();
412
+ });
413
+ $("#md5_encrypt").click(function () {
414
+ let md5 = $("#md5").val();
415
+ if (md5) {
416
+ Util.show_loading();
417
+ $("#md5").prop('disabled', true);
418
+ Util.post("/action", {action: "md5", md5: md5}, function (md5_result) {
419
+ $("#md5").prop('disabled', false);
420
+ $("#md5_result").html("<b class='text-success'>" + md5_result + "</b>");
421
+ Util.hide_tips();
422
+ }, "text");
423
+ } else {
424
+ $("#md5_result").html("<b class='text-danger'>不能为空!</b>");
425
+ }
426
+ });
427
+ $("#base64_action").click(function () {
428
+ let base64 = $("#base64").val();
429
+ if (base64) {
430
+ if ($(this).text() === "编 码") {
431
+ $("#base64_result").html("<b class='text-success'>" + Util.base64_encode(base64) + "</b>");
432
+ } else {
433
+ $("#base64_result").html("<b class='text-success'>" + Util.base64_decode(base64) + "</b>");
434
+ }
435
+ } else {
436
+ $("#base64_result").html("<b class='text-danger'>不能为空!</b>");
437
+ }
438
+ });
439
+ $("#base64_ul li a").click(function() {
440
+ $("#base64_action").text($(this).text());
441
+ });
442
+ $("#unicode_convert").click(function () {
443
+ let unicode_str = $("#unicode").val();
444
+ if (unicode_str) {
445
+ try {
446
+ let obj = JSON.parse('{"data": "' + unicode_str + '"}');
447
+ $("#unicode_result").html("<b class='text-success'>" + obj.data + "</b>");
448
+ } catch (error) {
449
+ $("#unicode_result").html("<b class='text-danger'>" + error.message + "</b>");
450
+ }
451
+ } else {
452
+ $("#unicode_result").html("<b class='text-danger'>不能为空!</b>");
453
+ }
454
+ });
455
+ $("#segment_parse").click(function () {
456
+ let segment_str = $("#segment").val();
457
+ if (segment_str) {
458
+ try {
459
+ let segmenter = new Intl.Segmenter("zh-CN", {granularity: "word"});
460
+ let segments = segmenter.segment(segment_str);
461
+ let segment_html = [];
462
+ for (let {segment, index, isWordLike} of segments) {
463
+ if (isWordLike) {
464
+ segment_html.push("<span class='label label-info'>", segment, "</span>&nbsp;");
465
+ }
466
+ }
467
+ $("#segment_result").html(segment_html.join(""));
468
+ } catch (error) {
469
+ $("#segment_result").html("<b class='text-danger'>" + error.message + "</b>");
470
+ }
471
+ } else {
472
+ $("#segment_result").html("<b class='text-danger'>不能为空!</b>");
473
+ }
474
+ });
475
+ $("#color_query").click(function () {
476
+ let width = 300;
477
+ let parent_width = $(this).parent().parent().width();
478
+ if (width < parent_width) {
479
+ let margin_left = Math.round((parent_width - width) / 2);
480
+ $("#color_result").css('width', width + "px");
481
+ $("#color_result").css('margin-left', margin_left + "px");
482
+ } else {
483
+ $("#color_result").css('width', parent_width + "px");
484
+ $("#color_result").css('margin-left', "0px");
485
+ }
486
+ let c_obj = $("#color");
487
+ let color = c_obj.val();
488
+ if (!color.startsWith("#")) {
489
+ color = "#" + color;
490
+ }
491
+ $("#color_result").css('background-color', color);
492
+ if (color.startsWith("#")) {
493
+ c_obj.val(color);
494
+ }
495
+ });
496
+ Util.hide_tips();
497
+ },
498
+
499
+ handle_site_map: function () {
500
+ let _html = [];
501
+ $('.side-menu li a').each(function () {
502
+ let url = $(this).attr("href");
503
+ if (url) {
504
+ let title = $(this).text();
505
+ if (title && title.length > 0) {
506
+ _html.push('<a href="', url, '" class="btn btn-default">', title, '</a>');
507
+ }
508
+ }
509
+ });
510
+ $("#site_map_zone").html(_html.join(""));
511
+ Util.hide_tips();
512
+ },
513
+
514
+ convert_ip_address: function (data) {
515
+ let country = data["country"] ? data["country"] : "";
516
+ let province = data["province"] ? data["province"] : "";
517
+ let city = data["city"] ? data["city"] : "";
518
+ let district = data["district"] ? data["district"] : "";
519
+ let isp = data["isp"] ? (" - " + data["isp"]) : "";
520
+ if (country === province || province === city) {
521
+ province = "";
522
+ }
523
+ if (country === isp) {
524
+ isp = "";
525
+ }
526
+ let ip_address = country + province + city + district + " " + isp;
527
+ return ip_address.trim();
528
+ },
529
+
530
+ phone_query: function() {
531
+ let phone = $("#phone").val().trim();
532
+ if (phone && Util.is_phone(phone)) {
533
+ Util.show_loading();
534
+ $("#phone").prop('disabled', true);
535
+ $("#phone_query").attr("disabled", true);
536
+ Util.post("/action", {action: "phone_query", phone: phone}, function (j) {
537
+ $("#phone").prop('disabled', false);
538
+ $("#phone_query").attr("disabled", false);
539
+ if (j["belong"]) {
540
+ let phone_url = Util.pack_html_link("https://www.ip138.com/mobile.asp?mobile=" + phone + "&action=mobile", "<i class='glyphicon glyphicon-link'></i> ");
541
+ $("#phone_result").html(Status.convert_phone(j) + "&nbsp;&nbsp;" + phone_url);
542
+ $("#phone_result a").addClass("text-success");
543
+ } else {
544
+ $("#phone_result").html(Util.pack_html_link("https://www.ip138.com/mobile.asp?mobile=" + phone + "&action=mobile", "<b class='text-danger'>找不到结果!</b>"));
545
+ }
546
+ Util.hide_tips();
547
+ });
548
+ } else {
549
+ $("#phone_result").html("<b class='text-danger'>不是一个合法的手机号!</b>");
550
+ }
551
+ },
552
+
553
+ convert_phone: function (data) {
554
+ let ret = [];
555
+ if (data["belong"]) {
556
+ ret.push("<b class='text-muted'>归属地</b>: <b class='text-success'>" + Status.map_url(data["belong"]) + "</b>");
557
+ }
558
+ if (data["card_type"]) {
559
+ ret.push("<b class='text-muted'>卡类型</b>: <b class='text-success'>" + data["card_type"] + "</b>");
560
+ }
561
+ return ret.join(", ");
562
+ },
563
+
564
+ map_url: function (location, location_name = "") {
565
+ location_name = location_name === "" ? location : location_name;
566
+ let location_arr = location.split(' ');
567
+ if (location.indexOf("中国") > -1 || location.indexOf("省") > -1 || location.indexOf("市") > -1) {
568
+ let url = Util.map_url(location_arr[0]);
569
+ return url.replace('>' + location_arr[0] + '</a>', '>' + location_name + '</a>');
570
+ }
571
+ return Util.google_map_url(location_arr[0], location_name);
572
+ }
573
+
574
+ };
575
+
576
+ let ip_obj = $('#ip_modal');
577
+ // 此事件在模态框已经显示出来触发
578
+ ip_obj.on('show.bs.modal', function (e) {
579
+ $("#ip_daily_search").click(function() {
580
+ Util.show_loading();
581
+ let data = {active_div: "ip_daily_search", ip: $("#search_ip").val(), location: $("#search_location").val(), referer: $("#search_referer").val()};
582
+ Util.post(location.pathname, data, function (j) {
583
+ Status.render_ip_daily(j["ip_daily_data"]);
584
+ Util.hide_tips();
585
+ });
586
+ $('#ip_modal').modal('hide');
587
+ });
588
+ });
589
+ // 此事件在模态框被隐藏(并且同时在 CSS 过渡效果完成)之后被触发
590
+ ip_obj.on('hidden.bs.modal', function () {
591
+ $("#search_ip").val("");
592
+ $("#search_location").val("");
593
+ $("#search_referer").val("");
594
+ Util.hide_tips();
595
+ });
596
+
597
+ let request_arguments = Util.request_arguments();
598
+ if (request_arguments["tab"]) {
599
+ localStorage[Status.tab_token] = request_arguments["tab"];
600
+ if (request_arguments["tab"] === "tool" && request_arguments["phone"]) {
601
+ $("#phone").val(request_arguments["phone"]);
602
+ setTimeout(function () {
603
+ Status.phone_query();
604
+ Enterprise.fetch_enterprise_detail(j["unified_code"]);
605
+ }, 1234);
606
+ }
607
+ } else {
608
+ localStorage[Status.tab_token] = "status";
609
+ }
610
+ Util.tab_switch(Status.tab_token, Status.fetch_data);
611
+ Status.fetch_data();
612
+
613
+ });
package/stock_basics.js CHANGED
@@ -170,7 +170,7 @@ let Stock = {
170
170
  location_obj.html(_html.join(""));
171
171
  }
172
172
  let cf_obj = $("#currency_funds");
173
- cf_obj.html(Util.strip_html(Util.to_unit(cf_obj.attr("title"))));
173
+ cf_obj.html(Util.to_unit(cf_obj.attr("title"), 2, 0));
174
174
  //获取股票详情数据
175
175
  Util.post("/stock/" + Stock["code"], {action: "code_detail"}, function (item) {
176
176
  Util.init_profile_component("profile", item["intro"]);
@@ -616,6 +616,8 @@ let Stock = {
616
616
  {"name": "净利同比", "tooltip": "(当前净利润 - 去年同期的净利润) / 去年同期的净利润 × 100%"},
617
617
  {"name": "净利环比", "tooltip": "(当前净利润 - 上一季度的净利润) / 上一季度的净利润 × 100%"},
618
618
  {"name": "扣非净利润"},
619
+ {"name": "扣净同比", "tooltip": "(当前扣非净利润 - 去年同期的扣非净利润) / 去年同期的扣非净利润 × 100%"},
620
+ {"name": "扣净环比", "tooltip": "(当前扣非净利润 - 上一季度的扣非净利润) / 上一季度的扣非净利润 × 100%"},
619
621
  ]
620
622
  });
621
623
  Util.post("/stock/" + Stock["code"], {action: "finance"}, function (j) {
@@ -704,14 +706,14 @@ let Stock = {
704
706
  _html.push("<td>", total_revenue, "</td>");
705
707
  let total_revenue_yoy_title = "", total_revenue_yoy_ratio = "--";
706
708
  if (item["yoy_total_revenue"]) {
707
- total_revenue_yoy_title = " title='" + Util.strip_html(Util.to_unit(item["yoy_total_revenue"])) + " - " + Util.strip_html(total_revenue) + "'";
709
+ total_revenue_yoy_title = " title='" + Util.to_unit(item["yoy_total_revenue"], 2, 0) + " - " + Util.strip_html(total_revenue) + "'";
708
710
  total_revenue_yoy_ratio = Util.to_float(((item["total_revenue"] - item["yoy_total_revenue"]) / item["yoy_total_revenue"]) * 100, 2);
709
711
  total_revenue_yoy_ratio = Util.parse_ratio(total_revenue_yoy_ratio);
710
712
  }
711
713
  _html.push("<td", total_revenue_yoy_title, ">", total_revenue_yoy_ratio, "</td>");
712
714
  let total_revenue_qoq_title = "", total_revenue_qoq_ratio = "--";
713
715
  if (item["qoq_total_revenue"]) {
714
- total_revenue_qoq_title = " title='" + Util.strip_html(Util.to_unit(item["qoq_total_revenue"])) + " - " + Util.strip_html(Util.to_unit(item["total_revenue_add"])) + "'";
716
+ total_revenue_qoq_title = " title='" + Util.to_unit(item["qoq_total_revenue"], 2, 0) + " - " + Util.to_unit(item["total_revenue_add"], 2, 0) + "'";
715
717
  total_revenue_qoq_ratio = Util.to_float(((item["total_revenue_add"] - item["qoq_total_revenue"]) / item["qoq_total_revenue"]) * 100, 2);
716
718
  total_revenue_qoq_ratio = Util.parse_ratio(total_revenue_qoq_ratio);
717
719
  }
@@ -720,19 +722,34 @@ let Stock = {
720
722
  _html.push("<td>", net_profit, "</td>");
721
723
  let net_profit_yoy_title = "", net_profit_yoy_ratio = "--";
722
724
  if (item["yoy_net_profit"]) {
723
- net_profit_yoy_title = " title='" + Util.strip_html(Util.to_unit(item["yoy_net_profit"])) + " - " + Util.strip_html(net_profit) + "'";
725
+ net_profit_yoy_title = " title='" + Util.to_unit(item["yoy_net_profit"], 2, 0) + " - " + Util.strip_html(net_profit) + "'";
724
726
  net_profit_yoy_ratio = Util.to_float(((item["net_profit"] - item["yoy_net_profit"]) / item["yoy_net_profit"]) * 100, 2);
725
727
  net_profit_yoy_ratio = Util.parse_ratio(net_profit_yoy_ratio);
726
728
  }
727
729
  _html.push("<td", net_profit_yoy_title, ">", net_profit_yoy_ratio, "</td>");
728
730
  let net_profit_qoq_title = "", net_profit_qoq_ratio = "--";
729
731
  if (item["qoq_net_profit"]) {
730
- net_profit_qoq_title = " title='" + Util.strip_html(Util.to_unit(item["qoq_net_profit"])) + " - " + Util.strip_html(Util.to_unit(item["net_profit_add"])) + "'";
732
+ net_profit_qoq_title = " title='" + Util.to_unit(item["qoq_net_profit"], 2, 0) + " - " + Util.to_unit(item["net_profit_add"], 2, 0) + "'";
731
733
  net_profit_qoq_ratio = Util.to_float(((item["net_profit_add"] - item["qoq_net_profit"]) / item["qoq_net_profit"]) * 100, 2);
732
734
  net_profit_qoq_ratio = Util.parse_ratio(net_profit_qoq_ratio);
733
735
  }
734
736
  _html.push("<td", net_profit_qoq_title, ">", net_profit_qoq_ratio, "</td>");
735
- _html.push("<td>", Util.to_unit(item["adjusted_net_profit"], 3), "</td>");
737
+ let adjusted_net_profit = Util.to_unit(item["adjusted_net_profit"], 3);
738
+ _html.push("<td>", adjusted_net_profit, "</td>");
739
+ let adjusted_net_profit_yoy_title = "", adjusted_net_profit_yoy_ratio = "--";
740
+ if (item["yoy_adjusted_net_profit"]) {
741
+ adjusted_net_profit_yoy_title = " title='" + Util.to_unit(item["yoy_adjusted_net_profit"], 2, 0) + " - " + Util.strip_html(adjusted_net_profit) + "'";
742
+ adjusted_net_profit_yoy_ratio = Util.to_float(((item["adjusted_net_profit"] - item["yoy_adjusted_net_profit"]) / item["yoy_adjusted_net_profit"]) * 100, 2);
743
+ adjusted_net_profit_yoy_ratio = Util.parse_ratio(adjusted_net_profit_yoy_ratio);
744
+ }
745
+ _html.push("<td", adjusted_net_profit_yoy_title, ">", adjusted_net_profit_yoy_ratio, "</td>");
746
+ let adjusted_net_profit_qoq_title = "", adjusted_net_profit_qoq_ratio = "--";
747
+ if (item["qoq_adjusted_net_profit"]) {
748
+ adjusted_net_profit_qoq_title = " title='" + Util.to_unit(item["qoq_adjusted_net_profit"], 2, 0) + " - " + Util.to_unit(item["adjusted_net_profit_add"], 2, 0) + "'";
749
+ adjusted_net_profit_qoq_ratio = Util.to_float(((item["adjusted_net_profit_add"] - item["qoq_adjusted_net_profit"]) / item["qoq_adjusted_net_profit"]) * 100, 2);
750
+ adjusted_net_profit_qoq_ratio = Util.parse_ratio(adjusted_net_profit_qoq_ratio);
751
+ }
752
+ _html.push("<td", adjusted_net_profit_qoq_title, ">", adjusted_net_profit_qoq_ratio, "</td>");
736
753
  _html.push("</tr>");
737
754
  }
738
755
  });
@@ -1209,38 +1226,38 @@ let Stock = {
1209
1226
  let d1 = j["latest"][0], d2 = j["latest"][1], rzye_dist_tips = "", rqye_dist_tips = "";
1210
1227
  let rzye_difference = d1["rzye"] - d2["rzye"];
1211
1228
  if (rzye_difference > 0) {
1212
- rzye_dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["rzye"], 3)) + "' style='color: #a94442;'>+" + Util.strip_html(Util.to_unit(rzye_difference, 3)) + "</b>)";
1229
+ rzye_dist_tips = "(<b title='" + Util.to_unit(d2["rzye"], 3, 0) + "' style='color: #a94442;'>+" + Util.to_unit(rzye_difference, 3, 0) + "</b>)";
1213
1230
  } else if (rzye_difference < 0) {
1214
- rzye_dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["rzye"], 3)) + "' style='color: #3c763d;'>" + Util.strip_html(Util.to_unit(rzye_difference, 3)) + "</b>)";
1231
+ rzye_dist_tips = "(<b title='" + Util.to_unit(d2["rzye"], 3, 0) + "' style='color: #3c763d;'>" + Util.to_unit(rzye_difference, 3, 0) + "</b>)";
1215
1232
  }
1216
1233
  margin_summary = " 最新融资余额(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + Util.to_unit(d1["rzye"], 3) + rzye_dist_tips;
1217
1234
  let rqye_difference = d1["rqye"] - d2["rqye"];
1218
1235
  if (rqye_difference > 0) {
1219
- rqye_dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["rqye"], 3)) + "' style='color: #a94442;'>+" + Util.strip_html(Util.to_unit(rqye_difference, 3)) + "</b>)";
1236
+ rqye_dist_tips = "(<b title='" + Util.to_unit(d2["rqye"], 3, 0) + "' style='color: #a94442;'>+" + Util.to_unit(rqye_difference, 3, 0) + "</b>)";
1220
1237
  } else if (rqye_difference < 0) {
1221
- rqye_dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["rqye"], 3)) + "' style='color: #3c763d;'>" + Util.strip_html(Util.to_unit(rqye_difference, 3)) + "</b>)";
1238
+ rqye_dist_tips = "(<b title='" + Util.to_unit(d2["rqye"], 3, 0) + "' style='color: #3c763d;'>" + Util.to_unit(rqye_difference, 3, 0) + "</b>)";
1222
1239
  }
1223
1240
  rqye_summary = " 最新融券余额(" + Util.seconds_to_format(d1["date"], "%Y-%m-%d") + "): " + Util.to_unit(d1["rqye"], 3) + rqye_dist_tips;
1224
1241
  }
1225
1242
  }
1226
- margin_summary += ' 当前最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(rzye_high, 3)) + '</span> 当前最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(rzye_low, 3)) + "</span>";
1243
+ margin_summary += ' 当前最高: <span style="color: #FFF;" class="label label-danger">' + Util.to_unit(rzye_high, 3, 0) + '</span> 当前最低: <span style="color: #FFF;" class="label label-success">' + Util.to_unit(rzye_low, 3, 0) + "</span>";
1227
1244
  if (j["rzye_high"] && j["rzye_high"]["date"] && j["rzye_high"]["date"] > 0) {
1228
- margin_summary += ' 历史最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(j["rzye_high"]["rzye"], 3)) + '</span>(' + Util.seconds_to_format(j["rzye_high"]["date"], "%Y-%m-%d") + ')';
1245
+ margin_summary += ' 历史最高: <span style="color: #FFF;" class="label label-danger">' + Util.to_unit(j["rzye_high"]["rzye"], 3, 0) + '</span>(' + Util.seconds_to_format(j["rzye_high"]["date"], "%Y-%m-%d") + ')';
1229
1246
  }
1230
1247
  if (j["rzye_low"] && j["rzye_low"]["date"] && j["rzye_low"]["date"] > 0) {
1231
- margin_summary += ' 历史最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(j["rzye_low"]["rzye"], 3)) + '</span>(' + Util.seconds_to_format(j["rzye_low"]["date"], "%Y-%m-%d") + ')';
1248
+ margin_summary += ' 历史最低: <span style="color: #FFF;" class="label label-success">' + Util.to_unit(j["rzye_low"]["rzye"], 3, 0) + '</span>(' + Util.seconds_to_format(j["rzye_low"]["date"], "%Y-%m-%d") + ')';
1232
1249
  }
1233
1250
  if (j["less_rate"]) {
1234
1251
  margin_summary += '&nbsp;&nbsp;当前最新融资余额超过历史 <span style="color: #FFF;" class="label label-info">' + j["less_rate"] + '%</span> 分位水平';
1235
1252
  }
1236
1253
  $("#margin_summary").html(margin_summary);
1237
1254
  Stock["rzye_chart"] = Util.multi_axis_line(Stock["rzye_chart"], "rzye_line_canvas", date_data, '融资余额(单位:亿)', rzye_data, '股价', price_data);
1238
- rqye_summary += ' 当前最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(rqye_high, 3)) + '</span> 当前最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(rqye_low, 3)) + "</span>";
1255
+ rqye_summary += ' 当前最高: <span style="color: #FFF;" class="label label-danger">' + Util.to_unit(rqye_high, 3, 0) + '</span> 当前最低: <span style="color: #FFF;" class="label label-success">' + Util.to_unit(rqye_low, 3, 0) + "</span>";
1239
1256
  if (j["rqye_high"] && j["rqye_high"]["date"] && j["rqye_high"]["date"] > 0) {
1240
- rqye_summary += ' 历史最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(j["rqye_high"]["rqye"], 3)) + '</span>(' + Util.seconds_to_format(j["rqye_high"]["date"], "%Y-%m-%d") + ')';
1257
+ rqye_summary += ' 历史最高: <span style="color: #FFF;" class="label label-danger">' + Util.to_unit(j["rqye_high"]["rqye"], 3, 0) + '</span>(' + Util.seconds_to_format(j["rqye_high"]["date"], "%Y-%m-%d") + ')';
1241
1258
  }
1242
1259
  if (j["rqye_low"] && j["rqye_low"]["date"] && j["rqye_low"]["date"] > 0) {
1243
- rqye_summary += ' 历史最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(j["rqye_low"]["rqye"], 3)) + '</span>(' + Util.seconds_to_format(j["rqye_low"]["date"], "%Y-%m-%d") + ')';
1260
+ rqye_summary += ' 历史最低: <span style="color: #FFF;" class="label label-success">' + Util.to_unit(j["rqye_low"]["rqye"], 3, 0) + '</span>(' + Util.seconds_to_format(j["rqye_low"]["date"], "%Y-%m-%d") + ')';
1244
1261
  }
1245
1262
  $("#rqye_summary").html(" [" + rqye_summary + " ]");
1246
1263
  Stock["rqye_chart"] = Util.chart_bar_line(Stock["rqye_chart"], "rqye_line_canvas", date_data, rqye_data, '融券余额(单位:万)', rqye_color_data, price_data, '股价');
@@ -1283,14 +1300,14 @@ let Stock = {
1283
1300
  let d2 = j["latest"][1];
1284
1301
  let difference = d1["volume"] - d2["volume"];
1285
1302
  if (difference > 0) {
1286
- dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["volume"])) + "股' style='color: #a94442;'>+" + Util.strip_html(Util.to_unit(difference)) + "股</b>)";
1303
+ dist_tips = "(<b title='" + Util.to_unit(d2["volume"], 2, 0) + "股' style='color: #a94442;'>+" + Util.to_unit(difference, 2, 0) + "股</b>)";
1287
1304
  } else if (difference < 0) {
1288
- dist_tips = "(<b title='" + Util.strip_html(Util.to_unit(d2["volume"])) + "股' style='color: #3c763d;'>" + Util.strip_html(Util.to_unit(difference)) + "股</b>)";
1305
+ dist_tips = "(<b title='" + Util.to_unit(d2["volume"], 2, 0) + "股' style='color: #3c763d;'>" + Util.to_unit(difference, 2, 0) + "股</b>)";
1289
1306
  }
1290
1307
  }
1291
1308
  latest_html += dist_tips + ", 占 <span style='color: #FFF;' class='label label-info'>" + j["latest"][0]["ratio"] + "%</span> 流通股, ";
1292
- hkex_holding_summary += (latest_html + ' 最高: <span style="color: #FFF;" class="label label-danger">' + Util.strip_html(Util.to_unit(j["high"]["volume"])) + '股</span>(' + Util.seconds_to_format(j["high"]["date"], "%Y-%m-%d") +
1293
- ') 最低: <span style="color: #FFF;" class="label label-success">' + Util.strip_html(Util.to_unit(j["low"]["volume"])) + '股</span>(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')');
1309
+ hkex_holding_summary += (latest_html + ' 最高: <span style="color: #FFF;" class="label label-danger">' + Util.to_unit(j["high"]["volume"], 2, 0) + '股</span>(' + Util.seconds_to_format(j["high"]["date"], "%Y-%m-%d") +
1310
+ ') 最低: <span style="color: #FFF;" class="label label-success">' + Util.to_unit(j["low"]["volume"], 2, 0) + '股</span>(' + Util.seconds_to_format(j["low"]["date"], "%Y-%m-%d") + ')');
1294
1311
  }
1295
1312
  $("#hkex_holding_summary").html(hkex_holding_summary);
1296
1313
  Stock["hkex_holding_chart"] = Util.multi_axis_line(Stock["hkex_holding_chart"], "hkex_holding_line_canvas", date_data, '持股数', volume_data, '股价', price_data);
package/util.js CHANGED
@@ -3207,13 +3207,22 @@ const Util = {
3207
3207
  * 转为相应单位的数值
3208
3208
  * @param digit
3209
3209
  * @param fraction
3210
+ * @param is_tips
3210
3211
  * @returns {*|number}
3211
3212
  */
3212
- to_unit: function (digit, fraction = 2) {
3213
+ to_unit: function (digit, fraction = 2, is_tips = 1) {
3213
3214
  if (digit >= 100000000 || digit <= -100000000) {
3214
- return "<span title='" + digit + "'>" + Util.to_float(digit / 100000000, fraction) + "亿</span>";
3215
+ if (is_tips === 1) {
3216
+ return "<span title='" + digit + "'>" + Util.to_float(digit / 100000000, fraction) + "亿</span>";
3217
+ } else {
3218
+ return Util.to_float(digit / 100000000, fraction) + "亿";
3219
+ }
3215
3220
  } else if (digit >= 10000 || digit <= -10000) {
3216
- return "<span title='" + digit + "'>" + Util.to_float(digit / 10000, fraction) + "万</span>";
3221
+ if (is_tips === 1) {
3222
+ return "<span title='" + digit + "'>" + Util.to_float(digit / 10000, fraction) + "万</span>";
3223
+ } else {
3224
+ return Util.to_float(digit / 10000, fraction) + "万";
3225
+ }
3217
3226
  }
3218
3227
  if (Util.is_float(digit)) {
3219
3228
  return Util.to_float(digit, fraction);