perf: 禁用企业

This commit is contained in:
renxiaodong
2025-06-23 06:02:47 -04:00
parent 82dfa3faeb
commit 55198613a8

View File

@ -101,7 +101,11 @@
v-for="(account, index) in accounts"
:key="index"
class="account-item"
:class="{ selected: selectedAccountIndex === index }"
:class="{
selected: selectedAccountIndex === index,
'cursor-no-drop': account.status === 0,
'cursor-pointer': account.status !== 0,
}"
@click="selectAccount(account, index)"
>
<a-list-item-meta>
@ -202,6 +206,10 @@ const disabledSubmitBtn = computed(() => {
});
const selectAccount = (account: any, index: any) => {
if (account.status === 0) {
return;
}
enterpriseStore.setEnterpriseInfo(account);
selectedAccountIndex.value = index;
};
@ -264,11 +272,12 @@ const handleVerificationSubmit = async () => {
const getProfileInfo = async () => {
const { code, data } = await fetchProfileInfo();
if (code === 200) {
enterpriseStore.setEnterpriseInfo(data);
userStore.setUserInfo(data);
let enterprises = data['enterprises'];
mobileNumber.value = data['mobile'];
accounts.value = enterprises;
enterpriseStore.setEnterpriseInfo(data);
userStore.setUserInfo(data);
if (enterprises.length > 0) {
if (enterprises.length === 1) {
await enterpriseStore.updateEnterpriseInfo();