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 }} + + + + + +
- + -