diff --git a/app/static/config.yml b/app/static/config.yml index 20aa396..e6f7ef1 100644 --- a/app/static/config.yml +++ b/app/static/config.yml @@ -1,16 +1,16 @@ # 全局引入的css文件地址 css: item: - - static/css/bootstrap.css + - ../static/css/bootstrap.css # 全局引入的js文件地址 js: head: # 在页面加载之前加载 - - static/js/jquery.js - - static/js/word_operation.js + - ../static/js/jquery.js + - ../static/js/word_operation.js bottom: # 在页面加载完之后加载 - - static/js/fillword.js - - static/js/highlight.js + - ../static/js/fillword.js + - ../static/js/highlight.js # 高亮样式,目前仅支持修改颜色 highlight: diff --git a/app/templates/login.html b/app/templates/login.html index ccf6f34..2507f75 100644 --- a/app/templates/login.html +++ b/app/templates/login.html @@ -22,7 +22,7 @@ alert('无法通过验证。'); window.location.href = "/login"; } else if (response.status === '1') { - window.location.href = "/"+username; + window.location.href = "/"+username+"/userpage"; } } ) diff --git a/app/templates/reset.html b/app/templates/reset.html index d29855b..3425c97 100644 --- a/app/templates/reset.html +++ b/app/templates/reset.html @@ -45,7 +45,7 @@ - + {% endblock %} \ No newline at end of file diff --git a/app/templates/signup.html b/app/templates/signup.html index c70e4ba..9030d41 100644 --- a/app/templates/signup.html +++ b/app/templates/signup.html @@ -35,7 +35,7 @@ You're logged in already! Logout. } else if (response.status === '2') { let f = confirm("恭喜,你已成功注册,你的用户名是"+username+'.\n点击“确认”开始使用,或点击“取消”返回首页'); if (f) { - window.location.href = '/'+username; + window.location.href = '/'+username+'/userpage'; } else { window.location.href = '/'; } diff --git a/app/templates/userpage_get.html b/app/templates/userpage_get.html index 428bb3b..8936ff7 100644 --- a/app/templates/userpage_get.html +++ b/app/templates/userpage_get.html @@ -90,7 +90,7 @@

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

-
+
diff --git a/app/user_service.py b/app/user_service.py index 61b129d..b9f8d26 100644 --- a/app/user_service.py +++ b/app/user_service.py @@ -97,7 +97,7 @@ def deleteword(username, word): return "success" -@userService.route("/", methods=['GET', 'POST']) +@userService.route("//userpage", methods=['GET', 'POST']) def userpage(username): ''' 用户界面 @@ -105,6 +105,7 @@ def userpage(username): :return: 返回用户界面 ''' # 未登录,跳转到未登录界面 + print("123123") if not session.get('logged_in'): return render_template('not_login.html')