From 8251c5514f058497147d57d55737b63cac1690ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 19 Jul 2019 16:31:28 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_returnTop_btn.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/users/_returnTop_btn.html.erb b/app/views/users/_returnTop_btn.html.erb index 4ccc60f2..45144399 100644 --- a/app/views/users/_returnTop_btn.html.erb +++ b/app/views/users/_returnTop_btn.html.erb @@ -48,15 +48,17 @@ $(function() { var trophy_uid = false; - console.log(trophy_uid) + if (window.localStorage) { trophy_uid = localStorage.getItem('trophy_uid'); } else { trophy_uid = false } - if(trophy_uid===true){ + + if(trophy_uid==="true"){ $("#trophyreturn").hide() } + }) From 7199e13120e65c7afaed513d84f40b65f9ea1acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 19 Jul 2019 16:56:53 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_returnTop_btn.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/users/_returnTop_btn.html.erb b/app/views/users/_returnTop_btn.html.erb index 45144399..9a3c7c32 100644 --- a/app/views/users/_returnTop_btn.html.erb +++ b/app/views/users/_returnTop_btn.html.erb @@ -54,8 +54,8 @@ } else { trophy_uid = false } - - if(trophy_uid==="true"){ + + if(trophy_uid==="true"||trophy_uid===true){ $("#trophyreturn").hide() }