4.17更新

This commit is contained in:
hrx 2026-04-17 17:41:38 +08:00
parent eb6059267d
commit 5df9a86325
26 changed files with 173 additions and 152 deletions

View File

@ -54,6 +54,12 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe606;</span>
<div class="name">414126695</div>
<div class="code-name">&amp;#xe606;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe617;</span>
<div class="name">apikey</div>
@ -186,9 +192,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1776308634739') format('woff2'),
url('iconfont.woff?t=1776308634739') format('woff'),
url('iconfont.ttf?t=1776308634739') format('truetype');
src: url('iconfont.woff2?t=1776413178216') format('woff2'),
url('iconfont.woff?t=1776413178216') format('woff'),
url('iconfont.ttf?t=1776413178216') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -214,6 +220,15 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-a-414126695"></span>
<div class="name">
414126695
</div>
<div class="code-name">.icon-a-414126695
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-apikey"></span>
<div class="name">
@ -412,6 +427,14 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-a-414126695"></use>
</svg>
<div class="name">414126695</div>
<div class="code-name">#icon-a-414126695</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-apikey"></use>

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 5136943 */
src: url('iconfont.woff2?t=1776308634739') format('woff2'),
url('iconfont.woff?t=1776308634739') format('woff'),
url('iconfont.ttf?t=1776308634739') format('truetype');
src: url('iconfont.woff2?t=1776413178216') format('woff2'),
url('iconfont.woff?t=1776413178216') format('woff'),
url('iconfont.ttf?t=1776413178216') format('truetype');
}
.iconfont {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-a-414126695:before {
content: "\e606";
}
.icon-apikey:before {
content: "\e617";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "47386728",
"name": "414126695",
"font_class": "a-414126695",
"unicode": "e606",
"unicode_decimal": 58886
},
{
"icon_id": "44608574",
"name": "apikey",

Binary file not shown.

View File

@ -14,7 +14,7 @@
padding-right: 2rem;
background: rgba(10, 12, 18, 0.74);
backdrop-filter: blur(16px);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
@media (max-width: 768px) {
padding: 0 1rem;
@ -241,10 +241,13 @@
display: flex;
align-items: center;
justify-content: center;
font-size: 13px;
font-weight: 700;
color: #fff;
background: linear-gradient(135deg, rgba(139, 124, 255, 0.9), rgba(246, 184, 106, 0.72));
// font-size: 50px;
.iconfont{
font-size: 28px;
}
// font-weight: 700;
// color: #fff;
// background: linear-gradient(135deg, rgba(139, 124, 255, 0.9), rgba(246, 184, 106, 0.72));
flex-shrink: 0;
}

View File

@ -206,6 +206,35 @@
width: 100%;
background: transparent;
:deep(.el-table) {
--el-table-bg-color: #1e2024;
--el-table-tr-bg-color: #1e2024;
--el-table-row-hover-bg-color: #25282e;
--el-table-current-row-bg-color: #25282e;
--el-table-header-bg-color: #1e2024;
--el-table-fixed-box-shadow: none;
--el-table-border-color: #2a2d32;
--el-table-text-color: rgba(255, 255, 255, 0.88);
--el-table-header-text-color: rgba(255, 255, 255, 0.75);
--el-bg-color: #1e2024;
--el-fill-color-lighter: #1a1c20;
background: transparent;
// Hide Element Plus default bottom divider on dark backgrounds.
&::before {
background-color: transparent;
}
}
:deep(.el-table__inner-wrapper),
:deep(.el-table__header-wrapper),
:deep(.el-table__body-wrapper),
:deep(.el-table__fixed),
:deep(.el-table__fixed-right),
:deep(.el-table__fixed-right-patch) {
background: #1e2024 !important;
}
:deep(.el-table__header-wrapper) {
.el-table__header th {
background-color: #1e2024;
@ -227,6 +256,7 @@
td {
border-bottom: 1px solid #2a2d32;
color: rgba(255, 255, 255, 0.88);
background-color: #1e2024;
}
}
}
@ -237,6 +267,15 @@
}
}
:deep(.el-table__cell) {
background-color: transparent;
}
:deep(.el-table__fixed-right::before),
:deep(.el-table__fixed::before) {
background-color: #2a2d32 !important;
}
.key-mask {
font-family: Consolas, 'Courier New', monospace;
font-size: 13px;

View File

@ -29,8 +29,9 @@
<!-- 用户信息 -->
<div class="user-profile" :class="{ 'dropdown-open': userDropdownVisible }">
<div class="user-trigger" @click="toggleUserDropdown">
<div class="user-avatar">{{ userInitial }}</div>
<div class="user-name">{{ loginStore.userInfo?.user?.name || loginStore.userInfo?.user?.username }}</div>
<div class="user-avatar">
<i class="iconfont icon-a-414126695"></i>
</div>
<svg class="dropdown-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M6 9l6 6 6-6" />
</svg>
@ -38,6 +39,10 @@
<Transition name="dropdown">
<div v-if="userDropdownVisible" class="user-dropdown">
<div class="dropdown-item user-id">
<span class="item-label">用户名:</span>
<span class="item-value">{{ loginStore.userInfo?.user?.name || loginStore.userInfo?.user?.username }}</span>
</div>
<div class="dropdown-item user-id">
<span class="item-label">用户ID:</span>
<span class="item-value">{{ loginStore.userInfo?.user?.id }}</span>
@ -84,8 +89,8 @@ const showRechargeModal = ref(false);
const userDropdownVisible = ref(false);
//
const balances = ref(0);
const userDisplayName = computed(() => loginStore.userInfo?.user?.name || loginStore.userInfo?.user?.username || '用户');
const userInitial = computed(() => userDisplayName.value.trim().charAt(0).toUpperCase() || 'U');
// const userDisplayName = computed(() => loginStore.userInfo?.user?.name || loginStore.userInfo?.user?.username || '');
// const userInitial = computed(() => userDisplayName.value.trim().charAt(0).toUpperCase() || 'U');
const formattedBalance = computed(() => Number(balances.value || 0).toLocaleString('zh-CN'));
//
@ -106,7 +111,6 @@ const handleLogout = () => {
const getBalance = async () => {
try {
const res = await balance<BalanceResult>();
console.log('用户余额:', res);
if (res.status === 'ok') {
balances.value = res.data[0].balance;
}

View File

@ -221,9 +221,6 @@ const confirmCustomAmount = () => {
//
selectedAmount.value = finalAmount;
// ()
console.log('[自定义充值] amount:', finalAmount);
//
closeCustomDialog();
};
@ -246,9 +243,6 @@ const handleConfirm = async () => {
currency: 'CNY'
};
// ()
console.log('[确认充值]', rechargeParams);
//
interface RechargeResponse {
status: string;
@ -258,7 +252,6 @@ interface RechargeResponse {
//
const res = await recharge<RechargeResponse, typeof rechargeParams>(rechargeParams);
console.log('充值接口返回:', res);
//
if (res.status === 'ok') {

View File

@ -439,23 +439,16 @@ const stopPolling = () => {
* 从后端获取今日任务列表并转换为前端格式
*/
const loadTaskList = async () => {
console.log('=== 开始加载任务列表 ===');
if (!isLoggedIn.value) {
console.log('未登录,跳过加载');
return;
}
isLoading.value = true;
try {
console.log('正在调用 getTodayTask 接口...');
//
const res = await getTodayTask<TaskResult>();
console.log('getTodayTask 响应:', res);
if (res.status === 'ok' && res.data?.tasks && Array.isArray(res.data.tasks)) {
console.log('任务列表数据:', res.data.tasks);
//
taskList.value = res.data.tasks.map((task) => {
const output = task.ioinfo?.output || [];
@ -477,8 +470,6 @@ const loadTaskList = async () => {
} as TaskItem;
});
console.log('转换后的任务列表:', taskList.value);
//
const hasProcessingTasks = taskList.value.some(task =>
task.status === 'created' ||
@ -487,14 +478,11 @@ const loadTaskList = async () => {
task.status === 'running' ||
task.status === 'PENDING'
);
console.log('是否有进行中的任务:', hasProcessingTasks);
if (hasProcessingTasks) {
console.log('启动轮询...');
startPolling();
}
} else {
console.log('任务列表为空或格式错误');
taskList.value = [];
}
} catch (error) {
@ -502,7 +490,6 @@ const loadTaskList = async () => {
taskList.value = [];
} finally {
isLoading.value = false;
console.log('=== 任务列表加载完成 ===');
}
};

View File

@ -98,7 +98,7 @@ const setVideoRef = (index: number, el: HTMLVideoElement | null) => {
const handleMouseEnter = (index: number) => {
const video = videoRefs.value[index]
if (video) {
video.play().catch(err => console.log('播放失败:', err))
video.play().catch(() => undefined)
isVideoPlaying.value[index] = true
}
}

View File

@ -308,7 +308,6 @@ const buildPriceParams = (): PriceQueryParams | null => {
config_data: configDataForPrice,
};
console.log('=== 构建价格查询参数 ===', priceParams);
return priceParams;
};
@ -397,7 +396,6 @@ const loadModels = async () => {
const handleModelChange = (modelId: string) => {
const selected = models.value.find(m => m.id === modelId);
if (selected) {
console.log('=== 切换模型 ===', selected.name);
currentModel.value = selected;
//
uploadedFiles.value = {};
@ -454,8 +452,6 @@ const handleFileChange = (file: UploadFile, fieldName: string) => {
const base64 = e.target?.result as string;
uploadedFiles.value[fieldName] = base64;
uploadedFileNames.value[fieldName] = fileName;
console.log('=== 上传图片 ===', { fieldName, fileName, base64Length: base64.length });
ElMessage.success('上传成功');
};
reader.readAsDataURL(rawFile);
@ -468,8 +464,6 @@ const handleFileChange = (file: UploadFile, fieldName: string) => {
const handleRemove = (fieldName: string) => {
uploadedFiles.value[fieldName] = '';
uploadedFileNames.value[fieldName] = '';
console.log('=== 删除图片 ===', fieldName);
ElMessage.info('已移除图片');
};
@ -508,7 +502,6 @@ const buildSubmitParams = (): Record<string, unknown> => {
Object.keys(uploadedFiles.value).forEach(key => {
if (uploadedFiles.value[key]) {
baseParams[key] = uploadedFiles.value[key];
console.log('提交字段:', key, 'Base64长度:', uploadedFiles.value[key].length);
}
});
@ -524,7 +517,6 @@ const buildSubmitParams = (): Record<string, unknown> => {
}
});
console.log('=== 构建提交参数 ===', baseParams);
return baseParams;
};
@ -565,8 +557,6 @@ const generate = async (): Promise<boolean> => {
const params = buildSubmitParams();
const res = (await imagetovideo(params)) as TextVideoResponse;
console.log('=== 图生视频接口响应 ===', res);
const taskid = res.data?.taskid || res.taskid;
if (res.status === 'created' || res.status === 'processing' || res.status === 'queueing' || res.status === 'CREATED') {
@ -600,7 +590,6 @@ const generate = async (): Promise<boolean> => {
* 重置表单清空输入图片配置恢复默认
*/
const resetForm = () => {
console.log('=== 重置表单 ===');
prompt.value = '';
uploadedFiles.value = {};
uploadedFileNames.value = {};

View File

@ -190,7 +190,7 @@
</template>
<script setup lang="ts">
import { ref, computed, watch, defineEmits } from 'vue'
import { ref, computed, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { Delete, ZoomIn } from '@element-plus/icons-vue'
@ -251,8 +251,7 @@ watch(promptText, (newText) => {
})
// change
const handleChange = (value: string) => {
console.log('selected', value)
const handleChange = () => {
}
//
@ -346,7 +345,6 @@ const handleVideoChange = async (file: File) => {
const base64 = await readFileAsBase64(file)
videoBase64.value = base64
videoMimeType.value = file.type
console.log('视频上传成功Base64长度:', base64.length)
ElMessage.success('视频上传成功')
} catch (error) {
console.error('视频上传失败:', error)
@ -370,7 +368,6 @@ const handleImageChange = async (file: File) => {
const base64 = await readFileAsBase64(file)
imageBase64.value = base64
imageMimeType.value = file.type
console.log('图片上传成功Base64长度:', base64.length)
ElMessage.success('图片上传成功')
} catch (error) {
console.error('图片上传失败:', error)
@ -400,36 +397,33 @@ const handlePreview = (type: 'video' | 'image') => {
dialogVisible.value = true
}
//
const buildSubmitParams = () => {
const params: Record<string, any> = {
llmid: selectModel.value,
prompt: promptText.value,
duration: selectedDuration.value,
voice: selectVoice.value,
quality: selectQuality.value,
codec: selectCodec.value,
ratio: selectRatio.value,
count: selectedCount.value,
}
// //
// const buildSubmitParams = () => {
// const params: Record<string, any> = {
// llmid: selectModel.value,
// prompt: promptText.value,
// duration: selectedDuration.value,
// voice: selectVoice.value,
// quality: selectQuality.value,
// codec: selectCodec.value,
// ratio: selectRatio.value,
// count: selectedCount.value,
// }
// base64
if (videoBase64.value) {
params.video = videoBase64.value
params.videoMimeType = videoMimeType.value
console.log('添加视频参数Base64长度:', videoBase64.value.length)
}
// // base64
// if (videoBase64.value) {
// params.video = videoBase64.value
// params.videoMimeType = videoMimeType.value
// }
// base64
if (imageBase64.value) {
params.image = imageBase64.value
params.imageMimeType = imageMimeType.value
console.log('添加图片参数Base64长度:', imageBase64.value.length)
}
// // base64
// if (imageBase64.value) {
// params.image = imageBase64.value
// params.imageMimeType = imageMimeType.value
// }
console.log('提交参数:', JSON.stringify(params, null, 2))
return params
}
// return params
// }
//
const generate = async () => {
@ -439,9 +433,8 @@ const generate = async () => {
}
try {
const params = buildSubmitParams()
// const params = buildSubmitParams()
// TODO:
console.log('生成参数:', params)
ElMessage.success('生成任务已提交')
return true
} catch (error) {

View File

@ -375,24 +375,16 @@ const generate = async (): Promise<boolean> => {
try {
const params = buildSubmitParams();
const res = (await textvideo(params)) as TextVideoResponse;
console.log('=== 文生视频接口响应 ===');
console.log('响应状态:', res.status);
console.log('响应数据:', res.data);
console.log('完整响应:', res);
// taskid
let taskid = res.data?.taskid || res.taskid;
console.log('提取的 taskid:', taskid);
if (res.status === 'created' || res.status === 'processing' || res.status === 'queueing') {
const statusMsg = res.status === 'created' ? '视频生成任务已提交' : (res.status === 'processing' ? '进行中' : '排队中');
ElMessage.success(`${statusMsg},请稍后在任务列表中查看`);
if (taskid) {
console.log('触发 task-created 事件, taskid:', taskid);
emit('task-created', taskid);
console.log('task-created 事件已发送');
} else {
console.warn('响应中没有 taskid尝试使用其他方式获取');
// taskid

View File

@ -161,29 +161,18 @@ const handleCreate = debounce(async () => {
const emit = defineEmits<{ (e: 'task-created', taskid: string): void }>();
const handleTaskCreated = (taskid: string) => {
console.log('=== VideoLeft: 接收到 task-created 事件 ===');
console.log('taskid:', taskid);
console.log('向上传递给父组件...');
emit('task-created', taskid);
console.log('=== VideoLeft: 重置表单 ===');
switch (activeTab.value) {
case 'text':
console.log('重置文生视频表单');
textVideoRef.value?.resetForm?.();
break;
case 'image':
console.log('重置图生视频表单');
imgVideoRef.value?.resetForm?.();
break;
case 'reference':
console.log('重置参考生视频表单');
referenceVideoRef.value?.resetForm?.();
break;
}
console.log('=== VideoLeft: handleTaskCreated 完成 ===');
};
//

View File

@ -84,6 +84,7 @@ const router = createRouter({
name: 'material-square',
component: () => import('@/views/videoGenerate/videoGenerate.vue')
},
// apikey
{
path: '/apikey',

View File

@ -28,7 +28,8 @@ export const useLoginStore = defineStore(
// 开户
const openAccounts = async () => {
const res = await openAccount();
console.log('开户', res);
console.log('开户',res);
};
// 清除自动登出计时器
@ -43,7 +44,6 @@ export const useLoginStore = defineStore(
const startAutoLogoutTimer = () => {
clearAutoLogoutTimer();
if (!loginTimestamp.value) {
console.log('没有登录时间戳,不启动计时器');
return;
}
@ -51,10 +51,7 @@ export const useLoginStore = defineStore(
const elapsed = now - loginTimestamp.value;
const remaining = Math.max(0, 20 * 60 * 1000 - elapsed);
console.log('启动自动登出计时器,剩余时间(毫秒):', remaining);
autoLogoutTimer = setTimeout(() => {
console.log('计时器触发,执行自动登出');
logoutS();
}, remaining);
};
@ -110,7 +107,6 @@ export const useLoginStore = defineStore(
return doLogin({ ...params, selected_id: selectedId });
};
const logoutS = () => {
console.log('自动登出触发');
// 保存当前路径
redirectPath.value = router.currentRoute.value.path;
clearAutoLogoutTimer();
@ -135,12 +131,9 @@ export const useLoginStore = defineStore(
// 初始化自动登出(页面刷新后调用,恢复计时器)
const initAutoLogout = () => {
console.log('初始化自动登出,当前登录状态:', isLoggedIn.value);
console.log('登录时间戳:', loginTimestamp.value);
if (isLoggedIn.value) {
// 如果没有时间戳(可能因为持久化缺少),用当前时间作为基准
if (!loginTimestamp.value) {
console.log('没有登录时间戳,使用当前时间作为基准');
loginTimestamp.value = Date.now();
}
startAutoLogoutTimer();

View File

@ -41,7 +41,6 @@ export function deleteCookie(name: string): void {
* Cookie HttpOnly
*/
export function logAllCookies(): void {
console.log('当前可读 Cookie 原始字符串:', document.cookie || '(空)');
if (!document.cookie) return;
const cookies = document.cookie.split('; ').reduce((acc, item) => {
const eqIndex = item.indexOf('=');

View File

@ -21,12 +21,6 @@ const shouldIncludeCredentials = (url?: string, baseURL?: string) => {
// 添加请求拦截器
axios.interceptors.request.use(
function (config) {
// console.log('=== 请求拦截器 ===')
// console.log('请求 URL:', config)
// console.log('请求方法:', config.method)
// console.log('请求参数 (params):', config.params)
// console.log('请求数据 (data):', config.data)
// console.log('请求头:', config.headers)
config.baseURL = apiBaseURL
config.withCredentials = shouldIncludeCredentials(config.url, config.baseURL)
return config
@ -122,8 +116,6 @@ export const uploadFile = async (file: File, uploadUrl: string, additionalData:
}
});
console.log("000", response.data);
return response.data;
} catch (error) {
console.error('文件上传失败:', error);

View File

@ -301,6 +301,43 @@ onMounted(() => {
</style>
<style lang='less'>
.apikey-table.el-table {
--el-table-bg-color: #1e2024;
--el-table-tr-bg-color: #1e2024;
--el-table-row-hover-bg-color: #25282e;
--el-table-current-row-bg-color: #25282e;
--el-table-header-bg-color: #1e2024;
--el-table-border-color: #2a2d32;
--el-table-text-color: rgba(255, 255, 255, 0.88);
--el-table-header-text-color: rgba(255, 255, 255, 0.75);
--el-table-fixed-box-shadow: none;
background: #1e2024;
}
.apikey-table.el-table::before,
.apikey-table .el-table__inner-wrapper::before,
.apikey-table .el-table__fixed-right-patch {
background-color: transparent !important;
}
.apikey-table .el-table__header-wrapper,
.apikey-table .el-table__body-wrapper,
.apikey-table .el-table__inner-wrapper,
.apikey-table .el-table__fixed,
.apikey-table .el-table__fixed-right,
.apikey-table td.el-table__cell,
.apikey-table th.el-table__cell {
background: #1e2024 !important;
}
.apikey-table .el-table__row--striped td.el-table__cell {
background: #1a1c20 !important;
}
.apikey-table .el-table__row:hover td.el-table__cell {
background: #25282e !important;
}
.custom-select-popup {
background-color: #2A2D34 !important;
border-radius: 12px !important;

View File

@ -176,7 +176,6 @@ const updatePaginatedList = () => {
const status = (order.status || '').toUpperCase();
return status === statusFilter.value.toUpperCase();
});
console.log('状态筛选 - 筛选条件:', statusFilter.value, '筛选后数量:', filteredList.length);
}
//
@ -193,7 +192,6 @@ const updatePaginatedList = () => {
const endIndex = startIndex + pageSize.value;
orderList.value = filteredList.slice(startIndex, endIndex);
console.log('前端分页 - 从索引', startIndex, '到', endIndex, '显示', orderList.value.length, '条数据', '总数:', total.value);
};
// ==================== ====================
@ -260,7 +258,6 @@ const getStatusClass = (status: string): string => {
* 每页条数变化
*/
const handleSizeChange = (size: number) => {
console.log('分页大小变化:', size);
pageSize.value = size;
currentPage.value = 1; //
updatePaginatedList(); //
@ -270,7 +267,6 @@ const handleSizeChange = (size: number) => {
* 当前页码变化
*/
const handleCurrentChange = (page: number) => {
console.log('页码变化:', page);
currentPage.value = page;
updatePaginatedList(); //
};
@ -295,30 +291,18 @@ const loadOrderList = async () => {
isLoading.value = true;
try {
console.log('=== 开始加载订单列表 ===');
//
const res = await consumptionRecord<any, any>({});
console.log('=== API响应 ===');
console.log('完整响应:', res);
console.log('响应状态:', res.status);
console.log('响应数据:', res.data);
if (res.status === 'ok' && res.data) {
const rawData = res.data.rows || [];
allOrderList.value = rawData; //
total.value = rawData.length || 0; // 使
console.log('=== 处理结果 ===');
console.log('原始数据长度:', rawData.length);
console.log('总数:', total.value);
//
updatePaginatedList();
} else {
resetOrderState();
console.log('API返回非ok状态或无数据');
}
} catch (error) {
console.error('=== 获取消费记录失败 ===');

View File

@ -27,7 +27,7 @@ import Top from '@/components/index/top.vue'
import AI from '@/components/index/AIMode.vue'
import StencilTabs from '@/components/index/StencilTabs.vue'
import StencilWaterfall from '@/components/index/StencilWaterfall.vue'
import type { StencilItem } from '@/types/home'
// import type { StencilItem } from '@/types/home'
const activeTab = ref('mixed') //
@ -35,12 +35,12 @@ const handleTabChange = (tabType: string) => {
activeTab.value = tabType
}
const handleLike = (item: StencilItem) => {
console.log('点赞', item)
const handleLike = () => {
}
const handleMakeSame = (item: StencilItem) => {
console.log('做同款', item)
const handleMakeSame = () => {
}
// ===== =====

View File

@ -201,7 +201,7 @@ const doSubmitForm = async () => {
if (!formRef.value) return;
if (loading.value) return;
await formRef.value.validate(async (valid, fields) => {
await formRef.value.validate(async (valid) => {
if (valid) {
loading.value = true;
try {
@ -218,7 +218,6 @@ const doSubmitForm = async () => {
loading.value = false;
}
} else {
console.log('验证失败:', fields);
ElMessage.error('请正确填写表单');
}
});

View File

@ -13,20 +13,13 @@ import { ref } from 'vue';
import VideoLeft from '@/components/video/VideoLeft.vue';
import RightResult from '@/components/RightResult/RightResult.vue';
const videoLeftRef = ref<InstanceType<typeof VideoLeft> | null>(null);
// const videoLeftRef = ref<InstanceType<typeof VideoLeft> | null>(null);
const rightResultRef = ref<InstanceType<typeof RightResult> | null>(null);
//
const handleTaskCreated = (taskid: string) => {
console.log('=== 任务创建事件被触发 ===');
console.log('taskid:', taskid);
console.log('rightResultRef.value:', rightResultRef.value);
console.log('refreshTaskList 方法:', rightResultRef.value?.refreshTaskList);
const handleTaskCreated = () => {
if (rightResultRef.value && typeof rightResultRef.value.refreshTaskList === 'function') {
console.log('开始刷新任务列表...');
rightResultRef.value.refreshTaskList();
console.log('任务列表刷新完成');
} else {
console.error('refreshTaskList 方法不存在或不可用');
}