feat(templates): 新增绿色主题模版,并设置为默认模版
和文档站点 docs.xxyopen.com 风格保持一致
BIN
templates/green/static/mobile/IMG_1470.JPG
Normal file
After Width: | Height: | Size: 56 KiB |
@ -0,0 +1 @@
|
||||
ANtJi2eSPQ
|
@ -0,0 +1 @@
|
||||
Ep8xaWQJAI
|
@ -0,0 +1 @@
|
||||
L6sR9GjEtg
|
90
templates/green/static/mobile/book_content.html
Normal file
92
templates/green/static/mobile/book_detail.html
Normal file
@ -0,0 +1,92 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>帝霸</title>
|
||||
<link rel="stylesheet" href="./layui/css/layui.css">
|
||||
<style type="text/css">
|
||||
|
||||
.indexP p a{
|
||||
color:#4c6978;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">帝霸</b>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row" style="background: #f2f2f2">
|
||||
<div style="padding: 10px" class="layui-col-xs4 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">评分:<i style="font-weight:bold;color: red">9.2分</i></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align: center;height: 60px;line-height: 60px">
|
||||
<button type="button" class="layui-btn layui-btn-radius">开始阅读</button>
|
||||
<button type="button" onclick="AddToFavorites()" class="layui-btn layui-btn-radius layui-btn-warm">加入收藏</button>
|
||||
</div>
|
||||
<p style="line-height: 23px;padding: 10px;text-indent: 25px;font-size: 14px;color: #4c6978;">
|
||||
万火儿莫名其妙的重生了,而且从堂堂的金丹修士,直接坠落尘埃,变成天赋极差的炼气期小透明。<br><br> 小透明无父无母小可怜,柔弱无骨真小白花。<br><br> 万火儿仰天长叹。<br><br> 天道你大爷!<br><br> 不过这一次不仅附赠随身空间,还另有极重承诺的天之骄子美貌未婚夫一枚。<br><br> 万火儿抚胸感叹:还好,还好。<br><br> 但是,除此之外,还附赠另一枚重生女!<br><br> 重生女杂灵根,蓦然醒转变为天之骄女,自此之后,丹药在她手,神兽就她有。人生处处是机缘,所到处处有福缘,更有无数美男前仆后继,后宫日益壮大。<br><br> 万火儿哀叹。<br><br> 不同命啊~<br><br> 什么?<br><br> 重生女抢她名额,找未婚夫揍她。<br><br> 什么?<br><br> 重生女抢她好友?让好友接着揍她。<br><br> 什么?<br><br> 重生女要将她未婚夫收后宫?<br><br> 抱歉,绝对不行!<br><br> 自此之后,柔弱小白花,踏上漫漫极品女盗之路。<br><br> 信奉宗旨,只要是重生女的机缘,那就抢抢抢。只要是重生女的桃花,那就破破破。<br><br> 什么?机缘本是她的?桃花也是她的?<br><br> 桃花就算了,机缘绝对不放过。<br><br> 敬请收看:妖孽无双女盗贼是如何装作可怜无助小白花,一路扮猪吃老虎,踏上漫漫修仙路的。
|
||||
</p>
|
||||
|
||||
|
||||
<div class="layui-collapse">
|
||||
<div class="layui-colla-item" >
|
||||
<h2 class="layui-colla-title">
|
||||
<span>最新章节</span>
|
||||
<span style="margin-left: 30px">
|
||||
更新: <i>2019-08-22 12:56:09</i>
|
||||
</span>
|
||||
</h2>
|
||||
<div class="layui-colla-content layui-show indexP">
|
||||
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第345章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第344章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第343章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第342章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第341章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第340章 我在钓鱼</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 42px;color:#4c6978;line-height: 42px;padding-left: 30px;background: #f2f2f2" >
|
||||
|
||||
查看完整目录
|
||||
</div>
|
||||
|
||||
<div style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
|
||||
<a style="font-size: 14px;color: #92B8B1;">首页</a>
|
||||
<a style="font-size: 14px;color: #92B8B1;margin-left: 50px">阅读记录</a>
|
||||
<div style="float: right"><a href="#top"><i class="layui-icon"
|
||||
style="margin-right:15px;font-size: 30px;color:#92B8B1 "></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
<script src="./layui/layui.all.js"></script>
|
||||
|
||||
|
||||
</html>
|
88
templates/green/static/mobile/book_index.html
Normal file
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>帝霸</title>
|
||||
<link rel="stylesheet" href="./layui/css/layui.css">
|
||||
<style type="text/css">
|
||||
|
||||
.indexP p a{
|
||||
color:#4c6978;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">帝霸</b>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px">
|
||||
|
||||
<a href="#buttom" style="color: red">↓直达页面底部</a>
|
||||
</p>
|
||||
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第345章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第344章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第343章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第342章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第341章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第340章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第345章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第344章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第343章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第342章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第341章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第340章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第345章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第344章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第343章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第342章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第341章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第340章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第345章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第344章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第343章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第342章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第341章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第340章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第345章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第344章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第343章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第342章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第341章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第340章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第345章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第344章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第343章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第342章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第341章 我在钓鱼</a></p>
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px"><a>第340章 我在钓鱼</a></p>
|
||||
|
||||
<div style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
|
||||
<a style="font-size: 14px;color: #92B8B1;">首页</a>
|
||||
<a style="font-size: 14px;color: #92B8B1;margin-left: 50px">阅读记录</a>
|
||||
<div style="float: right"><a href="#top"><i class="layui-icon"
|
||||
style="margin-right:15px;font-size: 30px;color:#92B8B1 "></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<script src="./layui/layui.all.js"></script>
|
||||
|
||||
</html>
|
313
templates/green/static/mobile/book_search.html
Normal file
@ -0,0 +1,313 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>帝霸</title>
|
||||
<link rel="stylesheet" href="./layui/css/layui.css">
|
||||
<style type="text/css">
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">搜索小说</b>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-container">
|
||||
<div class="layui-row">
|
||||
|
||||
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%">
|
||||
<input type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
<div class="layui-col-xs1" style="padding: 1%">
|
||||
<button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<div class="layui-col-xs5 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img align="left"
|
||||
style="width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs7 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;font-weight: bold;font-size: 20px">帝霸</div>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red">9.2分</i></div>
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content">
|
||||
|
||||
一觉醒来,世界大变。熟悉的高中传授的是魔法,
|
||||
告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽,
|
||||
虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师,
|
||||
一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<div class="layui-col-xs5 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img align="left"
|
||||
style="width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs7 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;font-weight: bold;font-size: 20px">帝霸</div>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red">9.2分</i></div>
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content">
|
||||
|
||||
一觉醒来,世界大变。熟悉的高中传授的是魔法,
|
||||
告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽,
|
||||
虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师,
|
||||
一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<div class="layui-col-xs5 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img align="left"
|
||||
style="width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs7 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;font-weight: bold;font-size: 20px">帝霸</div>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red">9.2分</i></div>
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content">
|
||||
|
||||
一觉醒来,世界大变。熟悉的高中传授的是魔法,
|
||||
告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽,
|
||||
虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师,
|
||||
一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<div class="layui-col-xs5 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img align="left"
|
||||
style="width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs7 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;font-weight: bold;font-size: 20px">帝霸</div>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red">9.2分</i></div>
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content">
|
||||
|
||||
一觉醒来,世界大变。熟悉的高中传授的是魔法,
|
||||
告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽,
|
||||
虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师,
|
||||
一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<div class="layui-col-xs5 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img align="left"
|
||||
style="width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs7 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;font-weight: bold;font-size: 20px">帝霸</div>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red">9.2分</i></div>
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content">
|
||||
|
||||
一觉醒来,世界大变。熟悉的高中传授的是魔法,
|
||||
告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽,
|
||||
虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师,
|
||||
一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<div class="layui-col-xs5 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img align="left"
|
||||
style="width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs7 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;font-weight: bold;font-size: 20px">帝霸</div>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red">9.2分</i></div>
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content">
|
||||
|
||||
一觉醒来,世界大变。熟悉的高中传授的是魔法,
|
||||
告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽,
|
||||
虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师,
|
||||
一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<div class="layui-col-xs5 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img align="left"
|
||||
style="width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div style="padding: 20px" class="layui-col-xs7 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<div style=";color: #4c6978;font-weight: bold;font-size: 20px">帝霸</div>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red">9.2分</i></div>
|
||||
<div style=";color: #4c6978;">作者:厌笔萧生</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">类别:玄幻奇幻</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">状态:连载</div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i>2019-08-22</i></div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content">
|
||||
|
||||
一觉醒来,世界大变。熟悉的高中传授的是魔法,
|
||||
告诉大家要成为一名出色的魔法师。居住的都市之外游荡着袭击人类的魔物妖兽,
|
||||
虎视眈眈。崇尚科学的世界变成了崇尚魔法,偏偏有着一样以学渣看待自己的老师,
|
||||
一样目光异样的同学,一样社会底层挣扎的爸爸,一样纯美却不能走路的非血缘妹妹……不过,莫凡发现绝大多数人都只能够主修一系魔法,自己却是全系全能法师!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="books" style="text-align: center"></div>
|
||||
|
||||
|
||||
<div style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
|
||||
<a style="font-size: 14px;color: #92B8B1;">首页</a>
|
||||
<a style="font-size: 14px;color: #92B8B1;margin-left: 50px">阅读记录</a>
|
||||
<div style="float: right"><a href="#top"><i class="layui-icon"
|
||||
style="margin-right:15px;font-size: 30px;color:#92B8B1 "></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<script src="./layui/layui.all.js"></script>
|
||||
|
||||
|
||||
<script>
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'books' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: 50 //数据总数,从服务端得到
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
//do something
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
BIN
templates/green/static/mobile/favicon.ico
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
templates/green/static/mobile/fiction_house.apk
Normal file
376
templates/green/static/mobile/index.html
Normal file
@ -0,0 +1,376 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>首页</title>
|
||||
<link rel="stylesheet" href="./layui/css/layui.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- 你的HTML代码 -->
|
||||
<a name="top"></a>
|
||||
<ul class="layui-nav" lay-filter="">
|
||||
<li class="layui-nav-item layui-this"><a href=""> 首 页 </a></li>
|
||||
<li class="layui-nav-item"><a href="book_detail.html">玄幻小说</a></li>
|
||||
<li class="layui-nav-item"><a href="">修真小说</a></li>
|
||||
<li class="layui-nav-item"><a href="">都市小说</a></li>
|
||||
<li class="layui-nav-item"><a href="">历史小说</a></li>
|
||||
<li class="layui-nav-item"><a href="">网游小说</a></li>
|
||||
<li class="layui-nav-item"><a href="">科幻小说</a></li>
|
||||
<li class="layui-nav-item"><a href="">女频小说</a></li>
|
||||
<li class="layui-nav-item"><a href="">小说排行榜</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="layui-container">
|
||||
<div class="layui-row">
|
||||
|
||||
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%">
|
||||
<input type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者" autocomplete="off"
|
||||
class="layui-input">
|
||||
</div>
|
||||
<div class="layui-col-xs1" style="padding: 1%">
|
||||
<button class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-collapse">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title">本站推荐</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
|
||||
|
||||
<div class="layui-container" style="padding: 0px">
|
||||
|
||||
<div class="layui-row" style="text-align: center">
|
||||
<div style="padding: 1%" class="layui-col-xs4 layui-col-sm4 layui-col-md3 layui-col-lg4">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
<br/>
|
||||
<a href="book_detail.html">三寸人间</a>
|
||||
|
||||
|
||||
</div>
|
||||
<div style="padding: 1%" class="layui-col-xs4 layui-col-sm4 layui-col-md3 layui-col-lg4">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
<br/>
|
||||
<a href="">三寸人间</a>
|
||||
</div>
|
||||
<div style="padding: 1%" class="layui-col-xs4 layui-col-sm4 layui-col-md3 layui-col-lg4">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;" src="static/4868.jpg"/>
|
||||
<br/>
|
||||
<a href="">三寸人间</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title">热门小说推荐</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
|
||||
<div class="layui-container">
|
||||
<div class="layui-row">
|
||||
<div style="margin-top: 1%" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<div class="layui-col-xs2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;"
|
||||
src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div class="layui-col-xs10 layui-col-sm8 layui-col-md8 layui-col-lg8"
|
||||
style="float: left;padding-left: 5%">
|
||||
<div><b>绝世唐门</b>
|
||||
<div style="float: right;"><b><i style="color: red">9.3分</i></b></div>
|
||||
</div>
|
||||
<div>作者:唐家三少</div>
|
||||
<div class="layui-elip" style="word-break:break-all;">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1%" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<div class="layui-col-xs2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;"
|
||||
src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div class="layui-col-xs10 layui-col-sm8 layui-col-md8 layui-col-lg8"
|
||||
style="float: left;padding-left: 5%">
|
||||
<div><b>绝世唐门</b>
|
||||
<div style="float: right;"><b><i style="color: red">9.3分</i></b></div>
|
||||
</div>
|
||||
<div>作者:唐家三少</div>
|
||||
<div class="layui-elip" style="word-break:break-all;">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1%" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<div class="layui-col-xs2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;"
|
||||
src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div class="layui-col-xs10 layui-col-sm8 layui-col-md8 layui-col-lg8"
|
||||
style="float: left;padding-left: 5%">
|
||||
<div><b>绝世唐门</b>
|
||||
<div style="float: right;"><b><i style="color: red">9.3分</i></b></div>
|
||||
</div>
|
||||
<div>作者:唐家三少</div>
|
||||
<div class="layui-elip" style="word-break:break-all;">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1%" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<div class="layui-col-xs2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;"
|
||||
src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div class="layui-col-xs10 layui-col-sm8 layui-col-md8 layui-col-lg8"
|
||||
style="float: left;padding-left: 5%">
|
||||
<div><b>绝世唐门</b>
|
||||
<div style="float: right;"><b><i style="color: red">9.3分</i></b></div>
|
||||
</div>
|
||||
<div>作者:唐家三少</div>
|
||||
<div class="layui-elip" style="word-break:break-all;">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1%" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<div class="layui-col-xs2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;"
|
||||
src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div class="layui-col-xs10 layui-col-sm8 layui-col-md8 layui-col-lg8"
|
||||
style="float: left;padding-left: 5%">
|
||||
<div><b>绝世唐门</b>
|
||||
<div style="float: right;"><b><i style="color: red">9.3分</i></b></div>
|
||||
</div>
|
||||
<div>作者:唐家三少</div>
|
||||
<div class="layui-elip" style="word-break:break-all;">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1%" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<div class="layui-col-xs2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;"
|
||||
src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div class="layui-col-xs10 layui-col-sm8 layui-col-md8 layui-col-lg8"
|
||||
style="float: left;padding-left: 5%">
|
||||
<div><b>绝世唐门</b>
|
||||
<div style="float: right;"><b><i style="color: red">9.3分</i></b></div>
|
||||
</div>
|
||||
<div>作者:唐家三少</div>
|
||||
<div class="layui-elip" style="word-break:break-all;">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 1%" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<div class="layui-col-xs2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;"
|
||||
src="static/4868.jpg"/>
|
||||
</div>
|
||||
<div class="layui-col-xs10 layui-col-sm8 layui-col-md8 layui-col-lg8"
|
||||
style="float: left;padding-left: 5%">
|
||||
<div><b>绝世唐门</b>
|
||||
<div style="float: right;"><b><i style="color: red">9.3分</i></b></div>
|
||||
</div>
|
||||
<div>作者:唐家三少</div>
|
||||
<div class="layui-elip" style="word-break:break-all;">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title">最近更新小说<div style="float: right; margin-right: 20px"><a href="javascript:moreNewBooks()"><i style="font-size: 14px;" class="layui-icon">更多</i></a></div></h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
|
||||
<div class="layui-container" style="padding-left: 2px;padding-right: 5px">
|
||||
<div class="layui-row">
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
<div style="padding-bottom: 30px" class="layui-col-xs11 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
|
||||
<div class="layui-col-xs8 layui-col-sm5 layui-col-md5 layui-col-lg5"><b>1.我真的要飞天了</b> - 柳一条
|
||||
</div>
|
||||
<div style="color: #FF5722;float: right;padding-right: 20px"><i>08-22 19:13</i></div>
|
||||
<div style="clear: both"></div>
|
||||
<div style="padding-left: 5px;padding-top: 5px" class="layui-elip">
|
||||
这里没有魔法,没有斗气,没有武术,却有武魂。唐门创立万年之后的斗罗大陆上,唐门式微。一代天骄横空出世,新一代史莱克七怪能否重振唐门,谱写一曲绝世唐门之歌?
|
||||
百万年魂兽,手握日月摘星辰的死灵圣法神,导致唐门衰落的全新魂导器体系。一切的神奇都将一一展现。 唐门暗器能否重振雄风,唐门能否重现辉煌,一切尽在绝世唐门!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
|
||||
<a style="font-size: 14px;color: #92B8B1;">首页</a>
|
||||
<a style="font-size: 14px;color: #92B8B1;margin-left: 50px">阅读记录</a>
|
||||
<div style="float: right"><a href="#top"><i class="layui-icon"
|
||||
style="margin-right:15px;font-size: 30px;color:#92B8B1 "></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script src="./layui/layui.all.js"></script>
|
||||
<script src="./js/jquery-1.9.1.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function moreNewBooks(event) {
|
||||
alert("获取更多");
|
||||
alert($("a"))
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
201
templates/green/static/mobile/js/common.js
Normal file
@ -0,0 +1,201 @@
|
||||
var needLoginPath = ['/user/favorites.html', '/user/comment.html', '/user/feedback.html',
|
||||
'/user/feedback_list.html', '/user/read_history.html', '/user/set_name.html',
|
||||
'/user/set_password.html', '/user/set_sex.html', '/user/setup.html', '/user/userinfo.html',
|
||||
"/pay/index.html," +
|
||||
"/author/register.html", "/author/index.html"];
|
||||
var isLogin = false;
|
||||
var url = window.location.search;
|
||||
|
||||
//key(需要检索的键)
|
||||
function getSearchString(key) {
|
||||
var str = url;
|
||||
str = str.substring(1, str.length); // 获取URL中?之后的字符(去掉第一位的问号)
|
||||
// 以&分隔字符串,获得类似name=xiaoli这样的元素数组
|
||||
var arr = str.split("&");
|
||||
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
var tmp_arr = arr[i].split("=");
|
||||
if (tmp_arr[0] == key) {
|
||||
return decodeURIComponent(tmp_arr[1]);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
var keyword = getSearchString("k");
|
||||
if (keyword != undefined) {
|
||||
$("#searchKey").val(keyword);
|
||||
$("#workDirection").remove();
|
||||
$("#idGirl").remove();
|
||||
}
|
||||
|
||||
function searchByK(k) {
|
||||
if (!k) {
|
||||
window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(document.getElementById("searchKey").value)
|
||||
} else {
|
||||
window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(k)
|
||||
}
|
||||
}
|
||||
|
||||
$("#searchKey").keypress(function (even) {
|
||||
if (even.which == 13) {
|
||||
even.stopPropagation();
|
||||
//enter键按下
|
||||
searchByK();
|
||||
}
|
||||
});
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) return i;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
jQuery.cookie = function (name, value, options) {
|
||||
if (typeof value != 'undefined') {
|
||||
options = options || {};
|
||||
if (value === null) {
|
||||
value = '';
|
||||
options.expires = -1;
|
||||
}
|
||||
var expires = '';
|
||||
if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
|
||||
var date;
|
||||
if (typeof options.expires == 'number') {
|
||||
date = new Date();
|
||||
date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
|
||||
} else {
|
||||
date = options.expires;
|
||||
}
|
||||
expires = '; expires=' + date.toUTCString();
|
||||
}
|
||||
var path = options.path ? '; path=' + options.path : '';
|
||||
var domain = options.domain ? '; domain=' + options.domain : '';
|
||||
var secure = options.secure ? '; secure' : '';
|
||||
document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
|
||||
} else {
|
||||
var cookieValue = null;
|
||||
if (document.cookie && document.cookie != '') {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = jQuery.trim(cookies[i]);
|
||||
if (cookie.substring(0, name.length + 1) == (name + '=')) {
|
||||
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cookieValue;
|
||||
}
|
||||
};
|
||||
|
||||
Array.prototype.indexOf = function (val) {
|
||||
for (var i = 0; i < this.length; i++) {
|
||||
if (this[i] == val) return i;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
Array.prototype.remove = function (val) {
|
||||
var index = this.indexOf(val);
|
||||
if (index > -1) {
|
||||
this.splice(index, 1);
|
||||
}
|
||||
};
|
||||
|
||||
var token = $.cookie('Authorization');
|
||||
if (!token) {
|
||||
if (needLoginPath.indexOf(window.location.pathname) != -1) {
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
}
|
||||
|
||||
$(".user_link").html("<a href=\"/user/login.html\">登录</a>|<a href=\"/user/register.html\">注册</a>");
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/refreshToken",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$(".user_link").html("<a href=\"/user/userinfo.html\"><i style=\"font-size: 20px;\" class=\"layui-icon \n" +
|
||||
"\">" +
|
||||
"\n" +
|
||||
"</i></a>");
|
||||
if ("/user/login.html" == window.location.pathname) {
|
||||
var orginUrl = getSearchString("originUrl");
|
||||
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
|
||||
return;
|
||||
}
|
||||
isLogin = true;
|
||||
if (localStorage.getItem("autoLogin") == 1) {
|
||||
$.cookie('Authorization', data.data.token, {expires: 7, path: '/'});
|
||||
} else {
|
||||
$.cookie('Authorization', data.data.token, {path: '/'});
|
||||
}
|
||||
} else {
|
||||
if (needLoginPath.indexOf(window.location.pathname) != -1) {
|
||||
location.href = '/user/login.html';
|
||||
}
|
||||
$(".user_link").html("<a href=\"/user/login.html\">登录</a>|<a href=\"/user/register.html\">注册</a>");
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function logout() {
|
||||
$.cookie('Authorization', null, {path: '/'});
|
||||
location.reload();
|
||||
}
|
||||
|
||||
|
||||
function readHistory() {
|
||||
|
||||
var books = localStorage.getItem("historyBooks");
|
||||
var bookIds = "-1929";
|
||||
if (books) {
|
||||
bookIds = JSON.parse(localStorage.getItem("historyBooks")).join(",");
|
||||
}
|
||||
window.location.href = "/book/search?historyBookIds=" + bookIds;
|
||||
};
|
||||
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split("&");
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split("=");
|
||||
if (pair[0] == variable) {
|
||||
return pair[1];
|
||||
}
|
||||
}
|
||||
return (false);
|
||||
}
|
||||
|
||||
String.prototype.isPhone = function () {
|
||||
var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/;
|
||||
if (strTemp.test(this)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
String.prototype.isBlank = function () {
|
||||
if (this == null || $.trim(this) == "") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
String.prototype.isNickName = function () {
|
||||
var strTemp = /^[\u4E00-\u9FA5A-Za-z0-9_]+$/;
|
||||
if (strTemp.test(this)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
|
49
templates/green/static/mobile/js/jquery-1.9.1.js
vendored
Normal file
180
templates/green/static/mobile/js/lazyload.js
Normal file
@ -0,0 +1,180 @@
|
||||
/*!
|
||||
* Lazy Load - JavaScript plugin for lazy loading images
|
||||
*
|
||||
* Copyright (c) 2007-2019 Mika Tuupola
|
||||
*
|
||||
* Licensed under the MIT license:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*
|
||||
* Project home:
|
||||
* https://appelsiini.net/projects/lazyload
|
||||
*
|
||||
* Version: 2.0.0-rc.2
|
||||
*
|
||||
*/
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof exports === "object") {
|
||||
module.exports = factory(root);
|
||||
} else if (typeof define === "function" && define.amd) {
|
||||
define([], factory);
|
||||
} else {
|
||||
root.LazyLoad = factory(root);
|
||||
}
|
||||
}) (typeof global !== "undefined" ? global : this.window || this.global, function (root) {
|
||||
|
||||
"use strict";
|
||||
|
||||
if (typeof define === "function" && define.amd){
|
||||
root = window;
|
||||
}
|
||||
|
||||
const defaults = {
|
||||
src: "data-src",
|
||||
srcset: "data-srcset",
|
||||
selector: ".lazyload",
|
||||
root: null,
|
||||
rootMargin: "0px",
|
||||
threshold: 0
|
||||
};
|
||||
|
||||
/**
|
||||
* Merge two or more objects. Returns a new object.
|
||||
* @private
|
||||
* @param {Boolean} deep If true, do a deep (or recursive) merge [optional]
|
||||
* @param {Object} objects The objects to merge together
|
||||
* @returns {Object} Merged values of defaults and options
|
||||
*/
|
||||
const extend = function () {
|
||||
|
||||
let extended = {};
|
||||
let deep = false;
|
||||
let i = 0;
|
||||
let length = arguments.length;
|
||||
|
||||
/* Check if a deep merge */
|
||||
if (Object.prototype.toString.call(arguments[0]) === "[object Boolean]") {
|
||||
deep = arguments[0];
|
||||
i++;
|
||||
}
|
||||
|
||||
/* Merge the object into the extended object */
|
||||
let merge = function (obj) {
|
||||
for (let prop in obj) {
|
||||
if (Object.prototype.hasOwnProperty.call(obj, prop)) {
|
||||
/* If deep merge and property is an object, merge properties */
|
||||
if (deep && Object.prototype.toString.call(obj[prop]) === "[object Object]") {
|
||||
extended[prop] = extend(true, extended[prop], obj[prop]);
|
||||
} else {
|
||||
extended[prop] = obj[prop];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* Loop through each object and conduct a merge */
|
||||
for (; i < length; i++) {
|
||||
let obj = arguments[i];
|
||||
merge(obj);
|
||||
}
|
||||
|
||||
return extended;
|
||||
};
|
||||
|
||||
function LazyLoad(images, options) {
|
||||
this.settings = extend(defaults, options || {});
|
||||
this.images = images || document.querySelectorAll(this.settings.selector);
|
||||
this.observer = null;
|
||||
this.init();
|
||||
}
|
||||
|
||||
LazyLoad.prototype = {
|
||||
init: function() {
|
||||
|
||||
/* Without observers load everything and bail out early. */
|
||||
if (!root.IntersectionObserver) {
|
||||
this.loadImages();
|
||||
return;
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let observerConfig = {
|
||||
root: this.settings.root,
|
||||
rootMargin: this.settings.rootMargin,
|
||||
threshold: [this.settings.threshold]
|
||||
};
|
||||
|
||||
this.observer = new IntersectionObserver(function(entries) {
|
||||
Array.prototype.forEach.call(entries, function (entry) {
|
||||
if (entry.isIntersecting) {
|
||||
self.observer.unobserve(entry.target);
|
||||
let src = entry.target.getAttribute(self.settings.src);
|
||||
let srcset = entry.target.getAttribute(self.settings.srcset);
|
||||
if ("img" === entry.target.tagName.toLowerCase()) {
|
||||
if (src) {
|
||||
entry.target.src = src;
|
||||
}
|
||||
if (srcset) {
|
||||
entry.target.srcset = srcset;
|
||||
}
|
||||
} else {
|
||||
entry.target.style.backgroundImage = "url(" + src + ")";
|
||||
}
|
||||
}
|
||||
});
|
||||
}, observerConfig);
|
||||
|
||||
Array.prototype.forEach.call(this.images, function (image) {
|
||||
self.observer.observe(image);
|
||||
});
|
||||
},
|
||||
|
||||
loadAndDestroy: function () {
|
||||
if (!this.settings) { return; }
|
||||
this.loadImages();
|
||||
this.destroy();
|
||||
},
|
||||
|
||||
loadImages: function () {
|
||||
if (!this.settings) { return; }
|
||||
|
||||
let self = this;
|
||||
Array.prototype.forEach.call(this.images, function (image) {
|
||||
let src = image.getAttribute(self.settings.src);
|
||||
let srcset = image.getAttribute(self.settings.srcset);
|
||||
if ("img" === image.tagName.toLowerCase()) {
|
||||
if (src) {
|
||||
image.src = src;
|
||||
}
|
||||
if (srcset) {
|
||||
image.srcset = srcset;
|
||||
}
|
||||
} else {
|
||||
image.style.backgroundImage = "url('" + src + "')";
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
if (!this.settings) { return; }
|
||||
this.observer.disconnect();
|
||||
this.settings = null;
|
||||
}
|
||||
};
|
||||
|
||||
root.lazyload = function(images, options) {
|
||||
return new LazyLoad(images, options);
|
||||
};
|
||||
|
||||
if (root.jQuery) {
|
||||
const $ = root.jQuery;
|
||||
$.fn.lazyload = function (options) {
|
||||
options = options || {};
|
||||
options.attribute = options.attribute || "data-src";
|
||||
new LazyLoad($.makeArray(this), options);
|
||||
return this;
|
||||
};
|
||||
}
|
||||
|
||||
return LazyLoad;
|
||||
});
|
197
templates/green/static/mobile/js/read.js
Normal file
@ -0,0 +1,197 @@
|
||||
var checkbg = "#A7A7A7";
|
||||
var nr_body = document.getElementById("read");//页面body
|
||||
var huyandiv = document.getElementById("huyandiv");//护眼div
|
||||
var lightdiv = document.getElementById("lightdiv");//灯光div
|
||||
var fontfont = document.getElementById("fontfont");//字体div
|
||||
var fontbig = document.getElementById("fontbig");//大字体div
|
||||
var fontmiddle = document.getElementById("fontmiddle");//中字体div
|
||||
var fontsmall = document.getElementById("fontsmall");//小字体div
|
||||
var nr1 = document.getElementById("chaptercontent");//内容div
|
||||
//内容页用户设置
|
||||
function nr_setbg(intype){
|
||||
var huyandiv = document.getElementById("huyandiv");
|
||||
var light = document.getElementById("lightdiv");
|
||||
if(intype == "huyan"){
|
||||
if(huyandiv.className == "button huyanon"){
|
||||
document.cookie="light=huyan;path=/";
|
||||
set("light","huyan");
|
||||
}
|
||||
else{
|
||||
document.cookie="light=no;path=/";
|
||||
set("light","no");
|
||||
}
|
||||
}
|
||||
if(intype == "light"){
|
||||
if(light.innerHTML == "关灯"){
|
||||
document.cookie="light=yes;path=/";
|
||||
set("light","yes");
|
||||
}
|
||||
else{
|
||||
document.cookie="light=no;path=/";
|
||||
set("light","no");
|
||||
}
|
||||
}
|
||||
if(intype == "big"){
|
||||
document.cookie="font=big;path=/";
|
||||
set("font","big");
|
||||
}
|
||||
if(intype == "middle"){
|
||||
document.cookie="font=middle;path=/";
|
||||
set("font","middle");
|
||||
}
|
||||
if(intype == "small"){
|
||||
document.cookie="font=small;path=/";
|
||||
set("font","small");
|
||||
}
|
||||
}
|
||||
|
||||
//内容页读取设置
|
||||
function getset(){
|
||||
var strCookie=document.cookie;
|
||||
var arrCookie=strCookie.split("; ");
|
||||
var light;
|
||||
var font;
|
||||
|
||||
for(var i=0;i<arrCookie.length;i++){
|
||||
var arr=arrCookie[i].split("=");
|
||||
if("light"==arr[0]){
|
||||
light=arr[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//light
|
||||
if(light == "yes"){
|
||||
set("light","yes");
|
||||
}
|
||||
else if(light == "no"){
|
||||
set("light","no");
|
||||
}
|
||||
else if(light == "huyan"){
|
||||
set("light","huyan");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//内容页读取设置
|
||||
function getset1(){
|
||||
var strCookie=document.cookie;
|
||||
var arrCookie=strCookie.split("; ");
|
||||
var light;
|
||||
var font;
|
||||
|
||||
for(var j=0;j<arrCookie.length;j++){
|
||||
var arr=arrCookie[j].split("=");
|
||||
if("font"==arr[0]){
|
||||
font=arr[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//font
|
||||
if(font == "big"){
|
||||
set("font","big");
|
||||
}
|
||||
else if(font == "middle"){
|
||||
set("font","middle");
|
||||
}
|
||||
else if(font == "small"){
|
||||
set("font","small");
|
||||
}
|
||||
else{
|
||||
set("font","middle");
|
||||
}
|
||||
}
|
||||
|
||||
//内容页应用设置
|
||||
function set(intype,p){
|
||||
|
||||
//var nr_title = document.getElementById("top1");//文章标题
|
||||
//var nr_title = document.getElementById("nr_title");//文章标题
|
||||
//var shuqian_2 = document.getElementById("shuqian_2");//书签链接
|
||||
|
||||
//var pt_prev = document.getElementById("pt_prev1");
|
||||
//var pt_mulu = document.getElementById("pt_mulu1");
|
||||
//var pt_next = document.getElementById("pt_next1");
|
||||
//var pb_prev = document.getElementById("pb_prev1");
|
||||
//var pb_mulu = document.getElementById("pb_mulu1");
|
||||
//var pb_next = document.getElementById("pb_next1");
|
||||
|
||||
|
||||
//灯光
|
||||
if(intype == "light"){
|
||||
if(p == "yes"){
|
||||
//关灯
|
||||
lightdiv.innerHTML = "开灯";
|
||||
lightdiv.className="button lighton";
|
||||
nr_body.style.backgroundColor = "#000";
|
||||
//nr_title.style.color = "#ccc";
|
||||
nr1.style.color = "#999";
|
||||
|
||||
huyandiv.innerHTML = "护眼";
|
||||
huyandiv.className="button huyanon";
|
||||
//pt_prev.style.cssText = "background-color:#222;color:#0065B5;";
|
||||
//pt_mulu.style.cssText = "background-color:#222;color:#0065B5;";
|
||||
//pt_next.style.cssText = "background-color:#222;color:#0065B5;";
|
||||
//pb_prev.style.cssText = "background-color:#222;color:#0065B5;";
|
||||
//pb_mulu.style.cssText = "background-color:#222;color:#0065B5;";
|
||||
//pb_next.style.cssText = "background-color:#222;color:#0065B5;";
|
||||
//shuqian_2.style.color = "#999";
|
||||
}
|
||||
else if(p == "no"){
|
||||
//开灯
|
||||
lightdiv.innerHTML = "关灯";
|
||||
lightdiv.className="button lightoff";
|
||||
nr_body.style.backgroundColor = "#fff";
|
||||
nr1.style.color = "#000";
|
||||
//nr_title.style.color = "#000";
|
||||
//pt_prev.style.cssText = "";
|
||||
//pt_mulu.style.cssText = "";
|
||||
//pt_next.style.cssText = "";
|
||||
//pb_prev.style.cssText = "";
|
||||
//pb_mulu.style.cssText = "";
|
||||
//pb_next.style.cssText = "";
|
||||
//shuqian_2.style.color = "#000";
|
||||
|
||||
huyandiv.innerHTML = "护眼";
|
||||
huyandiv.className="button huyanon";
|
||||
}
|
||||
else if(p == "huyan"){
|
||||
//护眼
|
||||
lightdiv.innerHTML = "关灯";
|
||||
lightdiv.className="button lightoff";
|
||||
huyandiv.className="button huyanoff";
|
||||
nr_body.style.backgroundColor = "#005716";
|
||||
nr1.style.color = "#000";
|
||||
//pt_prev.style.cssText = "background-color:#0E7A18;color:#000;";
|
||||
//pt_mulu.style.cssText = "background-color:#0E7A18;color:#000;";
|
||||
//pt_next.style.cssText = "background-color:#0E7A18;color:#000;";
|
||||
//pb_prev.style.cssText = "background-color:#0E7A18;color:#000;";
|
||||
//pb_mulu.style.cssText = "background-color:#0E7A18;color:#000;";
|
||||
//pb_next.style.cssText = "background-color:#0E7A18;color:#000;";
|
||||
shuqian_2.style.color = "#000";
|
||||
}
|
||||
}
|
||||
//字体
|
||||
if(intype == "font"){
|
||||
fontsmall.className="sizebg";
|
||||
if(p == "big"){
|
||||
fontbig.className="button sizebgon";
|
||||
nr1.style.fontSize="25px";
|
||||
fontmiddle.className="sizebg";
|
||||
fontsmall.className="sizebg";
|
||||
}
|
||||
if(p == "middle"){
|
||||
fontmiddle.className="button sizebgon";
|
||||
nr1.style.fontSize = "20px";
|
||||
fontbig.className="sizebg";
|
||||
fontsmall.className="sizebg";
|
||||
}
|
||||
if(p == "small"){
|
||||
fontsmall.className="button sizebgon";
|
||||
nr1.style.fontSize = "14px";
|
||||
fontbig.className="sizebg";
|
||||
fontmiddle.className="sizebg";
|
||||
}
|
||||
}
|
||||
}
|
107
templates/green/static/mobile/js/wap_collect.js
Normal file
@ -0,0 +1,107 @@
|
||||
window.onload=function(){
|
||||
// AddToFavorites(false);
|
||||
}
|
||||
function AddToFavorites(isTip)
|
||||
{
|
||||
if(GetCookie("isCollect") && !isTip){
|
||||
|
||||
return
|
||||
}
|
||||
else {
|
||||
SetCookie("isCollect","1");
|
||||
|
||||
|
||||
var title = document.title;
|
||||
var url = location.href;
|
||||
if (window.sidebar) // Firefox
|
||||
window.sidebar.addPanel(title, url, '');
|
||||
else if (window.opera && window.print) // Opera
|
||||
{
|
||||
var elem = document.createElement('a');
|
||||
elem.setAttribute('href', url);
|
||||
elem.setAttribute('title', title);
|
||||
elem.setAttribute('rel', 'sidebar'); // required to work in opera 7+
|
||||
elem.click();
|
||||
}
|
||||
else if (navigator.userAgent.indexOf('UCBrowser') > -1) {//UC
|
||||
window.location.href = "ext:add_favorite";
|
||||
}
|
||||
else if (document.all) // IE
|
||||
window.external.AddFavorite(url, title);
|
||||
else {
|
||||
if(isTip){
|
||||
alert("该浏览器不支持自动收藏,请点击Ctrl+D手动收藏!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function SetCookie(name, value) {
|
||||
var key = '';
|
||||
var Days = 365;
|
||||
var exp = new Date();
|
||||
var domain = "";
|
||||
exp.setTime(exp.getTime() + Days * 24 * 60 * 60 * 1000);
|
||||
if (key == null || key == "") {
|
||||
document.cookie = name + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/;domain=" + domain + ";";
|
||||
}
|
||||
else {
|
||||
var nameValue = GetCookie(name);
|
||||
if (nameValue == "") {
|
||||
document.cookie = name + "=" + key + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/;domain=" + domain + ";";
|
||||
}
|
||||
else {
|
||||
var keyValue = getCookie(name, key);
|
||||
if (keyValue != "") {
|
||||
nameValue = nameValue.replace(key + "=" + keyValue, key + "=" + encodeURI(value));
|
||||
document.cookie = name + "=" + nameValue + ";expires=" + exp.toGMTString() + ";path=/;domain=" + domain + ";";
|
||||
}
|
||||
else {
|
||||
document.cookie = name + "=" + nameValue + "&" + key + "=" + encodeURI(value) + ";expires=" + exp.toGMTString() + ";path=/;" + domain + ";";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GetCookie(name) {
|
||||
var nameValue = "";
|
||||
var key = "";
|
||||
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
||||
if (arr = document.cookie.match(reg)) {
|
||||
nameValue = decodeURI(arr[2]);
|
||||
}
|
||||
if (key != null && key != "") {
|
||||
reg = new RegExp("(^| |&)" + key + "=([^(;|&|=)]*)(&|$)");
|
||||
if (arr = nameValue.match(reg)) {
|
||||
return decodeURI(arr[2]);
|
||||
}
|
||||
else return "";
|
||||
}
|
||||
else {
|
||||
return nameValue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function DelCookie(name)
|
||||
|
||||
{
|
||||
|
||||
var exp = new Date();
|
||||
|
||||
exp.setTime(exp.getTime() - 1);
|
||||
|
||||
var cval=GetCookie(name);
|
||||
|
||||
if(cval!=null)
|
||||
|
||||
document.cookie= name + "="+cval+";expires="+exp.toGMTString();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
5015
templates/green/static/mobile/layui/css/layui.css
Normal file
2
templates/green/static/mobile/layui/css/layui.mobile.css
Normal file
2
templates/green/static/mobile/layui/css/modules/code.css
Normal file
@ -0,0 +1,2 @@
|
||||
/** layui-v2.4.5 MIT License By https://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,96 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>聊天记录</title>
|
||||
|
||||
<link rel="stylesheet" href="http://local.res.layui.com/layui/src/css/layui.css">
|
||||
<style>
|
||||
body .layim-chat-main{height: auto;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="layim-chat-main">
|
||||
<ul id="LAY_view"></ul>
|
||||
</div>
|
||||
|
||||
<div id="LAY_page" style="margin: 0 10px;"></div>
|
||||
|
||||
|
||||
<textarea title="消息模版" id="LAY_tpl" style="display:none;">
|
||||
{{# layui.each(d.data, function(index, item){
|
||||
if(item.id == parent.layui.layim.cache().mine.id){ }}
|
||||
<li class="layim-chat-mine"><div class="layim-chat-user"><img src="{{ item.avatar }}"><cite><i>{{ layui.data.date(item.timestamp) }}</i>{{ item.username }}</cite></div><div class="layim-chat-text">{{ layui.layim.content(item.content) }}</div></li>
|
||||
{{# } else { }}
|
||||
<li><div class="layim-chat-user"><img src="{{ item.avatar }}"><cite>{{ item.username }}<i>{{ layui.data.date(item.timestamp) }}</i></cite></div><div class="layim-chat-text">{{ layui.layim.content(item.content) }}</div></li>
|
||||
{{# }
|
||||
}); }}
|
||||
</textarea>
|
||||
|
||||
<!--
|
||||
上述模版采用了 laytpl 语法,不了解的同学可以去看下文档:http://www.layui.com/doc/modules/laytpl.html
|
||||
|
||||
-->
|
||||
|
||||
|
||||
<script src="http://local.res.layui.com/layui/src/layui.js"></script>
|
||||
<script>
|
||||
layui.use(['layim', 'laypage'], function(){
|
||||
var layim = layui.layim
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,$ = layui.jquery
|
||||
,laypage = layui.laypage;
|
||||
|
||||
//聊天记录的分页此处不做演示,你可以采用laypage,不了解的同学见文档:http://www.layui.com/doc/modules/laypage.html
|
||||
|
||||
|
||||
//开始请求聊天记录
|
||||
var param = location.search //获得URL参数。该窗口url会携带会话id和type,他们是你请求聊天记录的重要凭据
|
||||
|
||||
//实际使用时,下述的res一般是通过Ajax获得,而此处仅仅只是演示数据格式
|
||||
,res = {
|
||||
code: 0
|
||||
,msg: ''
|
||||
,data: [{
|
||||
username: '纸飞机'
|
||||
,id: 100000
|
||||
,avatar: 'http://tva3.sinaimg.cn/crop.0.0.512.512.180/8693225ajw8f2rt20ptykj20e80e8weu.jpg'
|
||||
,timestamp: 1480897882000
|
||||
,content: 'face[抱抱] face[心] 你好啊小美女'
|
||||
}, {
|
||||
username: 'Z_子晴'
|
||||
,id: 108101
|
||||
,avatar: 'http://tva3.sinaimg.cn/crop.0.0.512.512.180/8693225ajw8f2rt20ptykj20e80e8weu.jpg'
|
||||
,timestamp: 1480897892000
|
||||
,content: '你没发错吧?face[微笑]'
|
||||
},{
|
||||
username: 'Z_子晴'
|
||||
,id: 108101
|
||||
,avatar: 'http://tva3.sinaimg.cn/crop.0.0.512.512.180/8693225ajw8f2rt20ptykj20e80e8weu.jpg'
|
||||
,timestamp: 1480897898000
|
||||
,content: '你是谁呀亲。。我爱的是贤心!我爱的是贤心!我爱的是贤心!重要的事情要说三遍~'
|
||||
},{
|
||||
username: 'Z_子晴'
|
||||
,id: 108101
|
||||
,avatar: 'http://tva3.sinaimg.cn/crop.0.0.512.512.180/8693225ajw8f2rt20ptykj20e80e8weu.jpg'
|
||||
,timestamp: 1480897908000
|
||||
,content: '注意:这些都是模拟数据,实际使用时,需将其中的模拟接口改为你的项目真实接口。\n该模版文件所在目录(相对于layui.js):\n/css/modules/layim/html/chatlog.html'
|
||||
}]
|
||||
}
|
||||
|
||||
//console.log(param)
|
||||
|
||||
var html = laytpl(LAY_tpl.value).render({
|
||||
data: res.data
|
||||
});
|
||||
$('#LAY_view').html(html);
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,38 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>发现</title>
|
||||
|
||||
<link rel="stylesheet" href="http://local.res.layui.com/layui/src/css/layui.css">
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="margin: 15px;">
|
||||
<blockquote class="layui-elem-quote">此为自定义的【查找】页面,因需求不一,所以官方暂不提供该模版结构与样式,实际使用时,可移至该文件到你的项目中,对页面自行把控。
|
||||
<br>文件所在目录(相对于layui.js):/css/modules/layim/html/find.html</blockquote>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script src="http://local.res.layui.com/layui/src/layui.js"></script>
|
||||
<script>
|
||||
layui.use(['layim', 'laypage'], function(){
|
||||
var layim = layui.layim
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,$ = layui.jquery
|
||||
,laypage = layui.laypage;
|
||||
|
||||
//一些添加好友请求之类的交互参见文档
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,87 @@
|
||||
{
|
||||
"code": 0,
|
||||
"pages": 1,
|
||||
"data": [
|
||||
{
|
||||
"id": 76,
|
||||
"content": "申请添加你为好友",
|
||||
"uid": 168,
|
||||
"from": 166488,
|
||||
"from_group": 0,
|
||||
"type": 1,
|
||||
"remark": "有问题要问",
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "刚刚",
|
||||
"user": {
|
||||
"id": 166488,
|
||||
"avatar": "http://q.qlogo.cn/qqapp/101235792/B704597964F9BD0DB648292D1B09F7E8/100",
|
||||
"username": "李彦宏",
|
||||
"sign": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 75,
|
||||
"content": "申请添加你为好友",
|
||||
"uid": 168,
|
||||
"from": 347592,
|
||||
"from_group": 0,
|
||||
"type": 1,
|
||||
"remark": "你好啊!",
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "刚刚",
|
||||
"user": {
|
||||
"id": 347592,
|
||||
"avatar": "http://q.qlogo.cn/qqapp/101235792/B78751375E0531675B1272AD994BA875/100",
|
||||
"username": "麻花疼",
|
||||
"sign": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 62,
|
||||
"content": "雷军 拒绝了你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 60,
|
||||
"content": "马小云 已经同意你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": 61,
|
||||
"content": "贤心 已经同意你的好友申请",
|
||||
"uid": 168,
|
||||
"from": null,
|
||||
"from_group": null,
|
||||
"type": 1,
|
||||
"remark": null,
|
||||
"href": null,
|
||||
"read": 1,
|
||||
"time": "10天前",
|
||||
"user": {
|
||||
"id": null
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,208 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>消息盒子</title>
|
||||
|
||||
<link rel="stylesheet" href="../../../layui.css?v=1">
|
||||
<style>
|
||||
.layim-msgbox{margin: 15px;}
|
||||
.layim-msgbox li{position: relative; margin-bottom: 10px; padding: 0 130px 10px 60px; padding-bottom: 10px; line-height: 22px; border-bottom: 1px dotted #e2e2e2;}
|
||||
.layim-msgbox .layim-msgbox-tips{margin: 0; padding: 10px 0; border: none; text-align: center; color: #999;}
|
||||
.layim-msgbox .layim-msgbox-system{padding: 0 10px 10px 10px;}
|
||||
.layim-msgbox li p span{padding-left: 5px; color: #999;}
|
||||
.layim-msgbox li p em{font-style: normal; color: #FF5722;}
|
||||
|
||||
.layim-msgbox-avatar{position: absolute; left: 0; top: 0; width: 50px; height: 50px;}
|
||||
.layim-msgbox-user{padding-top: 5px;}
|
||||
.layim-msgbox-content{margin-top: 3px;}
|
||||
.layim-msgbox .layui-btn-small{padding: 0 15px; margin-left: 5px;}
|
||||
.layim-msgbox-btn{position: absolute; right: 0; top: 12px; color: #999;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<ul class="layim-msgbox" id="LAY_view"></ul>
|
||||
|
||||
<div style="margin: 0 15px;">
|
||||
<blockquote class="layui-elem-quote">注意:这些都是模拟数据,实际使用时,需将其中的模拟接口改为你的项目真实接口。
|
||||
<br>该模版文件所在目录(相对于layui.js):/css/modules/layim/html/msgbox.html</blockquote>
|
||||
</div>
|
||||
|
||||
<textarea title="消息模版" id="LAY_tpl" style="display:none;">
|
||||
{{# layui.each(d.data, function(index, item){
|
||||
if(item.from){ }}
|
||||
<li data-uid="{{ item.from }}" data-fromGroup="{{ item.from_group }}">
|
||||
<a href="/u/{{ item.from }}/" target="_blank">
|
||||
<img src="{{ item.user.avatar }}" class="layui-circle layim-msgbox-avatar">
|
||||
</a>
|
||||
<p class="layim-msgbox-user">
|
||||
<a href="/u/{{ item.from }}/" target="_blank">{{ item.user.username||'' }}</a>
|
||||
<span>{{ item.time }}</span>
|
||||
</p>
|
||||
<p class="layim-msgbox-content">
|
||||
{{ item.content }}
|
||||
<span>{{ item.remark ? '附言: '+item.remark : '' }}</span>
|
||||
</p>
|
||||
<p class="layim-msgbox-btn">
|
||||
<button class="layui-btn layui-btn-small" data-type="agree">同意</button>
|
||||
<button class="layui-btn layui-btn-small layui-btn-primary" data-type="refuse">拒绝</button>
|
||||
</p>
|
||||
</li>
|
||||
{{# } else { }}
|
||||
<li class="layim-msgbox-system">
|
||||
<p><em>系统:</em>{{ item.content }}<span>{{ item.time }}</span></p>
|
||||
</li>
|
||||
{{# }
|
||||
}); }}
|
||||
</textarea>
|
||||
|
||||
<!--
|
||||
上述模版采用了 laytpl 语法,不了解的同学可以去看下文档:http://www.layui.com/doc/modules/laytpl.html
|
||||
-->
|
||||
|
||||
|
||||
<script src="../../../../layui.js?v=1"></script>
|
||||
<script>
|
||||
layui.use(['layim', 'flow'], function(){
|
||||
var layim = layui.layim
|
||||
,layer = layui.layer
|
||||
,laytpl = layui.laytpl
|
||||
,$ = layui.jquery
|
||||
,flow = layui.flow;
|
||||
|
||||
var cache = {}; //用于临时记录请求到的数据
|
||||
|
||||
//请求消息
|
||||
var renderMsg = function(page, callback){
|
||||
|
||||
//实际部署时,请将下述 getmsg.json 改为你的接口地址
|
||||
|
||||
$.get('getmsg.json', {
|
||||
page: page || 1
|
||||
}, function(res){
|
||||
if(res.code != 0){
|
||||
return layer.msg(res.msg);
|
||||
}
|
||||
|
||||
//记录来源用户信息
|
||||
layui.each(res.data, function(index, item){
|
||||
cache[item.from] = item.user;
|
||||
});
|
||||
|
||||
callback && callback(res.data, res.pages);
|
||||
});
|
||||
};
|
||||
|
||||
//消息信息流
|
||||
flow.load({
|
||||
elem: '#LAY_view' //流加载容器
|
||||
,isAuto: false
|
||||
,end: '<li class="layim-msgbox-tips">暂无更多新消息</li>'
|
||||
,done: function(page, next){ //加载下一页
|
||||
renderMsg(page, function(data, pages){
|
||||
var html = laytpl(LAY_tpl.value).render({
|
||||
data: data
|
||||
,page: page
|
||||
});
|
||||
next(html, page < pages);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//打开页面即把消息标记为已读
|
||||
/*
|
||||
$.post('/message/read', {
|
||||
type: 1
|
||||
});
|
||||
*/
|
||||
|
||||
//操作
|
||||
var active = {
|
||||
//同意
|
||||
agree: function(othis){
|
||||
var li = othis.parents('li')
|
||||
,uid = li.data('uid')
|
||||
,from_group = li.data('fromGroup')
|
||||
,user = cache[uid];
|
||||
|
||||
//选择分组
|
||||
parent.layui.layim.setFriendGroup({
|
||||
type: 'friend'
|
||||
,username: user.username
|
||||
,avatar: user.avatar
|
||||
,group: parent.layui.layim.cache().friend //获取好友分组数据
|
||||
,submit: function(group, index){
|
||||
|
||||
//将好友追加到主面板
|
||||
parent.layui.layim.addList({
|
||||
type: 'friend'
|
||||
,avatar: user.avatar //好友头像
|
||||
,username: user.username //好友昵称
|
||||
,groupid: group //所在的分组id
|
||||
,id: uid //好友ID
|
||||
,sign: user.sign //好友签名
|
||||
});
|
||||
parent.layer.close(index);
|
||||
othis.parent().html('已同意');
|
||||
|
||||
|
||||
//实际部署时,请开启下述注释,并改成你的接口地址
|
||||
/*
|
||||
$.post('/im/agreeFriend', {
|
||||
uid: uid //对方用户ID
|
||||
,from_group: from_group //对方设定的好友分组
|
||||
,group: group //我设定的好友分组
|
||||
}, function(res){
|
||||
if(res.code != 0){
|
||||
return layer.msg(res.msg);
|
||||
}
|
||||
|
||||
//将好友追加到主面板
|
||||
parent.layui.layim.addList({
|
||||
type: 'friend'
|
||||
,avatar: user.avatar //好友头像
|
||||
,username: user.username //好友昵称
|
||||
,groupid: group //所在的分组id
|
||||
,id: uid //好友ID
|
||||
,sign: user.sign //好友签名
|
||||
});
|
||||
parent.layer.close(index);
|
||||
othis.parent().html('已同意');
|
||||
});
|
||||
*/
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//拒绝
|
||||
,refuse: function(othis){
|
||||
var li = othis.parents('li')
|
||||
,uid = li.data('uid');
|
||||
|
||||
layer.confirm('确定拒绝吗?', function(index){
|
||||
$.post('/im/refuseFriend', {
|
||||
uid: uid //对方用户ID
|
||||
}, function(res){
|
||||
if(res.code != 0){
|
||||
return layer.msg(res.msg);
|
||||
}
|
||||
layer.close(index);
|
||||
othis.parent().html('<em>已拒绝</em>');
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$('body').on('click', '.layui-btn', function(){
|
||||
var othis = $(this), type = othis.data('type');
|
||||
active[type] ? active[type].call(this, othis) : '';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
BIN
templates/green/static/mobile/layui/css/modules/layim/skin/1.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
templates/green/static/mobile/layui/css/modules/layim/skin/2.jpg
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
templates/green/static/mobile/layui/css/modules/layim/skin/3.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
templates/green/static/mobile/layui/css/modules/layim/skin/4.jpg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
templates/green/static/mobile/layui/css/modules/layim/skin/5.jpg
Normal file
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 3.2 KiB |
BIN
templates/green/static/mobile/layui/font/iconfont.eot
Normal file
473
templates/green/static/mobile/layui/font/iconfont.svg
Normal file
After Width: | Height: | Size: 274 KiB |
BIN
templates/green/static/mobile/layui/font/iconfont.ttf
Normal file
BIN
templates/green/static/mobile/layui/font/iconfont.woff
Normal file
BIN
templates/green/static/mobile/layui/images/face/0.gif
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/1.gif
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
templates/green/static/mobile/layui/images/face/10.gif
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
templates/green/static/mobile/layui/images/face/11.gif
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
templates/green/static/mobile/layui/images/face/12.gif
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/13.gif
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/14.gif
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/15.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
templates/green/static/mobile/layui/images/face/16.gif
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/17.gif
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/18.gif
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
templates/green/static/mobile/layui/images/face/19.gif
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
templates/green/static/mobile/layui/images/face/2.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
templates/green/static/mobile/layui/images/face/20.gif
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
templates/green/static/mobile/layui/images/face/21.gif
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
templates/green/static/mobile/layui/images/face/22.gif
Normal file
After Width: | Height: | Size: 9.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/23.gif
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
templates/green/static/mobile/layui/images/face/24.gif
Normal file
After Width: | Height: | Size: 7.9 KiB |
BIN
templates/green/static/mobile/layui/images/face/25.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
templates/green/static/mobile/layui/images/face/26.gif
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
templates/green/static/mobile/layui/images/face/27.gif
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/28.gif
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
templates/green/static/mobile/layui/images/face/29.gif
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
templates/green/static/mobile/layui/images/face/3.gif
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
templates/green/static/mobile/layui/images/face/30.gif
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
templates/green/static/mobile/layui/images/face/31.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
templates/green/static/mobile/layui/images/face/32.gif
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
templates/green/static/mobile/layui/images/face/33.gif
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
templates/green/static/mobile/layui/images/face/34.gif
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/35.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
templates/green/static/mobile/layui/images/face/36.gif
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/37.gif
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
templates/green/static/mobile/layui/images/face/38.gif
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
templates/green/static/mobile/layui/images/face/39.gif
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/4.gif
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/40.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
templates/green/static/mobile/layui/images/face/41.gif
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/42.gif
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
templates/green/static/mobile/layui/images/face/43.gif
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/44.gif
Normal file
After Width: | Height: | Size: 4.0 KiB |
BIN
templates/green/static/mobile/layui/images/face/45.gif
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/46.gif
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
templates/green/static/mobile/layui/images/face/47.gif
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/48.gif
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/49.gif
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
templates/green/static/mobile/layui/images/face/5.gif
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
templates/green/static/mobile/layui/images/face/50.gif
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
templates/green/static/mobile/layui/images/face/51.gif
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
templates/green/static/mobile/layui/images/face/52.gif
Normal file
After Width: | Height: | Size: 777 B |
BIN
templates/green/static/mobile/layui/images/face/53.gif
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
templates/green/static/mobile/layui/images/face/54.gif
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
templates/green/static/mobile/layui/images/face/55.gif
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
templates/green/static/mobile/layui/images/face/56.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
templates/green/static/mobile/layui/images/face/57.gif
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
templates/green/static/mobile/layui/images/face/58.gif
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
templates/green/static/mobile/layui/images/face/59.gif
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
templates/green/static/mobile/layui/images/face/6.gif
Normal file
After Width: | Height: | Size: 2.2 KiB |