5in1 优化若干bug
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
# 后端 api地址
|
# 后端 api地址
|
||||||
|
# VITE_API_BASE_URL=https://newclient.api.yolozs.com
|
||||||
VITE_API_BASE_URL=http://192.168.2.22:8101
|
VITE_API_BASE_URL=http://192.168.2.22:8101
|
||||||
# 注册地址
|
# 注册地址
|
||||||
VITE_REGISTER_API_URL=http://192.168.2.22:48080
|
VITE_REGISTER_API_URL=http://192.168.2.22:48080
|
||||||
|
# VITE_REGISTER_API_URL=https://backstageapi.yolozs.com
|
||||||
# pk api地址
|
# pk api地址
|
||||||
VITE_PK_MINI_API_URL=http://192.168.2.22:8086
|
VITE_PK_MINI_API_URL=http://192.168.2.22:8086
|
||||||
# 商店地址
|
# 商店地址
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
# 后端 api地址
|
# 后端 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
|
VITE_REGISTER_API_URL=https://backstageapi.yolozs.com
|
||||||
# pk api地址
|
# pk api地址
|
||||||
VITE_PK_MINI_API_URL=https://pk.hanxiaokj.cn
|
VITE_PK_MINI_API_URL=https://pk.hanxiaokj.cn
|
||||||
# 商店地址
|
# 商店地址
|
||||||
VITE_SHOP_URL=https://待填写
|
VITE_SHOP_URL=https://ck.ninisc.cn/
|
||||||
|
|||||||
17
src/App.vue
17
src/App.vue
@@ -163,6 +163,13 @@ const startHealthCheck = () => {
|
|||||||
if (result.success && result.code === 40400) {
|
if (result.success && result.code === 40400) {
|
||||||
alert('当前账号已在其他地方登录,请重新登录')
|
alert('当前账号已在其他地方登录,请重新登录')
|
||||||
localStorage.removeItem(USER_KEY)
|
localStorage.removeItem(USER_KEY)
|
||||||
|
// 隐藏所有 BrowserView 并停止自动化,防止视图悬浮在登录页上方
|
||||||
|
try {
|
||||||
|
await window.electronAPI.hideViews()
|
||||||
|
await handleStopAll()
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('[App] 清理视图失败:', e)
|
||||||
|
}
|
||||||
currentPage.value = 'login'
|
currentPage.value = 'login'
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -226,8 +233,16 @@ const handleLogout = async () => {
|
|||||||
if (isElectron()) {
|
if (isElectron()) {
|
||||||
await window.electronAPI.logout()
|
await window.electronAPI.logout()
|
||||||
}
|
}
|
||||||
localStorage.removeItem(USER_KEY)
|
|
||||||
|
try {
|
||||||
|
await window.electronAPI.hideViews()
|
||||||
|
await handleStopAll()
|
||||||
|
} catch (e) {
|
||||||
|
console.warn('[App] 清理视图失败:', e)
|
||||||
|
}
|
||||||
currentPage.value = 'login'
|
currentPage.value = 'login'
|
||||||
|
localStorage.removeItem(USER_KEY)
|
||||||
|
// currentPage.value = 'login'
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleStopAll = async () => {
|
const handleStopAll = async () => {
|
||||||
|
|||||||
@@ -18,10 +18,14 @@ export function getCountryinfo(data) {
|
|||||||
export function tkaccountuseinfo(accountName) {
|
export function tkaccountuseinfo(accountName) {
|
||||||
return getAxios({ url: `/api/common/accountCount?accountName=${accountName}` })
|
return getAxios({ url: `/api/common/accountCount?accountName=${accountName}` })
|
||||||
}
|
}
|
||||||
|
//查询主播列表
|
||||||
export function tkhostdata(data) {
|
export function tkhostdata(data) {
|
||||||
return postAxios({ url: '/api/save_data/hosts_info', 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) {
|
export function getExpiredTime(tenantId) {
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export function getPkGoEasy() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!pkGoEasyInstance) {
|
if (!pkGoEasyInstance) {
|
||||||
|
console.log("GoEasy", GoEasy)
|
||||||
pkGoEasyInstance = GoEasy.getInstance({
|
pkGoEasyInstance = GoEasy.getInstance({
|
||||||
host: PK_MINI_CONFIG.GOEASY.HOST,
|
host: PK_MINI_CONFIG.GOEASY.HOST,
|
||||||
appkey: PK_MINI_CONFIG.GOEASY.APP_KEY,
|
appkey: PK_MINI_CONFIG.GOEASY.APP_KEY,
|
||||||
|
|||||||
@@ -233,10 +233,10 @@ import { useCountryStore } from '@/stores/countryStore';
|
|||||||
// Mock API calls if not present
|
// 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
|
// 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.
|
// 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.
|
// I will attempt to import, but if it fails I might need to create it.
|
||||||
// Assuming verify step will catch missing API functions.
|
// 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 { t, locale } = useI18n();
|
||||||
const countryStore = useCountryStore();
|
const countryStore = useCountryStore();
|
||||||
@@ -367,8 +367,8 @@ function formatDate(date) {
|
|||||||
const getlist = () => {
|
const getlist = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
// Use API if available, else mock
|
// Use API if available, else mock
|
||||||
if (typeof tkhostdata === 'function') {
|
if (typeof tkbigdata === 'function') {
|
||||||
tkhostdata({
|
tkbigdata({
|
||||||
tenantId: Number(userInfo.value.tenantId),
|
tenantId: Number(userInfo.value.tenantId),
|
||||||
sort: sortData.value.sort,
|
sort: sortData.value.sort,
|
||||||
sortName: sortData.value.sortName,
|
sortName: sortData.value.sortName,
|
||||||
@@ -393,7 +393,7 @@ const getlist = () => {
|
|||||||
tableData.value = [];
|
tableData.value = [];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.warn("tkhostdata API not found");
|
console.warn("tkbigdata API not found");
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user