开店需要验证手机号

This commit is contained in:
2026-07-12 17:51:20 +08:00
parent b550ee2255
commit 908a5dcf0f
7 changed files with 235 additions and 9 deletions
@@ -84,6 +84,7 @@ export class AuthService {
return ClientApp.HQ_WEB;
case SmsScene.PARTNER_LOGIN:
case SmsScene.PARTNER_STAFF_ADD:
case SmsScene.PARTNER_STORE_OPEN:
return ClientApp.PARTNER_H5;
case SmsScene.HQ_LOGIN:
return ClientApp.HQ_WEB;
@@ -119,6 +120,13 @@ export class AuthService {
});
return account ? { refType: 'STORE', refId: account.id } : undefined;
}
case SmsScene.PARTNER_STORE_OPEN: {
const account = await this.prisma.storeAccount.findUnique({
where: { phone },
select: { id: true },
});
return account ? { refType: 'STORE', refId: account.id } : undefined;
}
case SmsScene.PARTNER_LOGIN:
case SmsScene.PARTNER_STAFF_ADD: {
const account = await this.prisma.partnerAccount.findUnique({
@@ -292,6 +300,9 @@ export class AuthService {
if (scene === SmsScene.PARTNER_PROXY_ORDER) {
return;
}
if (scene === SmsScene.PARTNER_STORE_OPEN) {
return;
}
}
async verifySmsCode(phone: string, code: string, scene: SmsScene) {