deploy: auto commit repo-root changes 2026-07-05 12:33:57

This commit is contained in:
hajimi
2026-07-05 12:33:57 +08:00
parent 1954948445
commit f641276b9d
123 changed files with 1182 additions and 572 deletions
+14 -2
View File
@@ -558,6 +558,11 @@ const isVipUser = computed(() => !!vipInfo.value.is_vip)
const vipLevelName = computed(() => vipInfo.value.vip_level_name || '会员')
const vipExpireDate = computed(() => vipInfo.value.vip_expire_time || '')
const freeRemain = ref(getAiFreeRemain(vipInfo.value))
const syncAiRemain = (res: any) => {
if (res?.remain_count !== undefined) {
freeRemain.value = Number(res.remain_count)
}
}
const predictionData = ref<any>(null)
const factorsData = ref<any>(null)
@@ -761,10 +766,13 @@ const waitForPostAnalysisResult = async (postId: number) => {
currentLoadingText.value = '正在重新查询分析结果...'
try {
const fallbackRes = await getCommunityPostAiAnalysis({ post_id: postId })
syncAiRemain(fallbackRes)
let packet = extractPostAnalysisPacket(fallbackRes)
if (shouldRefreshPostAnalysisCache(packet)) {
currentLoadingText.value = '正在刷新图片分析结果...'
packet = extractPostAnalysisPacket(await getCommunityPostAiAnalysis({ post_id: postId, force: 1 }))
const forceRes = await getCommunityPostAiAnalysis({ post_id: postId, force: 1 })
syncAiRemain(forceRes)
packet = extractPostAnalysisPacket(forceRes)
}
if (packet.analysis) {
analysisData.value = packet.analysis
@@ -861,6 +869,7 @@ const fetchArticleAnalysis = async (articleId: number) => {
startAnalysisTimer()
try {
const res = await getArticleAnalysis({ article_id: articleId })
syncAiRemain(res)
analysisData.value = res.analysis
} catch (e: any) {
errorMsg.value = getAnalysisErrorMessage(e)
@@ -895,10 +904,13 @@ const fetchPostAnalysis = async (postId: number) => {
startAnalysisTimer()
try {
const res = await getCommunityPostAiAnalysis({ post_id: postId })
syncAiRemain(res)
let packet = extractPostAnalysisPacket(res)
if (shouldRefreshPostAnalysisCache(packet)) {
currentLoadingText.value = '正在刷新图片分析结果...'
packet = extractPostAnalysisPacket(await getCommunityPostAiAnalysis({ post_id: postId, force: 1 }))
const forceRes = await getCommunityPostAiAnalysis({ post_id: postId, force: 1 })
syncAiRemain(forceRes)
packet = extractPostAnalysisPacket(forceRes)
}
if (!packet.analysis) {
throw { message: 'AI分析结果为空,请稍后重试', statusCode: 502 }
@@ -437,7 +437,13 @@ const vipInfo = computed(() => userStore.userInfo?.vip_info || {})
const isVipUser = computed(() => !!vipInfo.value.is_vip)
const vipLevelName = computed(() => vipInfo.value.vip_level_name || '会员')
const vipExpireDate = computed(() => vipInfo.value.vip_expire_time || '')
const freeRemain = computed(() => getAiFreeRemain(vipInfo.value))
const aiRemainOverride = ref<number | null>(null)
const freeRemain = computed(() => aiRemainOverride.value ?? getAiFreeRemain(vipInfo.value))
const syncAiRemain = (res: any) => {
if (res?.remain_count !== undefined) {
aiRemainOverride.value = Number(res.remain_count)
}
}
const showAiPopup = ref(false)
const aiLoading = ref(false)
@@ -473,6 +479,7 @@ const fetchAiPredict = async () => {
if (aiGameCode.value) params.code = aiGameCode.value
if (aiCategoryId.value) params.category_id = aiCategoryId.value
const data = await getLotteryAiPredict(params)
syncAiRemain(data)
aiData.value = data
} catch (e: any) {
aiError.value = e?.msg || 'AI分析失败,请稍后重试'
@@ -1000,6 +1000,9 @@ const loadInlineAi = async (matchId: number) => {
try {
const res = await getMatchPredictSection({ match_id: matchId, section: s })
aiInline.value[s] = res.data || {}
if (res.remain_count !== undefined) {
freeRemain.value = Number(res.remain_count)
}
} catch (e) {
// section
}