fix:添加查询是否注册,页面问题修复
This commit is contained in:
@@ -7,7 +7,7 @@ import { localStg } from '@/utils/storage';
|
||||
import { $t } from '@/locales';
|
||||
import { useRouteStore } from '../route';
|
||||
import { clearAuthStorage, emptyInfo, getToken } from './shared';
|
||||
import {sendCaptcha} from "@/service/api/auth";
|
||||
import {doCheckUserRepeat, sendCaptcha} from "@/service/api/auth";
|
||||
|
||||
export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
const routeStore = useRouteStore();
|
||||
@@ -122,6 +122,16 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//check User
|
||||
|
||||
/**
|
||||
* 检查用户信息是否已存在
|
||||
*/
|
||||
async function checkUserRepeat(checkForm:Api.Auth.CheckBody) {
|
||||
const { data, error } = await doCheckUserRepeat(checkForm);
|
||||
return { exists: data, error };
|
||||
}
|
||||
|
||||
/**
|
||||
* Register new user
|
||||
*/
|
||||
@@ -163,5 +173,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => {
|
||||
refreshUserInfo,
|
||||
register,
|
||||
captcha,
|
||||
checkUserRepeat,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user