From 159d6a346f7d2cedac3efab0778421885d9d84d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E6=A2=93=E9=94=9F?= <1640384813@qq.com> Date: Mon, 6 May 2024 11:27:42 +0800 Subject: [PATCH 1/3] Bug561-WanZiKun MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了bug561前后切换文章时生词高亮不显示的bug。 --- userpage_get.html | 264 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 264 insertions(+) create mode 100644 userpage_get.html diff --git a/userpage_get.html b/userpage_get.html new file mode 100644 index 0000000..232a747 --- /dev/null +++ b/userpage_get.html @@ -0,0 +1,264 @@ + + + + + + + + + + {{ yml['header'] | safe }} + {% if yml['css']['item'] %} + {% for css in yml['css']['item'] %} + + {% endfor %} + {% endif %} + {% if yml['js']['head'] %} + {% for js in yml['js']['head'] %} + + {% endfor %} + {% endif %} + + EnglishPal Study Room for {{ username }} + + + + + +
+

English Pal for {{ username }} + + {% if username == admin_name %} + 管理 + {% endif %} + 退出 + 重设密码 + +

+ {% for message in get_flashed_messages() %} + + {% endfor %} + + + + +

阅读文章并回答问题

+
+
+ +

Article added on: {{ today_article["date"] }}


+

+

{{ today_article["article_title"] }}


+

{{ today_article["article_body"] }}


+
+

{{ today_article['source'] }}


+
+ +

{{ today_article['question'] }}


+ + +
+
+
+ + +
+ + 生词高亮 + 大声朗读 + 划词入库 +
+
+
+ +
+ +
+
+

收集生词吧 (可以在正文中划词,也可以复制黏贴)

+
+
+ + +
+ {% if session.get['thisWord'] %} + + {% endif %} + + {% if d_len > 0 %} +

+ 我的生词簿 + +

+ +
+ {% for x in lst3 %} + {% set word = x[0] %} + {% set freq = x[1] %} + {% if session.get('thisWord') == x[0] and session.get('time') == 1 %} + {% endif %} +

+ {{ word }} + ( {{ freq }} ) + 熟悉 + 不熟悉 + 删除 + 朗读 +

+ {% endfor %} +
+ + {% endif %} +
+{{ yml['footer'] | safe }} +{% if yml['js']['bottom'] %} + {% for js in yml['js']['bottom'] %} + + {% endfor %} +{% endif %} + + + + + -- 2.17.1 From be153a965cc344c7b6e11d1464633944a50fb2e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E6=A2=93=E9=94=9F?= <1640384813@qq.com> Date: Mon, 6 May 2024 11:48:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=A0=E9=99=A4=20userpage=5Fget.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 上传错误 --- userpage_get.html | 264 ---------------------------------------------- 1 file changed, 264 deletions(-) delete mode 100644 userpage_get.html diff --git a/userpage_get.html b/userpage_get.html deleted file mode 100644 index 232a747..0000000 --- a/userpage_get.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - - - {{ yml['header'] | safe }} - {% if yml['css']['item'] %} - {% for css in yml['css']['item'] %} - - {% endfor %} - {% endif %} - {% if yml['js']['head'] %} - {% for js in yml['js']['head'] %} - - {% endfor %} - {% endif %} - - EnglishPal Study Room for {{ username }} - - - - - -
-

English Pal for {{ username }} - - {% if username == admin_name %} - 管理 - {% endif %} - 退出 - 重设密码 - -

- {% for message in get_flashed_messages() %} - - {% endfor %} - - - - -

阅读文章并回答问题

-
-
- -

Article added on: {{ today_article["date"] }}


-

-

{{ today_article["article_title"] }}


-

{{ today_article["article_body"] }}


-
-

{{ today_article['source'] }}


-
- -

{{ today_article['question'] }}


- - -
-
-
- - -
- - 生词高亮 - 大声朗读 - 划词入库 -
-
-
- -
- -
-
-

收集生词吧 (可以在正文中划词,也可以复制黏贴)

-
-
- - -
- {% if session.get['thisWord'] %} - - {% endif %} - - {% if d_len > 0 %} -

- 我的生词簿 - -

- -
- {% for x in lst3 %} - {% set word = x[0] %} - {% set freq = x[1] %} - {% if session.get('thisWord') == x[0] and session.get('time') == 1 %} - {% endif %} -

- {{ word }} - ( {{ freq }} ) - 熟悉 - 不熟悉 - 删除 - 朗读 -

- {% endfor %} -
- - {% endif %} -
-{{ yml['footer'] | safe }} -{% if yml['js']['bottom'] %} - {% for js in yml['js']['bottom'] %} - - {% endfor %} -{% endif %} - - - - - -- 2.17.1 From dd1cbc25ffe3e0fac7f7076a85dbea8fdc76a616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E6=A2=93=E9=94=9F?= <1640384813@qq.com> Date: Mon, 6 May 2024 11:50:17 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/templates/userpage?= =?UTF-8?q?=5Fget.html?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复bug561 --- app/templates/userpage_get.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index 68997ef..6e5d84c 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -157,6 +157,8 @@ update(data['today_article']); check_pre(data['visited_articles']); check_next(data['result_of_generate_article']); + // 在加载新文章后调用高亮函数 + toggleHighlighting(); } } }); @@ -170,6 +172,8 @@ if(data['today_article']){ update(data['today_article']); check_pre(data['visited_articles']); + // 在加载新文章后调用高亮函数 + toggleHighlighting(); } } }); -- 2.17.1