diff --git a/src/locales/en.js b/src/locales/en.js index f13119e..a57ab1a 100644 --- a/src/locales/en.js +++ b/src/locales/en.js @@ -93,5 +93,10 @@ export default { revenueTime: 'Time', close: 'Close', selectPlaceholder: 'Please select', + countryEng: 'Country (EN)', + videoCount: 'Video Count', + heart: 'Likes', + signature: 'Bio Signature', + bioLink: 'Bio Link', } } diff --git a/src/locales/zh.js b/src/locales/zh.js index bf7986f..69d3ad5 100644 --- a/src/locales/zh.js +++ b/src/locales/zh.js @@ -93,5 +93,10 @@ revenueTime: '时间', close: '关闭', selectPlaceholder: '请选择', + countryEng: '国家(英文)', + videoCount: '视频数量', + heart: '点赞数', + signature: '主页签名', + bioLink: '主页链接', } } diff --git a/src/utils/pythonBridge.js b/src/utils/pythonBridge.js index edec806..8141a1d 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() { }); }; + + // 查询主播列表 + const getHosts = (data) => { + return new Promise((resolve) => { + if (!bridge.value) return resolve(null); + callBridge('searchHosts', JSON.stringify(data), (result) => { + resolve(result); + }); + }); + }; // 在组件挂载时初始化桥接 onMounted(initBridge); @@ -143,5 +153,6 @@ export function usePythonBridge() { exportToExcel, stopScript, getVersion, + getHosts, }; } diff --git a/src/views/hosts/hostsList.vue b/src/views/hosts/hostsList.vue index 26ece7c..33e11c3 100644 --- a/src/views/hosts/hostsList.vue +++ b/src/views/hosts/hostsList.vue @@ -61,33 +61,33 @@
- - - - - + + + - - - - - + + + + + + + - - + - - - + + + + @@ -112,39 +112,20 @@ {{ row.hostlevel }} - - + - - + + + + - - + - + - + + + + + + @@ -269,14 +259,14 @@
-
- - - - - - - - - - - - - - - -
{{ $t('hostList.hostId') }} {{ $t('hostList.grade') }}{{ $t('hostList.invitationType') }}{{ $t('hostList.liveSessions') }}/{{ $t('hostList.liveRevenue') }} {{ $t('hostList.country') }}{{ $t('hostList.countryEng') }} {{ $t('hostList.creationTime') }} {{ $t('hostList.anchorcoins') }}{{ $t('hostList.yesterdayGoldCoins') }} {{ $t('hostList.fansNum') }} {{ $t('hostList.followersNum') }}{{ $t('hostList.onlineFans') }}{{ $t('hostList.anchorType') }}{{ $t('hostList.videoCount') }}{{ $t('hostList.heart') }}{{ $t('hostList.signature') }}{{ $t('hostList.bioLink') }}
- - {{ row.invitationType == 1 ? $t('hostList.invitationType1') : $t('hostList.invitationType2') }} - - -
- - -
-
{{ row.country }} + {{ row.countryEng }} +
@@ -158,10 +139,7 @@ {{ row.hostsCoins }}
- {{ row.yesterdayCoins }} - @@ -173,16 +151,28 @@ {{ row.fllowernum }} - {{ row.onlineFans }} + {{ row.videoCount }} - {{ row.hostsKind }} + {{ row.heart }} + {{ row.signature }} + + + {{ row.bioLink }} + + - +