({commit}, userInfo)
| 50 | commit("SET_CURRENT_CLUSTER", clusterName) |
| 51 | }, |
| 52 | login({commit}, userInfo) { |
| 53 | const {username, password} = userInfo |
| 54 | return new Promise((resolve, reject) => { |
| 55 | commit("LOGIN") |
| 56 | login({username: username.trim(), password: password}).then(response => { |
| 57 | commit("LOGIN") |
| 58 | resolve(response) |
| 59 | }).catch(error => { |
| 60 | reject(error) |
| 61 | }) |
| 62 | }) |
| 63 | }, |
| 64 | |
| 65 | isLogin({commit}) { |
| 66 | return new Promise((resolve) => { |