wangxy преди 1 месец
родител
ревизия
c80d6ab315
променени са 1 файла, в които са добавени 53 реда и са изтрити 0 реда
  1. 53 0
      utils/examTools.js

+ 53 - 0
utils/examTools.js

@@ -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
+	}
+}