后端显示门店账单

This commit is contained in:
2026-07-07 00:04:07 +08:00
parent 7ca9fc8a35
commit 1fcafac2a7
12 changed files with 233 additions and 126 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ async function main() {
console.log('5. Shop login + redeem preview');
const shopLogin = await loginSms(
'SHOP_H5',
'13900000001',
'13910000001',
'STORE_LOGIN',
'/shop/auth/login/sms',
'/shop/auth/sms/send',
+1 -1
View File
@@ -133,7 +133,7 @@ async function main() {
console.log('8. Shop confirm redeem');
const shopLogin = await loginSms(
'SHOP_H5',
'13900000001',
'13910000001',
'STORE_LOGIN',
'/shop/auth/login/sms',
'/shop/auth/sms/send',
+4 -4
View File
@@ -40,17 +40,17 @@ async function main() {
console.log('2. STORE_LOGIN bound phone');
await req('SHOP_H5', '/shop/auth/sms/send', {
method: 'POST',
body: JSON.stringify({ phone: '13900000001', scene: 'STORE_LOGIN' }),
body: JSON.stringify({ phone: '13910000001', scene: 'STORE_LOGIN' }),
});
const login = await req('SHOP_H5', '/shop/auth/login/sms', {
method: 'POST',
body: JSON.stringify({ phone: '13900000001', code: MOCK_SMS_CODE }),
body: JSON.stringify({ phone: '13910000001', code: MOCK_SMS_CODE }),
});
if (!login.accessToken || !login.refreshToken) throw new Error('login missing tokens');
console.log('3. Shop session me + refresh');
const me = await req('SHOP_H5', '/shop/auth/me', { token: login.accessToken });
if (me.phone !== '13900000001') throw new Error('me phone mismatch');
if (me.phone !== '13910000001') throw new Error('me phone mismatch');
const refreshed = await req('SHOP_H5', '/shop/auth/token/refresh', {
method: 'POST',
body: JSON.stringify({ refreshToken: login.refreshToken }),
@@ -69,7 +69,7 @@ async function main() {
const occupied = await expectFail('HQ_WEB', '/admin/stores/phone/sms/send', {
method: 'POST',
token: admin.accessToken,
body: JSON.stringify({ phone: '13900000001' }),
body: JSON.stringify({ phone: '13910000001' }),
});
if (!occupied.includes('已绑定')) throw new Error(`unexpected: ${occupied}`);