From ffb9c8f161c62893cfebacf6457369a66cd3ad0c Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Sat, 16 Jul 2022 18:40:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=99=BB=E9=99=86=E6=AD=BB=E5=BE=AA?= =?UTF-8?q?=E7=8E=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/html/body/nas/animrss.html | 4 ++-- web/html/header.html | 1 - web/js/myjs.js | 6 ++++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/web/html/body/nas/animrss.html b/web/html/body/nas/animrss.html index f8913ba..a957090 100644 --- a/web/html/body/nas/animrss.html +++ b/web/html/body/nas/animrss.html @@ -357,8 +357,8 @@ } else if (obj.event === 'bgm_src') { window.open("https://bgm.tv/subject/" + obj.data.bgmid) } else if (obj.event==='mikan'){ - console.log(getParam('bangumiId',obj.data.title)) - window.open('https://mikanani.me/Home/Bangumi/'+getParam('bangumiId',obj.data.title)+'#'+getParam('subgroupid',obj.data.title)) + console.log(getParamToUrl('bangumiId',obj.data.title)) + window.open('https://mikanani.me/Home/Bangumi/'+getParamToUrl('bangumiId',obj.data.title)+'#'+getParamToUrl('subgroupid',obj.data.title)) } else if (obj.event==='tmp_rss_show'){ window.open(obj.data.title) } else if (obj.event==='tmp_rss_del'){ diff --git a/web/html/header.html b/web/html/header.html index b98a932..49640b1 100644 --- a/web/html/header.html +++ b/web/html/header.html @@ -66,7 +66,6 @@ $.get("/login/check.do",{share:getParam("share")}, function (data) { try { let json = JSON.parse(data); - console.log(data) if (json.code === 0) { $('#login_text').text('已登录') loginStatus = true; diff --git a/web/js/myjs.js b/web/js/myjs.js index 0c22325..f42c536 100644 --- a/web/js/myjs.js +++ b/web/js/myjs.js @@ -102,9 +102,11 @@ function Base64() { } } function getParam(name){ - return getParam(name,window.location.href) + let url=window.location.href; + return getParamToUrl(name,url) } -function getParam(name,url){ +function getParamToUrl(name,url){ + console.log(url) let results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(url); if (results == null) { return null;