后端显示门店账单
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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}`);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user