forked from mrlan/EnglishPal
Compare commits
8 Commits
master
...
Bug422-XuX
Author | SHA1 | Date |
---|---|---|
Lan Hui | 4fb1cad745 | |
Lan Hui | 2a553e0f8f | |
Lan Hui | 4513a80bdd | |
Lan Hui | e73c66edd3 | |
Lan Hui | 69835c7f8d | |
徐幸 | 71cc627aad | |
徐幸 | 22775f9797 | |
徐幸 | 9e36644215 |
|
@ -28,7 +28,13 @@
|
||||||
</p>
|
</p>
|
||||||
{{ flashed_messages|safe }}
|
{{ flashed_messages|safe }}
|
||||||
|
|
||||||
<p><a class="btn btn-success" href="/{{ username }}/reset" role="button"> 下一篇 Next Article </a></p>
|
<a class="btn btn-success" href="/{{ username }}/reset" role="button"> 下一篇 Next Article </a>
|
||||||
|
{% if session.get('articleID') != session.get('old_articleID') %}
|
||||||
|
{% if session.get('old_articleID') != None %}
|
||||||
|
<a class="btn btn-success" href="/{{ username }}/back" role="button"> 上一篇 Previous Article </a>
|
||||||
|
{% endif%}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<p><b>阅读文章并回答问题</b></p>
|
<p><b>阅读文章并回答问题</b></p>
|
||||||
<div id="text-content">{{ today_article|safe }}</div>
|
<div id="text-content">{{ today_article|safe }}</div>
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,25 @@ def user_reset(username):
|
||||||
:param username: 用户名
|
:param username: 用户名
|
||||||
:return: 返回页面内容
|
:return: 返回页面内容
|
||||||
'''
|
'''
|
||||||
|
session['old_articleID'] = session.get('articleID')
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
session['articleID'] = None
|
session['articleID'] = None
|
||||||
return redirect(url_for('user_bp.userpage', username=username))
|
return redirect(url_for('user_bp.userpage', username=username))
|
||||||
else:
|
else:
|
||||||
return 'Under construction'
|
return 'Under construction'
|
||||||
|
|
||||||
|
@userService.route("/<username>/back", methods=['GET'])
|
||||||
|
def user_back(username):
|
||||||
|
'''
|
||||||
|
用户界面
|
||||||
|
:param username: 用户名
|
||||||
|
:return: 返回页面内容
|
||||||
|
'''
|
||||||
|
if request.method == 'GET':
|
||||||
|
session['articleID'] = session.get('old_articleID')
|
||||||
|
return redirect(url_for('user_bp.userpage', username=username))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@userService.route("/<username>/<word>/unfamiliar", methods=['GET', 'POST'])
|
@userService.route("/<username>/<word>/unfamiliar", methods=['GET', 'POST'])
|
||||||
def unfamiliar(username, word):
|
def unfamiliar(username, word):
|
||||||
|
|
Loading…
Reference in New Issue