补充
Change-Id: I058b37511bf75593587009fabaebaa7b11ad7aed
diff --git a/Merge/front/src/api/recommend_rhj.js b/Merge/front/src/api/recommend_rhj.js
new file mode 100644
index 0000000..34d9164
--- /dev/null
+++ b/Merge/front/src/api/recommend_rhj.js
@@ -0,0 +1,20 @@
+// RHJ 深度推荐接口
+import { getAuthToken } from '../utils/auth'
+const RHJ_BASE_URL = 'http://10.126.59.25:8082' // 端口已修正
+
+export async function deepRecommend(userId, topk = 10) {
+ const token = getAuthToken()
+ const headers = {
+ 'Content-Type': 'application/json',
+ ...(token ? { 'Authorization': `Bearer ${token}` } : {})
+ }
+ const res = await fetch(`${RHJ_BASE_URL}/recommend`, {
+ method: 'POST',
+ headers,
+ body: JSON.stringify({ user_id: userId, topk })
+ })
+ if (!res.ok) throw new Error('深度推荐接口调用失败')
+ const data = await res.json()
+ // 兼容接口返回格式
+ return data.data?.recommendations || []
+}