From f42ae7e72a2cfc73c6e2a2ac93aa7c82ce06c70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E9=99=8C?= Date: Sat, 29 Jul 2023 16:42:26 +0800 Subject: [PATCH] no message --- src/utils/tool.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/tool.js b/src/utils/tool.js index aa63d40..7b36c1b 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -4,13 +4,14 @@ import CryptoJS from 'crypto-js'; import sysConfig from "@/config"; import store from '@/store' - - const tool = {} /* store */ tool.store = { set(key, data) { - return store.commit('setCache', {key:key, value:data}); + return store.commit('setCache', { + key: key, + value: data + }); }, get(key) { if (!Object.prototype.hasOwnProperty.call(store.state.cache.cacheList, key)) { @@ -25,7 +26,6 @@ tool.store = { return store.commit('clearCache'); } } - /* localStorage */ tool.data = { set(key, data, datetime = 0) { @@ -93,7 +93,7 @@ tool.cookie = { set(name, value, config = {}) { var cfg = { expires: null, - path: null, + path: '/', domain: null, secure: false, httpOnly: false,