调整登录组织校验和图形验证码交互

This commit is contained in:
andy
2026-07-01 11:33:26 +08:00
parent 4919a311c3
commit 9e67339d3c
4 changed files with 76 additions and 15 deletions

View File

@@ -1,7 +1,7 @@
import { computed, ref } from 'vue'
import { defineStore } from 'pinia'
import {
bindUserInfoAndGetUserMemberInfoByPhone,
getBindStaffInfo,
loginByMobile,
type OrganizationMemberInfo
} from '@/api/auth'
@@ -66,7 +66,7 @@ export const useAuthStore = defineStore('auth', () => {
const payload = await loginByMobile(phone, code)
persistToken(payload, phone)
try {
const member = await bindUserInfoAndGetUserMemberInfoByPhone(phone)
const member = await getBindStaffInfo()
if (!member?.organizationId || !member?.memberId) {
throw new Error('未绑定组织,请联系管理员')
}