fix: update baidu translate api

This commit is contained in:
Gabe Yuan
2024-01-18 15:26:37 +08:00
parent c9d72323f1
commit 59f9dd697f
7 changed files with 137 additions and 48 deletions

View File

@@ -35,7 +35,7 @@ function DictField({ word }) {
fromLang: "en",
toLang: "zh-CN",
});
setDictResult(dictRes[2].dict_result);
dictRes[2].type === 1 && setDictResult(JSON.parse(dictRes[2].result));
} catch (err) {
setError(err.message);
} finally {