From 93bfd92d7acebb37d6a83c72c622254b7cba982b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=9C=E6=81=92?= <2323333339@qq.com>
Date: Fri, 26 Mar 2021 15:27:06 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/js/joe.global.js | 4 +-
assets/js/joe.global.min.js | 2 +-
assets/js/joe.index.js | 193 ++++++++++++++--------------
assets/js/joe.index.min.js | 2 +-
assets/js/joe.leaving.js | 3 +
assets/js/joe.leaving.min.js | 2 +-
assets/js/joe.live.js | 2 +
assets/js/joe.live.min.js | 2 +-
assets/js/joe.post&page.js | 6 +-
assets/js/joe.post&page.min.js | 2 +-
assets/js/joe.short.js | 89 ++++++-------
assets/js/joe.short.min.js | 2 +-
assets/js/joe.video.js | 3 +
assets/js/joe.video.min.js | 2 +-
assets/js/joe.wallpaper.js | 2 +
assets/js/joe.wallpaper.min.js | 2 +-
core/function.php | 2 +-
core/short.php | 39 ++++--
package.json | 2 +-
typecho/write/js/joe.write.chunk.js | 5 +-
typecho/write/js/joe.write.js | 5 +-
21 files changed, 195 insertions(+), 176 deletions(-)
diff --git a/assets/js/joe.global.js b/assets/js/joe.global.js
index e03fdb1..57248cc 100644
--- a/assets/js/joe.global.js
+++ b/assets/js/joe.global.js
@@ -170,6 +170,7 @@ document.addEventListener('DOMContentLoaded', () => {
$.ajax({
url: Joe.BASE_API,
type: 'POST',
+ dataType: 'json',
data: { routeType: 'aside_ranking' },
success(res) {
$('.joe_aside__item.ranking .joe_aside__item-title .text').html(res.title);
@@ -322,7 +323,7 @@ document.addEventListener('DOMContentLoaded', () => {
url,
type: 'POST',
data: { author, mail, text, parent },
- datatype: 'text',
+ dataType: 'text',
success(res) {
let arr = [],
str = '';
@@ -449,6 +450,7 @@ document.addEventListener('DOMContentLoaded', () => {
if ($('.joe_owo__contain').length > 0 && $('.joe_owo__target').length > 0) {
$.ajax({
url: '/usr/themes/Joe/assets/json/joe.owo.json',
+ dataType: 'json',
success(res) {
let barStr = '';
let scrollStr = '';
diff --git a/assets/js/joe.global.min.js b/assets/js/joe.global.min.js
index bf12ec8..fe8398c 100644
--- a/assets/js/joe.global.min.js
+++ b/assets/js/joe.global.min.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",()=>{const changeURLArg=(url,arg,arg_val)=>{let pattern=arg+"=([^&]*)",replaceText=arg+"="+arg_val;if(url.match(pattern)){let tmp="/("+arg+"=)([^&]*)/gi";return url.replace(eval(tmp),replaceText)}return url.match("[?]")?url+"&"+replaceText:url+"?"+replaceText};localStorage.getItem("data-night")?($(".joe_action_item.mode .icon-1").addClass("active"),$(".joe_action_item.mode .icon-2").removeClass("active")):($("html").removeAttr("data-night"),$(".joe_action_item.mode .icon-1").removeClass("active"),$(".joe_action_item.mode .icon-2").addClass("active")),$(".joe_action_item.mode").on("click",()=>{localStorage.getItem("data-night")?($(".joe_action_item.mode .icon-1").removeClass("active"),$(".joe_action_item.mode .icon-2").addClass("active"),$("html").removeAttr("data-night"),localStorage.removeItem("data-night")):($(".joe_action_item.mode .icon-1").addClass("active"),$(".joe_action_item.mode .icon-2").removeClass("active"),$("html").attr("data-night","night"),localStorage.setItem("data-night","night"))}),Joe.IS_MOBILE||"off"===Joe.DYNAMIC_BACKGROUND||!Joe.DYNAMIC_BACKGROUND||Joe.WALLPAPER_BACKGROUND_PC||$.getScript(`/usr/themes/Joe/assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`),$(".joe_header__above-search .input").on("click",t=>{t.stopPropagation(),$(".joe_header__above-search .result").addClass("active")}),$(document).on("click",function(){$(".joe_header__above-search .result").removeClass("active")}),$(document).on("scroll",function(){$(".joe_header__above-search .result").removeClass("active")}),$(".joe_dropdown").each(function(t,e){const o=$(this).find(".joe_dropdown__menu"),a=$(e).attr("trigger")||"click",n=$(e).attr("placement")||$(this).height()||0;o.css("top",n),"hover"===a?$(this).hover(()=>$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",function(t){$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),t.stopPropagation()}),o.on("click",t=>t.stopPropagation()))});{const t=()=>(document.documentElement.scrollTop||document.body.scrollTop)>300?$(".joe_action_item.scroll").addClass("active"):$(".joe_action_item.scroll").removeClass("active");t(),$(window).on("scroll",()=>t()),$(".joe_action_item.scroll").on("click",()=>window.scrollTo({top:0,behavior:"smooth"}))}if(0!==$(".joe_aside__item.timelife").length){let t=[{title:"今日已经过去",endTitle:"小时",num:0,percent:"0%"},{title:"这周已经过去",endTitle:"天",num:0,percent:"0%"},{title:"本月已经过去",endTitle:"天",num:0,percent:"0%"},{title:"今年已经过去",endTitle:"个月",num:0,percent:"0%"}];{let e=+new Date,o=new Date((new Date).toLocaleDateString()).getTime(),a=(e-o)/1e3/60/60,n=a/24*100;t[0].num=parseInt(a),t[0].percent=parseInt(n)+"%"}{let e={0:7,1:1,2:2,3:3,4:4,5:5,6:6},o=e[(new Date).getDay()],a=o/7*100;t[1].num=parseInt(o),t[1].percent=parseInt(a)+"%"}{let e=(new Date).getFullYear(),o=(new Date).getDate(),a=(new Date).getMonth()+1,n=new Date(e,a,0).getDate(),i=o/n*100;t[2].num=o,t[2].percent=parseInt(i)+"%"}{let e=(new Date).getMonth()+1,o=e/12*100;t[3].num=e,t[3].percent=parseInt(o)+"%"}let e="";t.forEach((t,o)=>{e+=`\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${t.title}\n\t\t\t\t\t\t\t\t${t.num} \n\t\t\t\t\t\t\t\t${t.endTitle}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
${t.percent}
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
`}),$(".joe_aside__item.timelife .joe_aside__item-contain").html(e)}if(0!==$(".joe_aside__item.weather").length){const t=$(".joe_aside__item.weather").attr("data-key"),e=$(".joe_aside__item.weather").attr("data-style"),o={1:"FFFFFF",2:"4A4A4A",3:"FFFFFF"};window.WIDGET={CONFIG:{layout:2,width:"220",height:"270",background:e,dataColor:o[e],language:"zh",key:t}},$.getScript("https://apip.weatherdt.com/standard/static/js/weather-standard.js?v=2.0")}0!==$(".joe_aside__item.ranking").length&&$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"aside_ranking"},success(t){$(".joe_aside__item.ranking .joe_aside__item-title .text").html(t.title);let e="";1===t.code?t.data.forEach((t,o)=>{e+=`\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t${o+1} \n\t\t\t\t\t\t\t\t\t\t${t.title} \n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t`}):e+='数据抓取异常! ',$(".joe_aside__item.ranking .joe_aside__item-contain").html(e)}}),$(".joe_aside__item:last-child").css("top",$(".joe_header").height()+15),"off"!==Joe.LIVE2D&&Joe.LIVE2D&&$.getScript("https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js",()=>{L2Dwidget.init({model:{jsonPath:Joe.LIVE2D,scale:1},mobile:{show:!1},display:{position:"right",width:160,height:200,hOffset:70,vOffset:0}})});{const t=()=>{let t=$(window).scrollTop(),e=$(document).height(),o=$(window).height(),a=parseInt(t/(e-o)*100);a<=0&&(a=0),a>=100&&(a=100),$(".joe_header__below-progress").css("width",a+"%")};t(),$(window).on("scroll",()=>t())}$(".joe_comment__respond-type .item").on("click",function(){$(this).addClass("active").siblings().removeClass("active"),"draw"===$(this).attr("data-type")?($(".joe_comment__respond-form .body .draw").show().siblings().hide(),$("#joe_comment_draw").prop("width",$(".joe_comment__respond-form .body").width()),$(".joe_comment__respond-form").attr("data-type","draw")):($(".joe_comment__respond-form .body .text").show().siblings().hide(),$(".joe_comment__respond-form").attr("data-type","text"))}),0!==$("#joe_comment_draw").length&&(window.sketchpad=new Sketchpad({element:"#joe_comment_draw",height:300,penSize:5,color:"303133"}),$(".joe_comment__respond-form .body .draw .icon-undo").on("click",()=>window.sketchpad.undo()),$(".joe_comment__respond-form .body .draw .icon-animate").on("click",()=>window.sketchpad.animate(10)),$(".joe_comment__respond-form .body .draw .line li").on("click",function(){window.sketchpad.penSize=$(this).attr("data-line"),$(this).addClass("active").siblings().removeClass("active")}),$(".joe_comment__respond-form .body .draw .color li").on("click",function(){window.sketchpad.color=$(this).attr("data-color"),$(this).addClass("active").siblings().removeClass("active")}));{const t=$(".joe_comment__respond");$(".joe_comment__reply").on("click",function(){const e=$(this).attr("data-coid"),o=$("#"+$(this).attr("data-id"));t.find(".joe_comment__respond-form").attr("data-coid",e),o.append(t),$(".joe_comment__respond-type .item[data-type='text']").click(),$(".joe_comment__cancle").show(),window.scrollTo({top:o.offset().top-$(".joe_header").height()-15,behavior:"smooth"})}),$(".joe_comment__cancle").on("click",function(){t.find(".joe_comment__respond-form").removeAttr("data-coid"),$(".joe_comment__cancle").hide(),$(".joe_comment__title").after(t),$(".joe_comment__respond-type .item[data-type='text']").click(),window.scrollTo({top:$(".joe_comment").offset().top-$(".joe_header").height()-15,behavior:"smooth"})})}{let t=!1;$(".joe_comment__respond-form").on("submit",function(e){e.preventDefault();const o=$(".joe_comment__respond-form").attr("action")+"?time="+ +new Date,a=$(".joe_comment__respond-form").attr("data-type"),n=$(".joe_comment__respond-form").attr("data-coid"),i=$(".joe_comment__respond-form .head input[name='author']").val(),s=$(".joe_comment__respond-form .head input[name='mail']").val();let r=$(".joe_comment__respond-form .body textarea[name='text']").val();if(""===i.trim())return Qmsg.info("请输入昵称!");if(!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(s))return Qmsg.info("请输入正确的邮箱!");if("text"===a&&""===r.trim())return Qmsg.info("请输入评论内容!");if("draw"===a){const t=$("#joe_comment_draw")[0].toDataURL("image/webp",.1);r="{!{"+t+"}!} "}t||(t=!0,$(".joe_comment__respond-form .foot .submit button").html("发送中..."),$.ajax({url:o,type:"POST",data:{author:i,mail:s,text:r,parent:n},datatype:"text",success(e){let o=[],a="";o=$(e).contents(),Array.from(o).forEach(t=>{"container"===t.parentNode.className&&(a=t)}),/Joe/.test(e)?window.location.href=changeURLArg(location.href,"scroll","joe_comment"):(Qmsg.warning(a.textContent.trim()||""),t=!1,$(".joe_comment__respond-form .foot .submit button").html("发表评论"))}}))})}if(Joe.DOCUMENT_TITLE){const t=document.title;document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?document.title=Joe.DOCUMENT_TITLE:document.title=t})}$(".joe_header__above-slideicon").on("click",function(){$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__slideout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active slideout"),$(".joe_header__slideout").addClass("active"))}),$(".joe_header__above-searchicon").on("click",function(){$(".joe_header__slideout").removeClass("active"),$(".joe_header__searchout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active"),$(".joe_header__searchout").addClass("active"))}),$(".joe_header__mask").on("click",function(){$("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").removeClass("active")}),$(".joe_header__slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".joe_header__slideout-menu .panel").on("click",function(){const t=$(this).parent().parent();t.find(".panel").not($(this)).removeClass("in"),t.find(".panel-body").not($(this).siblings(".panel-body")).stop().hide("fast"),$(this).toggleClass("in").siblings(".panel-body").stop().toggle("fast")});{const t=()=>{const t=new Date(Joe.BIRTHDAY),e=+new Date,o=e-t.getTime();let a=o/864e5,n=Math.floor(a),i=24*(a-n),s=Math.floor(i),r=60*(i-s),c=Math.floor(r),d=60*(r-c),l=Math.floor(d);a=String(n).padStart(2,0),i=String(s).padStart(2,0),r=String(c).padStart(2,0),d=String(l).padStart(2,0),$(".joe_run__day").html(a),$(".joe_run__hour").html(i),$(".joe_run__minute").html(r),$(".joe_run__second").html(d)};Joe.BIRTHDAY&&/(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2})\:(\d{1,2})\:(\d{1,2})/.test(Joe.BIRTHDAY)&&(t(),setInterval(t,1e3))}$(".joe_owo__contain").length>0&&$(".joe_owo__target").length>0&&$.ajax({url:"/usr/themes/Joe/assets/json/joe.owo.json",success(t){let e="",o="";for(let a in t)e+=`${a}
`,o+=`\n \n `;$(".joe_owo__contain").html(`\n OωO
\n \n `),$(document).on("click",function(){$(".joe_owo__contain .box").stop().slideUp("fast")}),$(".joe_owo__contain .seat").on("click",function(t){t.stopPropagation(),$(this).siblings(".box").stop().slideToggle("fast")}),$(".joe_owo__contain .box .bar .item").on("click",function(t){t.stopPropagation(),$(this).addClass("active").siblings().removeClass("active");const e='.joe_owo__contain .box .scroll[data-index="'+$(this).attr("data-index")+'"]';$(e).show().siblings(".scroll").hide()}),$(".joe_owo__contain .scroll .item").on("click",function(){const t=$(this).attr("data-text");$(".joe_owo__target").insertContent(t)}),$(".joe_owo__contain .box .bar .item").first().click()}});{let t=Joe.MOTTO;t||(t="有钱终成眷属,没钱亲眼目睹"),t.includes("http")?$.ajax({url:t,dataType:"text",success:t=>$(".joe_motto").html(t)}):$(".joe_motto").html(t)}});
\ No newline at end of file
+document.addEventListener("DOMContentLoaded",()=>{const changeURLArg=(url,arg,arg_val)=>{let pattern=arg+"=([^&]*)",replaceText=arg+"="+arg_val;if(url.match(pattern)){let tmp="/("+arg+"=)([^&]*)/gi";return url.replace(eval(tmp),replaceText)}return url.match("[?]")?url+"&"+replaceText:url+"?"+replaceText};localStorage.getItem("data-night")?($(".joe_action_item.mode .icon-1").addClass("active"),$(".joe_action_item.mode .icon-2").removeClass("active")):($("html").removeAttr("data-night"),$(".joe_action_item.mode .icon-1").removeClass("active"),$(".joe_action_item.mode .icon-2").addClass("active")),$(".joe_action_item.mode").on("click",()=>{localStorage.getItem("data-night")?($(".joe_action_item.mode .icon-1").removeClass("active"),$(".joe_action_item.mode .icon-2").addClass("active"),$("html").removeAttr("data-night"),localStorage.removeItem("data-night")):($(".joe_action_item.mode .icon-1").addClass("active"),$(".joe_action_item.mode .icon-2").removeClass("active"),$("html").attr("data-night","night"),localStorage.setItem("data-night","night"))}),Joe.IS_MOBILE||"off"===Joe.DYNAMIC_BACKGROUND||!Joe.DYNAMIC_BACKGROUND||Joe.WALLPAPER_BACKGROUND_PC||$.getScript(`/usr/themes/Joe/assets/backdrop/${Joe.DYNAMIC_BACKGROUND}`),$(".joe_header__above-search .input").on("click",t=>{t.stopPropagation(),$(".joe_header__above-search .result").addClass("active")}),$(document).on("click",function(){$(".joe_header__above-search .result").removeClass("active")}),$(document).on("scroll",function(){$(".joe_header__above-search .result").removeClass("active")}),$(".joe_dropdown").each(function(t,e){const o=$(this).find(".joe_dropdown__menu"),a=$(e).attr("trigger")||"click",n=$(e).attr("placement")||$(this).height()||0;o.css("top",n),"hover"===a?$(this).hover(()=>$(this).addClass("active"),()=>$(this).removeClass("active")):($(this).on("click",function(t){$(this).toggleClass("active"),$(document).one("click",()=>$(this).removeClass("active")),t.stopPropagation()}),o.on("click",t=>t.stopPropagation()))});{const t=()=>(document.documentElement.scrollTop||document.body.scrollTop)>300?$(".joe_action_item.scroll").addClass("active"):$(".joe_action_item.scroll").removeClass("active");t(),$(window).on("scroll",()=>t()),$(".joe_action_item.scroll").on("click",()=>window.scrollTo({top:0,behavior:"smooth"}))}if(0!==$(".joe_aside__item.timelife").length){let t=[{title:"今日已经过去",endTitle:"小时",num:0,percent:"0%"},{title:"这周已经过去",endTitle:"天",num:0,percent:"0%"},{title:"本月已经过去",endTitle:"天",num:0,percent:"0%"},{title:"今年已经过去",endTitle:"个月",num:0,percent:"0%"}];{let e=+new Date,o=new Date((new Date).toLocaleDateString()).getTime(),a=(e-o)/1e3/60/60,n=a/24*100;t[0].num=parseInt(a),t[0].percent=parseInt(n)+"%"}{let e={0:7,1:1,2:2,3:3,4:4,5:5,6:6},o=e[(new Date).getDay()],a=o/7*100;t[1].num=parseInt(o),t[1].percent=parseInt(a)+"%"}{let e=(new Date).getFullYear(),o=(new Date).getDate(),a=(new Date).getMonth()+1,n=new Date(e,a,0).getDate(),i=o/n*100;t[2].num=o,t[2].percent=parseInt(i)+"%"}{let e=(new Date).getMonth()+1,o=e/12*100;t[3].num=e,t[3].percent=parseInt(o)+"%"}let e="";t.forEach((t,o)=>{e+=`\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t${t.title}\n\t\t\t\t\t\t\t\t${t.num} \n\t\t\t\t\t\t\t\t${t.endTitle}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
${t.percent}
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
`}),$(".joe_aside__item.timelife .joe_aside__item-contain").html(e)}if(0!==$(".joe_aside__item.weather").length){const t=$(".joe_aside__item.weather").attr("data-key"),e=$(".joe_aside__item.weather").attr("data-style"),o={1:"FFFFFF",2:"4A4A4A",3:"FFFFFF"};window.WIDGET={CONFIG:{layout:2,width:"220",height:"270",background:e,dataColor:o[e],language:"zh",key:t}},$.getScript("https://apip.weatherdt.com/standard/static/js/weather-standard.js?v=2.0")}0!==$(".joe_aside__item.ranking").length&&$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"aside_ranking"},success(t){$(".joe_aside__item.ranking .joe_aside__item-title .text").html(t.title);let e="";1===t.code?t.data.forEach((t,o)=>{e+=`\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t${o+1} \n\t\t\t\t\t\t\t\t\t\t${t.title} \n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t`}):e+='数据抓取异常! ',$(".joe_aside__item.ranking .joe_aside__item-contain").html(e)}}),$(".joe_aside__item:last-child").css("top",$(".joe_header").height()+15),"off"!==Joe.LIVE2D&&Joe.LIVE2D&&$.getScript("https://cdn.jsdelivr.net/npm/live2d-widget@3.1.4/lib/L2Dwidget.min.js",()=>{L2Dwidget.init({model:{jsonPath:Joe.LIVE2D,scale:1},mobile:{show:!1},display:{position:"right",width:160,height:200,hOffset:70,vOffset:0}})});{const t=()=>{let t=$(window).scrollTop(),e=$(document).height(),o=$(window).height(),a=parseInt(t/(e-o)*100);a<=0&&(a=0),a>=100&&(a=100),$(".joe_header__below-progress").css("width",a+"%")};t(),$(window).on("scroll",()=>t())}$(".joe_comment__respond-type .item").on("click",function(){$(this).addClass("active").siblings().removeClass("active"),"draw"===$(this).attr("data-type")?($(".joe_comment__respond-form .body .draw").show().siblings().hide(),$("#joe_comment_draw").prop("width",$(".joe_comment__respond-form .body").width()),$(".joe_comment__respond-form").attr("data-type","draw")):($(".joe_comment__respond-form .body .text").show().siblings().hide(),$(".joe_comment__respond-form").attr("data-type","text"))}),0!==$("#joe_comment_draw").length&&(window.sketchpad=new Sketchpad({element:"#joe_comment_draw",height:300,penSize:5,color:"303133"}),$(".joe_comment__respond-form .body .draw .icon-undo").on("click",()=>window.sketchpad.undo()),$(".joe_comment__respond-form .body .draw .icon-animate").on("click",()=>window.sketchpad.animate(10)),$(".joe_comment__respond-form .body .draw .line li").on("click",function(){window.sketchpad.penSize=$(this).attr("data-line"),$(this).addClass("active").siblings().removeClass("active")}),$(".joe_comment__respond-form .body .draw .color li").on("click",function(){window.sketchpad.color=$(this).attr("data-color"),$(this).addClass("active").siblings().removeClass("active")}));{const t=$(".joe_comment__respond");$(".joe_comment__reply").on("click",function(){const e=$(this).attr("data-coid"),o=$("#"+$(this).attr("data-id"));t.find(".joe_comment__respond-form").attr("data-coid",e),o.append(t),$(".joe_comment__respond-type .item[data-type='text']").click(),$(".joe_comment__cancle").show(),window.scrollTo({top:o.offset().top-$(".joe_header").height()-15,behavior:"smooth"})}),$(".joe_comment__cancle").on("click",function(){t.find(".joe_comment__respond-form").removeAttr("data-coid"),$(".joe_comment__cancle").hide(),$(".joe_comment__title").after(t),$(".joe_comment__respond-type .item[data-type='text']").click(),window.scrollTo({top:$(".joe_comment").offset().top-$(".joe_header").height()-15,behavior:"smooth"})})}{let t=!1;$(".joe_comment__respond-form").on("submit",function(e){e.preventDefault();const o=$(".joe_comment__respond-form").attr("action")+"?time="+ +new Date,a=$(".joe_comment__respond-form").attr("data-type"),n=$(".joe_comment__respond-form").attr("data-coid"),i=$(".joe_comment__respond-form .head input[name='author']").val(),s=$(".joe_comment__respond-form .head input[name='mail']").val();let r=$(".joe_comment__respond-form .body textarea[name='text']").val();if(""===i.trim())return Qmsg.info("请输入昵称!");if(!/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(s))return Qmsg.info("请输入正确的邮箱!");if("text"===a&&""===r.trim())return Qmsg.info("请输入评论内容!");if("draw"===a){const t=$("#joe_comment_draw")[0].toDataURL("image/webp",.1);r="{!{"+t+"}!} "}t||(t=!0,$(".joe_comment__respond-form .foot .submit button").html("发送中..."),$.ajax({url:o,type:"POST",data:{author:i,mail:s,text:r,parent:n},dataType:"text",success(e){let o=[],a="";o=$(e).contents(),Array.from(o).forEach(t=>{"container"===t.parentNode.className&&(a=t)}),/Joe/.test(e)?window.location.href=changeURLArg(location.href,"scroll","joe_comment"):(Qmsg.warning(a.textContent.trim()||""),t=!1,$(".joe_comment__respond-form .foot .submit button").html("发表评论"))}}))})}if(Joe.DOCUMENT_TITLE){const t=document.title;document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState?document.title=Joe.DOCUMENT_TITLE:document.title=t})}$(".joe_header__above-slideicon").on("click",function(){$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__slideout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active slideout"),$(".joe_header__slideout").addClass("active"))}),$(".joe_header__above-searchicon").on("click",function(){$(".joe_header__slideout").removeClass("active"),$(".joe_header__searchout").hasClass("active")?($("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active")):($("body").css("overflow","hidden"),$(".joe_header__mask").addClass("active"),$(".joe_header__searchout").addClass("active"))}),$(".joe_header__mask").on("click",function(){$("body").css("overflow",""),$(".joe_header__mask").removeClass("active slideout"),$(".joe_header__searchout").removeClass("active"),$(".joe_header__slideout").removeClass("active")}),$(".joe_header__slideout-menu .current").parents(".panel-body").show().siblings(".panel").addClass("in"),$(".joe_header__slideout-menu .panel").on("click",function(){const t=$(this).parent().parent();t.find(".panel").not($(this)).removeClass("in"),t.find(".panel-body").not($(this).siblings(".panel-body")).stop().hide("fast"),$(this).toggleClass("in").siblings(".panel-body").stop().toggle("fast")});{const t=()=>{const t=new Date(Joe.BIRTHDAY),e=+new Date,o=e-t.getTime();let a=o/864e5,n=Math.floor(a),i=24*(a-n),s=Math.floor(i),r=60*(i-s),c=Math.floor(r),d=60*(r-c),l=Math.floor(d);a=String(n).padStart(2,0),i=String(s).padStart(2,0),r=String(c).padStart(2,0),d=String(l).padStart(2,0),$(".joe_run__day").html(a),$(".joe_run__hour").html(i),$(".joe_run__minute").html(r),$(".joe_run__second").html(d)};Joe.BIRTHDAY&&/(\d{4})\/(\d{1,2})\/(\d{1,2}) (\d{1,2})\:(\d{1,2})\:(\d{1,2})/.test(Joe.BIRTHDAY)&&(t(),setInterval(t,1e3))}$(".joe_owo__contain").length>0&&$(".joe_owo__target").length>0&&$.ajax({url:"/usr/themes/Joe/assets/json/joe.owo.json",dataType:"json",success(t){let e="",o="";for(let a in t)e+=`${a}
`,o+=`\n \n `;$(".joe_owo__contain").html(`\n OωO
\n \n `),$(document).on("click",function(){$(".joe_owo__contain .box").stop().slideUp("fast")}),$(".joe_owo__contain .seat").on("click",function(t){t.stopPropagation(),$(this).siblings(".box").stop().slideToggle("fast")}),$(".joe_owo__contain .box .bar .item").on("click",function(t){t.stopPropagation(),$(this).addClass("active").siblings().removeClass("active");const e='.joe_owo__contain .box .scroll[data-index="'+$(this).attr("data-index")+'"]';$(e).show().siblings(".scroll").hide()}),$(".joe_owo__contain .scroll .item").on("click",function(){const t=$(this).attr("data-text");$(".joe_owo__target").insertContent(t)}),$(".joe_owo__contain .box .bar .item").first().click()}});{let t=Joe.MOTTO;t||(t="有钱终成眷属,没钱亲眼目睹"),t.includes("http")?$.ajax({url:t,dataType:"text",success:t=>$(".joe_motto").html(t)}):$(".joe_motto").html(t)}});
\ No newline at end of file
diff --git a/assets/js/joe.index.js b/assets/js/joe.index.js
index e264b29..f961db5 100644
--- a/assets/js/joe.index.js
+++ b/assets/js/joe.index.js
@@ -1,29 +1,29 @@
document.addEventListener('DOMContentLoaded', () => {
- /* 激活轮播图功能 */
- {
- if ($('.joe_index__banner .swiper-container').length !== 0) {
- let direction = 'horizontal';
- if (!Joe.IS_MOBILE && $('.joe_index__banner-recommend .item').length === 2) direction = 'vertical';
- new Swiper('.swiper-container', {
- keyboard: false,
- direction,
- loop: true,
- autoplay: true,
- mousewheel: true,
- pagination: { el: '.swiper-pagination' },
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev'
- }
- });
- }
- }
+ /* 激活轮播图功能 */
+ {
+ if ($('.joe_index__banner .swiper-container').length !== 0) {
+ let direction = 'horizontal';
+ if (!Joe.IS_MOBILE && $('.joe_index__banner-recommend .item').length === 2) direction = 'vertical';
+ new Swiper('.swiper-container', {
+ keyboard: false,
+ direction,
+ loop: true,
+ autoplay: true,
+ mousewheel: true,
+ pagination: { el: '.swiper-pagination' },
+ navigation: {
+ nextEl: '.swiper-button-next',
+ prevEl: '.swiper-button-prev'
+ }
+ });
+ }
+ }
- /* 初始化首页列表功能 */
- {
- const getListMode = _ => {
- if (_.mode === 'default') {
- return `
+ /* 初始化首页列表功能 */
+ {
+ const getListMode = _ => {
+ if (_.mode === 'default') {
+ return `
@@ -51,8 +51,8 @@ document.addEventListener('DOMContentLoaded', () => {
`;
- } else if (_.mode === 'single') {
- return `
+ } else if (_.mode === 'single') {
+ return `
@@ -82,8 +82,8 @@ document.addEventListener('DOMContentLoaded', () => {
`;
- } else if (_.mode === 'multiple') {
- return `
+ } else if (_.mode === 'multiple') {
+ return `
@@ -94,12 +94,12 @@ document.addEventListener('DOMContentLoaded', () => {
${_.image
- .map((item, index) => {
- if (index < 3) {
- return ` `;
- }
- })
- .join('')}
+ .map((item, index) => {
+ if (index < 3) {
+ return ` `;
+ }
+ })
+ .join('')}
`;
- } else {
- return `
+ } else {
+ return `
@@ -139,67 +139,68 @@ document.addEventListener('DOMContentLoaded', () => {
`;
- }
- };
- let queryData = { page: 1, pageSize: 12, type: 'created' };
- const initDom = () => {
- $('.joe_index__list .joe_list').html('');
- $('.joe_load').show();
- let activeItem = $('.joe_index__title-title .item[data-type="' + queryData.type + '"]');
- let activeLine = $('.joe_index__title-title .line');
- activeItem.addClass('active').siblings().removeClass('active');
- activeLine.css({ left: activeItem.position().left, width: activeItem.width() });
- };
- const pushDom = () => {
- return new Promise((reslove, reject) => {
- $('.joe_load').attr('loading', true);
- $('.joe_load').html('loading...');
- $('.joe_index__list .joe_list__loading').show();
- $.ajax({
- url: Joe.BASE_API,
- type: 'POST',
- data: { routeType: 'publish_list', page: queryData.page, pageSize: queryData.pageSize, type: queryData.type },
- success(res) {
- if (res.data.length === 0) {
- $('.joe_load').removeAttr('loading');
- $('.joe_load').html('查看更多');
- $('.joe_load').hide();
- $('.joe_index__list .joe_list__loading').hide();
- return Qmsg.warning('没有更多内容了');
- }
- res.data.forEach(_ => $('.joe_index__list .joe_list').append(getListMode(_)));
- $('.joe_load').removeAttr('loading');
- $('.joe_load').html('查看更多');
- $('.joe_index__list .joe_list__loading').hide();
- reslove(res.data.length > 0 ? res.data.length - 1 : 0);
- }
- });
- });
- };
- initDom();
- pushDom();
+ }
+ };
+ let queryData = { page: 1, pageSize: 12, type: 'created' };
+ const initDom = () => {
+ $('.joe_index__list .joe_list').html('');
+ $('.joe_load').show();
+ let activeItem = $('.joe_index__title-title .item[data-type="' + queryData.type + '"]');
+ let activeLine = $('.joe_index__title-title .line');
+ activeItem.addClass('active').siblings().removeClass('active');
+ activeLine.css({ left: activeItem.position().left, width: activeItem.width() });
+ };
+ const pushDom = () => {
+ return new Promise((reslove, reject) => {
+ $('.joe_load').attr('loading', true);
+ $('.joe_load').html('loading...');
+ $('.joe_index__list .joe_list__loading').show();
+ $.ajax({
+ url: Joe.BASE_API,
+ type: 'POST',
+ dataType: 'json',
+ data: { routeType: 'publish_list', page: queryData.page, pageSize: queryData.pageSize, type: queryData.type },
+ success(res) {
+ if (res.data.length === 0) {
+ $('.joe_load').removeAttr('loading');
+ $('.joe_load').html('查看更多');
+ $('.joe_load').hide();
+ $('.joe_index__list .joe_list__loading').hide();
+ return Qmsg.warning('没有更多内容了');
+ }
+ res.data.forEach(_ => $('.joe_index__list .joe_list').append(getListMode(_)));
+ $('.joe_load').removeAttr('loading');
+ $('.joe_load').html('查看更多');
+ $('.joe_index__list .joe_list__loading').hide();
+ reslove(res.data.length > 0 ? res.data.length - 1 : 0);
+ }
+ });
+ });
+ };
+ initDom();
+ pushDom();
- $('.joe_index__title-title .item').on('click', async function () {
- if ($(this).attr('data-type') === queryData.type) return;
- queryData = { page: 1, pageSize: 12, type: $(this).attr('data-type') };
- initDom();
- pushDom();
- });
+ $('.joe_index__title-title .item').on('click', async function () {
+ if ($(this).attr('data-type') === queryData.type) return;
+ queryData = { page: 1, pageSize: 12, type: $(this).attr('data-type') };
+ initDom();
+ pushDom();
+ });
- $('.joe_load').on('click', async function () {
- if ($(this).attr('loading')) return;
- queryData.page++;
- let length = await pushDom();
- length = $('.joe_index__list .joe_list .joe_list__item').length - length;
- const queryElement = `.joe_index__list .joe_list .joe_list__item:nth-child(${length})`;
- const offset = $(queryElement).offset().top - $('.joe_header').height();
- window.scrollTo({ top: offset - 15, behavior: 'smooth' });
- });
- }
+ $('.joe_load').on('click', async function () {
+ if ($(this).attr('loading')) return;
+ queryData.page++;
+ let length = await pushDom();
+ length = $('.joe_index__list .joe_list .joe_list__item').length - length;
+ const queryElement = `.joe_index__list .joe_list .joe_list__item:nth-child(${length})`;
+ const offset = $(queryElement).offset().top - $('.joe_header').height();
+ window.scrollTo({ top: offset - 15, behavior: 'smooth' });
+ });
+ }
- /* 激活列表特效 */
- {
- const wow = $('.joe_index__list').attr('data-wow');
- if (wow !== 'off' && wow) new WOW({ boxClass: 'wow', animateClass: `animated ${wow}`, offset: 0, mobile: true, live: true, scrollContainer: null }).init();
- }
+ /* 激活列表特效 */
+ {
+ const wow = $('.joe_index__list').attr('data-wow');
+ if (wow !== 'off' && wow) new WOW({ boxClass: 'wow', animateClass: `animated ${wow}`, offset: 0, mobile: true, live: true, scrollContainer: null }).init();
+ }
});
diff --git a/assets/js/joe.index.min.js b/assets/js/joe.index.min.js
index 1b3ae11..3f721ec 100644
--- a/assets/js/joe.index.min.js
+++ b/assets/js/joe.index.min.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",()=>{if(0!==$(".joe_index__banner .swiper-container").length){let l="horizontal";Joe.IS_MOBILE||2!==$(".joe_index__banner-recommend .item").length||(l="vertical"),new Swiper(".swiper-container",{keyboard:!1,direction:l,loop:!0,autoplay:!0,mousewheel:!0,pagination:{el:".swiper-pagination"},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})}{const l=l=>"default"===l.mode?`\n \n
\n \n \n ${l.time} \n \n \n \n \n `:"single"===l.mode?`\n \n
\n \n \n \n ${l.time} \n \n \n \n \n `:"multiple"===l.mode?`\n \n
\n \n \n ${l.image.map((e,t)=>{if(t<3)return` `}).join("")}\n \n \n \n `:`\n \n
\n \n \n `;let e={page:1,pageSize:12,type:"created"};const t=()=>{$(".joe_index__list .joe_list").html(""),$(".joe_load").show();let l=$('.joe_index__title-title .item[data-type="'+e.type+'"]'),t=$(".joe_index__title-title .line");l.addClass("active").siblings().removeClass("active"),t.css({left:l.position().left,width:l.width()})},i=()=>new Promise((t,i)=>{$(".joe_load").attr("loading",!0),$(".joe_load").html("loading..."),$(".joe_index__list .joe_list__loading").show(),$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"publish_list",page:e.page,pageSize:e.pageSize,type:e.type},success(e){if(0===e.data.length)return $(".joe_load").removeAttr("loading"),$(".joe_load").html("查看更多"),$(".joe_load").hide(),$(".joe_index__list .joe_list__loading").hide(),Qmsg.warning("没有更多内容了");e.data.forEach(e=>$(".joe_index__list .joe_list").append(l(e))),$(".joe_load").removeAttr("loading"),$(".joe_load").html("查看更多"),$(".joe_index__list .joe_list__loading").hide(),t(e.data.length>0?e.data.length-1:0)}})});t(),i(),$(".joe_index__title-title .item").on("click",async function(){$(this).attr("data-type")!==e.type&&(e={page:1,pageSize:12,type:$(this).attr("data-type")},t(),i())}),$(".joe_load").on("click",async function(){if($(this).attr("loading"))return;e.page++;let l=await i();l=$(".joe_index__list .joe_list .joe_list__item").length-l;const t=`.joe_index__list .joe_list .joe_list__item:nth-child(${l})`,a=$(t).offset().top-$(".joe_header").height();window.scrollTo({top:a-15,behavior:"smooth"})})}{const l=$(".joe_index__list").attr("data-wow");"off"!==l&&l&&new WOW({boxClass:"wow",animateClass:`animated ${l}`,offset:0,mobile:!0,live:!0,scrollContainer:null}).init()}});
\ No newline at end of file
+document.addEventListener("DOMContentLoaded",()=>{if(0!==$(".joe_index__banner .swiper-container").length){let l="horizontal";Joe.IS_MOBILE||2!==$(".joe_index__banner-recommend .item").length||(l="vertical"),new Swiper(".swiper-container",{keyboard:!1,direction:l,loop:!0,autoplay:!0,mousewheel:!0,pagination:{el:".swiper-pagination"},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})}{const l=l=>"default"===l.mode?`\n \n
\n \n \n ${l.time} \n \n \n \n \n `:"single"===l.mode?`\n \n
\n \n \n \n ${l.time} \n \n \n \n \n `:"multiple"===l.mode?`\n \n
\n \n \n ${l.image.map((e,t)=>{if(t<3)return` `}).join("")}\n \n \n \n `:`\n \n
\n \n \n `;let e={page:1,pageSize:12,type:"created"};const t=()=>{$(".joe_index__list .joe_list").html(""),$(".joe_load").show();let l=$('.joe_index__title-title .item[data-type="'+e.type+'"]'),t=$(".joe_index__title-title .line");l.addClass("active").siblings().removeClass("active"),t.css({left:l.position().left,width:l.width()})},i=()=>new Promise((t,i)=>{$(".joe_load").attr("loading",!0),$(".joe_load").html("loading..."),$(".joe_index__list .joe_list__loading").show(),$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"publish_list",page:e.page,pageSize:e.pageSize,type:e.type},success(e){if(0===e.data.length)return $(".joe_load").removeAttr("loading"),$(".joe_load").html("查看更多"),$(".joe_load").hide(),$(".joe_index__list .joe_list__loading").hide(),Qmsg.warning("没有更多内容了");e.data.forEach(e=>$(".joe_index__list .joe_list").append(l(e))),$(".joe_load").removeAttr("loading"),$(".joe_load").html("查看更多"),$(".joe_index__list .joe_list__loading").hide(),t(e.data.length>0?e.data.length-1:0)}})});t(),i(),$(".joe_index__title-title .item").on("click",async function(){$(this).attr("data-type")!==e.type&&(e={page:1,pageSize:12,type:$(this).attr("data-type")},t(),i())}),$(".joe_load").on("click",async function(){if($(this).attr("loading"))return;e.page++;let l=await i();l=$(".joe_index__list .joe_list .joe_list__item").length-l;const t=`.joe_index__list .joe_list .joe_list__item:nth-child(${l})`,a=$(t).offset().top-$(".joe_header").height();window.scrollTo({top:a-15,behavior:"smooth"})})}{const l=$(".joe_index__list").attr("data-wow");"off"!==l&&l&&new WOW({boxClass:"wow",animateClass:`animated ${l}`,offset:0,mobile:!0,live:!0,scrollContainer:null}).init()}});
\ No newline at end of file
diff --git a/assets/js/joe.leaving.js b/assets/js/joe.leaving.js
index cccc44e..85b4912 100644
--- a/assets/js/joe.leaving.js
+++ b/assets/js/joe.leaving.js
@@ -10,6 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
$.ajax({
url: Joe.BASE_API,
type: 'POST',
+ dataType: 'json',
data: { routeType: 'baidu_record', site: window.location.href },
success(res) {
if (res.data && res.data === '已收录') {
@@ -23,6 +24,7 @@ document.addEventListener('DOMContentLoaded', () => {
$.ajax({
url: Joe.BASE_API,
type: 'POST',
+ dataType: 'json',
data: {
routeType: 'baidu_push',
domain: encodeURI(window.location.hostname),
@@ -55,6 +57,7 @@ document.addEventListener('DOMContentLoaded', () => {
$.ajax({
url: Joe.BASE_API,
type: 'POST',
+ dataType: 'json',
data: { routeType: 'handle_views', cid },
success(res) {
if (res.code !== 1) return;
diff --git a/assets/js/joe.leaving.min.js b/assets/js/joe.leaving.min.js
index 77a98f0..56612f0 100644
--- a/assets/js/joe.leaving.min.js
+++ b/assets/js/joe.leaving.min.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",()=>{const e=e=>window.btoa(unescape(encodeURIComponent(e))),o=e=>decodeURIComponent(escape(window.atob(e))),t=$(".joe_detail").attr("data-cid");$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"baidu_record",site:window.location.href},success(e){if(e.data&&"已收录"===e.data)$("#Joe_Baidu_Record").css("color","#67C23A"),$("#Joe_Baidu_Record").html("已收录");else if(Joe.BAIDU_PUSH){$("#Joe_Baidu_Record").html('未收录,推送中... ');const e=setTimeout(function(){$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"baidu_push",domain:encodeURI(window.location.hostname),url:encodeURI(window.location.href)},success(e){e.error?$("#Joe_Baidu_Record").html('推送失败,请检查! '):$("#Joe_Baidu_Record").html('推送成功! ')}}),clearTimeout(e)},1e3)}else{const e=`https://ziyuan.baidu.com/linksubmit/url?sitename=${encodeURI(window.location.href)}`;$("#Joe_Baidu_Record").html(`未收录,提交收录 `)}}});{let a=localStorage.getItem(e("views"))?JSON.parse(o(localStorage.getItem(e("views")))):[];const n=a.includes(t);n||$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"handle_views",cid:t},success(o){if(1!==o.code)return;$("#Joe_Article_Views").html(`${o.data.views} 阅读`),a.push(t);const n=e("views"),i=e(JSON.stringify(a));localStorage.setItem(n,i)}})}{let e=100;const o=["#F8D800","#0396FF","#EA5455","#7367F0","#32CCBC","#F6416C","#28C76F","#9F44D3","#F55555","#736EFE","#E96D71","#DE4313","#D939CD","#4C83FF","#F072B6","#C346C2","#5961F9","#FD6585","#465EFB","#FFC600","#FA742B","#5151E5","#BB4E75","#FF52E5","#49C628","#00EAFF","#F067B4","#F067B4","#ff9a9e","#00f2fe","#4facfe","#f093fb","#6fa3ef","#bc99c4","#46c47c","#f9bb3c","#e8583d","#f68e5f"],t=(e,o)=>Math.floor(Math.random()*(o-e+1))+e,a=$(".joe_detail__leaving-list").width(),n=$(".joe_detail__leaving-list").height(),i=["20px 300px","20px 400px","20px 500px","30px 300px","30px 400px","30px 500px","40px 300px","40px 400px","40px 500px"],l=["300px 20px","400px 20px","500px 20px","300px 30px","400px 30px","500px 30px","300px 40px","400px 40px","500px 40px"];$(".joe_detail__leaving-list .item").each((c,s)=>{const d=t(1,99),r=o[t(0,o.length-1)],p=Math.ceil($(s).width()),h=Math.ceil($(s).height()),x=t(0,n-h),u=t(0,a-p);$(s).css({display:"block",zIndex:d,background:r,top:x,left:u,borderTopLeftRadius:l[t(0,l.length-1)],borderTopRightRadius:i[t(0,i.length-1)],borderBottomLeftRadius:i[t(0,i.length-1)],borderBottomRightRadius:i[t(0,i.length-1)]}),$(s).draggabilly({containment:!0}),$(s).on("dragStart",o=>{e++,$(s).css({zIndex:e})})})}$(".joe_comment .joe_pagination a").each((e,o)=>{const t=$(o).attr("href");t&&t.includes("#")&&$(o).attr("href",t.replace("#comments","?scroll=joe_comment"))})}),window.addEventListener("load",function(){{const e=new URLSearchParams(location.search).get("scroll");if(e){const o=$(".joe_header").height();let t=null;if(t=$("#"+e).length>0?$("#"+e):$("."+e),t&&t.length>0){const e=t.offset().top-o-15;window.scrollTo({top:e,behavior:"smooth"})}}}});
\ No newline at end of file
+document.addEventListener("DOMContentLoaded",()=>{const e=e=>window.btoa(unescape(encodeURIComponent(e))),o=e=>decodeURIComponent(escape(window.atob(e))),t=$(".joe_detail").attr("data-cid");$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"baidu_record",site:window.location.href},success(e){if(e.data&&"已收录"===e.data)$("#Joe_Baidu_Record").css("color","#67C23A"),$("#Joe_Baidu_Record").html("已收录");else if(Joe.BAIDU_PUSH){$("#Joe_Baidu_Record").html('未收录,推送中... ');const e=setTimeout(function(){$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"baidu_push",domain:encodeURI(window.location.hostname),url:encodeURI(window.location.href)},success(e){e.error?$("#Joe_Baidu_Record").html('推送失败,请检查! '):$("#Joe_Baidu_Record").html('推送成功! ')}}),clearTimeout(e)},1e3)}else{const e=`https://ziyuan.baidu.com/linksubmit/url?sitename=${encodeURI(window.location.href)}`;$("#Joe_Baidu_Record").html(`未收录,提交收录 `)}}});{let a=localStorage.getItem(e("views"))?JSON.parse(o(localStorage.getItem(e("views")))):[];const n=a.includes(t);n||$.ajax({url:Joe.BASE_API,type:"POST",dataType:"json",data:{routeType:"handle_views",cid:t},success(o){if(1!==o.code)return;$("#Joe_Article_Views").html(`${o.data.views} 阅读`),a.push(t);const n=e("views"),i=e(JSON.stringify(a));localStorage.setItem(n,i)}})}{let e=100;const o=["#F8D800","#0396FF","#EA5455","#7367F0","#32CCBC","#F6416C","#28C76F","#9F44D3","#F55555","#736EFE","#E96D71","#DE4313","#D939CD","#4C83FF","#F072B6","#C346C2","#5961F9","#FD6585","#465EFB","#FFC600","#FA742B","#5151E5","#BB4E75","#FF52E5","#49C628","#00EAFF","#F067B4","#F067B4","#ff9a9e","#00f2fe","#4facfe","#f093fb","#6fa3ef","#bc99c4","#46c47c","#f9bb3c","#e8583d","#f68e5f"],t=(e,o)=>Math.floor(Math.random()*(o-e+1))+e,a=$(".joe_detail__leaving-list").width(),n=$(".joe_detail__leaving-list").height(),i=["20px 300px","20px 400px","20px 500px","30px 300px","30px 400px","30px 500px","40px 300px","40px 400px","40px 500px"],l=["300px 20px","400px 20px","500px 20px","300px 30px","400px 30px","500px 30px","300px 40px","400px 40px","500px 40px"];$(".joe_detail__leaving-list .item").each((c,s)=>{const d=t(1,99),r=o[t(0,o.length-1)],p=Math.ceil($(s).width()),h=Math.ceil($(s).height()),x=t(0,n-h),u=t(0,a-p);$(s).css({display:"block",zIndex:d,background:r,top:x,left:u,borderTopLeftRadius:l[t(0,l.length-1)],borderTopRightRadius:i[t(0,i.length-1)],borderBottomLeftRadius:i[t(0,i.length-1)],borderBottomRightRadius:i[t(0,i.length-1)]}),$(s).draggabilly({containment:!0}),$(s).on("dragStart",o=>{e++,$(s).css({zIndex:e})})})}$(".joe_comment .joe_pagination a").each((e,o)=>{const t=$(o).attr("href");t&&t.includes("#")&&$(o).attr("href",t.replace("#comments","?scroll=joe_comment"))})}),window.addEventListener("load",function(){{const e=new URLSearchParams(location.search).get("scroll");if(e){const o=$(".joe_header").height();let t=null;if(t=$("#"+e).length>0?$("#"+e):$("."+e),t&&t.length>0){const e=t.offset().top-o-15;window.scrollTo({top:e,behavior:"smooth"})}}}});
\ No newline at end of file
diff --git a/assets/js/joe.live.js b/assets/js/joe.live.js
index c2320b2..c192ecd 100644
--- a/assets/js/joe.live.js
+++ b/assets/js/joe.live.js
@@ -26,6 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
function renderLiveType() {
$.ajax({
url: '/usr/themes/Joe/assets/json/joe.live.json',
+ dataType: 'json',
success(res) {
const item = res[queryData.index];
$('.joe_live__type-title .text').html(item.name);
@@ -43,6 +44,7 @@ document.addEventListener('DOMContentLoaded', () => {
$.ajax({
url: Joe.BASE_API,
type: 'POST',
+ dataType: 'json',
data: {
routeType: 'huya_list',
page: queryData.page,
diff --git a/assets/js/joe.live.min.js b/assets/js/joe.live.min.js
index df6dd14..bba2a34 100644
--- a/assets/js/joe.live.min.js
+++ b/assets/js/joe.live.min.js
@@ -1 +1 @@
-document.addEventListener("DOMContentLoaded",()=>{function a(){function a(){$.ajax({url:"/usr/themes/Joe/assets/json/joe.live.json",success(a){const e=a[n.index];$(".joe_live__type-title .text").html(e.name);let t='全部 ';e.list.forEach(a=>t+=`${a.name} `),$(".joe_live__type-list").html(t),$(".joe_live__type-list .item").first().click()}})}function e(){window.scrollTo({top:0,behavior:"smooth"}),n.isLoading=!0,$(".joe_live__list").html(""),$.ajax({url:Joe.BASE_API,type:"POST",data:{routeType:"huya_list",page:n.page,gameId:n.gameId},success(a){if(1!==a.code)return;let e="";a.data.datas.forEach(a=>{e+=`\n \n \n
${a.recommendTagName} \n
\n
\n \n
\n
\n
\n
\n
${a.nick}
\n
${a.introduction}
\n
\n
\n \n `}),$(".joe_live__list").html(e),n.totalPage=a.data.totalPage,t()},complete:()=>n.isLoading=!1})}function t(){let a="";1!=n.page&&(a+=`\n \t\t\n \t\t\n \t\t\n \t`),a+=``,n.page!=n.totalPage&&(a+=`\n \t\t\n \t\t\n \t`),n.page