@arms/js-sdk
Advanced tools
Comparing version 1.8.36-beta.12 to 1.8.36-beta.13
@@ -1,2 +0,2 @@ | ||
var global = require("../global"), util = require("../util"), UniApp = require("./uniapp"), uni = global.get("uni"), storage = global.get("storage"), ARMS_STORAGE_MINIPROGRAM_UID_KEY = "ARMS_STORAGE_MINIPROGRAM_UID_KEY", MiniLogger = function(t) { | ||
var global = require("../global"), util = require("../util"), UniApp = require("./uniapp"), uni = global.get("uni"), ARMS_STORAGE_MINIPROGRAM_UID_KEY = "ARMS_STORAGE_MINIPROGRAM_UID_KEY", MiniLogger = function(t) { | ||
return UniApp.call(this, t), this; | ||
@@ -14,24 +14,16 @@ }; | ||
autoSetUid: function() { | ||
var t = this; | ||
if (t._conf && t._conf.uid) t.setCommonInfo({ | ||
uid: t._conf.uid | ||
}); else if (storage) try { | ||
storage.get({ | ||
key: ARMS_STORAGE_MINIPROGRAM_UID_KEY, | ||
success: function(e) { | ||
if (e && "string" == typeof e) t.setCommonInfo({ | ||
uid: e | ||
}); else { | ||
var o = util.uu(); | ||
storage.set({ | ||
key: ARMS_STORAGE_MINIPROGRAM_UID_KEY, | ||
value: o | ||
}), t.setCommonInfo({ | ||
uid: o | ||
}); | ||
} | ||
} | ||
}); | ||
} catch (e) { | ||
util.warn("[arms] error in autoSetUid", e); | ||
if (this._conf && this._conf.uid) this.setCommonInfo({ | ||
uid: this._conf.uid | ||
}); else try { | ||
var t = uni.getStorageSync(ARMS_STORAGE_MINIPROGRAM_UID_KEY); | ||
if (t && "string" == typeof t) this.setCommonInfo({ | ||
uid: t | ||
}); else if ("function" == typeof uni.setStorageSync) { | ||
var e = util.uu(); | ||
uni.setStorageSync(ARMS_STORAGE_MINIPROGRAM_UID_KEY, e), this.setCommonInfo({ | ||
uid: e | ||
}); | ||
} | ||
} catch (i) { | ||
util.warn("[arms] error in autoSetUid", i); | ||
} | ||
@@ -38,0 +30,0 @@ }, |
{ | ||
"name": "@arms/js-sdk", | ||
"version": "1.8.36-beta.12", | ||
"version": "1.8.36-beta.13", | ||
"description": "arms rum javascript sdk", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
651224
145
12677
1