diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index 9eecbd2..be503e6 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -29,8 +29,8 @@ {{ flashed_messages|safe }} 下一篇 Next Article - {% if session.get('articleID') != session.get('temp') %} - {% if session.get('temp') != None %} + {% if session.get('articleID') != session.get('old_articleID') %} + {% if session.get('old_articleID') != None %} 上一篇 Previous Article {% endif%} {% endif %} diff --git a/app/user_service.py b/app/user_service.py index f758f77..7ae608a 100644 --- a/app/user_service.py +++ b/app/user_service.py @@ -29,7 +29,7 @@ def user_reset(username): :param username: 用户名 :return: 返回页面内容 ''' - session['temp'] = session.get('articleID') + session['old_artcileID'] = session.get('articleID') if request.method == 'GET': session['articleID'] = None return redirect(url_for('user_bp.userpage', username=username)) @@ -44,7 +44,7 @@ def user_back(username): :return: 返回页面内容 ''' if request.method == 'GET': - session['articleID'] = session.get('temp') + session['articleID'] = session.get('old_artcileID') return redirect(url_for('user_bp.userpage', username=username))