Michael Wang 4 жил өмнө
parent
commit
0088199575

+ 3 - 1
src/constant/constants.js

@@ -1,8 +1,10 @@
+import MD5 from "js-md5";
+
 export const YYYYMMDDHHmmss = "YYYY-MM-DD HH:mm:ss";
 export const PLATFORM = "WEB";
 
 if (!localStorage.getItem("deviceId")) {
-  localStorage.setItem("deviceId", Math.random() + "-" + Date.now());
+  localStorage.setItem("deviceId", MD5(Math.random() + "-" + Date.now()));
 }
 export const DEVICE_ID = localStorage.getItem("deviceId");