UNPKG

xlb-main-login

Version:

``` yarn install ```

19 lines (16 loc) 567 B
import mutations from '../store/mutations' import state from '../store/index' import { default_login_url } from './config' function registerHint(val) { const baseURL = window.location.href const noloding = ['homereport', 'login'] if (val == 'invalid_token' && noloding.indexOf(baseURL.split('/#/')[1]) == -1) { } else if (val == 'invalid_token' && baseURL.indexOf('homereport') > 1) { } } function onOk() { const token = mutations.SET_TOKEN token(state, null) window.location.href = default_login_url } export default registerHint