diff --git a/.workbuddy/expert-history.json b/.workbuddy/expert-history.json index 9ffe22a..11c6b63 100644 --- a/.workbuddy/expert-history.json +++ b/.workbuddy/expert-history.json @@ -24,5 +24,5 @@ } ] }, - "lastUpdated": 1775908690098 + "lastUpdated": 1775909408190 } \ No newline at end of file diff --git a/src/passport/invite/index.tsx b/src/passport/invite/index.tsx index e862a80..d4eaaba 100644 --- a/src/passport/invite/index.tsx +++ b/src/passport/invite/index.tsx @@ -141,6 +141,10 @@ const InvitePage: React.FC = () => { try { setAuthLoading(true); + console.log('开始接受邀请, token:', token); + console.log('请求URL:', `${INVITE_API_URL}/api/_app/developer/invite/accept`); + console.log('请求参数:', { token, code: phoneCode ? '***' : null }); + const res = await Taro.request({ url: `${INVITE_API_URL}/api/_app/developer/invite/accept`, method: 'POST', @@ -156,6 +160,9 @@ const InvitePage: React.FC = () => { } }); + console.log('接受邀请接口响应:', res); + console.log('响应数据:', res.data); + if (res.data.code === 200 || res.data.code === 0) { Taro.showToast({ title: '加入成功', icon: 'success', duration: 1500 }); setTimeout(() => { @@ -163,9 +170,11 @@ const InvitePage: React.FC = () => { Taro.switchTab({ url: '/pages/index/index' }); }, 1500); } else { + console.error('接受邀请失败:', res.data.message, 'code:', res.data.code); Taro.showToast({ title: res.data.message || '加入失败', icon: 'none' }); } } catch (err: any) { + console.error('接受邀请异常:', err); Taro.showToast({ title: err.message || '加入失败', icon: 'error' }); } finally { setAuthLoading(false);