diff --git a/src/main/java/com/yutou/tools/bangumi/AnimationController.java b/src/main/java/com/yutou/tools/bangumi/AnimationController.java index ca92a21..4f7043f 100644 --- a/src/main/java/com/yutou/tools/bangumi/AnimationController.java +++ b/src/main/java/com/yutou/tools/bangumi/AnimationController.java @@ -10,6 +10,7 @@ import com.yutou.tools.mybatis.model.BangumiItemExample; import com.yutou.tools.mybatis.model.BangumiList; import com.yutou.tools.mybatis.model.BangumiListExample; import com.yutou.tools.services.interfaces.BangumiService; +import com.yutou.tools.utils.BangumiTools; import org.springframework.stereotype.Controller; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; @@ -166,4 +167,9 @@ public class AnimationController { JSONArray array= (JSONArray) JSON.toJSON(list); return array.toJSONString(); } + @ResponseBody + @RequestMapping(value = "/anim/getToDay.do", method = RequestMethod.GET) + public JSONObject getToDayAnim(){ + return BangumiTools.getBangumi(0); + } } diff --git a/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java b/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java index bbcb37c..ceb32ac 100644 --- a/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java +++ b/src/main/java/com/yutou/tools/services/BangumiServiceImpl.java @@ -75,7 +75,7 @@ public class BangumiServiceImpl implements BangumiService { continue; } JSONObject bangumi=BangumiTools.getBangumiInfoSmall(item.getBgmid()); - if(bangumi.getInteger("code")==404){ + if(bangumi.containsKey("code")&&bangumi.getInteger("code")==404){ continue; } int day=Tools.getWeekDay(); diff --git a/web/html/body/nas/animrss.html b/web/html/body/nas/animrss.html index c741e9e..6772959 100644 --- a/web/html/body/nas/animrss.html +++ b/web/html/body/nas/animrss.html @@ -203,11 +203,23 @@ } }) - layui.use(['layer', 'form', 'element', 'table'], function () { + layui.use(['layer', 'form', 'element', 'table', 'util'], function () { let layer = layui.layer + , util = layui.util , form = layui.form , table = layui.table , element = layui.element; + util.fixbar({ + bar1: '', + bgcolor: '#393D49', + css: {right: 100, bottom: 100}, + click: function(type){ + console.log(type); + if(type === 'bar1'){ + showToDayAnim() + } + } + }); $.get("/anim/type/list.do", function (data) { let json = JSON.parse(data); if (json.code === 0) { @@ -411,6 +423,30 @@ } + function showToDayAnim() { + $.get("/anim/getToDay.do", function (json) { + let items = json.items; + let _tab = [] + let html = '
标题 | 首更时间 | 图片 | 地址 |
---|---|---|---|
' + name + ' | ' + item.air_date + ' | 前往番剧计划 |