no message

This commit is contained in:
小陌 2023-07-29 16:42:26 +08:00
parent bd71ec3cc8
commit f42ae7e72a

View File

@ -4,13 +4,14 @@
import CryptoJS from 'crypto-js'; import CryptoJS from 'crypto-js';
import sysConfig from "@/config"; import sysConfig from "@/config";
import store from '@/store' import store from '@/store'
const tool = {} const tool = {}
/* store */ /* store */
tool.store = { tool.store = {
set(key, data) { set(key, data) {
return store.commit('setCache', {key:key, value:data}); return store.commit('setCache', {
key: key,
value: data
});
}, },
get(key) { get(key) {
if (!Object.prototype.hasOwnProperty.call(store.state.cache.cacheList, key)) { if (!Object.prototype.hasOwnProperty.call(store.state.cache.cacheList, key)) {
@ -25,7 +26,6 @@ tool.store = {
return store.commit('clearCache'); return store.commit('clearCache');
} }
} }
/* localStorage */ /* localStorage */
tool.data = { tool.data = {
set(key, data, datetime = 0) { set(key, data, datetime = 0) {
@ -93,7 +93,7 @@ tool.cookie = {
set(name, value, config = {}) { set(name, value, config = {}) {
var cfg = { var cfg = {
expires: null, expires: null,
path: null, path: '/',
domain: null, domain: null,
secure: false, secure: false,
httpOnly: false, httpOnly: false,