@arms/rum-miniapp 0.0.17 → 0.0.19
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/lib/utils/uuid.js +1 -1
- package/package.json +3 -3
package/lib/utils/uuid.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/function getUUID(a){return void 0===a&&(a=""),a&&(a+="_"),""+a+(0,_rumCore.generateUUID)()}// 每次启动重置Session.id
|
|
7
7
|
(0,_platform.setStorageSync)(SESSION_ID,void 0);/**
|
|
8
8
|
* 获取唯一的sessionID
|
|
9
|
-
*/function getSessionID(){var a=(0,_platform.getStorageSync)(SESSION_ID),b=new Date((0,_platform.getStorageSync)(SESSION_ID_EXP));return
|
|
9
|
+
*/function getSessionID(){var a=(0,_platform.getStorageSync)(SESSION_ID),b=new Date((0,_platform.getStorageSync)(SESSION_ID_EXP));return(!a||32>a.length||!b.valueOf()||b<new Date)&&(a=setSessionID()),a}/**
|
|
10
10
|
* 设置唯一的sessionID
|
|
11
11
|
*/function setSessionID(){var a=(0,_rumCore.generateGUID)();return(0,_platform.setStorageSync)(SESSION_ID,a),(0,_platform.setStorageSync)(SESSION_ID_EXP,new Date(Date.now()+86400000).toString()),a}/**
|
|
12
12
|
* 获取唯一的userID
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arms/rum-miniapp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "arms rum javascript sdk for miniapp",
|
|
5
5
|
"author": "guangli.fj <guangli.fj@alibaba-inc.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"test": "node ./__tests__/@arms/miniapp.test.js"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@arms/rum-core": "^0.0.
|
|
25
|
+
"@arms/rum-core": "^0.0.18"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "^4.9.4"
|
|
29
29
|
},
|
|
30
|
-
"homepage": "https://unpkg.com/@arms/rum-miniapp@0.0.
|
|
30
|
+
"homepage": "https://unpkg.com/@arms/rum-miniapp@0.0.19/build/index.html"
|
|
31
31
|
}
|