fix(config): 修正环境配置中的API_BASE_URL地址

- 将开发环境、生产环境和测试环境的API_BASE_URL统一更新为新的域名websopy-api.websoft.top
- 更新SimpleQRCodeModal组件中二维码请求地址,使用新的API域名
- 在邀请信息请求函数fetchInviteInfo中添加详细的请求和响应日志
- 增加接口错误日志打印,提高捕获异常时的信息丰富度
This commit is contained in:
2026-04-11 19:03:45 +08:00
parent 699ff9c01e
commit b6105d65e9
3 changed files with 13 additions and 5 deletions

View File

@@ -75,6 +75,10 @@ const InvitePage: React.FC = () => {
*/
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);