try fix account setting rewrite

This commit is contained in:
2024-04-20 01:28:42 +08:00
parent df1e75caa5
commit 2f306430b1
2 changed files with 10 additions and 4 deletions

View File

@@ -18,7 +18,12 @@ export async function GetSelfAccount() {
if (cookie.value) {
const result = await Self()
if (result.code == 200) {
if (!ACCOUNT.value) {
ACCOUNT.value = result.data
} else {
result.data.settings = ACCOUNT.value.settings
ACCOUNT.value = result.data
}
isLoadingAccount.value = false
//console.log('[vtsuru] 已获取账户信息')
if (!isSameDay(new Date(), cookieRefreshDate.value)) {

View File

@@ -46,11 +46,12 @@ QueryGetAPI<string>(BASE_API_URL + 'vtsuru/version')
QueryGetAPI<string>(BASE_API_URL + 'vtsuru/version').then((keepCheckData) => {
if (keepCheckData.code == 200 && keepCheckData.data != currentVersion) {
isHaveNewVersion = true
currentVersion = version.data
currentVersion = keepCheckData.data
localStorage.setItem('Version', currentVersion)
console.log('[vtsuru] 发现新版本: ' + currentVersion)
const route = useRoute()
if (!route.path.startsWith('/obs')) {
//@ts-expect-error 这里获取不了
if (!window.obsstudio) {
const n = notification.info({
title: '发现新的版本更新',
content: '是否现在刷新?',