(key)
| 114 | }; |
| 115 | // 个性化设置 - 首页内容 |
| 116 | const submitOption = async (key) => { |
| 117 | try { |
| 118 | setLoadingInput((loadingInput) => ({ |
| 119 | ...loadingInput, |
| 120 | HomePageContent: true, |
| 121 | })); |
| 122 | await updateOption(key, inputs[key]); |
| 123 | showSuccess('首页内容已更新'); |
| 124 | } catch (error) { |
| 125 | console.error('首页内容更新失败', error); |
| 126 | showError('首页内容更新失败'); |
| 127 | } finally { |
| 128 | setLoadingInput((loadingInput) => ({ |
| 129 | ...loadingInput, |
| 130 | HomePageContent: false, |
| 131 | })); |
| 132 | } |
| 133 | }; |
| 134 | // 个性化设置 - 关于 |
| 135 | const submitAbout = async () => { |
| 136 | try { |
no test coverage detected