Skip to content

Commit

Permalink
🐛 修复成就导入异常
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Jun 13, 2024
1 parent b628df5 commit 59a686c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/pages/common/Achievements.vue
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ async function handleImportOuter(app: string): Promise<void> {
const data: TGApp.Plugins.UIAF.Data = JSON.parse(clipboard);
loadingTitle.value = "正在导入数据";
loading.value = true;
await TSUserAchi.mergeUIAF(data);
await TSUserAchi.mergeUIAF(data.list);
loading.value = false;
showSnackbar({
color: "success",
Expand Down
10 changes: 5 additions & 5 deletions src/plugins/Sqlite/sql/updateData.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/**
* @file plugins/Sqlite/sql/updateData.ts
* @description 更新数据
* @since Beta v0.4.7
* @since Beta v0.4.9
*/

import minifySql from "../../../utils/minifySql";

/**
* @description 导入UIAF数据-单项
* @since Beta v0.4.7
* @since Beta v0.4.9
* @param {TGApp.Plugins.UIAF.Achievement} data
* @returns {string} sql
*/
Expand All @@ -33,10 +33,10 @@ export function importUIAFData(data: TGApp.Plugins.UIAF.Achievement): string[] {
} else {
sql = `
UPDATE Achievements
SET progress = ${achievement.current},
SET progress = ${data.current},
updated = datetime('now', 'localtime')
WHERE id = ${achievement.id}
AND progress != ${achievement.current};
WHERE id = ${data.id}
AND progress != ${data.current};
`;
}
return minifySql(sql);
Expand Down

0 comments on commit 59a686c

Please sign in to comment.