feat(store): 新增用户和企业信息管理功能

- 在 user store 中添加 userInfo 相关状态和操作
- 创建 enterprise store管理企业信息
- 更新相关组件以使用新的 store 方法
This commit is contained in:
2025-06-20 16:16:17 +08:00
parent c26ac51c21
commit 84f86f77ee
5 changed files with 90 additions and 22 deletions

View File

@ -35,16 +35,14 @@ import Modal from '@/components/modal.vue';
import { ref, reactive, computed } from 'vue';
import CustomerServiceModal from '@/components/customer-service-modal.vue';
import { updateEnterpriseName } from '@/api/all';
import { useEnterpriseStore } from '@/stores/modules/enterprise';
const store = useEnterpriseStore();
const form = reactive({
name: '',
});
const enterpriseInfo = reactive({
name: '123321',
update_name_quota: 2,
used_update_name_count: 1,
});
const enterpriseInfo = store.getEnterpriseInfo();
const columns = [
{
@ -85,6 +83,8 @@ async function handleOk() {
return;
}
await updateEnterpriseName({ name: form.name });
store.setEnterpriseName(form.name);
store.incUsedUpdateNameCount();
AMessage.success('修改成功!');
}
</script>