wgt-node-utils 0.0.30 → 0.0.32

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": "wgt-node-utils",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "description": "WGT工具类包",
5
5
  "main": "dist/bundle.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -112,7 +112,7 @@ class wgtNodeUtils {
112
112
  * @res node端 返回头
113
113
  *
114
114
  */
115
- addCommonHeadersInfo = res => {
115
+ addCommonHeadersInfo = (res) => {
116
116
  // 增加头信息Content-Type, 在开启gzip时会用到
117
117
  res.setHeader('Content-Type','text/html; charset=utf-8');
118
118
 
@@ -181,7 +181,7 @@ class wgtNodeUtils {
181
181
  return new Promise((resolve) => {
182
182
  axios.get(url, { params }).then(res => {
183
183
  let siteData = res.data.data;
184
- // 如果未获取到数据,使用enjoy4fun.com做为默认数据
184
+ // 如果未获取到数据,使用做为默认数据
185
185
  if (!siteData) {
186
186
  siteData = {
187
187
  siteId: "site_12",
@@ -353,7 +353,7 @@ class wgtNodeUtils {
353
353
  * @err 发送信息类型
354
354
  * @components 项目名称
355
355
  */
356
- appendLog = (title, err, ENV, components = '') => {
356
+ appendLog = (title, ENV, components = '', err) => {
357
357
  try {
358
358
  if (!err) {
359
359
  console.warn(`============${new Date().toLocaleString()}===========`);
@@ -500,7 +500,6 @@ class wgtNodeUtils {
500
500
  name: 'English',
501
501
  icon: 'cfgv1bursfevmln3akj0.webp'
502
502
  }]
503
- console.log(url, 'url')
504
503
  return new Promise((resolve) => {
505
504
  axios.get(url).then(res => {
506
505
  let list = res.data.data || [];