|
@ -55,10 +55,9 @@ const actions = { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userLogin({ commit }, data) { // 用户登录
|
|
|
userLogin({ commit }, data) { // 用户登录
|
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
axiosMethods.instancePosts('/connect/token', data) |
|
|
axiosMethods.instancePosts('/api/connect-token', data) |
|
|
.then(response => { |
|
|
.then(response => { |
|
|
commit('SET_TOKEN', response.access_token) |
|
|
commit('SET_TOKEN', response.access_token) |
|
|
setToken(response.access_token) |
|
|
setToken(response.access_token) |
|
@ -68,6 +67,18 @@ const actions = { |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
// userLogin({ commit }, data) { // 用户登录
|
|
|
|
|
|
// return new Promise((resolve, reject) => {
|
|
|
|
|
|
// axiosMethods.instancePosts('/connect/token', data)
|
|
|
|
|
|
// .then(response => {
|
|
|
|
|
|
// commit('SET_TOKEN', response.access_token)
|
|
|
|
|
|
// setToken(response.access_token)
|
|
|
|
|
|
// resolve()
|
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
|
// reject(error)
|
|
|
|
|
|
// })
|
|
|
|
|
|
// })
|
|
|
|
|
|
// },
|
|
|
// get user info
|
|
|
// get user info
|
|
|
getInfo({ commit }) { |
|
|
getInfo({ commit }) { |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|