🐛 fixed the third-party login bug

This commit is contained in:
landaiqing
2024-08-30 21:52:48 +08:00
parent d91e683e87
commit 2c6ad81720
11 changed files with 254 additions and 72 deletions

View File

@@ -0,0 +1,31 @@
import {defineStore} from 'pinia';
import {ref} from "vue";
export const useClientStore = defineStore(
'clientId',
() => {
const clientId = ref<string>();
function setClientId(id: string) {
clientId.value = id;
}
function getClientId() {
return clientId.value;
}
return {
clientId,
setClientId,
getClientId
};
},
{
// 开启数据持久化
persist: {
key: 'clientId',
storage: localStorage,
paths: ["clientId"],
}
}
);