From 21eec1085affc8fe39c93d2646a22c3ca0dee9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=A1=E5=A4=8D=E4=B9=A0?= <2353956224@qq.com> Date: Fri, 23 Jan 2026 16:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=90=AFtk=20=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/pythonBridge.js | 13 +- src/views/hosts/hostsList.vue | 304 +++++------ src/views/hosts/workbenches.vue | 152 ++++-- src/views/hosts/workbenches1.vue | 872 +++++++++++++++++++++++++++++++ 4 files changed, 1141 insertions(+), 200 deletions(-) create mode 100644 src/views/hosts/workbenches1.vue diff --git a/src/utils/pythonBridge.js b/src/utils/pythonBridge.js index edec806..4df67f7 100644 --- a/src/utils/pythonBridge.js +++ b/src/utils/pythonBridge.js @@ -38,7 +38,7 @@ const initBridge = () => { const val = target[prop]; if (typeof val === 'function') return val; // 返回空函数,确保 handleResponse 可调用 - return () => {}; + return () => { }; }, set(target, prop, value) { target[prop] = value; @@ -129,6 +129,16 @@ export function usePythonBridge() { }); }; + // 查询TK登录状态 + const getTkLoginStatus = () => { + return new Promise((resolve) => { + if (!bridge.value) return resolve(false); + callBridge('getTkLoginStatus', (result) => { + resolve(result); + }); + }); + }; + // 在组件挂载时初始化桥接 onMounted(initBridge); @@ -143,5 +153,6 @@ export function usePythonBridge() { exportToExcel, stopScript, getVersion, + getTkLoginStatus, }; } diff --git a/src/views/hosts/hostsList.vue b/src/views/hosts/hostsList.vue index 26ece7c..a0e512a 100644 --- a/src/views/hosts/hostsList.vue +++ b/src/views/hosts/hostsList.vue @@ -4,47 +4,36 @@
- - expand_more + expand_more
- +
- calendar_today - + calendar_today +
- +
- +
- +
- -
@@ -54,9 +43,9 @@
- sync + sync
- +
@@ -64,7 +53,7 @@ - + @@ -79,7 +68,8 @@ - + + @@ -90,40 +80,36 @@ - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ $t('hostList.hostId') }} {{ $t('hostList.grade') }} {{ $t('hostList.invitationType') }}{{ $t('hostList.liveSessions') }}/{{ $t('hostList.liveRevenue') }}{{ $t('hostList.liveSessions') }} {{ $t('hostList.country') }} {{ $t('hostList.creationTime') }} {{ $t('hostList.anchorcoins') }}{{ $t('hostList.anchorType') }}
暂无数据
暂无数据
- - {{ row.hostId }} - - - {{ row.hostlevel }} - - - {{ row.invitationType == 1 ? $t('hostList.invitationType1') : $t('hostList.invitationType2') }} - - + + + + + {{ row.hostId }} + + + {{ row.hostlevel }} + + + {{ row.invitationType == 1 ? $t('hostList.invitationType1') : $t('hostList.invitationType2') }} + +
- + -->
- {{ row.country }} - -
- {{ formatTimeOnlyDate(row.createTime) }} - {{ formatTimeOnlyTime(row.createTime) }} -
-
- {{ row.hostsCoins }} - - {{ row.yesterdayCoins }} - - {{ row.fans }} - - {{ row.fllowernum }} - - {{ row.onlineFans }} - - {{ row.hostsKind }} -
+ + + {{ row.country }} + + + + +
+ {{ formatTimeOnlyDate(row.createTime) }} + {{ formatTimeOnlyTime(row.createTime) }} +
+ + + + + {{ row.hostsCoins }} + + + + + {{ row.yesterdayCoins }} + + + + + {{ row.fans }} + + + + + {{ row.fllowernum }} + + + + + {{ row.onlineFans }} + + + + + {{ row.hostsKind }} + + + + + +
- + -