deploy: auto commit repo-root changes 2026-07-05 12:33:57
This commit is contained in:
+22
-11
@@ -1,31 +1,41 @@
|
||||
import request from '@/utils/request'
|
||||
import { AI_REQUEST_CONFIG, withAiRequestTimeout } from './aiRequest'
|
||||
|
||||
export type AiAnalysisType =
|
||||
| 'match'
|
||||
| 'match_full'
|
||||
| 'article'
|
||||
| 'post'
|
||||
| 'lottery'
|
||||
| 'lottery_module'
|
||||
| 'credibility'
|
||||
|
||||
export function requestAiAnalysis(data: Record<string, any> & { type: AiAnalysisType }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/ai/analyze', data }),
|
||||
{ ...AI_REQUEST_CONFIG, isAuth: true }
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 赛事AI预测(完整)
|
||||
*/
|
||||
export function getMatchPredict(data: { match_id: number }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/ai/matchPredict', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
return requestAiAnalysis({ type: 'match_full', ...data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 赛事AI预测 - 分段请求
|
||||
*/
|
||||
export function getMatchPredictSection(data: { match_id: number; section: string }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/ai/matchPredictSection', data }), AI_REQUEST_CONFIG)
|
||||
return requestAiAnalysis({ type: 'match', ...data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 资讯AI分析
|
||||
*/
|
||||
export function getArticleAnalysis(data: { article_id: number }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/ai/articleAnalysis', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
return requestAiAnalysis({ type: 'article', ...data })
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,12 +49,13 @@ export function checkAiUnlock(data: { match_id: number }) {
|
||||
* @description 用户可信度分析
|
||||
*/
|
||||
export function getUserCredibility(data: { user_id: number }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/ai/userCredibility', data }), AI_REQUEST_CONFIG)
|
||||
return requestAiAnalysis({ type: 'credibility', ...data })
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 彩票概率分析
|
||||
*/
|
||||
export function getLotteryAnalysis(data: { type: string }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/ai/lotteryAnalysis', data }), AI_REQUEST_CONFIG)
|
||||
const { type, ...rest } = data
|
||||
return requestAiAnalysis({ type: 'lottery', code: type, ...rest })
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
import { AI_REQUEST_CONFIG, withAiRequestTimeout } from './aiRequest'
|
||||
import { requestAiAnalysis } from './ai'
|
||||
|
||||
// 帖子列表
|
||||
export function getCommunityPosts(data?: Record<string, any>) {
|
||||
@@ -68,7 +69,7 @@ export function translatePost(data: { post_id: number; confirm?: number }) {
|
||||
|
||||
// 帖子AI分析
|
||||
export function getCommunityPostAiAnalysis(data: { post_id: number; force?: number }) {
|
||||
return request.get(withAiRequestTimeout({ url: '/community/aiAnalysis', data }), AI_REQUEST_CONFIG)
|
||||
return requestAiAnalysis({ type: 'post', ...data })
|
||||
}
|
||||
|
||||
// 帖子AI分析结果轮询,只查缓存,不触发新的模型分析
|
||||
|
||||
+17
-20
@@ -1,5 +1,13 @@
|
||||
import request from '@/utils/request'
|
||||
import { AI_REQUEST_CONFIG, withAiRequestTimeout } from './aiRequest'
|
||||
import { requestAiAnalysis } from './ai'
|
||||
|
||||
const normalizeLotteryModuleResult = (res: any) => ({
|
||||
...(res?.data || {}),
|
||||
remain_count: res?.remain_count,
|
||||
unlocked: res?.unlocked,
|
||||
charged: res?.charged
|
||||
})
|
||||
|
||||
/**
|
||||
* @description 开奖列表
|
||||
@@ -51,10 +59,7 @@ export function getDrawResultList(data: { code: string; page_no?: number; page_s
|
||||
* @description AI预测分析
|
||||
*/
|
||||
export function getLotteryAiPredict(data: { category_id?: number; code?: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiPredict', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
return requestAiAnalysis({ type: 'lottery', ...data })
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,40 +73,32 @@ export function getLotteryAiHistory(data: { code: string }) {
|
||||
* @description AI分析 - 热冷号
|
||||
*/
|
||||
export function getLotteryAiHotCold(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiHotCold', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
return requestAiAnalysis({ type: 'lottery_module', module: 'hot_cold', ...data })
|
||||
.then(normalizeLotteryModuleResult)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 趋势+推荐组合
|
||||
*/
|
||||
export function getLotteryAiTrend(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiTrend', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
return requestAiAnalysis({ type: 'lottery_module', module: 'trend', ...data })
|
||||
.then(normalizeLotteryModuleResult)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 统计数据
|
||||
*/
|
||||
export function getLotteryAiStats(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiStats', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
return requestAiAnalysis({ type: 'lottery_module', module: 'stats', ...data })
|
||||
.then(normalizeLotteryModuleResult)
|
||||
}
|
||||
|
||||
/**
|
||||
* @description AI分析 - 波色+生肖(六合彩专属)
|
||||
*/
|
||||
export function getLotteryAiColorZodiac(data: { code: string }) {
|
||||
return request.get(
|
||||
withAiRequestTimeout({ url: '/lottery/aiColorZodiac', data }),
|
||||
{ ...AI_REQUEST_CONFIG, withToken: false }
|
||||
)
|
||||
return requestAiAnalysis({ type: 'lottery_module', module: 'color_zodiac', ...data })
|
||||
.then(normalizeLotteryModuleResult)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user