feat: 全局获取userinfo、数据持久化、store处理

This commit is contained in:
renxiaodong
2025-06-23 22:03:57 -04:00
parent 55198613a8
commit 59dac3bb13
10 changed files with 104 additions and 75 deletions

View File

@ -105,6 +105,8 @@ const okText = computed(() => {
});
const customerServiceVisible = ref(false);
const canAddAccount = computed(() => {
if (!enterpriseInfo) return false;
return enterpriseInfo.sub_account_quota > enterpriseInfo.used_sub_account_count;
});
@ -124,9 +126,11 @@ function handlePageSizeChange(pageSize: number) {
async function getSubAccount() {
const res = await fetchSubAccountPage(params);
const { data, total } = res.data;
pagination.total = total;
data.value = data;
const { data, total, code } = res.data;
if (code === 200) {
pagination.total = total;
data.value = data;
}
}
async function handleAddAccount() {
if (canAddAccount.value) {