From d280cc6d354479fdb6c1eecfb73d1f988a522d68 Mon Sep 17 00:00:00 2001 From: Gsh <15170702455@163.com> Date: Tue, 20 Jan 2026 00:15:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E5=8F=B7=E6=B1=A0?= =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.Ai.Vue3/src/api/channel/index.ts | 8 + Yi.Ai.Vue3/src/api/channel/types.ts | 11 + Yi.Ai.Vue3/src/config/permission.ts | 2 +- .../src/pages/console/channel/index.vue | 320 ++++++++++++++++-- Yi.Ai.Vue3/src/pages/console/index.vue | 4 +- .../src/routers/modules/staticRouter.ts | 2 +- 6 files changed, 316 insertions(+), 31 deletions(-) diff --git a/Yi.Ai.Vue3/src/api/channel/index.ts b/Yi.Ai.Vue3/src/api/channel/index.ts index 154bf6de..ec63849f 100644 --- a/Yi.Ai.Vue3/src/api/channel/index.ts +++ b/Yi.Ai.Vue3/src/api/channel/index.ts @@ -8,6 +8,7 @@ import type { AiModelCreateInput, AiModelUpdateInput, AiModelGetListInput, + AppShortcutDto, PagedResultDto, } from './types'; @@ -103,3 +104,10 @@ export function deleteModel(id: string) { export function clearPremiumModelCache() { return post('/model/clear-premium-cache').json(); } + +// ==================== 快捷渠道 ==================== + +// 获取快捷渠道列表 +export function getAppShortcutList() { + return get('/channel/app-shortcut').json(); +} diff --git a/Yi.Ai.Vue3/src/api/channel/types.ts b/Yi.Ai.Vue3/src/api/channel/types.ts index 96fb710e..b166ffeb 100644 --- a/Yi.Ai.Vue3/src/api/channel/types.ts +++ b/Yi.Ai.Vue3/src/api/channel/types.ts @@ -117,6 +117,17 @@ export interface AiModelGetListInput { maxResultCount?: number; } +// 快捷渠道DTO +export interface AppShortcutDto { + id: string; + name: string; + endpoint: string; + extraUrl?: string; + apiKey: string; + orderNum: number; + creationTime: string; +} + // 分页结果 export interface PagedResultDto { items: T[]; diff --git a/Yi.Ai.Vue3/src/config/permission.ts b/Yi.Ai.Vue3/src/config/permission.ts index 975246fd..e658fe28 100644 --- a/Yi.Ai.Vue3/src/config/permission.ts +++ b/Yi.Ai.Vue3/src/config/permission.ts @@ -23,7 +23,7 @@ export const PAGE_PERMISSIONS: PermissionConfig[] = [ { path: '/console/channel', allowedUsers: ['cc', 'Guo'], - description: '渠道商管理页面 - 仅限cc和Guo用户访问', + description: '号池管理页面 - 仅限cc和Guo用户访问', }, { path: '/console/system-statistics', diff --git a/Yi.Ai.Vue3/src/pages/console/channel/index.vue b/Yi.Ai.Vue3/src/pages/console/channel/index.vue index a09b18e3..1580bd86 100644 --- a/Yi.Ai.Vue3/src/pages/console/channel/index.vue +++ b/Yi.Ai.Vue3/src/pages/console/channel/index.vue @@ -1,32 +1,46 @@ @@ -254,9 +364,26 @@ onMounted(() => {

应用列表

- - 新建 - +
+ + 批量应用号池 ({{ selectedAppIds.length }}) + + + 查看号池列表 + + + 新建 + +
@@ -266,10 +393,16 @@ onMounted(() => { :key="app.id" class="app-item" :class="{ active: selectedAppId === app.id }" - @click="handleSelectApp(app.id)" > -
-
{{ app.name }}
+ +
+
+ {{ app.name }} +
{ - {{ appDetailData.name }} - {{ appDetailData.endpoint }} - {{ appDetailData.extraUrl || '-' }} + + {{ appDetailData.name }} + + + {{ appDetailData.endpoint }} + + + {{ appDetailData.extraUrl || '-' }} + - {{ appDetailData.orderNum }} - {{ appDetailData.creationTime }} + + {{ appDetailData.orderNum }} + + + {{ appDetailData.creationTime }} + - + + + + +
+ {{ shortcut.name }} + {{ shortcut.endpoint }} +
+
+
+
+ 选择号池可自动填入终结点和 API Key +
+
+ @@ -412,8 +580,98 @@ onMounted(() => {
+
+ + + + + + +
+ + {{ appList.find(a => a.id === appId)?.name || appId }} + +
+
+ + + +
+ {{ shortcut.name }} + {{ shortcut.endpoint }} +
+
+
+
+ +
+
名称:{{ shortcutList.find(s => s.id === batchApplyShortcutId)?.name }}
+
终结点:{{ shortcutList.find(s => s.id === batchApplyShortcutId)?.endpoint }}
+
API Key:{{ shortcutList.find(s => s.id === batchApplyShortcutId)?.apiKey?.substring(0, 20) }}***
+
+
+
+ +
+ + + + + + + + + + + + + + + + @@ -470,8 +728,12 @@ onMounted(() => {
@@ -540,6 +802,9 @@ onMounted(() => { border-radius: 6px; cursor: pointer; transition: all 0.3s; + display: flex; + align-items: center; + gap: 10px; &:hover { border-color: #409eff; @@ -552,6 +817,7 @@ onMounted(() => { } .app-item-content { + flex: 1; .app-name { font-size: 14px; font-weight: 500; diff --git a/Yi.Ai.Vue3/src/pages/console/index.vue b/Yi.Ai.Vue3/src/pages/console/index.vue index a78a7108..21f3fb33 100644 --- a/Yi.Ai.Vue3/src/pages/console/index.vue +++ b/Yi.Ai.Vue3/src/pages/console/index.vue @@ -37,10 +37,10 @@ const baseNavItems = [ ]; // 根据权限动态添加菜单项 -let navItems = [...baseNavItems]; +const navItems = [...baseNavItems]; if (hasChannelPermission) { - navItems.push({ name: 'channel', label: '渠道商管理', icon: 'Setting', path: '/console/channel' }); + navItems.push({ name: 'channel', label: '号池管理', icon: 'Setting', path: '/console/channel' }); } if (hasSystemStatisticsPermission) { diff --git a/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts b/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts index 777991f8..d6bfdbde 100644 --- a/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts +++ b/Yi.Ai.Vue3/src/routers/modules/staticRouter.ts @@ -220,7 +220,7 @@ export const layoutRouter: RouteRecordRaw[] = [ name: 'consoleChannel', component: () => import('@/pages/console/channel/index.vue'), meta: { - title: '意心Ai-渠道商管理', + title: '意心Ai-号池管理', }, }, {