@zxhy-npm/send-sls-logger 1.1.7 → 1.1.8

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/lib/init.js +2 -1
  2. package/package.json +1 -1
package/lib/init.js CHANGED
@@ -1,4 +1,4 @@
1
- import { deviceInfo, referUrl } from "./trace";
1
+ import { deviceInfo, isPC, mobileInfo, referUrl } from "./trace";
2
2
  const getType = (val) => {
3
3
  return Object.prototype.toString.call(val).toLocaleLowerCase().slice(8, -1);
4
4
  };
@@ -121,6 +121,7 @@ class DefaultLog {
121
121
  pageName: () => document.title,
122
122
  referUrl: () => referUrl.referUrl,
123
123
  deviceInfo,
124
+ terminal: isPC ? 'PC' : mobileInfo.split(' ')[0],
124
125
  ...data,
125
126
  }), type);
126
127
  const isExcludeMsg = Object.keys(result).find((key) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zxhy-npm/send-sls-logger",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "阿里云sls的logger发送",
5
5
  "scripts": {
6
6
  "build": "rm -rf lib && tsc"