5in1 优化若干bug

This commit is contained in:
2026-03-03 14:36:25 +08:00
parent b6f8586efa
commit e1c132ead9
6 changed files with 32 additions and 9 deletions

View File

@@ -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
# 商店地址

View File

@@ -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/

View File

@@ -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 () => {

View File

@@ -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) {

View File

@@ -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,

View File

@@ -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;
}
};