|
@@ -0,0 +1,53 @@
|
|
|
|
|
+import {
|
|
|
|
|
+ useUserCache
|
|
|
|
|
+} from "@/utils/userCache.js"
|
|
|
|
|
+
|
|
|
|
|
+// 身份确认缓存
|
|
|
|
|
+const identificationKey = 'ShenFenQueRen'
|
|
|
|
|
+export function useIdentificationTools() {
|
|
|
|
|
+ const {saveCache,getCache,removeCache} = useUserCache();
|
|
|
|
|
+
|
|
|
|
|
+ function saveIdentCache(key,data) {
|
|
|
|
|
+ saveCache(identificationKey,key, data)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getIdentCache(key) {
|
|
|
|
|
+ return getCache(identificationKey, key)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeIdentCache(key) {
|
|
|
|
|
+ removeCache(identificationKey,key)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ saveIdentCache,
|
|
|
|
|
+ getIdentCache,
|
|
|
|
|
+ removeIdentCache
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+const ksCache = 'kaoshiCache'
|
|
|
|
|
+export function useKaoShiCache() {
|
|
|
|
|
+ const {saveCache,getCache,removeCache} = useUserCache();
|
|
|
|
|
+
|
|
|
|
|
+ function saveCacheKs(key,data) {
|
|
|
|
|
+ saveCache(ksCache,key, data)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function getCacheKs(key) {
|
|
|
|
|
+ return getCache(ksCache, key)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function removeCacheKs(key) {
|
|
|
|
|
+ removeCache(ksCache,key)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ saveCacheKs,
|
|
|
|
|
+ getCacheKs,
|
|
|
|
|
+ removeCacheKs
|
|
|
|
|
+ }
|
|
|
|
|
+}
|