From 4d471aa45d7c49e354e2eda39e24f002b9671460 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sat, 11 Apr 2026 20:03:31 +0800 Subject: [PATCH] =?UTF-8?q?fix(invite):=20=E4=BF=AE=E6=AD=A3=E9=82=80?= =?UTF-8?q?=E8=AF=B7=E6=8E=A5=E5=8F=A3=E8=B7=AF=E5=BE=84=E4=BB=A5=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=93=E7=94=A8=E5=89=8D?= =?UTF-8?q?=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将请求邀请信息接口路径改为使用 /api/_app 前缀,确保小程序免登录访问 - 修改接受邀请接口路径,统一使用小程序专用 API 域名和前缀 - 更新邀请相关接口注释,明确小程序专用接口前缀含义 - 在专家历史数据中添加高级开发工程师 Will 的条目并更新时间戳 --- .workbuddy/expert-history.json | 13 ++++++++++++- src/passport/invite/index.tsx | 6 +++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/.workbuddy/expert-history.json b/.workbuddy/expert-history.json index af0c8c5..9ffe22a 100644 --- a/.workbuddy/expert-history.json +++ b/.workbuddy/expert-history.json @@ -11,7 +11,18 @@ "usedAt": 1775908159660, "industryId": "all" } + ], + "751f0e28e31849adb28b750fe4cdcde7": [ + { + "expertId": "SeniorDeveloper", + "name": "Will", + "profession": "高级开发工程师", + "avatarUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/avatars/02-Engineering/SeniorDeveloper/SeniorDeveloper.png", + "promptUrl": "https://acc-1258344699.cos.accelerate.myqcloud.com/workbuddy/experts/experts/02-Engineering/SeniorDeveloper/SeniorDeveloper_zh.md", + "usedAt": 1775908159660, + "industryId": "all" + } ] }, - "lastUpdated": 1775908297489 + "lastUpdated": 1775908690098 } \ No newline at end of file diff --git a/src/passport/invite/index.tsx b/src/passport/invite/index.tsx index cb93228..e862a80 100644 --- a/src/passport/invite/index.tsx +++ b/src/passport/invite/index.tsx @@ -1,9 +1,9 @@ import React, { useState, useEffect } from 'react'; import { View, Text, Button, Image } from '@tarojs/components'; import Taro, { useRouter } from '@tarojs/taro'; -import { SERVER_API_URL } from "@/utils/server"; // 邀请相关接口使用独立的 API 域名 +// 注意:使用 /api/_app 前缀表示小程序专用接口(免登录) const INVITE_API_URL = 'https://websopy-api.websoft.top'; import { TenantId } from "@/config/app"; @@ -83,7 +83,7 @@ const InvitePage: React.FC = () => { console.log('请求头:', { 'content-type': 'application/json', TenantId }); const res = await Taro.request({ - url: `${INVITE_API_URL}/api/developer/invite/info?token=${encodeURIComponent(inviteToken)}`, + url: `${INVITE_API_URL}/api/_app/developer/invite/info?token=${encodeURIComponent(inviteToken)}`, method: 'GET', header: { 'content-type': 'application/json', @@ -142,7 +142,7 @@ const InvitePage: React.FC = () => { setAuthLoading(true); const res = await Taro.request({ - url: `${INVITE_API_URL}/api/developer/invite/accept`, + url: `${INVITE_API_URL}/api/_app/developer/invite/accept`, method: 'POST', data: { token,