openatc-components 0.1.136 → 0.1.138

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.138",
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 = () => {
@@ -39,7 +39,7 @@ export class KissApi {
39
39
  获取token 需要在storage中设置 key=token的value
40
40
  */
41
41
  GetToken () {
42
- return localStorge.getStorage('token')
42
+ return getToken()
43
43
  }
44
44
 
45
45
  /*
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
  }