add:新增今日动画按钮
This commit is contained in:
@@ -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 = '<table class="layui-table"> <colgroup> <col width="150" /> <col width="200" /> <col /> </colgroup> <thead> <tr> <th>标题</th> <th>首更时间</th> <th>图片</th> <th>地址</th> </tr> </thead> <tbody> </tbody>'
|
||||
items.forEach((item) => {
|
||||
let name = item.name_cn
|
||||
if (name === '') {
|
||||
name = item.name;
|
||||
}
|
||||
html += '<tr><td>' + name + '</td><td>' + item.air_date + '</td><td><img src="' + item.images.small + '"></td><td><a href="' + item.url + '" target="_blank">前往番剧计划</a></td></tr>'
|
||||
_tab.push({title: item.name, url: '<a href="' + item.url + '">前往番剧计划</a>'})
|
||||
})
|
||||
html += "</table>"
|
||||
layer.open({
|
||||
title: '今日新番列表',
|
||||
area: ['700px', '300px'],
|
||||
content: html,
|
||||
shade: 0,
|
||||
offset: 'rb'
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -420,7 +456,6 @@
|
||||
$('#bgmUrl')[0].href = url;
|
||||
}
|
||||
|
||||
//let js="" ; $('#team option').each(function() { let value=$(this).val(); let text=$(this).text(); js+='{"'+value+'":"'+text+'"},'})
|
||||
</script>
|
||||
</body>
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user