@hzab/data-model 1.8.5 → 1.8.7

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @hzab/data-model@1.8.5
2
2
 
3
- fix: getToken opt.hasCookie 是否读取 cookie 的 token
3
+ fix: getToken opt.hasCookie 是否读取 cookie 的 token。默认不读取 cookie 的 token
4
4
  fix: setToken 默认不设置到 cookie 上
5
5
 
6
6
  # @hzab/data-model@1.8.4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/data-model",
3
- "version": "1.8.5",
3
+ "version": "1.8.7",
4
4
  "description": "data model",
5
5
  "main": "src",
6
6
  "scripts": {
package/src/axios.js CHANGED
@@ -32,8 +32,9 @@ export function setToken(token = "", opt) {
32
32
  */
33
33
  export function getToken(opt) {
34
34
  const { hasCookie = false } = opt || {};
35
+ let token = "";
35
36
  if (hasCookie) {
36
- let token = Cookies.get(TOKEN) || "";
37
+ token = Cookies.get(TOKEN) || "";
37
38
  if (token) {
38
39
  return token;
39
40
  }