Browse Source
Merge pull request #1196 from colinin/fix-tenant-cookie
Fix(vben5): tenant cookie
pull/1211/head
yx lin
11 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
11 additions and
5 deletions
-
apps/vben5/packages/@abp/account/src/components/MySetting.vue
-
apps/vben5/packages/@abp/saas/package.json
-
apps/vben5/packages/@abp/saas/src/components/tenants/TenantSelectModal.vue
|
|
|
@ -103,11 +103,13 @@ const [ChangePhoneNumberModal, changePhoneNumberModalApi] = useVbenModal({ |
|
|
|
}); |
|
|
|
function onEmailConfirm() { |
|
|
|
if (query?.confirmToken) { |
|
|
|
emailConfirmModalApi.setData({ |
|
|
|
email: myProfile.value.email, |
|
|
|
...query, |
|
|
|
}); |
|
|
|
emailConfirmModalApi.open(); |
|
|
|
setTimeout(() => { |
|
|
|
emailConfirmModalApi.setData({ |
|
|
|
email: myProfile.value.email, |
|
|
|
...query, |
|
|
|
}); |
|
|
|
emailConfirmModalApi.open(); |
|
|
|
}, 300); |
|
|
|
} |
|
|
|
} |
|
|
|
async function onGetProfile() { |
|
|
|
|
|
|
|
@ -34,6 +34,7 @@ |
|
|
|
"ant-design-vue": "catalog:", |
|
|
|
"dayjs": "catalog:", |
|
|
|
"lodash.debounce": "catalog:", |
|
|
|
"universal-cookie": "catalog:", |
|
|
|
"vue": "catalog:*", |
|
|
|
"vxe-table": "catalog:" |
|
|
|
}, |
|
|
|
|
|
|
|
@ -5,6 +5,7 @@ import { useVbenForm, useVbenModal } from '@vben/common-ui'; |
|
|
|
import { $t } from '@vben/locales'; |
|
|
|
|
|
|
|
import { message } from 'ant-design-vue'; |
|
|
|
import Cookies from 'universal-cookie'; |
|
|
|
|
|
|
|
import { useMultiTenancyApi } from '../../api/useMultiTenancyApi'; |
|
|
|
|
|
|
|
@ -19,6 +20,7 @@ const emits = defineEmits<{ |
|
|
|
|
|
|
|
const tenant = ref<Tenant>(); |
|
|
|
const { findTenantByNameApi } = useMultiTenancyApi(); |
|
|
|
const cookies = new Cookies(null, { path: '/' }); |
|
|
|
|
|
|
|
const [Form, formApi] = useVbenForm({ |
|
|
|
handleSubmit: onSubmit, |
|
|
|
@ -53,6 +55,7 @@ async function onSubmit(values: Record<string, any>) { |
|
|
|
modalApi.setState({ submitting: true }); |
|
|
|
try { |
|
|
|
tenant.value = undefined; |
|
|
|
cookies.remove('__tenant'); |
|
|
|
if (values.name) { |
|
|
|
const result = await findTenantByNameApi(values.name); |
|
|
|
if (!result.success) { |
|
|
|
|