|
@@ -25,10 +25,12 @@ Vue.use(Element, {
|
|
|
Vue.prototype.$api = process.env.NODE_ENV == 'development' ? "/api" : "http://localhost:9000";
|
|
Vue.prototype.$api = process.env.NODE_ENV == 'development' ? "/api" : "http://localhost:9000";
|
|
|
Vue.http.options.emulateJSON = true;
|
|
Vue.http.options.emulateJSON = true;
|
|
|
Vue.prototype.$md5 = md5;
|
|
Vue.prototype.$md5 = md5;
|
|
|
-Vue.http.options.xhr = { withCredentials: true,}
|
|
|
|
|
|
|
+Vue.http.options.xhr = {
|
|
|
|
|
+ // withCredentials: true,
|
|
|
|
|
+}
|
|
|
Vue.http.interceptors.push(function (request, next) {//拦截器
|
|
Vue.http.interceptors.push(function (request, next) {//拦截器
|
|
|
// 跨域携带cookie
|
|
// 跨域携带cookie
|
|
|
- request.credentials = true;
|
|
|
|
|
|
|
+ //request.credentials = true;
|
|
|
next()
|
|
next()
|
|
|
})
|
|
})
|
|
|
new Vue({
|
|
new Vue({
|