webadmin去掉新建门店的短信验证

This commit is contained in:
2026-07-07 18:17:45 +08:00
parent 67eed11276
commit 887d728496
6 changed files with 14 additions and 71 deletions
+10 -3
View File
@@ -57,7 +57,7 @@ async function main() {
});
if (!refreshed.accessToken) throw new Error('refresh failed');
console.log('4. STORE_ACCOUNT_OPEN occupied phone');
console.log('4. Admin create store rejects occupied phone');
await req('HQ_WEB', '/admin/auth/sms/send', {
method: 'POST',
body: JSON.stringify({ phone: '13600000001', scene: 'HQ_LOGIN' }),
@@ -66,10 +66,17 @@ async function main() {
method: 'POST',
body: JSON.stringify({ phone: '13600000001', code: MOCK_SMS_CODE }),
});
const occupied = await expectFail('HQ_WEB', '/admin/stores/phone/sms/send', {
const occupied = await expectFail('HQ_WEB', '/admin/stores', {
method: 'POST',
token: admin.accessToken,
body: JSON.stringify({ phone: '13910000001' }),
body: JSON.stringify({
partnerId: '1',
cityId: '1',
name: '重复手机号测试店',
phone: '13910000001',
district: '测试区',
address: '测试地址1号',
}),
});
if (!occupied.includes('已绑定')) throw new Error(`unexpected: ${occupied}`);