update: 批量转存优化

This commit is contained in:
ctwj
2025-08-12 00:27:10 +08:00
parent 25c7c47c96
commit aa3b8585f9
10 changed files with 435 additions and 127 deletions

View File

@@ -1,5 +1,6 @@
import { defineStore } from 'pinia'
import { useApiFetch } from '~/composables/useApiFetch'
import { parseApiResponse } from '~/composables/useApi'
export const useSystemConfigStore = defineStore('systemConfig', {
state: () => ({
@@ -15,9 +16,11 @@ export const useSystemConfigStore = defineStore('systemConfig', {
const response = await useApiFetch(apiUrl)
console.log('Store API响应:', response) // 调试信息
// 正确处理API响应结构
const data = response.data || response
// 使用parseApiResponse正确解析API响应
const data = parseApiResponse(response)
console.log('Store 处理后的数据:', data) // 调试信息
console.log('Store 自动处理状态:', data.auto_process_ready_resources)
console.log('Store 自动转存状态:', data.auto_transfer_enabled)
this.config = data
this.initialized = true