flat: 缓存
This commit is contained in:
@@ -14,6 +14,10 @@ import {
|
||||
import {
|
||||
useReadMsg
|
||||
} from '@/stores/useReadMsg';
|
||||
import {
|
||||
msg,
|
||||
$api,
|
||||
} from '../common/globalFunction';
|
||||
|
||||
// 简历完成度计算
|
||||
function getResumeCompletionPercentage(resume) {
|
||||
@@ -52,7 +56,8 @@ const useUserStore = defineStore("user", () => {
|
||||
const token = ref('')
|
||||
const resume = ref({})
|
||||
const Completion = ref('0%')
|
||||
const seesionId = ref(uni.getStorageSync('seesionId') || '')
|
||||
const seesionId = ref('')
|
||||
const counts = ref({})
|
||||
|
||||
const login = (value) => {
|
||||
hasLogin.value = true;
|
||||
@@ -128,6 +133,13 @@ const useUserStore = defineStore("user", () => {
|
||||
seesionId.value = seesionIdVal
|
||||
}
|
||||
|
||||
function getUserstatistics() {
|
||||
$api.createRequest('/app/user/statistics').then((resData) => {
|
||||
counts.value = resData.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 导入
|
||||
return {
|
||||
hasLogin,
|
||||
@@ -140,8 +152,12 @@ const useUserStore = defineStore("user", () => {
|
||||
getUserResume,
|
||||
initSeesionId,
|
||||
seesionId,
|
||||
Completion
|
||||
Completion,
|
||||
getUserstatistics,
|
||||
counts
|
||||
}
|
||||
}, {
|
||||
unistorage: true,
|
||||
})
|
||||
|
||||
export default useUserStore;
|
||||
Reference in New Issue
Block a user