feat: support mini program phone authorization binding
This commit is contained in:
@@ -55,18 +55,24 @@ console.log('\n[wechat-miniprogram-auth-smoke] 通过');
|
||||
|
||||
function checkMiniProgramShell() {
|
||||
const shellPath = join(repoRoot, 'miniprogram', 'pages', 'web-view', 'index.js');
|
||||
const shellTemplatePath = join(repoRoot, 'miniprogram', 'pages', 'web-view', 'index.wxml');
|
||||
const authServiceTestPath = join(repoRoot, 'src', 'services', 'authService.test.ts');
|
||||
|
||||
ensureNeedles(shellPath, [
|
||||
'/api/auth/wechat/miniprogram-login',
|
||||
'/api/auth/wechat/bind-phone',
|
||||
"'x-client-type': MINI_PROGRAM_CLIENT_TYPE",
|
||||
"'x-client-runtime': MINI_PROGRAM_CLIENT_RUNTIME",
|
||||
'auth_provider',
|
||||
'auth_token',
|
||||
'auth_binding_status',
|
||||
'bindingStatus',
|
||||
'pending_bind_phone',
|
||||
'wechatPhoneCode',
|
||||
]);
|
||||
|
||||
ensureNeedles(shellTemplatePath, ['getPhoneNumber', 'bindgetphonenumber']);
|
||||
|
||||
// 中文注释:这里锁定 H5 消费回跳 hash 的真实测试输入,避免只检查实现文本。
|
||||
ensureNeedles(authServiceTestPath, [
|
||||
'#auth_provider=wechat&auth_token=jwt-callback-token&auth_binding_status=pending_bind_phone',
|
||||
|
||||
Reference in New Issue
Block a user