|
|
@@ -39,16 +39,14 @@ export const actions = {
|
|
|
store.commit('option/GET_MESSAGETYPE', messageType)
|
|
|
}
|
|
|
if (cookie && cookie.length) {
|
|
|
- if (cookie) {
|
|
|
- for (let i = 0; i < cookie.length; i++) {
|
|
|
- if (cookie[i].indexOf('JSESSIONID') > -1) {
|
|
|
- const sessionId = cookie[i]
|
|
|
- const first = sessionId.indexOf(';')
|
|
|
- const second = sessionId.lastIndexOf(';')
|
|
|
- const newSessionId = sessionId.replace(sessionId.substring(first, second), '')
|
|
|
- store.commit('option/SET_SESSION_ID', newSessionId)
|
|
|
- break
|
|
|
- }
|
|
|
+ for (let i = 0; i < cookie.length; i++) {
|
|
|
+ if (cookie[i].indexOf('JSESSIONID') > -1) {
|
|
|
+ const sessionId = cookie[i]
|
|
|
+ const first = sessionId.indexOf(';')
|
|
|
+ const second = sessionId.lastIndexOf(';')
|
|
|
+ const newSessionId = sessionId.replace(sessionId.substring(first, second), '')
|
|
|
+ store.commit('option/SET_SESSION_ID', newSessionId)
|
|
|
+ break
|
|
|
}
|
|
|
}
|
|
|
axios.defaults.headers['cookie'] = store.state.option.cookies + '; ' + store.state.option.sessionId
|