From ec382995b46570fc8ea102081ef1aee399198938 Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Sat, 31 Jan 2026 17:39:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=B9=E8=AF=9D=E4=B8=AD=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=BC=96=E8=BE=91=E4=B8=8E=E9=87=8D=E6=96=B0=E7=94=9F?= =?UTF-8?q?=E6=88=90=E4=B8=8E=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Ai.Vue3/src/api/chat/index.ts | 16 +- Yi.Ai.Vue3/src/api/chat/types.ts | 4 +- .../src/components/ProductPackage/index.vue | 4 +- .../components/CardFlipActivity.vue | 135 ++- Yi.Ai.Vue3/src/config/constants.ts | 2 +- .../pages/chat/layouts/chatWithId/index.vue | 863 ++++++++++++++++-- Yi.Ai.Vue3/src/pages/modelLibrary/index.vue | 5 +- Yi.Ai.Vue3/src/stores/modules/chat.ts | 14 +- Yi.Ai.Vue3/types/components.d.ts | 2 + 9 files changed, 943 insertions(+), 102 deletions(-) diff --git a/Yi.Ai.Vue3/src/api/chat/index.ts b/Yi.Ai.Vue3/src/api/chat/index.ts index aa9cdbba..ca793d68 100644 --- a/Yi.Ai.Vue3/src/api/chat/index.ts +++ b/Yi.Ai.Vue3/src/api/chat/index.ts @@ -1,5 +1,19 @@ import type { ChatMessageVo, GetChatListParams, SendDTO } from './types'; -import { get, post } from '@/utils/request'; +import { del, get, post } from '@/utils/request'; + +// 删除消息接口 +export interface DeleteMessageParams { + ids: (number | string)[]; + isDeleteSubsequent?: boolean; +} + +export function deleteMessages(data: DeleteMessageParams) { + const idsQuery = data.ids.map(id => `ids=${encodeURIComponent(id)}`).join('&'); + const subsequentQuery = data.isDeleteSubsequent !== undefined ? `isDeleteSubsequent=${data.isDeleteSubsequent}` : ''; + const query = [idsQuery, subsequentQuery].filter(Boolean).join('&'); + const url = `/message${query ? `?${query}` : ''}`; + return del(url).json(); +} // 发送消息(旧接口) export function send(data: SendDTO) { diff --git a/Yi.Ai.Vue3/src/api/chat/types.ts b/Yi.Ai.Vue3/src/api/chat/types.ts index d94d1ae4..3afcd16a 100644 --- a/Yi.Ai.Vue3/src/api/chat/types.ts +++ b/Yi.Ai.Vue3/src/api/chat/types.ts @@ -125,7 +125,7 @@ export interface GetChatListParams { /** * 主键 */ - id?: number; + id?: number | string; /** * 排序的方向desc或者asc */ @@ -195,7 +195,7 @@ export interface ChatMessageVo { /** * 主键 */ - id?: number; + id?: number | string; /** * 模型名称 */ diff --git a/Yi.Ai.Vue3/src/components/ProductPackage/index.vue b/Yi.Ai.Vue3/src/components/ProductPackage/index.vue index 20ef964f..7dc5d663 100644 --- a/Yi.Ai.Vue3/src/components/ProductPackage/index.vue +++ b/Yi.Ai.Vue3/src/components/ProductPackage/index.vue @@ -6,8 +6,8 @@ import { createOrder, getOrderStatus } from '@/api'; import { getGoodsList, GoodsCategoryType } from '@/api/pay'; import ProductPage from '@/pages/products/index.vue'; import { useUserStore } from '@/stores'; -import NewbieGuide from './NewbieGuide.vue'; import ActivationGuide from './ActivationGuide.vue'; +import NewbieGuide from './NewbieGuide.vue'; import PackageTab from './PackageTab.vue'; const emit = defineEmits(['close']); @@ -171,7 +171,7 @@ const benefitsData2 = { qy: [ { name: '需先成为意心会员后方可购买使用', value: '' }, { name: '意心会员过期后,尊享Token包会临时冻结', value: '' }, - { name: '可重复购买,将自动累积Token,在个人中心查看', value: '' }, + { name: '尊享Token = 实际消耗Token * 当前模型倍率,模型倍率可前往【模型库】查看', value: '' }, { name: 'Token长期有效,无限流限制', value: '' }, { name: '几乎是全网最低价,让人人用的起Agent', value: '' }, { name: '附带claude code独家教程,手把手对接', value: '' }, diff --git a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/CardFlipActivity.vue b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/CardFlipActivity.vue index 14e47109..b360aa19 100644 --- a/Yi.Ai.Vue3/src/components/userPersonalCenter/components/CardFlipActivity.vue +++ b/Yi.Ai.Vue3/src/components/userPersonalCenter/components/CardFlipActivity.vue @@ -1,4 +1,4 @@ -