diff --git a/CHANGELOG.md b/CHANGELOG.md index d38747e..5b604ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,18 @@ +## version 2.10.7 + +- 中文题解获取错误 + ## version 2.10.6 - 更新工作流 ## version 2.10.5 -- bricks.json格式化 +- bricks.json 格式化 ## version 2.10.4 -- 更新action +- 更新 action ## version 2.10.3 diff --git a/package.json b/package.json index c839f52..b096785 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "vscode-leetcode-problem-rating", "displayName": "LeetCode", "description": "LeetCode 官方插件增强, 代码开源, 增加 LeetCode 题目难度分, 给个star吧, 球球了", - "version": "2.10.6", + "version": "2.10.7", "author": "ccagml", "publisher": "ccagml", "license": "MIT", diff --git a/src/rpc/actionChain/chainNode/leetcode.cn.ts b/src/rpc/actionChain/chainNode/leetcode.cn.ts index 70b7e93..dc6cb81 100644 --- a/src/rpc/actionChain/chainNode/leetcode.cn.ts +++ b/src/rpc/actionChain/chainNode/leetcode.cn.ts @@ -223,7 +223,7 @@ function getSolutionBySlug(question_slug: string, articles_slug: string, lang: s opts.json = true; opts.body = { operationName: "solutionDetailArticle", - variables: { slug: "pan-duan-guo-ji-xiang-qi-qi-pan-zhong-yi-8dv4", orderBy: "DEFAULT" }, + variables: { slug: articles_slug, orderBy: "DEFAULT" }, query: [ "query solutionDetailArticle($slug: String!, $orderBy: SolutionArticleOrderBy!) {", " solutionArticle(slug: $slug, orderBy: $orderBy) {", @@ -265,7 +265,7 @@ function getSolutionBySlug(question_slug: string, articles_slug: string, lang: s let content = solution.content.replace(/\\n/g, "\n").replace(/\\t/g, "\t"); let solution_result: any = {}; - solution_result.problem_name = "暂代题目名称"; + solution_result.problem_name = solution.title; solution_result.title = solution.title; solution_result.url = link; solution_result.lang = lang;