fix: 修复游戏封面图无法显示的问题 (#643) - #648
Merged
Merged
Conversation
config.txt 中键或值存在首尾空格时,解析结果带空格导致字段匹配失败。因此要对 key 和 value 均做 trim 处理。
MakinoharaShoko
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Dashboard 中游戏封面图有时无法显示。
根因:后端
getGameConfig解析 config.txt 时未对键和值做 trim。当配置项存在首尾空格(如Title_img: bg.png)时,解析出的 key 带前导空格,无法匹配Title_img字段,导致封面图路径落空、请求 404。改动
packages/terre2/src/Modules/manage-game/manage-game.service.tspackages/origine2/src/pages/dashboard/GameElement.tsx变量名拼写 soureBase → sourceBase测试方法
Title_img:后加一个空格(如Title_img: bg.png)Fixes #643