wgt-node-utils 0.0.37 → 0.0.39

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgt-node-utils",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "WGT工具类包",
5
5
  "main": "dist/bundle.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -327,7 +327,6 @@ class wgtNodeUtils {
327
327
  data: {
328
328
  receive_id: 'oc_aba13955509035daa7a799f30b1b3341',
329
329
  msg_type: 'text',
330
-
331
330
  content: `{\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${message}\"}`,
332
331
  uuid: ''
333
332
  }
@@ -355,6 +354,8 @@ class wgtNodeUtils {
355
354
  * @components 项目名称
356
355
  */
357
356
  appendLog = (title, ENV, components = '', err) => {
357
+ console.error('=============err============', err)
358
+ console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
358
359
  try {
359
360
  if (!err) {
360
361
  console.warn(`============${new Date().toLocaleString()}===========`);
@@ -365,17 +366,17 @@ class wgtNodeUtils {
365
366
  console.error(`${title} [${err.config.method}]: ${err.config.url}`);
366
367
  console.error(`request: {params: ${JSON.stringify(err.config.params)}, data: ${JSON.stringify(err.config.data)}}`);
367
368
  console.error(`response: ${JSON.stringify(err.response)}`);
368
-
369
- console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
370
-
371
369
  this.sendFeiShu(`${title} [${err.config.method}]: ${err.config.url}`, ENV, components);
372
370
  } else {
373
371
  console.error(`============${new Date().toLocaleString()}===========`);
374
372
  console.error(`${title} ${err}`);
373
+
374
+ console.error(`=========================={\"text\":\"<b>前端容器node报错</b> \\n components: ${components}\\n env: ${ENV}, \\n message: ${title} [${err.config.method}]: ${err.config.url}\"}`)
375
+
375
376
  this.sendFeiShu(`${title} ${err}`, ENV, components);
376
377
  }
377
378
  } catch (e) {
378
-
379
+
379
380
  }
380
381
  };
381
382
  /**