openatc-components 0.1.136 → 0.1.137

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.1.136",
3
+ "version": "0.1.137",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -14,7 +14,7 @@ import {
14
14
  } from './HttpurlMgr'
15
15
  import axios from 'axios'
16
16
  import * as localStorge from './localStorage'
17
- import { removeToken } from '../../utils/auth'
17
+ import { removeToken, getToken } from '../../utils/auth'
18
18
 
19
19
  axios.defaults.withCredentials = true
20
20
  export const getAxios = () => {
@@ -32,7 +32,8 @@ export class KissApi {
32
32
  获取服务器地址 需要在storage中设置 key=host的value
33
33
  */
34
34
  GetHost () {
35
- return localStorge.getStorage('host')
35
+ return getToken()
36
+ // return localStorge.getStorage('host')
36
37
  }
37
38
 
38
39
  /*
package/src/utils/auth.js CHANGED
@@ -14,7 +14,7 @@ var localStorage = require('../lib/publicjs/localStorage')
14
14
  const nameSpace = 'openatc_conponents_'
15
15
  let LoginKey = 'token'
16
16
  // eslint-disable-next-line camelcase
17
- let Prefix = ''
17
+ let Prefix = 'Prefix'
18
18
  const LoginHost = nameSpace + 'kisshost'
19
19
  const typeKey = 'type'
20
20
  const type = 'edge'
@@ -31,8 +31,8 @@ export function getToken () {
31
31
  return localStorage.getStorage(key)
32
32
  }
33
33
 
34
- export function setToken (token, prifix = '') {
35
- setPrefix(prifix)
34
+ export function setToken (token, prefix = '') {
35
+ setPrefix(prefix)
36
36
  let key = getPrefix() + LoginKey
37
37
  return localStorage.setStorage(key, token)
38
38
  }