feat(web): change interest distribution api
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 14:00:06
|
* @Date: 2026-02-03 14:00:06
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-02-03 14:00:06
|
* @Last Modified time: 2026-03-04 10:58:41
|
||||||
*/
|
*/
|
||||||
import { request } from '@/utils/request'
|
import { request } from '@/utils/request'
|
||||||
import type {
|
import type {
|
||||||
@@ -98,8 +98,8 @@ export const getMemorySearchEdges = (end_user_id: string) => {
|
|||||||
return request.get(`/memory-storage/analytics/graph_data`, { end_user_id })
|
return request.get(`/memory-storage/analytics/graph_data`, { end_user_id })
|
||||||
}
|
}
|
||||||
// User Memory - User interest distribution
|
// User Memory - User interest distribution
|
||||||
export const getHotMemoryTagsByUser = (end_user_id: string) => {
|
export const getInterestDistributionByUser = (end_user_id: string) => {
|
||||||
return request.get(`/memory/analytics/hot_memory_tags/by_user`, { end_user_id })
|
return request.get(`/memory/analytics/interest_distribution/by_user`, { end_user_id })
|
||||||
}
|
}
|
||||||
// User Memory - Total memory count
|
// User Memory - Total memory count
|
||||||
export const getTotalMemoryCountByUser = (end_user_id: string) => {
|
export const getTotalMemoryCountByUser = (end_user_id: string) => {
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { useParams } from 'react-router-dom'
|
|||||||
import ReactEcharts from 'echarts-for-react';
|
import ReactEcharts from 'echarts-for-react';
|
||||||
import { Space } from 'antd'
|
import { Space } from 'antd'
|
||||||
|
|
||||||
import { getHotMemoryTagsByUser } from '@/api/memory';
|
import { getInterestDistributionByUser } from '@/api/memory';
|
||||||
import Empty from '@/components/Empty';
|
import Empty from '@/components/Empty';
|
||||||
import Loading from '@/components/Empty/Loading';
|
import Loading from '@/components/Empty/Loading';
|
||||||
import RbCard from '@/components/RbCard/Card';
|
import RbCard from '@/components/RbCard/Card';
|
||||||
@@ -38,7 +38,7 @@ const InterestDistribution: FC = () => {
|
|||||||
/** Fetch interest distribution data */
|
/** Fetch interest distribution data */
|
||||||
const getData = () => {
|
const getData = () => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
getHotMemoryTagsByUser(id as string).then(res => {
|
getInterestDistributionByUser(id as string).then(res => {
|
||||||
const response = res as { name: string; frequency: number }[]
|
const response = res as { name: string; frequency: number }[]
|
||||||
setData(response.map(item => ({
|
setData(response.map(item => ({
|
||||||
...item,
|
...item,
|
||||||
|
|||||||
Reference in New Issue
Block a user