Commit 27f6714e by huyue

提交

1 parent 63b0e736
...@@ -74,7 +74,7 @@ service.interceptors.response.use( ...@@ -74,7 +74,7 @@ service.interceptors.response.use(
response.config.retry = true response.config.retry = true
return service(response.config) return service(response.config)
} }
if (errId + '' === result.errId_logout_value + '') { if (errId + '' === result.errId_logout_value + '' || code + '' === result.errId_logout_value + '') {
// window.vm && window.vm.$parent_iframe && window.vm.$parent_iframe.to('login') // window.vm && window.vm.$parent_iframe && window.vm.$parent_iframe.to('login')
window.parent.postMessage({ window.parent.postMessage({
type: 'logout'}, '*'); type: 'logout'}, '*');
......
...@@ -3,7 +3,9 @@ import base from '@/base' ...@@ -3,7 +3,9 @@ import base from '@/base'
import GlAxios from '../../../../common/axios' import GlAxios from '../../../../common/axios'
base.getConfig().then(data => { base.getConfig().then(data => {
const { config } = data const { config } = data
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(App) base.render(App)
}) })
...@@ -3,7 +3,9 @@ import base from '@/base' ...@@ -3,7 +3,9 @@ import base from '@/base'
import GlAxios from '../../../../common/axios' import GlAxios from '../../../../common/axios'
base.getConfig().then(data => { base.getConfig().then(data => {
const { config } = data const { config } = data
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(App) base.render(App)
}) })
...@@ -3,7 +3,9 @@ import base from '@/base' ...@@ -3,7 +3,9 @@ import base from '@/base'
import GlAxios from '../../../../common/axios' import GlAxios from '../../../../common/axios'
base.getConfig().then(data => { base.getConfig().then(data => {
const { config } = data const { config } = data
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(App) base.render(App)
}) })
...@@ -3,7 +3,9 @@ import base from '@/base' ...@@ -3,7 +3,9 @@ import base from '@/base'
import GlAxios from '../../../../common/axios' import GlAxios from '../../../../common/axios'
base.getConfig().then(data => { base.getConfig().then(data => {
const { config } = data const { config } = data
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(App) base.render(App)
}) })
...@@ -3,7 +3,9 @@ import base from '@/base' ...@@ -3,7 +3,9 @@ import base from '@/base'
import GlAxios from '../../../../common/axios' import GlAxios from '../../../../common/axios'
base.getConfig().then(data => { base.getConfig().then(data => {
const { config } = data const { config } = data
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(App) base.render(App)
}) })
...@@ -3,7 +3,9 @@ import base from '@/base' ...@@ -3,7 +3,9 @@ import base from '@/base'
import GlAxios from '../../../common/axios' import GlAxios from '../../../common/axios'
base.getConfig().then(data => { base.getConfig().then(data => {
const { config } = data const { config } = data
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(App) base.render(App)
}) })
...@@ -9,7 +9,9 @@ Apps.keys().map(item => { ...@@ -9,7 +9,9 @@ Apps.keys().map(item => {
console.log(data); console.log(data);
const { config } = data const { config } = data
Vue.prototype.fileUploadURL = config.axios.fileUploadURL Vue.prototype.fileUploadURL = config.axios.fileUploadURL
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(Apps(item).default) base.render(Apps(item).default)
}) })
......
...@@ -7,7 +7,9 @@ const Apps = require.context('./', false, /\.vue$/) ...@@ -7,7 +7,9 @@ const Apps = require.context('./', false, /\.vue$/)
Apps.keys().map(item => { Apps.keys().map(item => {
base.getConfig().then(data => { base.getConfig().then(data => {
const { config } = data const { config } = data
var cfg = Object.assign({}, config.axios) var cfg = Object.assign({headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}}, config.axios)
GlAxios.init(cfg) GlAxios.init(cfg)
base.render(Apps(item).default) base.render(Apps(item).default)
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!