|
@@ -1,7 +1,8 @@
|
|
|
import axios from 'axios'
|
|
|
import { MessageBox, Message } from 'element-ui'
|
|
|
import store from '@/store'
|
|
|
-import { getToken } from '@/utils/auth'
|
|
|
+import { getToken } from '@/utils/auth'
|
|
|
+import Cookies from 'js-cookie';
|
|
|
|
|
|
//获取当前url
|
|
|
const DoMainString = document.querySelector("html").getAttribute("domain");
|
|
@@ -16,7 +17,7 @@ console.log(URL,'===========URL')
|
|
|
if(URL.indexOf('/')==0 && URL.length==1){
|
|
|
URL= window.location.protocol + "//"+window.location.host+URL
|
|
|
}
|
|
|
-
|
|
|
+Cookies.set('url',URL)
|
|
|
const service = axios.create({
|
|
|
baseURL: URL, // url = base url + request url
|
|
|
withCredentials: true, // send cookies when cross-domain requests
|