diff --git a/.env.development b/.env.development index 591f558..150c4e3 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,9 @@ # 后端 api地址 +# VITE_API_BASE_URL=https://newclient.api.yolozs.com VITE_API_BASE_URL=http://192.168.2.22:8101 # 注册地址 VITE_REGISTER_API_URL=http://192.168.2.22:48080 +# VITE_REGISTER_API_URL=https://backstageapi.yolozs.com # pk api地址 VITE_PK_MINI_API_URL=http://192.168.2.22:8086 # 商店地址 diff --git a/.env.production b/.env.production index 07c1b2f..5f7e424 100644 --- a/.env.production +++ b/.env.production @@ -1,8 +1,9 @@ # 后端 api地址 -VITE_API_BASE_URL=https://crawlclient.api.yolozs.com +VITE_API_BASE_URL=https://newclient.api.yolozs.com +# VITE_API_BASE_URL=https://crawlclient.api.yolozs.com # 注册地址 VITE_REGISTER_API_URL=https://backstageapi.yolozs.com # pk api地址 VITE_PK_MINI_API_URL=https://pk.hanxiaokj.cn # 商店地址 -VITE_SHOP_URL=https://待填写 +VITE_SHOP_URL=https://ck.ninisc.cn/ diff --git a/src/App.vue b/src/App.vue index aadd8ea..42664eb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -163,6 +163,13 @@ const startHealthCheck = () => { if (result.success && result.code === 40400) { alert('当前账号已在其他地方登录,请重新登录') localStorage.removeItem(USER_KEY) + // 隐藏所有 BrowserView 并停止自动化,防止视图悬浮在登录页上方 + try { + await window.electronAPI.hideViews() + await handleStopAll() + } catch (e) { + console.warn('[App] 清理视图失败:', e) + } currentPage.value = 'login' } } catch (error) { @@ -226,8 +233,16 @@ const handleLogout = async () => { if (isElectron()) { await window.electronAPI.logout() } - localStorage.removeItem(USER_KEY) + + try { + await window.electronAPI.hideViews() + await handleStopAll() + } catch (e) { + console.warn('[App] 清理视图失败:', e) + } currentPage.value = 'login' + localStorage.removeItem(USER_KEY) + // currentPage.value = 'login' } const handleStopAll = async () => { diff --git a/src/api/account.js b/src/api/account.js index 1466588..aa8f4ee 100644 --- a/src/api/account.js +++ b/src/api/account.js @@ -18,10 +18,14 @@ export function getCountryinfo(data) { export function tkaccountuseinfo(accountName) { return getAxios({ url: `/api/common/accountCount?accountName=${accountName}` }) } - +//查询主播列表 export function tkhostdata(data) { return postAxios({ url: '/api/save_data/hosts_info', data }) } +//查询大哥列表 +export function tkbigdata(data) { + return postAxios({ url: '/api/big-brother/page', data }) +} //获取到期时间 export function getExpiredTime(tenantId) { diff --git a/src/utils/pk-mini/goeasy.js b/src/utils/pk-mini/goeasy.js index f3614cd..fd0fe54 100644 --- a/src/utils/pk-mini/goeasy.js +++ b/src/utils/pk-mini/goeasy.js @@ -18,6 +18,7 @@ export function getPkGoEasy() { } if (!pkGoEasyInstance) { + console.log("GoEasy", GoEasy) pkGoEasyInstance = GoEasy.getInstance({ host: PK_MINI_CONFIG.GOEASY.HOST, appkey: PK_MINI_CONFIG.GOEASY.APP_KEY, diff --git a/src/views/tk/FanWorkbench.vue b/src/views/tk/FanWorkbench.vue index bbc0ffb..8242f54 100644 --- a/src/views/tk/FanWorkbench.vue +++ b/src/views/tk/FanWorkbench.vue @@ -233,10 +233,10 @@ import { useCountryStore } from '@/stores/countryStore'; // Mock API calls if not present // Ideally we should import these from api file, but for simplicity I will mock them or use empty callbacks // if the user hasn't provided the api file content. -// Based on hostsList.vue reading, it uses `tkhostdata` from `@/api/account`. +// Based on hostsList.vue reading, it uses `tkbigdata` from `@/api/account`. // I will attempt to import, but if it fails I might need to create it. // Assuming verify step will catch missing API functions. -import { tkhostdata, getCountryinfo } from "@/api/account"; +import { tkbigdata, getCountryinfo } from "@/api/account"; const { t, locale } = useI18n(); const countryStore = useCountryStore(); @@ -367,8 +367,8 @@ function formatDate(date) { const getlist = () => { loading.value = true; // Use API if available, else mock - if (typeof tkhostdata === 'function') { - tkhostdata({ + if (typeof tkbigdata === 'function') { + tkbigdata({ tenantId: Number(userInfo.value.tenantId), sort: sortData.value.sort, sortName: sortData.value.sortName, @@ -393,7 +393,7 @@ const getlist = () => { tableData.value = []; }); } else { - console.warn("tkhostdata API not found"); + console.warn("tkbigdata API not found"); loading.value = false; } };