mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 12:57:11 +08:00
refactor: 优化 useTenantStore 使用
This commit is contained in:
@@ -6,6 +6,7 @@ export * from './modules/route'
|
||||
export * from './modules/tabs'
|
||||
export * from './modules/dict'
|
||||
export * from './modules/user'
|
||||
export * from './modules/tenant'
|
||||
|
||||
const pinia = createPinia()
|
||||
pinia.use(piniaPluginPersistedstate)
|
||||
|
@@ -44,11 +44,8 @@
|
||||
import { type FormInstance, Message } from '@arco-design/web-vue'
|
||||
import { useStorage } from '@vueuse/core'
|
||||
import { getImageCaptcha } from '@/apis/common'
|
||||
import { useTabsStore, useUserStore } from '@/stores'
|
||||
import { useTabsStore, useTenantStore, useUserStore } from '@/stores'
|
||||
import { encryptByRsa } from '@/utils/encrypt'
|
||||
import { useTenantStore } from '@/stores/modules/tenant'
|
||||
|
||||
const tenantStore = useTenantStore()
|
||||
|
||||
const loginConfig = useStorage('login-config', {
|
||||
rememberMe: true,
|
||||
@@ -61,7 +58,6 @@ const loginConfig = useStorage('login-config', {
|
||||
const isCaptchaEnabled = ref(true)
|
||||
// 验证码图片
|
||||
const captchaImgBase64 = ref()
|
||||
// 租户编号
|
||||
const tenantCode = ref()
|
||||
const formRef = ref<FormInstance>()
|
||||
const form = reactive({
|
||||
@@ -112,6 +108,7 @@ const getCaptcha = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const tenantStore = useTenantStore()
|
||||
const userStore = useUserStore()
|
||||
const tabsStore = useTabsStore()
|
||||
const router = useRouter()
|
||||
|
@@ -45,11 +45,8 @@
|
||||
import { type FormInstance, Message } from '@arco-design/web-vue'
|
||||
import type { BehaviorCaptchaReq } from '@/apis'
|
||||
// import { type BehaviorCaptchaReq, getEmailCaptcha } from '@/apis'
|
||||
import { useTabsStore, useUserStore } from '@/stores'
|
||||
import { useTabsStore, useTenantStore, useUserStore } from '@/stores'
|
||||
import * as Regexp from '@/utils/regexp'
|
||||
import { useTenantStore } from '@/stores/modules/tenant'
|
||||
|
||||
const tenantStore = useTenantStore()
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const form = reactive({
|
||||
@@ -66,6 +63,7 @@ const rules: FormInstance['rules'] = {
|
||||
captcha: [{ required: true, message: '请输入验证码' }],
|
||||
}
|
||||
|
||||
const tenantStore = useTenantStore()
|
||||
const userStore = useUserStore()
|
||||
const tabsStore = useTabsStore()
|
||||
const router = useRouter()
|
||||
|
@@ -45,11 +45,8 @@
|
||||
import { type FormInstance, Message } from '@arco-design/web-vue'
|
||||
// import type { BehaviorCaptchaReq } from '@/apis'
|
||||
import { type BehaviorCaptchaReq, getSmsCaptcha } from '@/apis'
|
||||
import { useTabsStore, useUserStore } from '@/stores'
|
||||
import { useTabsStore, useTenantStore, useUserStore } from '@/stores'
|
||||
import * as Regexp from '@/utils/regexp'
|
||||
import { useTenantStore } from '@/stores/modules/tenant'
|
||||
|
||||
const tenantStore = useTenantStore()
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
const form = reactive({
|
||||
@@ -66,6 +63,7 @@ const rules: FormInstance['rules'] = {
|
||||
captcha: [{ required: true, message: '请输入验证码' }],
|
||||
}
|
||||
|
||||
const tenantStore = useTenantStore()
|
||||
const userStore = useUserStore()
|
||||
const tabsStore = useTabsStore()
|
||||
const router = useRouter()
|
||||
|
Reference in New Issue
Block a user