Explorar el Código

Merge branch 'master' of http://120.55.44.4:10080/xujunjie/WorkloadWeb

xjj hace 1 año
padre
commit
4f0d0f948e
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/utils/request.js

+ 2 - 1
src/utils/request.js

@@ -2,7 +2,7 @@ import fetch from 'dva/fetch';
 import { message, notification } from 'antd';
 import router from 'umi/router';
 import hash from 'hash.js';
-import { isAntdPro, getToken, GetTokenFromUrl } from './utils';
+import { isAntdPro, getToken, GetTokenFromUrl, storeToken } from './utils';
 
 // var apiUrl = "http://oraysmart.com:8888"
 // var apiUrl = "http://120.55.44.4:8900"
@@ -90,6 +90,7 @@ export default function request(url, option, jwt) {
   let token = getToken();
   if (!token) {
     token = GetTokenFromUrl();
+    storeToken(token)
   }
 
   const options = {