|
@@ -1,11 +1,5 @@
|
|
import Vue from 'vue'
|
|
import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
import Vuex from 'vuex'
|
|
-import { store as firstPage } from '../modules/firstPage'
|
|
|
|
-import { store as sacilitiedAndStaff } from '../modules/facilitiesAndStaff'
|
|
|
|
-import { store as environment } from '../modules/environment'
|
|
|
|
-import { store as safety } from '../modules/safety'
|
|
|
|
-import { store as energyConsumption } from '../modules/energyConsumption'
|
|
|
|
-import { store as performance } from '../modules/performance'
|
|
|
|
import storage from '../utils/storage'
|
|
import storage from '../utils/storage'
|
|
import axios from 'axios'
|
|
import axios from 'axios'
|
|
|
|
|
|
@@ -13,6 +7,7 @@ Vue.use(Vuex)
|
|
const KEY_LAST_ROUTE = 'last_route'
|
|
const KEY_LAST_ROUTE = 'last_route'
|
|
|
|
|
|
const store = new Vuex.Store({
|
|
const store = new Vuex.Store({
|
|
|
|
+ modules:{},
|
|
state: {
|
|
state: {
|
|
name: '这里是全局的',
|
|
name: '这里是全局的',
|
|
projects: [
|
|
projects: [
|
|
@@ -70,20 +65,11 @@ const store = new Vuex.Store({
|
|
sessionStorage.setItem('token', token)
|
|
sessionStorage.setItem('token', token)
|
|
} else {
|
|
} else {
|
|
let ssoServer = 'http://sso.sagacloud.cn'
|
|
let ssoServer = 'http://sso.sagacloud.cn'
|
|
- // let redirectUrl = 'http://47.94.89.44:8011/home/main'
|
|
|
|
let redirectUrl = window.location.protocol + '//' + window.location.host +'/home/main'
|
|
let redirectUrl = window.location.protocol + '//' + window.location.host +'/home/main'
|
|
window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
|
|
window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- modules: {
|
|
|
|
- firstPage,
|
|
|
|
- sacilitiedAndStaff,
|
|
|
|
- environment,
|
|
|
|
- safety,
|
|
|
|
- energyConsumption,
|
|
|
|
- performance
|
|
|
|
- }
|
|
|
|
})
|
|
})
|
|
|
|
|
|
export default store
|
|
export default store
|