diff --git a/config/env.ts b/config/env.ts index f230b12..763962d 100644 --- a/config/env.ts +++ b/config/env.ts @@ -3,19 +3,19 @@ export const ENV_CONFIG = { // 开发环境 development: { // API_BASE_URL: 'http://127.0.0.1:9200/api', - API_BASE_URL: 'https://mp-api.websoft.top/api', + API_BASE_URL: 'https://websopy-api.websoft.top/api', APP_NAME: '开发环境', DEBUG: 'true', }, // 生产环境 production: { - API_BASE_URL: 'https://mp-api.websoft.top/api', + API_BASE_URL: 'https://websopy-api.websoft.top/api', APP_NAME: '网宿软件', DEBUG: 'false', }, // 测试环境 test: { - API_BASE_URL: 'https://mp-api.websoft.top/api', + API_BASE_URL: 'https://websopy-api.websoft.top/api', APP_NAME: '测试环境', DEBUG: 'true', } diff --git a/src/components/SimpleQRCodeModal.tsx b/src/components/SimpleQRCodeModal.tsx index 1acde23..84cb288 100644 --- a/src/components/SimpleQRCodeModal.tsx +++ b/src/components/SimpleQRCodeModal.tsx @@ -81,7 +81,7 @@ const SimpleQRCodeModal: React.FC = ({ {qrContent ? ( 二维码 { */ const fetchInviteInfo = async (inviteToken: string) => { try { + console.log('开始获取邀请信息, token:', inviteToken); + console.log('请求URL:', `${SERVER_API_URL}/api/_app/developer/invite/info?token=${encodeURIComponent(inviteToken)}`); + console.log('请求头:', { 'content-type': 'application/json', TenantId }); + const res = await Taro.request({ url: `${SERVER_API_URL}/api/_app/developer/invite/info?token=${encodeURIComponent(inviteToken)}`, method: 'GET', @@ -84,13 +88,17 @@ const InvitePage: React.FC = () => { } }); + console.log('邀请信息接口响应:', res); + console.log('响应数据:', res.data); + if (res.data.code === 200 || res.data.code === 0) { setInviteInfo(res.data.data); } else { + console.error('接口返回错误:', res.data.message, 'code:', res.data.code); setError(res.data.message || '邀请信息获取失败'); } } catch (err: any) { - console.error('获取邀请信息失败:', err); + console.error('获取邀请信息异常:', err); setError(err.message || '网络请求失败'); } finally { setLoading(false);