Michael Wang 4 rokov pred
rodič
commit
0088199575
1 zmenil súbory, kde vykonal 3 pridanie a 1 odobranie
  1. 3 1
      src/constant/constants.js

+ 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");