zhangjie há 1 ano atrás
pai
commit
e426988188
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/utils/request.js

+ 2 - 2
src/utils/request.js

@@ -5,7 +5,7 @@ import { get, isEmpty } from 'lodash';
 import qs from 'qs';
 // import { h } from 'vue';
 import { LoadingPlugin } from 'tdesign-vue-next';
-import { getAuthorization } from './crypto';
+import { getAuthorization, getMD5 } from './crypto';
 import router from '@/router';
 import { initSyncTime, fetchTime } from './syncServerTime';
 import { cookie } from '@/utils/tool';
@@ -15,7 +15,7 @@ function getDeviceId() {
   if (deviceId) return deviceId;
 
   if (!deviceId) {
-    deviceId = MD5(Math.random() + '-' + Date.now());
+    deviceId = getMD5(Math.random() + '-' + Date.now());
     cookie.set('deviceId', deviceId);
     return deviceId;
   }