perf: 禁用企业
This commit is contained in:
@ -101,7 +101,11 @@
|
|||||||
v-for="(account, index) in accounts"
|
v-for="(account, index) in accounts"
|
||||||
:key="index"
|
:key="index"
|
||||||
class="account-item"
|
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)"
|
@click="selectAccount(account, index)"
|
||||||
>
|
>
|
||||||
<a-list-item-meta>
|
<a-list-item-meta>
|
||||||
@ -202,6 +206,10 @@ const disabledSubmitBtn = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const selectAccount = (account: any, index: any) => {
|
const selectAccount = (account: any, index: any) => {
|
||||||
|
if (account.status === 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
enterpriseStore.setEnterpriseInfo(account);
|
enterpriseStore.setEnterpriseInfo(account);
|
||||||
selectedAccountIndex.value = index;
|
selectedAccountIndex.value = index;
|
||||||
};
|
};
|
||||||
@ -264,11 +272,12 @@ const handleVerificationSubmit = async () => {
|
|||||||
const getProfileInfo = async () => {
|
const getProfileInfo = async () => {
|
||||||
const { code, data } = await fetchProfileInfo();
|
const { code, data } = await fetchProfileInfo();
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
enterpriseStore.setEnterpriseInfo(data);
|
|
||||||
userStore.setUserInfo(data);
|
|
||||||
let enterprises = data['enterprises'];
|
let enterprises = data['enterprises'];
|
||||||
mobileNumber.value = data['mobile'];
|
mobileNumber.value = data['mobile'];
|
||||||
accounts.value = enterprises;
|
accounts.value = enterprises;
|
||||||
|
|
||||||
|
enterpriseStore.setEnterpriseInfo(data);
|
||||||
|
userStore.setUserInfo(data);
|
||||||
if (enterprises.length > 0) {
|
if (enterprises.length > 0) {
|
||||||
if (enterprises.length === 1) {
|
if (enterprises.length === 1) {
|
||||||
await enterpriseStore.updateEnterpriseInfo();
|
await enterpriseStore.updateEnterpriseInfo();
|
||||||
|
|||||||
Reference in New Issue
Block a user