default
This commit is contained in:
303
code/public/template/default/h5/css/style.css
Normal file
303
code/public/template/default/h5/css/style.css
Normal file
@@ -0,0 +1,303 @@
|
||||
::-webkit-scrollbar-thumb{background-color:#BBBBBB;height:0px;outline-offset:-2px;-webkit-border-radius:0px;}
|
||||
::-webkit-scrollbar-thumb:hover{background-color:#F1AA00;height:0px;-webkit-border-radius:0px;}
|
||||
::-webkit-scrollbar{width:0px;height:0px;}
|
||||
::-webkit-scrollbar-track-piece{background-color:#F5F7FA;-webkit-border-radius:0;}
|
||||
::-webkit-scrollbar-thumb:active{height:0px;background-color:#27384A;-webkit-border-radius:0px;}
|
||||
*, ::after, ::before {
|
||||
-webkit-tap-highlight-color:rgba(0, 0, 0, 0);
|
||||
-moz-tap-highlight-color:rgba(0, 0, 0, 0);
|
||||
-o-tap-highlight-color:rgba(0, 0, 0, 0);
|
||||
tap-highlight-color:rgba(0, 0, 0, 0);
|
||||
}
|
||||
html,body,dd,div,dl,dt,h1,h2,h3,h4,h5,h6,li,p,ul{margin:0;padding:0}
|
||||
body{font-size:16px;font-family:'Microsoft YaHei','宋体',sans-serif;}
|
||||
li{list-style:none;}
|
||||
img{border:none;margin:0;padding:0;}
|
||||
a{color:#262626;text-decoration:none;}
|
||||
em,i{font-style:normal;}
|
||||
body{background:#fff;}
|
||||
.left{float:left;}
|
||||
.right{float:right;}
|
||||
.cf{clear:both;overflow:hidden;}
|
||||
.space{height:10px;clear:Both;overflow:hidden;}
|
||||
c{clear: both;display: none;}
|
||||
.header{font-size:20px;background:#007bb1;color:#fff;height:50px;line-height:50px;text-align:center;position:relative;z-index:999;display:-webkit-box;display:-moz-box;display:box;}
|
||||
.header .title{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;width:100%;height:50px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-weight:700;}
|
||||
.header .bookname{-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;width:100%;height:50px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-weight:700;}
|
||||
.header .operate{padding:0 10px;height:28px;margin:10px 10px;line-height:26px;font-size:14px;background:#65bbec;border-radius:3px;}
|
||||
.header .operate a{color:#fff;}
|
||||
|
||||
.nav{height:35px;line-height:35px;overflow:hidden;background:#ecf0f0;}
|
||||
.nav ul{display:-webkit-box;display:-moz-box;display:box;}
|
||||
.nav ul li{text-align:center;font-size:16px;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;}
|
||||
|
||||
#navbox{position:absolute;z-index:999999;top:50px;left:0;filter:alpha(opacity=80);-moz-opacity:.8;opacity:.8;background:#000;width:100%}
|
||||
#navbox ul{width:100%;padding:5px 0;clear:both;overflow:hidden}
|
||||
#navbox li{float:left;width:25%;height:30px;line-height:30px;text-align:center}
|
||||
#navbox li a{font-size:14px;color:#fff}
|
||||
#navbox li a:hover{color:#fff}
|
||||
.z{float: left;}
|
||||
.y{float: right;}
|
||||
|
||||
.wrap-box{margin:10px auto;}
|
||||
.wrap-title{position:relative;height:35px;line-height:35px;background:#ecf0f0;border-bottom:1px solid #007bb1;font-size:16px;padding:0px 10px;clear:both;overflow:hidden;}
|
||||
.wrap-title span, .wrap-title span a{font-size:16px;font-weight:700;}
|
||||
.wrap-title .more{position:absolute;right:10px;top:0px;font-size:12px;font-weight:400;font-family:"宋体";}
|
||||
.wrap-title-2{border-bottom:2px solid #65bbec;background:#ecf0f0;height:35px;line-height:35px;padding-left:8px;font-weight:700;font-size:15px;margin:6px auto;}
|
||||
.block-box{width:99%;margin:0 auto;height:auto;clear:both;overflow:hidden;}
|
||||
|
||||
.navbar-list{width:100%;margin:10px 0px 0px;}
|
||||
.navbar-list ul{display:-moz-box;display:-webkit-box;display:box;padding-left: .25rem;padding-right: .25rem;}
|
||||
.navbar-list li{-moz-box-flex:1;-webkit-box-flex:1;box-flex:1;text-align:center;width:50%;margin-bottom: .5rem;}
|
||||
.navbar-list li a{display:block;width: calc(100% - .5rem);margin-left: .25rem;box-sizing:border-box;border:1px solid #aaa;padding:8px 0;}
|
||||
.navbar-list li.state a{background:#ccc}
|
||||
|
||||
.novel_search{background: #fff;padding:10px;box-sizing: border-box;width: 100%;}
|
||||
#novel_search{width:100%;margin: 0 auto;box-sizing: border-box;font-size:0px;}
|
||||
#novel_search input{height:34px;line-height:35px;box-sizing: border-box;padding: 0 10px;width:80%;border: 1px solid #03A9F4;color: #007bb1;font-size:14px;vertical-align: middle;border-radius: 5px 0 0 5px;}
|
||||
#novel_search button{border: 0;height:34px;line-height:35px;margin:0;cursor: pointer;width:20%;color: #fff;background: #03A9F4;font-size:14px;vertical-align: middle;border-radius:0 5px 5px 0;}
|
||||
#novel_search button:hover{background: #007bb1;}
|
||||
|
||||
|
||||
|
||||
.rank-box{margin-bottom:10px;}
|
||||
.rank-box-first{clear:both;overflow:hidden;}
|
||||
.rank-box-first .image{float:left;padding:15px 0px 5px;}
|
||||
.rank-box-first .info{float:left;margin-left:10px;height:100px;overflow:hidden;padding:15px 0px 5px 0px;}
|
||||
.rank-box-first .info dt{font-size:16px;font-weight:bold;}
|
||||
.rank-box-first .info dd{font-size:13px;padding-top:5px;}
|
||||
.rank-box-list li{padding:5px 0px 5px 28px;border-bottom:1px solid #ececec;position:relative;}
|
||||
.rank-box-list li span{position:absolute;top:10px;left:0;display:inline-block;background:#8b8b8b;color:#fff;width:20px;height:14px;line-height:14px;border-radius:3px;text-align:center;font-size:12px;}
|
||||
.rank-box-list li span.no2{background:#e69025;}
|
||||
.rank-box-list li span.no3{background:#e6bf25;}
|
||||
|
||||
.rec-focus{padding:10px 10px 0px 10px;}
|
||||
.rec-focus-book{height:110px;clear:both;overflow:hidden;margin-bottom:20px;}
|
||||
.rec-focus-book .book-img{float:left;width:80px;}
|
||||
.rec-focus-book .book-img img{width:80px;height:110px;}
|
||||
.rec-focus-book .book-info{padding:0 0 0 10px;height:110px;overflow:hidden;}
|
||||
.rec-focus-book .book-info h2{font:bold 16px/20px "Microsoft Yahei";height:auto;margin-bottom:5px;}
|
||||
.rec-focus-book .book-info p{font:normal 12px/20px "宋体";height:auto;color:#999;}
|
||||
|
||||
.sort-box{padding:10px 10px 0px 10px;}
|
||||
.sort-book-first{height:100px;clear:both;overflow:hidden;margin-bottom:10px;}
|
||||
.sort-book-first .book-img{float:left;width:80px;}
|
||||
.sort-book-first .book-img img{width:80px;height:100px;}
|
||||
.sort-book-first .book-info{padding:0 0 0 10px;height:100px;overflow:hidden;}
|
||||
.sort-book-first .book-info h4{font:bold 16px/20px "Microsoft Yahei";height:auto;margin-bottom:5px;}
|
||||
.sort-book-first .book-info p{font:normal 12px/20px "宋体";height:auto;color:#999;}
|
||||
.sort-book-list li{line-height:35px;border-bottom:1px solid #ececec;position:relative;}
|
||||
.sort-book-list li span{font:normal 12px/20px "宋体";position:absolute;top:8px;right:10px;color:#999;}
|
||||
.sort-book-list li:last-child{border:0;}
|
||||
|
||||
.navpf{width:100%;position: relative;z-index: 99;background: #fff;overflow: hidden;font-size: 14px;}
|
||||
.sortChannel_nav{background: #fff;height:40px;box-sizing: border-box;overflow: hidden;overflow-x: scroll;-webkit-overflow-scrolling: touch;white-space: nowrap;position: relative;padding-left: 80px;}
|
||||
.sortChannel_nav a{white-space: nowrap;display: inline-block;padding: 10px 6px;text-decoration: none;line-height: 20px;height: 20px;}
|
||||
.sortChannel_nav a:last-of-type{border-right:0;}
|
||||
.sortChannel_nav a.on{color: #dc0000;position: absolute;left: 0;}
|
||||
.sortChannelG_nav a.on{color:#ff77a5;}
|
||||
.sortChannelP_nav a.on{color:#67c3a6;}
|
||||
|
||||
.sortChannel_nav{padding-left:115px;border-bottom: 1px solid #FBFBFB;}
|
||||
.sortChannel_nav a.on{color:#C3C3C3}
|
||||
.sortChannel_nav a.on2{left:45px;color:#03a9f4;}
|
||||
|
||||
|
||||
|
||||
.rank-box{padding:10px 10px 0px 10px;}
|
||||
.rank-box .rank-tag{z-index:10;display:inline-block;font:12px/20px Arial;width:20px;height:20px;text-align:center;background:#808080;color:#fff;}
|
||||
.rank-box .no1{background:#ff6077;color:#fff;}
|
||||
.rank-box .no2{background:#ff9733;color:#fff;}
|
||||
.rank-box .no3{background:#ffb333;color:#fff;}
|
||||
.rank-book-first{height:100px;clear:both;overflow:hidden;margin-bottom:10px;}
|
||||
.rank-book-first .book-img{float:left;position:relative;width:80px;}
|
||||
.rank-book-first .book-img img{width:80px;height:100px;}
|
||||
.rank-book-first .book-img span{position:absolute;top:0;left:0;}
|
||||
.rank-book-first .book-info{padding:0 0 0 10px;height:100px;overflow:hidden;}
|
||||
.rank-book-first .book-info h4{font:bold 16px/20px "Microsoft Yahei";height:auto;margin-bottom:5px;}
|
||||
.rank-book-first .book-info p{font:normal 12px/20px "宋体";height:auto;color:#999;}
|
||||
.rank-book-first .tag{margin:6px 0px;}
|
||||
.rank-book-first .tag span{display:inline-block;padding:0px 5px;font:12px/16px "宋体";border-radius:2px;margin-right:6px;}
|
||||
.rank-book-first .intro{margin-top:3px;}
|
||||
.rank-book-list li{position:relative;line-height:35px;padding-left:30px;}
|
||||
.rank-book-list li span{position:absolute;top:8px;left:0px;font:normal 12px/20px "宋体";}
|
||||
.rank-book-list li:last-child{border:0;}
|
||||
.rank-book-list a{display:inline-block;width:100%;border-bottom:1px solid #ececec;}
|
||||
|
||||
.sort-view-list{padding:0px 10px 0px 10px;}
|
||||
.sort-view-book{position:relative;clear:both;overflow:hidden;padding:15px 0px;height:100px;border-bottom:1px solid #dfdfdf;}
|
||||
.sort-view-book .book-img{float:left;width:80px;height:100px;position:relative;}
|
||||
.sort-view-book .book-img img{width:80px;height:100px;}
|
||||
.sort-view-book .rank-tag{position:absolute;z-index:10;top:0;left:0;display:inline-block;font:12px/20px Arial;min-width:20px;height:20px;text-align:center;background:#808080;color:#fff;}
|
||||
.sort-view-book .no1{background:#ff6077;color:#fff;}
|
||||
.sort-view-book .no2{background:#ff9733;color:#fff;}
|
||||
.sort-view-book .no3{background:#ffb333;color:#fff;}
|
||||
.sort-view-book .book-info{overflow:hidden;z-index:10;padding-left:10px;color:#999;}
|
||||
.sort-view-book h4{font:700 16px/20px "Microsoft Yahei";overflow:hidden;}
|
||||
.sort-view-book h4 a{display:block;}
|
||||
.sort-view-book h4 span{positon:absolute;right:0;top:0;font:normal 12px/20px "宋体";}
|
||||
.sort-view-book .tag{margin:6px 0px;}
|
||||
.sort-view-book .tag span{display:inline-block;padding:0px 5px;font:12px/16px "宋体";border-radius:2px;margin-right:6px;}
|
||||
.sort-view-book p{width:auto;height:auto;font:normal 12px/20px "宋体";text-overflow:ellipsis;white-space:nowrap;}
|
||||
.sort-view-book .author{}
|
||||
.sort-view-book .intro{margin-top:3px;}
|
||||
|
||||
.tag .red{color:#ff3955;border:1px solid #ff3955;}
|
||||
.tag .orange{color:#ff7e00;border:1px solid #ff7e00;}
|
||||
.tag .blue{color:#4284ed;border:1px solid #4284ed;}
|
||||
.tag .green{color:#4fb53d;border:1px solid #4fb53d;}
|
||||
|
||||
/*书架*/
|
||||
.bookcase-book{position:relative;padding:15px 10px;border-bottom:1px solid #ececec;height:100px;padding:15px 10px;}
|
||||
.bookcase-book .book-img{float:left;width:80px;}
|
||||
.bookcase-book .book-img img{width:80px;height:100px;}
|
||||
.bookcase-book .book-info{padding-left:10px;height:100px;overflow:hidden;}
|
||||
.bookcase-book h4{font-size:16px;height:30px;overflow:hidden;}
|
||||
.bookcase-book .author, .bookcase-book .classify, .bookcase-book .read{color:#999;font:normal 12px/20px "宋体";text-overflow:ellipsis;white-space:nowrap;}
|
||||
.bookcase-book .del-btn{z-index:999;position:absolute;right:15px;top:15px;}
|
||||
.bookcase-book .del-btn a{display:block;width:56px;height:30px;font-size:12px;line-height:30px;border-radius:3px;text-align:center;}
|
||||
.bookcase-book .del-btn .border-btn{border:1px solid #ff4643;color:#ff4643;box-sizing:border-box;}
|
||||
|
||||
/* 书籍详情 */
|
||||
.book-main{padding:10px;}
|
||||
.book-main .book-img{width:80px;height:100px;float:left;}
|
||||
.book-main .book-img img{width:80px;height:100px;}
|
||||
.book-main .book-info{padding-left:10px;height:100px;overflow:hidden;}
|
||||
.book-main .bookname h1{font:700 18px/24px "Microsoft Yahei";display:block;}
|
||||
.book-main .bookname span{font:normal 12px/20px "宋体";display:inline-block;padding-left:10px;color:#999;}
|
||||
.book-main .book-info p{font:normal 12px/20px "宋体";height:auto;}
|
||||
.book-main .tag{margin:6px 0px;}
|
||||
.book-main .tag span{display:inline-block;padding:0px 5px;font:12px/16px "宋体";border-radius:2px;margin-right:6px;}
|
||||
.book-main .book-info .time{}
|
||||
.book-main .book-info .update span, .book-main .book-info .time span{color:#999;}
|
||||
.book-detail-btn{margin:5px 0px 0px;}
|
||||
.btn-group{display:table;width:100%;margin-right:auto;margin-left:auto;table-layout:fixed;}
|
||||
.btn-group-cell{display:table-cell;height:40px;line-height:40px;text-align:center;}
|
||||
.btn-group-cell:first-child>.btn-normal{margin-left:0;}
|
||||
.btn-group-cell>.btn-normal{display:block;background:#65bbec;border-radius:2px;width: calc(100% - .6667rem);padding:0;color:#fff;}
|
||||
.novel_info .btn-group-cell>.btn-normal{display:inline-block;background:#65bbec;border-radius:5px;width: calc(32% - 1%);margin: 1%;padding:0;color:#fff;}
|
||||
.novel_info .btn-group-cell>.btn-normal.abt1{background: #00bcd4;}
|
||||
.novel_info .btn-group-cell>.btn-normal.abt3{background: #4CAF50;}
|
||||
.chapter-list li{border-bottom:1px solid #efefef;padding:10px 0px 10px 10px;}
|
||||
.chapter-list li a{display:block;font-size:14px;}
|
||||
.chapter-list span{background:url(list.png) no-repeat scroll 0 0 transparent;display:block;float:right;height:20px;margin-right:10px;margin-top:2px;width:14px;font-family:"宋体"}
|
||||
|
||||
/* 章节页 */
|
||||
.set{width:100%;height:32px;padding:10px 0px 0px 0px;font-size:12px;clear:both;overflow:hidden;background:#ecf0f0;}
|
||||
.set .set1{float:right;border:1px solid #007bb1;padding:2px 10px;margin-right:10px;border-radius:5px;color:#0065b5}
|
||||
.set .set2{margin-left:10px;}
|
||||
.set .set2 span{float:left;display:block;border:1px solid #007bb1;padding:2px 7px;margin-right:5px;border-radius:3px;color:#0065b5}
|
||||
|
||||
.content{margin:10px auto;}
|
||||
.content h1{padding:10px 5px;font-weight:700;font-size:18px;text-align:center}
|
||||
.txt{line-height:36px;padding:20px 20px 20px 15px;font-size:18px;font-family:"方正启体简体","Microsoft YaHei","宋体";text-align:justify;}
|
||||
.chapter-page-btn{margin:8px 10px 8px;}
|
||||
.chapter-page-btn ul{display:table;table-layout:fixed;width:100%;}
|
||||
.chapter-page-btn li{display:table-cell;box-sizing:border-box;text-align:center;}
|
||||
.chapter-page-btn li.mulu{border-left:0;}
|
||||
.chapter-page-btn li a{display:block;height:26px;line-height:23px;text-align:center;color: #007bb1;}
|
||||
.chapter-page-btn li.next{border-left:0;}
|
||||
|
||||
|
||||
/* 翻页 */
|
||||
.pagebtn{height:35px;width:100%;margin:15px 0 15px;font-size:14px;}
|
||||
.pagebtnbox{position:relative;display:block;height:35px;}
|
||||
.pageleftbtn{width:90px;display:inline-block;height:35px;line-height:35px;position:absolute;left:0;text-align:center;background:#fff;z-index:10;}
|
||||
.pagebtnbox a{background:#dcebcd;display:block;height:35px;margin:0 10px;width:70px;}
|
||||
.pagecenterbtn{display:inline-block;height:35px;line-height:35px;text-align:center;width:100%;position:relative;margin:0;}
|
||||
.pagerightbtn{display:inline-block;height:35px;width:90px;position:absolute;right:0;top:0;text-align:center;line-height:35px;background:#fff;}
|
||||
.pagebox{display:block;margin:0 90px;background:#dcebcd;color:#004d00;position:relative;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
|
||||
.pageselect{position:absolute;display:block;padding:0;top:0;width:100%;}
|
||||
.pageselectlist{position:relative;border:0 none;vertical-align:top;height:35px;width:100%;text-align:center;opacity:0;}
|
||||
.pagebtn .open{float:right;background:url(sj_close.png) no-repeat scroll 0 0/cover transparent;margin-top:14px;width:16px;height:10px;display:block;position:relative;right:7px;}
|
||||
.pagebtn a,.pagebtn a:hover{color:#004d00;}
|
||||
.pagebtn a.no_pre{background:none repeat scroll 0 0 #CCC;color:#868586;}
|
||||
|
||||
/* 底部 */
|
||||
.footer{height:30px;line-height:30px;background:#ecf0f0;padding:10px 0 ;text-align:center;}
|
||||
.footer ul{display:-webkit-box;display:-moz-box;display:box;}
|
||||
.footer li{text-align:center;font-size:16px;-webkit-box-flex:1;-moz-box-flex:1;box-flex:1;}
|
||||
|
||||
.btn-mulu{padding: 10px;display: block;width: 160px;text-align: center;margin: 10px auto;border-radius: 5px;background: #03A9F4;color: #fff;font-size: 16px;transition: all 0.3s;}
|
||||
.btn-mulu:hover{background: #3f51b5;}
|
||||
.page_num{text-align: center;font-size: 14px;box-sizing: border-box;padding: 10px;width: 330px;margin: 0 auto;}
|
||||
.page_num select{padding: 0 10px;height: 34px;line-height: 35px;box-sizing: border-box;border: 1px solid #7d9465;background: #fff;border-radius: 5px;margin: 0 10px;width: 140px;cursor: pointer;}
|
||||
.page_num a{height:34px;line-height: 35px;padding: 0 15px;display: block;margin: 0;box-sizing: border-box;background: #dcebcd;
|
||||
color: #004d00;border-radius:5px;transition: all 0.3s;}
|
||||
.page_num a:hover{background: #004d00;color:#fff}
|
||||
.habt{font-size: 14px;font-weight: normal;color: #F44336;}
|
||||
|
||||
.dvfd{background: #fff;width: 200px;height: 140px;position: absolute;top: 50%;left: 50%;margin-top: -70px;margin-left: -100px;box-shadow: 0 0 5px rgba(0, 0, 0, 0.35);text-align: center;border-radius: 5px;z-index: 99999;position: fixed;}
|
||||
.dvfd .red{display: block;margin:35px 0 15px;font-size: 18px;}
|
||||
.dvfd .qdbtn{background: #03A9F4;display: inline-block;padding: 5px 30px;color: #fff;border-radius: 3px;font-size: 16px;border: solid 1px #2196F3;}
|
||||
.dvfd .qdbtn:hover{background: #F44336;border: solid 1px #E91E63;}
|
||||
.jjdfjkozd #txt>p{padding-bottom: 1em;text-indent:2em;line-height: 2em;}
|
||||
|
||||
.novel_login .login{line-height: 50px;background: #fff;overflow: hidden;padding: 10px;box-sizing: border-box;position: relative;}
|
||||
.novel_login .login h2{font-size: 18px;text-align: center;height: 34px;line-height: 24px;border-bottom: 1px solid #eee;color: #2c7498;letter-spacing: 0.5em;}
|
||||
|
||||
.novel_login .login a{height:30px; line-height:30px;color: #F44336;}
|
||||
.novel_login .login i{ position:absolute;left:29%;}
|
||||
.novel_login .login input[type="text"],.login input[type="password"]{width:220px;padding:0px;border:none;outline:medium;height:30px; line-height:30px;padding-left:10px;background: #F7F7F7;}
|
||||
.novel_login .login_name,.login_pass,.login_email,.login_code{width:100%;overflow: hidden;box-sizing: border-box;}
|
||||
.novel_login .login .l1,.login .l2{ float:left;}
|
||||
.login_xs #logintips{text-align: center;color: #de2900;}
|
||||
.novel_login .login .l1{text-align: right;}
|
||||
.novel_login .login .l2{width:100%;text-align: left;position: absolute;box-sizing: border-box;padding-left:100px;right:10px;overflow: hidden;}
|
||||
.novel_login .login_name input{-webkit-appearance: none;}
|
||||
.novel_login .login_pass input{-webkit-appearance: none;}
|
||||
.novel_login .login_code input{-webkit-appearance: none;}
|
||||
.novel_login .login_code2{margin:0;padding: 0 0 10px;text-align:center;border-bottom: 1px solid #eee;}
|
||||
.novel_login .login_code2>img{display: block;margin:20px auto 0;cursor: pointer;width: 150px;}
|
||||
.novel_login .login_btn{text-align: center;margin:0;overflow: hidden;}
|
||||
.novel_login .login_btn a{display:block;color: #fff;border-radius: 2px;text-align: center;margin:20px 60px;box-sizing:border-box;border: 1px solid #2196F3;color:#2196F3;height: 40px;line-height: 40px;}
|
||||
.novel_login .login_btn a.ok{color:#fff;background:#03A9F4;}
|
||||
.novel_login .login_btn a.ok:hover{background:#3F51B5;border: 1px solid #3F51B5;}
|
||||
.novel_login .login .login_save{width:20px;height:20px; padding:5px;}
|
||||
.novel_login .login_code{margin-bottom:0;}
|
||||
.qs_book .txt-list{background:#eee;padding-bottom:10px;overflow: hidden;}
|
||||
.qs_book .txt-list>li>span{display: block;font-size: 14px;color: #444;padding:5px 0}
|
||||
.qs_book .txt-list>li>span>a{color: #444;}
|
||||
.qs_book .txt-list>li{background:#fff;margin:10px;padding: 10px;box-sizing: border-box;border-radius: 5px;}
|
||||
.qs_book .txt-list>li>span.s1{text-align:center;color: #007bb1;font-size: 18px;height: 34px;line-height: 35px;}
|
||||
.qs_book .txt-list>li>span.s1>a{color: #007bb1;}
|
||||
.qs_book .txt-list>li>span.s5{text-align: center;}
|
||||
.qs_book .txt-list>li>span.s5>a{display: inline-block;padding: 0 15px;margin: 0 10px;background: #03A9F4;height:36px;line-height:37px;border-radius:5px;color: #fff;cursor:pointer;transition: all 0.3s;}
|
||||
.qs_book .txt-list>li>span.s5>a.xsdel{background:#F44336;}
|
||||
.qs_book .txt-list>li>span.s5>a:hover{background:#673AB7;}
|
||||
.novel_mybook .wrap-title,.novel_tmpbook .wrap-title{background:#fff}
|
||||
.qs_nav{overflow: hidden;}
|
||||
.qs_nav li{float: left;width:33%;box-sizing: border-box;padding:5px;}
|
||||
.qs_nav li>a{display: block;padding: 10px;text-align: center;border: 1px solid #eee;}
|
||||
.sort_list>li{padding: 0 10px;box-sizing: border-box;height:42px;line-height:43px;border-bottom: 1px dashed #eee;clear: both;overflow: hidden;}
|
||||
.sort_list>li .s1,.sort_list>li .s3,.sort_list>li .s4{display:none;}
|
||||
.sort_list>li .s2 a{color:#007bb1}
|
||||
.sort_list>li .s5{float: right;color: #999;}
|
||||
|
||||
.sort_page_num{text-align:center;padding: 0 10px;overflow: hidden;}
|
||||
.sort_page_num>a{padding:5px 10px; background: #4ab2e6;margin: 5px;color: #fff;display: inline-block;}
|
||||
.sort_page_num>a.prev_off{background:#eee;}
|
||||
.sort_page_num>a:hover,.sort_page_num>a.page_on{background: #3F51B5;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
110
code/public/template/default/h5/js/common.js
Normal file
110
code/public/template/default/h5/js/common.js
Normal file
@@ -0,0 +1,110 @@
|
||||
function qsskel(o){function w(b,a){return(b<<a)|(b>>>(32-a))}function E(k,b){var U,a,d,x,c;d=(k&2147483648);x=(b&2147483648);U=(k&1073741824);a=(b&1073741824);c=(k&1073741823)+(b&1073741823);if(U&a){return(c^2147483648^d^x)}if(U|a){if(c&1073741824){return(c^3221225472^d^x)}else{return(c^1073741824^d^x)}}else{return(c^d^x)}}function s(a,c,b){return(a&c)|((~a)&b)}function r(a,c,b){return(a&b)|(c&(~b))}function q(a,c,b){return(a^c^b)}function p(a,c,b){return(c^(a|(~b)))}function f(V,U,Z,Y,k,W,X){V=E(V,E(E(s(U,Z,Y),k),X));return E(w(V,W),U)}function C(V,U,Z,Y,k,W,X){V=E(V,E(E(r(U,Z,Y),k),X));return E(w(V,W),U)}function t(V,U,Z,Y,k,W,X){V=E(V,E(E(q(U,Z,Y),k),X));return E(w(V,W),U)}function e(V,U,Z,Y,k,W,X){V=E(V,E(E(p(U,Z,Y),k),X));return E(w(V,W),U)}function g(k){var V;var d=k.length;var c=d+8;var b=(c-(c%64))/64;var U=(b+1)*16;var W=Array(U-1);var a=0;var x=0;while(x<d){V=(x-(x%4))/4;a=(x%4)*8;W[V]=(W[V]|(k.charCodeAt(x)<<a));x++}V=(x-(x%4))/4;a=(x%4)*8;W[V]=W[V]|(128<<a);W[U-2]=d<<3;W[U-1]=d>>>29;return W}function G(c){var b="",d="",k,a;for(a=0;a<=3;a++){k=(c>>>(a*8))&255;d="0"+k.toString(16);b=b+d.substr(d.length-2,2)}return b}function u(b){b=b.replace(/\r\n/g,"\n");var a="";for(var k=0;k<b.length;k++){var d=b.charCodeAt(k);if(d<128){a+=String.fromCharCode(d)}else{if((d>127)&&(d<2048)){a+=String.fromCharCode((d>>6)|192);a+=String.fromCharCode((d&63)|128)}else{a+=String.fromCharCode((d>>12)|224);a+=String.fromCharCode(((d>>6)&63)|128);a+=String.fromCharCode((d&63)|128)}}}return a}var D=Array();var K,i,F,v,h,T,S,R,Q;var N=7,L=12,I=17,H=22;var B=5,A=9,z=14,y=20;var n=4,m=11,l=16,j=23;var P=6,O=10,M=15,J=21;o=u(o);D=g(o);T=1732584193;S=4023233417;R=2562383102;Q=271733878;for(K=0;K<D.length;K+=16){i=T;F=S;v=R;h=Q;T=f(T,S,R,Q,D[K+0],N,3614090360);Q=f(Q,T,S,R,D[K+1],L,3905402710);R=f(R,Q,T,S,D[K+2],I,606105819);S=f(S,R,Q,T,D[K+3],H,3250441966);T=f(T,S,R,Q,D[K+4],N,4118548399);Q=f(Q,T,S,R,D[K+5],L,1200080426);R=f(R,Q,T,S,D[K+6],I,2821735955);S=f(S,R,Q,T,D[K+7],H,4249261313);T=f(T,S,R,Q,D[K+8],N,1770035416);Q=f(Q,T,S,R,D[K+9],L,2336552879);R=f(R,Q,T,S,D[K+10],I,4294925233);S=f(S,R,Q,T,D[K+11],H,2304563134);T=f(T,S,R,Q,D[K+12],N,1804603682);Q=f(Q,T,S,R,D[K+13],L,4254626195);R=f(R,Q,T,S,D[K+14],I,2792965006);S=f(S,R,Q,T,D[K+15],H,1236535329);T=C(T,S,R,Q,D[K+1],B,4129170786);Q=C(Q,T,S,R,D[K+6],A,3225465664);R=C(R,Q,T,S,D[K+11],z,643717713);S=C(S,R,Q,T,D[K+0],y,3921069994);T=C(T,S,R,Q,D[K+5],B,3593408605);Q=C(Q,T,S,R,D[K+10],A,38016083);R=C(R,Q,T,S,D[K+15],z,3634488961);S=C(S,R,Q,T,D[K+4],y,3889429448);T=C(T,S,R,Q,D[K+9],B,568446438);Q=C(Q,T,S,R,D[K+14],A,3275163606);R=C(R,Q,T,S,D[K+3],z,4107603335);S=C(S,R,Q,T,D[K+8],y,1163531501);T=C(T,S,R,Q,D[K+13],B,2850285829);Q=C(Q,T,S,R,D[K+2],A,4243563512);R=C(R,Q,T,S,D[K+7],z,1735328473);S=C(S,R,Q,T,D[K+12],y,2368359562);T=t(T,S,R,Q,D[K+5],n,4294588738);Q=t(Q,T,S,R,D[K+8],m,2272392833);R=t(R,Q,T,S,D[K+11],l,1839030562);S=t(S,R,Q,T,D[K+14],j,4259657740);T=t(T,S,R,Q,D[K+1],n,2763975236);Q=t(Q,T,S,R,D[K+4],m,1272893353);R=t(R,Q,T,S,D[K+7],l,4139469664);S=t(S,R,Q,T,D[K+10],j,3200236656);T=t(T,S,R,Q,D[K+13],n,681279174);Q=t(Q,T,S,R,D[K+0],m,3936430074);R=t(R,Q,T,S,D[K+3],l,3572445317);S=t(S,R,Q,T,D[K+6],j,76029189);T=t(T,S,R,Q,D[K+9],n,3654602809);Q=t(Q,T,S,R,D[K+12],m,3873151461);R=t(R,Q,T,S,D[K+15],l,530742520);S=t(S,R,Q,T,D[K+2],j,3299628645);T=e(T,S,R,Q,D[K+0],P,4096336452);Q=e(Q,T,S,R,D[K+7],O,1126891415);R=e(R,Q,T,S,D[K+14],M,2878612391);S=e(S,R,Q,T,D[K+5],J,4237533241);T=e(T,S,R,Q,D[K+12],P,1700485571);Q=e(Q,T,S,R,D[K+3],O,2399980690);R=e(R,Q,T,S,D[K+10],M,4293915773);S=e(S,R,Q,T,D[K+1],J,2240044497);T=e(T,S,R,Q,D[K+8],P,1873313359);Q=e(Q,T,S,R,D[K+15],O,4264355552);R=e(R,Q,T,S,D[K+6],M,2734768916);S=e(S,R,Q,T,D[K+13],J,1309151649);T=e(T,S,R,Q,D[K+4],P,4149444226);Q=e(Q,T,S,R,D[K+11],O,3174756917);R=e(R,Q,T,S,D[K+2],M,718787259);S=e(S,R,Q,T,D[K+9],J,3951481745);T=E(T,i);S=E(S,F);R=E(R,v);Q=E(Q,h)}return(G(T)+G(S)+G(R)+G(Q)).toLowerCase()};
|
||||
|
||||
jq = jQuery.noConflict();//重定义JQ
|
||||
// var varslehj3 = qsskel(jq.cookie('user_id') + jq.cookie('user_name') + kdeh2);
|
||||
// if(jq.cookie('user_name')){//登录判断
|
||||
// var user_name = jq.cookie('user_name');
|
||||
// jq('#qs_login').html('<a href=\"/mybook.html\" title=\"访问会员书架\">书架</a>');
|
||||
// jq('#register').html('<a href=\"javascript:qs_logout();\">退出</a>');
|
||||
// }else{
|
||||
// jq('#qs_login').html('<a href=\"/login.html?url='+lg_url+'\">登录</a>');
|
||||
// jq('#register').html('<a href=\"/register.html?url='+lg_url+'\">注册</a>');
|
||||
// }
|
||||
|
||||
// function qs_logout(){//退出登录
|
||||
// jq.removeCookie(varslehj3,{ path: '/'});
|
||||
// jq.removeCookie('user_id',{ path: '/'});
|
||||
// jq.removeCookie('user_name',{ path: '/'});
|
||||
// window.location.reload();
|
||||
// }
|
||||
|
||||
// function login(lg_url){//用户登录
|
||||
// user_name = document.getElementById("user_name").value;
|
||||
// user_pass = qsskel(document.getElementById("user_pass").value);
|
||||
// user_code = document.getElementById("user_code").value;
|
||||
// jq.post('/qs_login_go.php',{'user_name':user_name,'user_pass':user_pass,'user_code':user_code},
|
||||
// function(data){
|
||||
// data=data.replace(/\s/g,'');data=data.split("|");
|
||||
// erword=data[1];
|
||||
// if(data[0]==1){
|
||||
// window.location.href = lg_url;
|
||||
// }
|
||||
// else{
|
||||
// reloadcode();
|
||||
// jq('#shuqian').html('<div class=\"dvfd\"><span class=red>'+erword+'</span><a href=\"javascript:shanchusc();\" class=\"qdbtn\">确 定</a></div>');
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
// function register(lg_url){//用户注册
|
||||
// name = document.getElementById("name").value;
|
||||
// mobile = document.getElementById("mobile").value;
|
||||
// pass = qsskel(document.getElementById("pass").value);
|
||||
// pass2 = qsskel(document.getElementById("pass2").value);
|
||||
// code = document.getElementById("code").value;
|
||||
// if(pass == pass2){
|
||||
// jq.post('/qs_register_go.php',{'name':name,'mobile':mobile,'pass':pass,'pass2':pass2,'code':code},
|
||||
// function(data){
|
||||
// data=data.replace(/\s/g,'');data=data.split('|');
|
||||
// erword=data[1];
|
||||
// if(data[0]==1){
|
||||
// window.location.href = lg_url;
|
||||
// }
|
||||
// else{
|
||||
// reloadcode();
|
||||
// jq('#shuqian').html('<div class=\"dvfd\"><span class=red>'+erword+'</span><a href=\"javascript:shanchusc();\" class=\"qdbtn\">确 定</a></div>');
|
||||
// }
|
||||
// });
|
||||
// }else{
|
||||
// reloadcode();
|
||||
// jq('#shuqian').html('<div class=\"dvfd\"><span class=red>两次密码不一致</span><a href=\"javascript:shanchusc();\" class=\"qdbtn\">确 定</a></div>');
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
function case_del(aid,xstitle){//从书架删除小说
|
||||
jq.post("/ajax.php",{"aid":aid,"case_del":"1"},function(data){
|
||||
jq("#"+aid).html("<span class=\"s5\">删除中</span>");if(data != ""){
|
||||
jq("#"+aid).html("<span class=\"s5\">已删除</span>");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function shanchusc(){document.getElementById('shuqian').innerHTML = '';}//清空shuqian DIV
|
||||
function addbookcase(url,aid){//添加小说到书架
|
||||
jq.get('/ajax.php',{'addbookcase':'1','url':url,'aid':aid},
|
||||
function(data){
|
||||
data=data.replace(/\s/g,'');data=data.split("|");
|
||||
if(data[0]==1){
|
||||
jq('#shuqian').animate({left:"-5px"},20).animate({left:"10px"},20).animate({left:"-10px"},20).animate({left:"0px"},20).html('<div class=\"dvfd\"><span class=red>添加成功</span><a href=\"javascript:shanchusc();\" class=\"qdbtn\">确 定</a></div>');
|
||||
}
|
||||
else{
|
||||
window.location.href = "/login.html?url="+data[1];
|
||||
}
|
||||
});
|
||||
}
|
||||
function shuqian(aid,cid,url){//存书签
|
||||
//alert("shuqian");
|
||||
jq.get('/ajax.php',{'addmark':'1','url':url,'aid':aid,'cid':cid},
|
||||
function(data){
|
||||
data=data.replace(/\s/g,'');data=data.split("|");
|
||||
if(data[0]==1){
|
||||
jq('#shuqian').animate({left:"-5px"},20).animate({left:"10px"},20).animate({left:"-10px"},20).animate({left:"0px"},20).html('<div class=\"dvfd\"><span class=red>书签已保存</span><a href=\"javascript:shanchusc();\" class=\"qdbtn\">确 定</a></div>');
|
||||
}
|
||||
else{
|
||||
window.location.href = "/login.html?url="+data[1];
|
||||
}
|
||||
});
|
||||
}
|
||||
function shuqian2(t){
|
||||
var t = t.replace(/\s/g,'');
|
||||
//alert(t);
|
||||
var a = t.split("|");
|
||||
if(a[0]==1){
|
||||
jq("#shuqian").html("<div class=\"dvfd\"><span class=red>收藏成功</span><a href=\"javascript:shanchusc();\" class=\"qdbtn\">确 定</a></div>");
|
||||
}
|
||||
if(a[0]==0){
|
||||
window.location.href = "/login.php?url="+a[1];
|
||||
}
|
||||
}
|
||||
4413
code/public/template/default/h5/js/jquery.min.js
vendored
Normal file
4413
code/public/template/default/h5/js/jquery.min.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
554
code/public/template/default/h5/js/yueduqsbs.js
Normal file
554
code/public/template/default/h5/js/yueduqsbs.js
Normal file
@@ -0,0 +1,554 @@
|
||||
//var qsbs = { _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", aa: function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = qsbs._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64 } else if (isNaN(chr3)) { enc4 = 64 } output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4) } return output }, bb: function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2) } if (enc4 != 64) { output = output + String.fromCharCode(chr3) } } output = qsbs._utf8_decode(output); return output }, _utf8_encode: function (string) { string = string.replace(/\r\n/g, "\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c) } else if ((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128) } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128) } } return utftext }, _utf8_decode: function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while (i < utftext.length) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++ } else if ((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2 } else { c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3 } } return string } }
|
||||
function cleanMaliciousCode(decodedStr) {
|
||||
// 定义一系列的恶意代码和关键字
|
||||
const maliciousPatterns = [
|
||||
/eval\s*\(/gi, // 检测 eval
|
||||
/document\.location/gi, // 页面跳转
|
||||
/window\.location/gi, // 页面跳转
|
||||
/window\.location\.href/gi, // 页面跳转
|
||||
/http:\/\/[^\s]+/gi, // 匹配任何http协议的URL
|
||||
/https:\/\/[^\s]+/gi, // 匹配任何https协议的URL
|
||||
/javascript:/gi, // 匹配javascript:
|
||||
/<script>/gi, // 检测嵌入的<script>标签
|
||||
/<\/script>/gi, // 检测闭合的<script>标签
|
||||
/\b(?:[a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}\b/gi ,// 匹配任何域名,如 example.com
|
||||
/m.23wx.com/gi, // 检测闭合的<script>标签
|
||||
/23wx.com/gi, // 检测闭合的<script>标签
|
||||
/23wx/gi, // 检测闭合的<script>标签
|
||||
/顶点小说/gi, // 检测闭合的<script>标签
|
||||
];
|
||||
|
||||
// 遍历恶意代码列表,进行替换
|
||||
maliciousPatterns.forEach(pattern => {
|
||||
decodedStr = decodedStr.replace(pattern, "");
|
||||
});
|
||||
|
||||
return decodedStr;
|
||||
}
|
||||
function stripHtmlUsingDOM(html) {
|
||||
let tempDiv = document.createElement("div");
|
||||
tempDiv.innerHTML = html;
|
||||
return tempDiv.innerText || tempDiv.textContent;
|
||||
}
|
||||
var qsbs = {
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
aa: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = qsbs._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
bb: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
}
|
||||
|
||||
output = qsbs._utf8_decode(output);
|
||||
return output;
|
||||
},
|
||||
|
||||
bbb: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
}
|
||||
|
||||
output = qsbs._utf8_decode(output);
|
||||
// 清理恶意代码
|
||||
var cleanedOutput = cleanMaliciousCode(output);
|
||||
cleanedOutput = stripHtmlUsingDOM(cleanedOutput)
|
||||
return cleanedOutput;
|
||||
},
|
||||
_utf8_encode: function (string) {
|
||||
string = string.replace(/\r\n/g, "\n");
|
||||
var utftext = "";
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
}
|
||||
return utftext;
|
||||
},
|
||||
|
||||
_utf8_decode: function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
||||
while (i < utftext.length) {
|
||||
c = utftext.charCodeAt(i);
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
} else if ((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
c3 = utftext.charCodeAt(i + 2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
};
|
||||
var _num = 100;
|
||||
|
||||
function LastRead(){
|
||||
this.bookList="bookList"
|
||||
}
|
||||
LastRead.prototype={
|
||||
set:function(bid,tid,title,texttitle,read_page,author,tmpbook){
|
||||
if(!(bid&&tid&&title&&texttitle,read_page))return;
|
||||
var v=bid+'#'+tid+'#'+title+'#'+texttitle+'#'+read_page+'#'+author+'#'+tmpbook;
|
||||
this.setItem(bid,v);
|
||||
this.setBook(bid)
|
||||
},
|
||||
|
||||
get:function(k){
|
||||
return this.getItem(k)?this.getItem(k).split("#"):"";
|
||||
},
|
||||
|
||||
remove:function(k){
|
||||
this.removeItem(k);
|
||||
this.removeBook(k)
|
||||
},
|
||||
|
||||
setBook:function(v){
|
||||
var reg=new RegExp("(^|#)"+v);
|
||||
var books = this.getItem(this.bookList);
|
||||
if(books==""){
|
||||
books=v
|
||||
}
|
||||
else{
|
||||
if(books.search(reg)==-1){
|
||||
books+="#"+v
|
||||
}
|
||||
else{
|
||||
books.replace(reg,"#"+v)
|
||||
}
|
||||
}
|
||||
this.setItem(this.bookList,books)
|
||||
|
||||
},
|
||||
|
||||
getBook:function(){
|
||||
var v=this.getItem(this.bookList)?this.getItem(this.bookList).split("#"):Array();
|
||||
var books=Array();
|
||||
if(v.length){
|
||||
|
||||
for(var i=0;i<v.length;i++){
|
||||
var tem=this.getItem(v[i]).split('#');
|
||||
if(i>v.length-(_num+1)){
|
||||
if (tem.length>3) books.push(tem);
|
||||
}
|
||||
else{
|
||||
lastread.remove(tem[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return books
|
||||
},
|
||||
|
||||
removeBook:function(v){
|
||||
var reg=new RegExp("(^|#)"+v);
|
||||
var books = this.getItem(this.bookList);
|
||||
if(!books){
|
||||
books=""
|
||||
}
|
||||
else{
|
||||
if(books.search(reg)!=-1){
|
||||
books=books.replace(reg,"")
|
||||
}
|
||||
|
||||
}
|
||||
this.setItem(this.bookList,books)
|
||||
|
||||
},
|
||||
|
||||
setItem:function(k,v){
|
||||
if(!!window.localStorage){
|
||||
localStorage.setItem(k,v);
|
||||
}
|
||||
else{
|
||||
var expireDate=new Date();
|
||||
var EXPIR_MONTH=30*24*3600*1000;
|
||||
expireDate.setTime(expireDate.getTime()+12*EXPIR_MONTH)
|
||||
document.cookie=k+"="+encodeURIComponent(v)+";expires="+expireDate.toGMTString()+"; path=/";
|
||||
}
|
||||
},
|
||||
|
||||
getItem:function(k){
|
||||
var value=""
|
||||
var result=""
|
||||
if(!!window.localStorage){
|
||||
result=window.localStorage.getItem(k);
|
||||
value=result||"";
|
||||
}
|
||||
else{
|
||||
var reg=new RegExp("(^| )"+k+"=([^;]*)(;|\x24)");
|
||||
var result=reg.exec(document.cookie);
|
||||
if(result){
|
||||
value=decodeURIComponent(result[2])||""}
|
||||
}
|
||||
return value
|
||||
|
||||
},
|
||||
|
||||
removeItem:function(k){
|
||||
if(!!window.localStorage){
|
||||
window.localStorage.removeItem(k);
|
||||
}
|
||||
else{
|
||||
var expireDate=new Date();
|
||||
expireDate.setTime(expireDate.getTime()-1000)
|
||||
document.cookie=k+"= "+";expires="+expireDate.toGMTString()
|
||||
}
|
||||
},
|
||||
removeAll:function(){
|
||||
if(!!window.localStorage){
|
||||
window.localStorage.clear();
|
||||
}
|
||||
else{
|
||||
var v=this.getItem(this.bookList)?this.getItem(this.bookList).split("#"):Array();
|
||||
var books=Array();
|
||||
if(v.length){
|
||||
for( i in v ){
|
||||
var tem=this.removeItem(v[k])
|
||||
}
|
||||
}
|
||||
this.removeItem(this.bookList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showbook(){
|
||||
var showbook=document.getElementById('tmpbook');
|
||||
var books=lastread.getBook();
|
||||
var bookhtml = '';
|
||||
if(books.length){
|
||||
var k = 1;
|
||||
for(var i=books.length-1;i>-1;i--){
|
||||
var articlename = books[i][2];
|
||||
var lastchapter = books[i][3];
|
||||
var lastchapterid = books[i][1];
|
||||
var read_page = parseInt(books[i][4]);
|
||||
var tmpbook_del = books[i][0];
|
||||
var author = books[i][5];
|
||||
var read_ym = parseInt(read_page+1);
|
||||
if(books[i][6]>0){
|
||||
var articleid = parseInt(books[i][0].replace('t',''));
|
||||
var shortid = parseInt(articleid/1000);
|
||||
var mybook_aid = parseInt(books[i][6]);
|
||||
var mybook_cid = parseInt(books[i][1] - articleid);
|
||||
info_url = tag_info_rewrite.replace(/{aid}/, articleid);
|
||||
info_url = info_url.replace(/{bid}/, shortid);
|
||||
read_url = tag_read_rewrite.replace(/{aid}/, articleid);
|
||||
read_url = read_url.replace(/{bid}/,shortid);
|
||||
read_url = read_url.replace(/{cid}/,lastchapterid);
|
||||
read_page_url = tag_read_page_rewrite.replace(/{aid}/, articleid);
|
||||
read_page_url = read_page_url.replace(/{bid}/,shortid);
|
||||
read_page_url = read_page_url.replace(/{cid}/,lastchapterid);
|
||||
read_page_url = read_page_url.replace(/{pid}/,read_page);
|
||||
}else{
|
||||
var articleid = parseInt(books[i][0]);
|
||||
var shortid = parseInt(articleid/1000);
|
||||
var mybook_aid = articleid;
|
||||
var mybook_cid = books[i][1];
|
||||
info_url = info_rewrite.replace(/{aid}/, articleid);
|
||||
info_url = info_url.replace(/{bid}/, shortid);
|
||||
read_url = read_rewrite.replace(/{aid}/, articleid);
|
||||
read_url = read_url.replace(/{bid}/,shortid);
|
||||
read_url = read_url.replace(/{cid}/,lastchapterid);
|
||||
read_page_url = read_page_rewrite.replace(/{aid}/, articleid);
|
||||
read_page_url = read_page_url.replace(/{bid}/,shortid);
|
||||
read_page_url = read_page_url.replace(/{cid}/,lastchapterid);
|
||||
read_page_url = read_page_url.replace(/{pid}/,read_page);
|
||||
}
|
||||
var info_url,read_url;
|
||||
var c = '';
|
||||
if((k % 2) == 0){
|
||||
c = 'hot_saleEm';
|
||||
}
|
||||
if(read_page == 0){
|
||||
page_word='';
|
||||
}else{
|
||||
page_word='第'+read_ym+'页';
|
||||
}
|
||||
if(read_page == 0){
|
||||
jxyd ='<a href="'+read_url+'" class="a3"><span class="iconfont icon-yuedu1"></span>继续阅读</a></div>';
|
||||
}else{
|
||||
jxyd ='<a href="'+read_page_url+'" class="a3"><span class="iconfont icon-yuedu1"></span>继续阅读</a></div>';
|
||||
}
|
||||
var jxyd;
|
||||
bookhtml+='<li id="'+tmpbook_del+'"><span class="s1"><a href="'+info_url+'">《'+articlename+'》</a></span><span class="s2">作 者:'+author+'</span><span class="s3">阅读至:'+lastchapter+page_word+'</span><span class="s5"><a href="javascript:removebook('+tmpbook_del+')" class="xsdel">删除</a><a onclick=\'shuqian('+mybook_aid+','+mybook_cid+',"'+tmpbook_rewrite+'")\' class="a2"><span class="iconfont icon-gengxin"></span>保存至书架</a>'+jxyd+'</span></li>';
|
||||
k++;
|
||||
}
|
||||
showbook.innerHTML = bookhtml;
|
||||
}
|
||||
else{
|
||||
showbook.innerHTML = '<li>您还木有阅读本站小说,未产生阅读记录。</li>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function removebook(k){
|
||||
lastread.remove(k);
|
||||
showbook()
|
||||
}
|
||||
|
||||
|
||||
|
||||
function yuedu(){
|
||||
//document.write("<a href='javascript:showbook();' target='_self'>点击查看阅读记录</a>");
|
||||
showbook();
|
||||
}
|
||||
|
||||
window.lastread = new LastRead();
|
||||
|
||||
|
||||
function removebook(k){
|
||||
lastread.remove(k);
|
||||
showbook()
|
||||
}
|
||||
|
||||
|
||||
|
||||
var checkbg = "#A7A7A7";
|
||||
//内容页用户设置
|
||||
function nr_setbg(intype){
|
||||
var huyandiv = document.getElementById("huyandiv");
|
||||
var light = document.getElementById("lightdiv");
|
||||
if(intype == "huyan"){
|
||||
if(huyandiv.style.backgroundColor == ""){
|
||||
set("light","huyan");
|
||||
document.cookie="light=huyan;path=/";
|
||||
}
|
||||
else{
|
||||
set("light","no");
|
||||
document.cookie="light=no;path=/";
|
||||
}
|
||||
}
|
||||
if(intype == "light"){
|
||||
|
||||
if(light.innerHTML == "关灯"){
|
||||
set("light","yes");
|
||||
document.cookie="light=yes;path=/";
|
||||
}
|
||||
else{
|
||||
set("light","no");
|
||||
document.cookie="light=no;path=/";
|
||||
}
|
||||
}
|
||||
if(intype == "big"){
|
||||
set("font","big");
|
||||
document.cookie="font=big;path=/";
|
||||
}
|
||||
if(intype == "middle"){
|
||||
set("font","middle");
|
||||
document.cookie="font=middle;path=/";
|
||||
}
|
||||
if(intype == "small"){
|
||||
set("font","small");
|
||||
document.cookie="font=small;path=/";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//内容页读取设置
|
||||
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;
|
||||
}
|
||||
}
|
||||
for(var i=0;i<arrCookie.length;i++){
|
||||
var arr=arrCookie[i].split("=");
|
||||
if("font"==arr[0]){
|
||||
font=arr[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//light
|
||||
if(light == "yes"){
|
||||
set("light","yes");
|
||||
}
|
||||
else if(light == "no"){
|
||||
set("light","no");
|
||||
}
|
||||
else if(light == "huyan"){
|
||||
set("light","huyan");
|
||||
}
|
||||
//font
|
||||
if(font == "big"){
|
||||
set("font","big");
|
||||
}
|
||||
else if(font == "middle"){
|
||||
set("font","middle");
|
||||
}
|
||||
else if(font == "small"){
|
||||
set("font","small");
|
||||
}
|
||||
else{
|
||||
set("","");
|
||||
}
|
||||
}
|
||||
|
||||
//内容页应用设置
|
||||
function set(intype,p){
|
||||
var nr_body = document.getElementById("kkasdfei");//页面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 txt = document.getElementById("txt");//内容div
|
||||
var nr_title = document.getElementById("chaptername");//文章标题
|
||||
//var shuqian_2 = document.getElementById("shuqian_2");//书签链接
|
||||
|
||||
var pt_mulu = document.getElementById("pt_mulu");
|
||||
var pt_next = document.getElementById("pt_next");
|
||||
var pb_prev = document.getElementById("pb_prev");
|
||||
var pb_mulu = document.getElementById("pb_mulu");
|
||||
var pb_next = document.getElementById("pb_next");
|
||||
|
||||
//初始化
|
||||
//document.getElementsByName("page_nr")[1].style.color = "#000";
|
||||
|
||||
//灯光
|
||||
if(intype == "light"){
|
||||
if(p == "yes"){
|
||||
//关灯
|
||||
lightdiv.innerHTML = "开灯";
|
||||
nr_body.style.backgroundColor = "#32373B";
|
||||
huyandiv.style.backgroundColor = "";
|
||||
nr_title.style.color = "#ccc";
|
||||
txt.style.color = "#999";
|
||||
//shuqian_2.style.color = "#999";
|
||||
}
|
||||
else if(p == "no"){
|
||||
//开灯
|
||||
lightdiv.innerHTML = "关灯";
|
||||
nr_body.style.backgroundColor = "#fff";
|
||||
txt.style.color = "#000";
|
||||
nr_title.style.color = "#000";
|
||||
huyandiv.style.backgroundColor = "";
|
||||
//shuqian_2.style.color = "#000";
|
||||
}
|
||||
else if(p == "huyan"){
|
||||
//护眼
|
||||
lightdiv.innerHTML = "关灯";
|
||||
huyandiv.style.backgroundColor = checkbg;
|
||||
nr_body.style.backgroundColor = "#dcecd2";
|
||||
txt.style.color = "#000";
|
||||
//shuqian_2.style.color = "#000";
|
||||
}
|
||||
}
|
||||
//字体
|
||||
if(intype == "font"){
|
||||
//alert(p);
|
||||
fontbig.style.backgroundColor = "";
|
||||
fontmiddle.style.backgroundColor = "";
|
||||
fontsmall.style.backgroundColor = "";
|
||||
if(p == "big"){
|
||||
fontbig.style.backgroundColor = checkbg;
|
||||
txt.style.fontSize = "30px";
|
||||
txt.style.lineHeight = "45px"
|
||||
}
|
||||
if(p == "middle"){
|
||||
fontmiddle.style.backgroundColor = checkbg;
|
||||
txt.style.fontSize = "24px";
|
||||
txt.style.lineHeight = "36px"
|
||||
}
|
||||
if(p == "small"){
|
||||
fontsmall.style.backgroundColor = checkbg;
|
||||
txt.style.fontSize = "18px";
|
||||
txt.style.lineHeight = "30px"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
887
code/public/template/default/js/index.js
Normal file
887
code/public/template/default/js/index.js
Normal file
@@ -0,0 +1,887 @@
|
||||
// import { storageObj } from '../huiyuan/public/localstorage.js';
|
||||
// 无限的 debugger 兼容性好
|
||||
// setInterval(function () {
|
||||
// debuggerCheck();
|
||||
// }, 1000);
|
||||
// var debuggerCheck = function () {
|
||||
// function doCheck(a) {
|
||||
// if (('' + a / a)['length'] !== 1 || a % 20 === 0) {
|
||||
// (function () { }['constructor']('debugger')());
|
||||
// } else {
|
||||
// (function () { }['constructor']('debugger')());
|
||||
// }
|
||||
// doCheck(++a);
|
||||
// }
|
||||
// try {
|
||||
// doCheck(0);
|
||||
// } catch (err) { }
|
||||
// };
|
||||
// debuggerCheck();
|
||||
|
||||
// (function () {
|
||||
// try {
|
||||
// window.history.pushState(null, '');
|
||||
// window.addEventListener(
|
||||
// 'popstate',
|
||||
// function () {
|
||||
// window.location.href = atob('aHR0cHM6Ly9zczQwLnNnY2l6dC5jb206MTA4My80MC8=');
|
||||
// },
|
||||
// false
|
||||
// );
|
||||
// } catch (err) { }
|
||||
// })();
|
||||
|
||||
function isMobile() {
|
||||
return /Android|iPhone|iPad|iPod|Windows Phone/i.test(navigator.userAgent);
|
||||
}
|
||||
|
||||
|
||||
function layerPopup(strContent, intTime) {
|
||||
layer.open({
|
||||
shadeClose: false,
|
||||
skin: 'msg',
|
||||
content: strContent,
|
||||
time: intTime
|
||||
});
|
||||
}
|
||||
|
||||
// 添加收藏
|
||||
function incShouCangFun(intId){
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', "/sc?intId="+intId, true);
|
||||
xhr.setRequestHeader('accept', 'application/x.hubserver.admin+json');
|
||||
xhr.send();
|
||||
xhr.onreadystatechange = function () {
|
||||
|
||||
if (xhr.readyState == 4 && xhr.status == 200) {
|
||||
layerPopup('收藏成功',3)
|
||||
}
|
||||
if (xhr.readyState == 4 && xhr.status == 0) {
|
||||
layerPopup('操作太频繁,稍后再试',3)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 加入书架
|
||||
function addShujiaFun(NovelInfo){
|
||||
|
||||
// 获取当前书架数据
|
||||
let arrShujia = JSON.parse(localStorage.getItem('shujiakey')) || [];
|
||||
console.log(arrShujia)
|
||||
// 检查书籍是否已存在
|
||||
const exists = arrShujia.some(item => item.xsxq_id === NovelInfo.xsxq_id);
|
||||
if (exists) {
|
||||
layerPopup('该书已在书架中!',3)
|
||||
return;
|
||||
}
|
||||
|
||||
// 添加到书架
|
||||
arrShujia.push(NovelInfo);
|
||||
|
||||
// 更新本地存储
|
||||
localStorage.setItem('shujiakey', JSON.stringify(arrShujia));
|
||||
|
||||
layerPopup('已成功加入书架!',3)
|
||||
}
|
||||
|
||||
function displayShujia() {
|
||||
|
||||
// 获取书架数据
|
||||
const shujia = JSON.parse(localStorage.getItem('shujiakey')) || [];
|
||||
|
||||
if (shujia.length === 0) {
|
||||
console.log('书架为空');
|
||||
return;
|
||||
}
|
||||
|
||||
// 渲染书籍列表
|
||||
const shujiaContainer = document.getElementById('shujiaContainer');
|
||||
shujiaContainer.innerHTML = ''; // 清空原内容
|
||||
shujia.forEach(book => {
|
||||
const bookElement = document.createElement('div');
|
||||
if (isMobile()) {
|
||||
bookElement.innerHTML = `
|
||||
<dl class="rec-focus-book">
|
||||
<dt class="book-img">
|
||||
<a href="/shu/${book.xsxq_id}.html">
|
||||
<img height="100" width="80" src="${book.xsxq_feng_mian_url}" >
|
||||
</a>
|
||||
</dt>
|
||||
<dd class="book-info">
|
||||
<h2><a href="/shu/${book.xsxq_id}.html">${book.xsxq_ming_zi}</a></h2>
|
||||
<p>作者: ${book.xsxq_zuozhe}</p>
|
||||
<p> ${book.xsxq_jie_shao}</p>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
`;
|
||||
} else {
|
||||
bookElement.innerHTML = `
|
||||
<div class="item">
|
||||
<div class="image">
|
||||
<a href="/shu/${book.xsxq_id}.html">
|
||||
<img style="min-height:120px;" src="${book.xsxq_feng_mian_url}" alt="${book.xsxq_ming_zi}">
|
||||
</a>
|
||||
</div>
|
||||
<dl>
|
||||
<dt>
|
||||
<span>${book.xsxq_zuozhe}</span>
|
||||
<a href="/shu/${book.xsxq_id}.html">${book.xsxq_ming_zi}</a>
|
||||
</dt>
|
||||
<dd style="height:90px">
|
||||
<a href="/shu/${book.xsxq_id}.html"
|
||||
style="color: #555">${book.xsxq_jie_shao}</a>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
`;
|
||||
}
|
||||
|
||||
shujiaContainer.appendChild(bookElement);
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// // 生成二维码
|
||||
// async function generateQRCode() {
|
||||
// var qrcodeCanvas = document.querySelector('.js-qr .qrcode');
|
||||
// var url = window.location.href;
|
||||
|
||||
// // 清空二维码画布
|
||||
// qrcodeCanvas.innerHTML = '';
|
||||
|
||||
// // 使用 qrcode.min.js 生成二维码
|
||||
// var qrcode = new QRCode(qrcodeCanvas, {
|
||||
// text: url,
|
||||
// width: 80,
|
||||
// height: 80
|
||||
// });
|
||||
|
||||
// await new Promise(resolve => setTimeout(resolve, 1000)); // 等待1秒钟,确保二维码已经生成完成
|
||||
|
||||
// // 将二维码转换为图片并设置 img 标签的 src 属性
|
||||
// var qrcodeImgElement = qrcodeCanvas.querySelector('.qrcode img');
|
||||
// if (qrcodeImgElement) {
|
||||
// var dataURL = qrcodeImgElement.src;
|
||||
|
||||
// // 设置下载链接
|
||||
// var downloadLink = document.querySelector('.site-qrcode.js-qr');
|
||||
// downloadLink.href = dataURL;
|
||||
// } else {
|
||||
// console.error('二维码生成失败');
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// // 关闭弹窗的函数
|
||||
// function closeIndexPopup(id) {
|
||||
// let popup = document.getElementById('index-zxcv-puoup-' + id);
|
||||
// if (popup) {
|
||||
// popup.style.display = 'none';
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 检查并显示弹窗的函数
|
||||
// function checkAndShowPopup(id) {
|
||||
// let lastShown = localStorage.getItem('popup-' + id + '-lastShown');
|
||||
// let now = Date.now();
|
||||
// let oneHour = 60 * 60 * 1000;
|
||||
|
||||
// if (!lastShown || now - lastShown > oneHour) {
|
||||
// let popup = document.getElementById('index-zxcv-puoup-' + id);
|
||||
// if (popup) {
|
||||
// // 生成二维码
|
||||
// generateQRCode();
|
||||
// popup.style.display = 'block';
|
||||
// localStorage.setItem('popup-' + id + '-lastShown', now);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // 点击顶部保存网站
|
||||
// function showSiteTips(id) {
|
||||
// let popup = document.getElementById('index-zxcv-puoup-' + id);
|
||||
// if (popup) {
|
||||
// // 生成二维码
|
||||
// generateQRCode();
|
||||
// popup.style.display = 'block';
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// // 监听滚动事件隐藏头部
|
||||
// function throttlingFnV2(fn, delay) {
|
||||
// let lastCall = 0;
|
||||
// return function (...args) {
|
||||
// const now = new Date().getTime();
|
||||
// if (now - lastCall < delay) {
|
||||
// return;
|
||||
// }
|
||||
// lastCall = now;
|
||||
// return fn(...args);
|
||||
// };
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 切换顶部会员信息
|
||||
// */
|
||||
// function checkoutHuiyuanTip(){
|
||||
// if($(".huiyuan-btn-top")){
|
||||
// if(checkIsLoginFn()){
|
||||
// $(".huiyuan-btn-top").attr('href',"/info")
|
||||
// $(".huiyuan-btn-top").text('会员')
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// $(function () {
|
||||
// checkoutHuiyuanTip()
|
||||
// if ($(".novel-reader").length === 0) {
|
||||
// let _scrollY = 0; // 记录上一次滚动位置
|
||||
// let nav = $('.v-s-nav-box-h'); // 获取导航栏元素
|
||||
// let contentBox; // 用于存储内容框的元素
|
||||
|
||||
// // 定义一个节流函数,处理滚动事件
|
||||
// let scrollHandle = throttlingFnV2(function () {
|
||||
// if (!contentBox) {
|
||||
// contentBox = $('.content-box').eq(0);
|
||||
// }
|
||||
// nav.addClass('nav-active'); // 给导航栏添加激活类
|
||||
// let navHeight = nav.height()?? 0; // 获取导航栏高度
|
||||
// contentBox.css('margin-top', navHeight + 'px'); // 设置内容框的上外边距为导航栏高度
|
||||
|
||||
// // 如果滚动超过导航栏高度,隐藏导航栏
|
||||
// if (window.pageYOffset > navHeight) {
|
||||
// nav.addClass('v-s-nav-box-hide');
|
||||
// }
|
||||
|
||||
// // 如果向上滚动,显示导航栏
|
||||
// if (window.pageYOffset < _scrollY) {
|
||||
// nav.removeClass('v-s-nav-box-hide');
|
||||
// }
|
||||
|
||||
// _scrollY = window.pageYOffset; // 更新滚动位置
|
||||
// });
|
||||
|
||||
// // 监听滚动事件
|
||||
// $(window).scroll(function () {
|
||||
// scrollHandle();
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
// $(function () {
|
||||
// //顶部分类高亮
|
||||
// function scrollToSelectedMenu(menuClass, selectedClass) {
|
||||
// function scrollToMenu() {
|
||||
// try {
|
||||
// let nav = document.querySelector(`.${selectedClass}`);
|
||||
// if (nav) {
|
||||
// let offset = nav.getBoundingClientRect(); // 屏幕坐标
|
||||
// let position = nav.offsetLeft; // 相对于父元素定位
|
||||
// let width = window.innerWidth;
|
||||
// if (position + nav.offsetWidth > width) {
|
||||
// document.querySelector(`.${menuClass}`).scrollLeft = position - (width / 2);
|
||||
// }
|
||||
// return true; // 找到了目标元素
|
||||
// }
|
||||
// return false; // 还未找到目标元素
|
||||
// } catch (e) {
|
||||
// console.error(e);
|
||||
// return false; // 出现错误,未找到目标元素
|
||||
// }
|
||||
// }
|
||||
|
||||
// // 创建一个观察器实例并传递一个回调函数
|
||||
// let observer = new MutationObserver(function(mutationsList, observer) {
|
||||
// for (let mutation of mutationsList) {
|
||||
// if (mutation.type === 'childList' || mutation.type === 'attributes') {
|
||||
// if (scrollToMenu()) {
|
||||
// observer.disconnect(); // 找到目标元素后停止观察
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
// // 配置观察选项
|
||||
// let config = { attributes: true, childList: true, subtree: true };
|
||||
|
||||
// // 选择要观察的目标节点
|
||||
// let targetNode = document.body;
|
||||
|
||||
// // 传入目标节点和观察选项
|
||||
// observer.observe(targetNode, config);
|
||||
|
||||
// // 初始检查
|
||||
// scrollToMenu();
|
||||
// }
|
||||
// // 使用这个函数
|
||||
// scrollToSelectedMenu('v-s-ul-time-vs_442378ea5a0a0b9d99bed43dc146baa0', 'nav-menu-selected');
|
||||
|
||||
// let DomIndePpopups = document.querySelectorAll('[id^="index-zxcv-puoup-"]');
|
||||
// DomIndePpopups.forEach(function (popup) {
|
||||
// let DomIndePpopupId = popup.id.split('-').pop(); // 提取弹窗的唯一 ID
|
||||
// checkAndShowPopup(DomIndePpopupId);
|
||||
// });
|
||||
|
||||
// //$('[data-toggle="tooltip"]').tooltip();
|
||||
// //$('[data-toggle="popover"]').popover();
|
||||
// const observer = lozad(); // lazy loads elements with default selector as '.lozad'
|
||||
// observer.observe();
|
||||
// window._$lozad = observer;
|
||||
|
||||
// // sweetalert2弹窗配置
|
||||
// // const SSwal = Swal.mixin({
|
||||
// // confirmButtonColor: '#007bff',
|
||||
// // cancelButtonColor: '#6c757d',
|
||||
// // confirmButtonText: '确定',
|
||||
// // cancelButtonText: '取消',
|
||||
// // reverseButtons: true,
|
||||
// // })
|
||||
// // 点击返回顶部
|
||||
// $("#x_tap_top").on("click", function () {
|
||||
// $("body, html").animate(
|
||||
// {
|
||||
// scrollTop: 0,
|
||||
// },
|
||||
// 500
|
||||
// );
|
||||
// return false;
|
||||
// });
|
||||
|
||||
// // 跑马灯
|
||||
// if(document.querySelector("#scroll-outer")){
|
||||
// const outer = document.getElementById('scroll-outer')
|
||||
// const innter = document.getElementById('scroll-inner')
|
||||
// const outerWidth = outer.getBoundingClientRect().width
|
||||
// const innerWidth = innter.getBoundingClientRect().width
|
||||
// const lastText = document.getElementById('last-text')
|
||||
// const padding = 20
|
||||
// const middle = innerWidth / 2
|
||||
// let translate = 0
|
||||
// if (middle - padding > outerWidth) {
|
||||
// setInterval(() => {
|
||||
// translate = translate >= middle ? 0.5 : (translate + 0.5)
|
||||
// innter.style.transform = `translate3d(${-translate}px, 0, 0)`
|
||||
// }, 10)
|
||||
// } else {
|
||||
// lastText.style.display = 'none'
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// const FloatManager = (function() {
|
||||
// const floadzxcvxy = document.getElementById('fload-zxcv-xy');
|
||||
// if(floadzxcvxy){
|
||||
// let x = window.innerWidth / 2 - 25;
|
||||
// let y = window.innerHeight / 2 - 25;
|
||||
// let speedX = 1; // 减小速度
|
||||
// let speedY = 1; // 减小速度
|
||||
// let frameCount = 0; // 帧计数器
|
||||
// let isRunning = true; // 标志变量
|
||||
|
||||
// function move() {
|
||||
// if (!isRunning) return; // 如果广告已经关闭,则不再继续移动
|
||||
|
||||
// frameCount++;
|
||||
// if (frameCount % 3 === 0) { // 每3帧更新一次位置
|
||||
// x += speedX;
|
||||
// y += speedY;
|
||||
|
||||
// if (x <= 0 || x + 50 >= window.innerWidth) {
|
||||
// speedX = -speedX;
|
||||
// }
|
||||
// if (y <= 0 || y + 50 >= window.innerHeight) {
|
||||
// speedY = -speedY;
|
||||
// }
|
||||
|
||||
// floadzxcvxy.style.left = x + 'px';
|
||||
// floadzxcvxy.style.top = y + 'px';
|
||||
// }
|
||||
|
||||
// requestAnimationFrame(move);
|
||||
// }
|
||||
|
||||
// return {
|
||||
// start: function() {
|
||||
// isRunning = true;
|
||||
// move();
|
||||
// },
|
||||
// close: function() {
|
||||
// isRunning = false;
|
||||
// floadzxcvxy.style.display = 'none';
|
||||
// }
|
||||
// };
|
||||
// }
|
||||
// })();
|
||||
|
||||
|
||||
// let indexPuopZxcv = document.querySelector('#close-btn');
|
||||
// if (indexPuopZxcv) {
|
||||
// FloatManager.start();
|
||||
// indexPuopZxcv.addEventListener('click', function(event) {
|
||||
// event.stopPropagation(); // 阻止事件冒泡
|
||||
// event.preventDefault(); // 阻止默认行为
|
||||
// FloatManager.close();
|
||||
// });
|
||||
// }
|
||||
// // document.getElementById('close-btn').addEventListener('click', function(event) {
|
||||
// // event.stopPropagation(); // 阻止事件冒泡
|
||||
// // event.preventDefault(); // 阻止默认行为
|
||||
// // FloatManager.close();
|
||||
// // });
|
||||
|
||||
|
||||
// });
|
||||
|
||||
// // function FloatManagerCloseFn(event) {
|
||||
// // event.stopPropagation(); // 阻止事件冒泡
|
||||
// // event.preventDefault(); // 阻止默认行为
|
||||
// // FloatManager.close();
|
||||
// // }
|
||||
|
||||
// // 没用到
|
||||
// // function ypshare() {
|
||||
// // clipboard = new ClipboardJS(".content-box");
|
||||
// // $("#copyUrlx").val(`本站永久域名:${document.domain},请收藏!防止丢失,永不迷路!`);
|
||||
// // clipboard.on("success", function (e) {
|
||||
// // e.clearSelection();
|
||||
// // clipboard.destroy();
|
||||
// // });
|
||||
// // clipboard.on("error", function (e) {
|
||||
// // clipboard.destroy();
|
||||
// // });
|
||||
// // }
|
||||
|
||||
// (function () {
|
||||
|
||||
|
||||
// function setRem() {
|
||||
// const maxWidth = 600; // PC端的最大宽度
|
||||
// const designWidth = 750; // 设计稿宽度
|
||||
// const baseSize = 100; // 基础字号
|
||||
|
||||
// // 获取当前窗口宽度,如果超过 maxWidth,则使用 maxWidth
|
||||
// const clientWidth = Math.min(document.documentElement.clientWidth || window.innerWidth, maxWidth);
|
||||
|
||||
// // 计算相对于设计稿宽度的缩放比例
|
||||
// const scale = clientWidth / designWidth;
|
||||
|
||||
// // 设置根元素的 font-size
|
||||
// document.documentElement.style.fontSize = baseSize * scale + 'px';
|
||||
|
||||
// // 设置 body 的最大宽度为 7.5rem
|
||||
// // document.body.style.maxWidth = '7.5rem';
|
||||
// }
|
||||
|
||||
// // 初始调用
|
||||
// setRem();
|
||||
|
||||
// // 监听窗口 resize 事件
|
||||
// window.addEventListener('resize', setRem);
|
||||
|
||||
|
||||
|
||||
// })();
|
||||
// document.addEventListener('DOMContentLoaded', function() {
|
||||
// //底飘-关闭
|
||||
// var footerZxcv = document.querySelector('#floating-zxcv-close-btn');
|
||||
// if (footerZxcv) {
|
||||
// footerZxcv.addEventListener('click', function(event) {
|
||||
// event.stopPropagation(); // 阻止事件冒泡
|
||||
// event.preventDefault(); // 阻止默认行为
|
||||
// $(".floating-zxcv").hide()
|
||||
// });
|
||||
// }
|
||||
|
||||
// var swiperss = document.querySelectorAll('.swiper-container-index');
|
||||
// swiperss.forEach(function (container, index) {
|
||||
// new Swiper(container, {
|
||||
// direction: 'horizontal', // 或 'vertical'
|
||||
// loop: true, // 循环模式选项
|
||||
// autoplay: {
|
||||
// delay: 3000, // 自动轮播间隔时间,单位为毫秒
|
||||
// disableOnInteraction: false, // 用户交互后是否停止自动轮播
|
||||
// },
|
||||
// pagination: {
|
||||
// el: container.querySelector('.swiper-pagination'),
|
||||
// clickable: true,
|
||||
// },
|
||||
// navigation: {
|
||||
// nextEl: container.querySelector('.swiper-button-next'),
|
||||
// prevEl: container.querySelector('.swiper-button-prev'),
|
||||
// },
|
||||
// });
|
||||
// });
|
||||
|
||||
|
||||
// function adjustSwiperHeights() {
|
||||
// // 获取所有 .swiper-top-zxcv 容器
|
||||
// const swiperContainers = document.querySelectorAll('.swiper-top-zxcv');
|
||||
// swiperContainers.forEach(container => {
|
||||
// // 查找当前容器内的活动滑块图片
|
||||
// const activeSlide = container.querySelector('.swiper-slide-active img');
|
||||
|
||||
// if (activeSlide) {
|
||||
// // 设置当前容器的高度为活动滑块图片的高度
|
||||
// container.style.height = activeSlide.clientHeight + 'px';
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// // 调整所有容器的高度
|
||||
// adjustSwiperHeights();
|
||||
// // 当 swiper 发生切换时重新调整高度
|
||||
// document.querySelectorAll('.swiper-container').forEach(swiper => {
|
||||
// const swiperInstance = swiper.swiper;
|
||||
// if (swiperInstance) {
|
||||
// swiperInstance.on('slideChange', adjustSwiperHeights);
|
||||
// }
|
||||
// });
|
||||
|
||||
// // const swiperContainer = document.querySelector('.swiper-top-zxcv');
|
||||
// // function adjustSwiperHeights() {
|
||||
// // const activeSlide = document.querySelector('.swiper-slide-active img');
|
||||
// // if (activeSlide) {
|
||||
// // swiperContainer.style.height = activeSlide.clientHeight + 'px';
|
||||
// // }
|
||||
// // }
|
||||
// // adjustSwiperHeights();
|
||||
// var swiper = new Swiper('.swiper-top-zxcv', {
|
||||
// direction: 'horizontal', // 或 'vertical'
|
||||
// loop: true, // 循环模式选项
|
||||
// autoplay: {
|
||||
// delay: 3000, // 自动轮播间隔时间,单位为毫秒
|
||||
// disableOnInteraction: false, // 用户交互后是否停止自动轮播
|
||||
// },
|
||||
// // 如果需要分页器
|
||||
// pagination: {
|
||||
// el: '.swiper-pagination',
|
||||
// clickable: true,
|
||||
// },
|
||||
// // 如果需要前进后退按钮
|
||||
// navigation: {
|
||||
// nextEl: '.swiper-button-next',
|
||||
// prevEl: '.swiper-button-prev',
|
||||
// },
|
||||
// // 如果需要滚动条
|
||||
// scrollbar: {
|
||||
// el: '.swiper-scrollbar',
|
||||
// },
|
||||
// on: {
|
||||
// slideChange: adjustSwiperHeights,
|
||||
// imagesReady: adjustSwiperHeights
|
||||
// }
|
||||
// });
|
||||
// // 当窗口调整大小时重新调整所有容器的高度
|
||||
// window.addEventListener('resize', adjustSwiperHeights);
|
||||
|
||||
// // yp-detail
|
||||
// if(document.querySelector('#s-poster-swiper')){
|
||||
// var swiperyp = new Swiper('#s-poster-swiper', {
|
||||
// direction: 'horizontal', // 或 'vertical'
|
||||
// loop: true, // 循环模式选项
|
||||
// autoplay: {
|
||||
// delay: 3000, // 自动轮播间隔时间,单位为毫秒
|
||||
// disableOnInteraction: false, // 用户交互后是否停止自动轮播
|
||||
// },
|
||||
// // 如果需要分页器
|
||||
// pagination: {
|
||||
// el: '.swiper-pagination',
|
||||
// clickable: true,
|
||||
// },
|
||||
// // 如果需要前进后退按钮
|
||||
// navigation: {
|
||||
// nextEl: '.swiper-button-next',
|
||||
// prevEl: '.swiper-button-prev',
|
||||
// },
|
||||
// // 如果需要滚动条
|
||||
// scrollbar: {
|
||||
// el: '.swiper-scrollbar',
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
|
||||
// // 直播
|
||||
// if(document.querySelector('.zaixianzhibo-web')){
|
||||
// const barrageContainer = document.querySelector('.s-live-item');
|
||||
// const barrageItems = document.querySelectorAll('.barrage-item');
|
||||
// const containerWidth = barrageContainer.offsetWidth;
|
||||
|
||||
// function setAnimation(item, delay, duration) {
|
||||
// item.style.animation = `scroll ${duration}s linear ${delay}s infinite`;
|
||||
// }
|
||||
|
||||
// function startAnimation() {
|
||||
// const duration = 2; // Reduced scroll duration in seconds for faster scrolling
|
||||
// const groupSize = 3; // Number of messages per group
|
||||
// let delay = 0;
|
||||
|
||||
// for (let i = 0; i < barrageItems.length; i += groupSize) {
|
||||
// const group = Array.from(barrageItems).slice(i, i + groupSize);
|
||||
// group.forEach((item, index) => {
|
||||
// const itemWidth = item.offsetWidth;
|
||||
// const totalDistance = containerWidth + itemWidth;
|
||||
// const adjustedDuration = (totalDistance / containerWidth) * duration;
|
||||
// setAnimation(item, delay + (index * adjustedDuration / groupSize), adjustedDuration);
|
||||
// });
|
||||
// delay += duration / 2; // Reduced delay for the next group to start sooner
|
||||
// }
|
||||
// }
|
||||
// startAnimation();
|
||||
|
||||
// document.getElementById('js-reload').addEventListener('click', function() {
|
||||
// const currentUrl = window.location.href;
|
||||
// const version = new Date().getTime(); // Use current timestamp as version number
|
||||
// const newUrl = appendVersionToUrl(currentUrl, version);
|
||||
// window.location.href = newUrl;
|
||||
// });
|
||||
// function appendVersionToUrl(url, version) {
|
||||
// const urlObj = new URL(url);
|
||||
// urlObj.searchParams.set('t', version);
|
||||
// return urlObj.toString();
|
||||
// }
|
||||
// }
|
||||
|
||||
// if(document.querySelector('.cryouxi-web')){
|
||||
// let tabs = $("#s-game-wrap .s-game-tag");
|
||||
// let mySwiper = new Swiper('#s-game-wrap .swiper', {
|
||||
// on: {
|
||||
// slideChangeTransitionEnd: function () {
|
||||
// tabs.removeClass("active").eq(this.activeIndex).addClass("active")
|
||||
// },
|
||||
// },
|
||||
// });
|
||||
// tabs.on("click",function(){
|
||||
// let currIdx = $(this).index();
|
||||
// tabs.removeClass("active").eq(currIdx).addClass("active");
|
||||
// mySwiper.slideTo(currIdx, 300, false);
|
||||
// });
|
||||
// tabs.eq(0).click();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// });
|
||||
|
||||
|
||||
// $(function () {
|
||||
// $('.s-select-wrap').on('click', '.pretty-select', function() {
|
||||
// var $currentWrap = $(this).closest('.s-select-wrap');
|
||||
// var $currentPrettySelectWrap = $(this).closest('.pretty-select-wrap');
|
||||
|
||||
// // 移除所有兄弟元素的子元素的 active 类
|
||||
// $('.s-select-wrap').find('.pretty-select-wrap').removeClass('active');
|
||||
|
||||
// // 切换当前元素的 active 类
|
||||
// if ($currentPrettySelectWrap.hasClass('active')) {
|
||||
// $currentPrettySelectWrap.removeClass('active');
|
||||
// } else {
|
||||
// $currentPrettySelectWrap.addClass('active');
|
||||
// }
|
||||
// });
|
||||
|
||||
// // 处理选项点击事件
|
||||
// $('.pretty-options li').on('click', function() {
|
||||
// var selectedText = $(this).text();
|
||||
// var $currentPrettySelect = $(this).closest('.pretty-select-wrap').find('.pretty-select');
|
||||
// var $currentPrettyOptions = $(this).closest('.pretty-options');
|
||||
|
||||
// // 更新 pretty-select 的文本
|
||||
// $currentPrettySelect.text(selectedText);
|
||||
|
||||
// // 移除所有选项的 selected 类
|
||||
// $currentPrettyOptions.find('li').removeClass('selected');
|
||||
|
||||
// // 添加 selected 类到当前选项
|
||||
// $(this).addClass('selected');
|
||||
|
||||
// // 隐藏选项列表
|
||||
// $(this).closest('.pretty-select-wrap').removeClass('active');
|
||||
// });
|
||||
|
||||
// // 点击外部隐藏所有的 active 类
|
||||
// $(document).on('click', function(event) {
|
||||
// if (!$(event.target).closest('.s-select-wrap').length) {
|
||||
// $('.pretty-select-wrap').removeClass('active');
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
// document.addEventListener('DOMContentLoaded', function() {
|
||||
// if(document.querySelector('.pagination-click')){
|
||||
// document.querySelector('.pagination-click').addEventListener('click', function() {
|
||||
// var pageInput = document.querySelector('.page-link.pagination-num');
|
||||
// var pageNum = pageInput.value ? parseInt(pageInput.value, 10) : 1;
|
||||
// var maxPage = parseInt(this.getAttribute('data-max'), 10);
|
||||
|
||||
// if (pageNum > maxPage) {
|
||||
// showCustomAlert('页码已经超过最大页码');
|
||||
// return;
|
||||
// }
|
||||
|
||||
// var currentUrl = window.location.href;
|
||||
// var urlObj = new URL(currentUrl);
|
||||
// var path = urlObj.pathname + urlObj.search;
|
||||
|
||||
// var searchParams = new URLSearchParams(urlObj.search);
|
||||
// if (searchParams.has('page')) {
|
||||
// searchParams.set('page', pageNum);
|
||||
// } else {
|
||||
// searchParams.append('page', pageNum);
|
||||
// }
|
||||
|
||||
// // var newUrl = urlObj.origin + urlObj.pathname + '?' + searchParams.toString();
|
||||
// // var newUrl = urlObj.origin + urlObj.pathname
|
||||
|
||||
// var newUrl = urlObj.pathname.replace(/(\d+)\.html$/, pageNum + '.html');
|
||||
// newUrl = urlObj.origin + newUrl
|
||||
|
||||
// console.log(newUrl);
|
||||
|
||||
// window.open(newUrl);
|
||||
// });
|
||||
// }
|
||||
// if(document.querySelector('#js-set-qr')){
|
||||
// document.getElementById('js-set-qr').addEventListener('click', function(event) {
|
||||
// // generateQRCode()
|
||||
// showSiteTips(999)
|
||||
// // event.preventDefault();
|
||||
// // generateQRCode(window.location.href, '永不丢失二维码.png');
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
// function showCustomAlert(message) {
|
||||
// var alertBox = document.getElementById('custom-alert');
|
||||
// alertBox.textContent = message;
|
||||
// alertBox.classList.add('show');
|
||||
// setTimeout(function() {
|
||||
// alertBox.classList.remove('show');
|
||||
// }, 3000);
|
||||
// }
|
||||
|
||||
// function copyUrlxs(url) {
|
||||
// var tempInput = document.createElement('input');
|
||||
// tempInput.style.position = 'absolute';
|
||||
// tempInput.style.left = '-9999px';
|
||||
// tempInput.value = url;
|
||||
// document.body.appendChild(tempInput);
|
||||
// tempInput.select();
|
||||
// document.execCommand('copy');
|
||||
// document.body.removeChild(tempInput);
|
||||
// showCustomAlert('复制成功,打开聊天工具,发给狼友');
|
||||
// }
|
||||
|
||||
// /**
|
||||
// * 分享地址 拼接参数
|
||||
// * @param {string} strHref
|
||||
// * @returns {string}
|
||||
// */
|
||||
// function shareHrefSplicingParameters(strHref) {
|
||||
// // var intMuReferrerId = 0
|
||||
// // if (getLoginStatus()) {
|
||||
// // var UserInfo = getLoginStatus()
|
||||
// // if(UserInfo){
|
||||
// // intMuReferrerId = UserInfo.mu_id
|
||||
// // }
|
||||
// // }
|
||||
// // if (String(intMuReferrerId).length > 0) {
|
||||
// // strHref += '?mu_referrer_id=' + intMuReferrerId
|
||||
// // }
|
||||
|
||||
// // let strChannelVal = (localStorage.getItem(EncAndDec.encryptData('dlfx_channelcode')) ? localStorage.getItem(EncAndDec.encryptData('dlfx_channelcode')) : '')
|
||||
// // if (strChannelVal.length > 0) {
|
||||
// // if (strHref.indexOf('?') != -1) {
|
||||
// // strHref += '&channel=' + strChannelVal
|
||||
// // } else {
|
||||
// // strHref += '?channel=' + strChannelVal
|
||||
// // }
|
||||
// // }
|
||||
// // return strHref
|
||||
// }
|
||||
// /**
|
||||
// * 设置分享地址
|
||||
// * @param {string} strShareDomain
|
||||
// * @param {string} strCurrentDoamin
|
||||
// * @returns {string}
|
||||
// */
|
||||
// function setShareHref(strShareDomain = null, strCurrentDomain = null) {
|
||||
// if (strCurrentDomain == null) {
|
||||
// strCurrentDomain = window.location.origin + window.location.pathname
|
||||
// }
|
||||
// if (strShareDomain == null) {
|
||||
// strShareDomain = "https://"+document.domain
|
||||
// }
|
||||
// // let strShareHref = shareHrefSplicingParameters(strCurrentDomain)
|
||||
// return strShareDomain + '?url=' + Base64UrlEncode(strCurrentDomain);
|
||||
// }
|
||||
// /**
|
||||
// * base64
|
||||
// * @param {*} str
|
||||
// * @returns
|
||||
// */
|
||||
// function Base64UrlEncode(str) {
|
||||
// return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
|
||||
// function toSolidBytes(match, p1) {
|
||||
// return String.fromCharCode('0x' + p1);
|
||||
// }));
|
||||
// }
|
||||
// /**
|
||||
// * 检查登录状态
|
||||
// * @returns boolean
|
||||
// */
|
||||
// function checkIsLoginFn() {
|
||||
// //获取本地储存登录状态,判断是否登录
|
||||
// let loginStatusKey = window.location.hostname+'loginStatus'
|
||||
// var loginStatus = localStorage.getItem(loginStatusKey)
|
||||
// if (!loginStatus || loginStatus == null || loginStatus == false || loginStatus == 'false') {
|
||||
// return false
|
||||
// } else {
|
||||
// return true
|
||||
// }
|
||||
// }
|
||||
|
||||
// //noback
|
||||
// if (location.href.indexOf('source=1') >= 0) {
|
||||
// setHistory()
|
||||
// }
|
||||
|
||||
// function setHistory() {
|
||||
// history.pushState(null, null, document.URL);
|
||||
// setTimeout(function() {
|
||||
// window.addEventListener('popstate', function() {
|
||||
// history.pushState(null, null, document.URL);
|
||||
// let strRand = agenerateLetterAndNumber(false,5,10)
|
||||
// let strGoWeb = '/?v='+strRand
|
||||
// window.location.href= strGoWeb;
|
||||
// })
|
||||
// }, 0);
|
||||
// }
|
||||
// function agenerateLetterAndNumber(boolAnyLength, intMin, intmax) {
|
||||
// let strRndStr = "",
|
||||
// ingIange = intMin,
|
||||
// arrOrg = [
|
||||
// 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
|
||||
// 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
// 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
|
||||
// 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',];
|
||||
|
||||
// if (boolAnyLength) {
|
||||
// ingIange = Math.round(Math.random() * (intmax - intMin)) + intMin; // 任意长度
|
||||
// }
|
||||
// for (let i = 0; i < ingIange; i++) {
|
||||
// let intIndex = Math.round(Math.random() * (arrOrg.length - 1));
|
||||
// strRndStr += arrOrg[intIndex];
|
||||
// }
|
||||
// return strRndStr;
|
||||
// }
|
||||
2816
code/public/template/default/pc/css/style.css
Normal file
2816
code/public/template/default/pc/css/style.css
Normal file
File diff suppressed because it is too large
Load Diff
108
code/public/template/default/pc/js/common.js
Normal file
108
code/public/template/default/pc/js/common.js
Normal file
File diff suppressed because one or more lines are too long
4413
code/public/template/default/pc/js/jquery.min.js
vendored
Normal file
4413
code/public/template/default/pc/js/jquery.min.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
561
code/public/template/default/pc/js/yueduqsbs.js
Normal file
561
code/public/template/default/pc/js/yueduqsbs.js
Normal file
@@ -0,0 +1,561 @@
|
||||
//var qsbs = { _keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", aa: function (input) { var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = qsbs._utf8_encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64 } else if (isNaN(chr3)) { enc4 = 64 } output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4) } return output }, bb: function (input) { var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) { enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) { output = output + String.fromCharCode(chr2) } if (enc4 != 64) { output = output + String.fromCharCode(chr3) } } output = qsbs._utf8_decode(output); return output }, _utf8_encode: function (string) { string = string.replace(/\r\n/g, "\n"); var utftext = ""; for (var n = 0; n < string.length; n++) { var c = string.charCodeAt(n); if (c < 128) { utftext += String.fromCharCode(c) } else if ((c > 127) && (c < 2048)) { utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128) } else { utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128) } } return utftext }, _utf8_decode: function (utftext) { var string = ""; var i = 0; var c = c1 = c2 = 0; while (i < utftext.length) { c = utftext.charCodeAt(i); if (c < 128) { string += String.fromCharCode(c); i++ } else if ((c > 191) && (c < 224)) { c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2 } else { c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3 } } return string } }
|
||||
// 解码后检测并清理木马代码
|
||||
function cleanMaliciousCode(decodedStr) {
|
||||
// 定义一系列的恶意代码和关键字
|
||||
const maliciousPatterns = [
|
||||
/eval\s*\(/gi, // 检测 eval
|
||||
/document\.location/gi, // 页面跳转
|
||||
/window\.location/gi, // 页面跳转
|
||||
/window\.location\.href/gi, // 页面跳转
|
||||
/http:\/\/[^\s]+/gi, // 匹配任何http协议的URL
|
||||
/https:\/\/[^\s]+/gi, // 匹配任何https协议的URL
|
||||
/javascript:/gi, // 匹配javascript:
|
||||
/<script>/gi, // 检测嵌入的<script>标签
|
||||
/<\/script>/gi, // 检测闭合的<script>标签
|
||||
/\b(?:[a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}\b/gi ,// 匹配任何域名,如 example.com
|
||||
/m.23wx.com/gi, // 检测闭合的<script>标签
|
||||
/23wx.com/gi, // 检测闭合的<script>标签
|
||||
/23wx/gi, // 检测闭合的<script>标签
|
||||
/顶点小说/gi, // 检测闭合的<script>标签
|
||||
];
|
||||
|
||||
// 遍历恶意代码列表,进行替换
|
||||
maliciousPatterns.forEach(pattern => {
|
||||
decodedStr = decodedStr.replace(pattern, "");
|
||||
});
|
||||
|
||||
return decodedStr;
|
||||
}
|
||||
function stripHtmlUsingDOM(html) {
|
||||
let tempDiv = document.createElement("div");
|
||||
tempDiv.innerHTML = html;
|
||||
return tempDiv.innerText || tempDiv.textContent;
|
||||
}
|
||||
var qsbs = {
|
||||
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
||||
|
||||
aa: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = qsbs._utf8_encode(input);
|
||||
|
||||
while (i < input.length) {
|
||||
chr1 = input.charCodeAt(i++);
|
||||
chr2 = input.charCodeAt(i++);
|
||||
chr3 = input.charCodeAt(i++);
|
||||
enc1 = chr1 >> 2;
|
||||
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
|
||||
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
|
||||
enc4 = chr3 & 63;
|
||||
|
||||
if (isNaN(chr2)) {
|
||||
enc3 = enc4 = 64;
|
||||
} else if (isNaN(chr3)) {
|
||||
enc4 = 64;
|
||||
}
|
||||
|
||||
output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
|
||||
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);
|
||||
}
|
||||
|
||||
return output;
|
||||
},
|
||||
|
||||
bb: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
}
|
||||
|
||||
output = qsbs._utf8_decode(output);
|
||||
// 清理恶意代码
|
||||
var cleanedOutput = cleanMaliciousCode(output);
|
||||
return cleanedOutput;
|
||||
},
|
||||
|
||||
bbb: function (input) {
|
||||
var output = "";
|
||||
var chr1, chr2, chr3;
|
||||
var enc1, enc2, enc3, enc4;
|
||||
var i = 0;
|
||||
input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
|
||||
|
||||
while (i < input.length) {
|
||||
enc1 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc2 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc3 = this._keyStr.indexOf(input.charAt(i++));
|
||||
enc4 = this._keyStr.indexOf(input.charAt(i++));
|
||||
|
||||
chr1 = (enc1 << 2) | (enc2 >> 4);
|
||||
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
|
||||
chr3 = ((enc3 & 3) << 6) | enc4;
|
||||
|
||||
output = output + String.fromCharCode(chr1);
|
||||
if (enc3 != 64) {
|
||||
output = output + String.fromCharCode(chr2);
|
||||
}
|
||||
if (enc4 != 64) {
|
||||
output = output + String.fromCharCode(chr3);
|
||||
}
|
||||
}
|
||||
|
||||
output = qsbs._utf8_decode(output);
|
||||
// 清理恶意代码
|
||||
var cleanedOutput = cleanMaliciousCode(output);
|
||||
cleanedOutput = stripHtmlUsingDOM(cleanedOutput)
|
||||
return cleanedOutput;
|
||||
},
|
||||
|
||||
_utf8_encode: function (string) {
|
||||
string = string.replace(/\r\n/g, "\n");
|
||||
var utftext = "";
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
if (c < 128) {
|
||||
utftext += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
utftext += String.fromCharCode((c >> 6) | 192);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
utftext += String.fromCharCode((c >> 12) | 224);
|
||||
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
utftext += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
}
|
||||
return utftext;
|
||||
},
|
||||
|
||||
_utf8_decode: function (utftext) {
|
||||
var string = "";
|
||||
var i = 0;
|
||||
var c = c1 = c2 = 0;
|
||||
|
||||
while (i < utftext.length) {
|
||||
c = utftext.charCodeAt(i);
|
||||
if (c < 128) {
|
||||
string += String.fromCharCode(c);
|
||||
i++;
|
||||
} else if ((c > 191) && (c < 224)) {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
|
||||
i += 2;
|
||||
} else {
|
||||
c2 = utftext.charCodeAt(i + 1);
|
||||
c3 = utftext.charCodeAt(i + 2);
|
||||
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
|
||||
i += 3;
|
||||
}
|
||||
}
|
||||
return string;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var _num = 100;
|
||||
|
||||
function LastRead() {
|
||||
this.bookList = "bookList"
|
||||
}
|
||||
LastRead.prototype = {
|
||||
set: function (bid, tid, title, texttitle, read_page, author, tmpbook) {
|
||||
if (!(bid && tid && title && texttitle, read_page)) return;
|
||||
var v = bid + '#' + tid + '#' + title + '#' + texttitle + '#' + read_page + '#' + author + '#' + tmpbook;
|
||||
this.setItem(bid, v);
|
||||
this.setBook(bid)
|
||||
},
|
||||
|
||||
get: function (k) {
|
||||
return this.getItem(k) ? this.getItem(k).split("#") : "";
|
||||
},
|
||||
|
||||
remove: function (k) {
|
||||
this.removeItem(k);
|
||||
this.removeBook(k)
|
||||
},
|
||||
|
||||
setBook: function (v) {
|
||||
var reg = new RegExp("(^|#)" + v);
|
||||
var books = this.getItem(this.bookList);
|
||||
if (books == "") {
|
||||
books = v
|
||||
}
|
||||
else {
|
||||
if (books.search(reg) == -1) {
|
||||
books += "#" + v
|
||||
}
|
||||
else {
|
||||
books.replace(reg, "#" + v)
|
||||
}
|
||||
}
|
||||
this.setItem(this.bookList, books)
|
||||
|
||||
},
|
||||
|
||||
getBook: function () {
|
||||
var v = this.getItem(this.bookList) ? this.getItem(this.bookList).split("#") : Array();
|
||||
var books = Array();
|
||||
if (v.length) {
|
||||
|
||||
for (var i = 0; i < v.length; i++) {
|
||||
var tem = this.getItem(v[i]).split('#');
|
||||
if (i > v.length - (_num + 1)) {
|
||||
if (tem.length > 3) books.push(tem);
|
||||
}
|
||||
else {
|
||||
lastread.remove(tem[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return books
|
||||
},
|
||||
|
||||
removeBook: function (v) {
|
||||
var reg = new RegExp("(^|#)" + v);
|
||||
var books = this.getItem(this.bookList);
|
||||
if (!books) {
|
||||
books = ""
|
||||
}
|
||||
else {
|
||||
if (books.search(reg) != -1) {
|
||||
books = books.replace(reg, "")
|
||||
}
|
||||
|
||||
}
|
||||
this.setItem(this.bookList, books)
|
||||
|
||||
},
|
||||
|
||||
setItem: function (k, v) {
|
||||
if (!!window.localStorage) {
|
||||
localStorage.setItem(k, v);
|
||||
}
|
||||
else {
|
||||
var expireDate = new Date();
|
||||
var EXPIR_MONTH = 30 * 24 * 3600 * 1000;
|
||||
expireDate.setTime(expireDate.getTime() + 12 * EXPIR_MONTH)
|
||||
document.cookie = k + "=" + encodeURIComponent(v) + ";expires=" + expireDate.toGMTString() + "; path=/";
|
||||
}
|
||||
},
|
||||
|
||||
getItem: function (k) {
|
||||
var value = ""
|
||||
var result = ""
|
||||
if (!!window.localStorage) {
|
||||
result = window.localStorage.getItem(k);
|
||||
value = result || "";
|
||||
}
|
||||
else {
|
||||
var reg = new RegExp("(^| )" + k + "=([^;]*)(;|\x24)");
|
||||
var result = reg.exec(document.cookie);
|
||||
if (result) {
|
||||
value = decodeURIComponent(result[2]) || ""
|
||||
}
|
||||
}
|
||||
return value
|
||||
|
||||
},
|
||||
|
||||
removeItem: function (k) {
|
||||
if (!!window.localStorage) {
|
||||
window.localStorage.removeItem(k);
|
||||
}
|
||||
else {
|
||||
var expireDate = new Date();
|
||||
expireDate.setTime(expireDate.getTime() - 1000)
|
||||
document.cookie = k + "= " + ";expires=" + expireDate.toGMTString()
|
||||
}
|
||||
},
|
||||
removeAll: function () {
|
||||
if (!!window.localStorage) {
|
||||
window.localStorage.clear();
|
||||
}
|
||||
else {
|
||||
var v = this.getItem(this.bookList) ? this.getItem(this.bookList).split("#") : Array();
|
||||
var books = Array();
|
||||
if (v.length) {
|
||||
for (i in v) {
|
||||
var tem = this.removeItem(v[k])
|
||||
}
|
||||
}
|
||||
this.removeItem(this.bookList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showbook() {
|
||||
var showbook = document.getElementById('tmpbook');
|
||||
var books = lastread.getBook();
|
||||
var bookhtml = '';
|
||||
if (books.length) {
|
||||
var k = 1;
|
||||
for (var i = books.length - 1; i > -1; i--) {
|
||||
var articlename = books[i][2];
|
||||
var lastchapter = books[i][3];
|
||||
var lastchapterid = books[i][1];
|
||||
var read_page = parseInt(books[i][4]);
|
||||
var tmpbook_del = books[i][0];
|
||||
var author = books[i][5];
|
||||
var read_ym = parseInt(read_page + 1);
|
||||
if (books[i][6] > 0) {
|
||||
var articleid = parseInt(books[i][0].replace('t', ''));
|
||||
var shortid = parseInt(articleid / 1000);
|
||||
var mybook_aid = parseInt(books[i][6]);
|
||||
var mybook_cid = parseInt(books[i][1] - articleid);
|
||||
info_url = tag_info_rewrite.replace(/{aid}/, articleid);
|
||||
info_url = info_url.replace(/{bid}/, shortid);
|
||||
read_url = tag_read_rewrite.replace(/{aid}/, articleid);
|
||||
read_url = read_url.replace(/{bid}/, shortid);
|
||||
read_url = read_url.replace(/{cid}/, lastchapterid);
|
||||
read_page_url = tag_read_page_rewrite.replace(/{aid}/, articleid);
|
||||
read_page_url = read_page_url.replace(/{bid}/, shortid);
|
||||
read_page_url = read_page_url.replace(/{cid}/, lastchapterid);
|
||||
read_page_url = read_page_url.replace(/{pid}/, read_page);
|
||||
} else {
|
||||
var articleid = parseInt(books[i][0]);
|
||||
var shortid = parseInt(articleid / 1000);
|
||||
var mybook_aid = articleid;
|
||||
var mybook_cid = books[i][1];
|
||||
info_url = info_rewrite.replace(/{aid}/, articleid);
|
||||
info_url = info_url.replace(/{bid}/, shortid);
|
||||
read_url = read_rewrite.replace(/{aid}/, articleid);
|
||||
read_url = read_url.replace(/{bid}/, shortid);
|
||||
read_url = read_url.replace(/{cid}/, lastchapterid);
|
||||
read_page_url = read_page_rewrite.replace(/{aid}/, articleid);
|
||||
read_page_url = read_page_url.replace(/{bid}/, shortid);
|
||||
read_page_url = read_page_url.replace(/{cid}/, lastchapterid);
|
||||
read_page_url = read_page_url.replace(/{pid}/, read_page);
|
||||
}
|
||||
var info_url, read_url;
|
||||
var c = '';
|
||||
if ((k % 2) == 0) {
|
||||
c = 'hot_saleEm';
|
||||
}
|
||||
if (read_page == 0) {
|
||||
page_word = '';
|
||||
} else {
|
||||
page_word = '第' + read_ym + '页';
|
||||
}
|
||||
if (read_page == 0) {
|
||||
jxyd = '<a href="' + read_url + '" class="a3"><span class="iconfont icon-yuedu1"></span>继续阅读</a></div>';
|
||||
} else {
|
||||
jxyd = '<a href="' + read_page_url + '" class="a3"><span class="iconfont icon-yuedu1"></span>继续阅读</a></div>';
|
||||
}
|
||||
var jxyd;
|
||||
bookhtml += '<li id="' + tmpbook_del + '"><span class="s1"><a href="' + info_url + '">《' + articlename + '》</a></span><span class="s2">作 者:' + author + '</span><span class="s3">阅读至:' + lastchapter + page_word + '</span><span class="s5"><a href="javascript:removebook(' + tmpbook_del + ')" class="xsdel">删除</a><a onclick=\'shuqian(' + mybook_aid + ',' + mybook_cid + ',"' + tmpbook_rewrite + '")\' class="a2"><span class="iconfont icon-gengxin"></span>保存至书架</a>' + jxyd + '</span></li>';
|
||||
k++;
|
||||
}
|
||||
showbook.innerHTML = bookhtml;
|
||||
}
|
||||
else {
|
||||
showbook.innerHTML = '<li>您还木有阅读本站小说,未产生阅读记录。</li>';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function removebook(k) {
|
||||
lastread.remove(k);
|
||||
showbook()
|
||||
}
|
||||
|
||||
|
||||
|
||||
function yuedu() {
|
||||
//document.write("<a href='javascript:showbook();' target='_self'>点击查看阅读记录</a>");
|
||||
showbook();
|
||||
}
|
||||
|
||||
window.lastread = new LastRead();
|
||||
|
||||
|
||||
function removebook(k) {
|
||||
lastread.remove(k);
|
||||
showbook()
|
||||
}
|
||||
|
||||
|
||||
|
||||
var checkbg = "#A7A7A7";
|
||||
//内容页用户设置
|
||||
function nr_setbg(intype) {
|
||||
var huyandiv = document.getElementById("huyandiv");
|
||||
var light = document.getElementById("lightdiv");
|
||||
if (intype == "huyan") {
|
||||
if (huyandiv.style.backgroundColor == "") {
|
||||
set("light", "huyan");
|
||||
document.cookie = "light=huyan;path=/";
|
||||
}
|
||||
else {
|
||||
set("light", "no");
|
||||
document.cookie = "light=no;path=/";
|
||||
}
|
||||
}
|
||||
if (intype == "light") {
|
||||
|
||||
if (light.innerHTML == "关灯") {
|
||||
set("light", "yes");
|
||||
document.cookie = "light=yes;path=/";
|
||||
}
|
||||
else {
|
||||
set("light", "no");
|
||||
document.cookie = "light=no;path=/";
|
||||
}
|
||||
}
|
||||
if (intype == "big") {
|
||||
set("font", "big");
|
||||
document.cookie = "font=big;path=/";
|
||||
}
|
||||
if (intype == "middle") {
|
||||
set("font", "middle");
|
||||
document.cookie = "font=middle;path=/";
|
||||
}
|
||||
if (intype == "small") {
|
||||
set("font", "small");
|
||||
document.cookie = "font=small;path=/";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//内容页读取设置
|
||||
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;
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < arrCookie.length; i++) {
|
||||
var arr = arrCookie[i].split("=");
|
||||
if ("font" == arr[0]) {
|
||||
font = arr[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//light
|
||||
if (light == "yes") {
|
||||
set("light", "yes");
|
||||
}
|
||||
else if (light == "no") {
|
||||
set("light", "no");
|
||||
}
|
||||
else if (light == "huyan") {
|
||||
set("light", "huyan");
|
||||
}
|
||||
//font
|
||||
if (font == "big") {
|
||||
set("font", "big");
|
||||
}
|
||||
else if (font == "middle") {
|
||||
set("font", "middle");
|
||||
}
|
||||
else if (font == "small") {
|
||||
set("font", "small");
|
||||
}
|
||||
else {
|
||||
set("", "");
|
||||
}
|
||||
}
|
||||
|
||||
//内容页应用设置
|
||||
function set(intype, p) {
|
||||
var nr_body = document.getElementById("kkasdfei");//页面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 txt = document.getElementById("txt");//内容div
|
||||
var nr_title = document.getElementById("chaptername");//文章标题
|
||||
//var shuqian_2 = document.getElementById("shuqian_2");//书签链接
|
||||
|
||||
var pt_mulu = document.getElementById("pt_mulu");
|
||||
var pt_next = document.getElementById("pt_next");
|
||||
var pb_prev = document.getElementById("pb_prev");
|
||||
var pb_mulu = document.getElementById("pb_mulu");
|
||||
var pb_next = document.getElementById("pb_next");
|
||||
|
||||
//初始化
|
||||
//document.getElementsByName("page_nr")[1].style.color = "#000";
|
||||
|
||||
//灯光
|
||||
if (intype == "light") {
|
||||
if (p == "yes") {
|
||||
//关灯
|
||||
lightdiv.innerHTML = "开灯";
|
||||
nr_body.style.backgroundColor = "#32373B";
|
||||
huyandiv.style.backgroundColor = "";
|
||||
nr_title.style.color = "#ccc";
|
||||
txt.style.color = "#999";
|
||||
//shuqian_2.style.color = "#999";
|
||||
}
|
||||
else if (p == "no") {
|
||||
//开灯
|
||||
lightdiv.innerHTML = "关灯";
|
||||
nr_body.style.backgroundColor = "#fff";
|
||||
txt.style.color = "#000";
|
||||
nr_title.style.color = "#000";
|
||||
huyandiv.style.backgroundColor = "";
|
||||
//shuqian_2.style.color = "#000";
|
||||
}
|
||||
else if (p == "huyan") {
|
||||
//护眼
|
||||
lightdiv.innerHTML = "关灯";
|
||||
huyandiv.style.backgroundColor = checkbg;
|
||||
nr_body.style.backgroundColor = "#dcecd2";
|
||||
txt.style.color = "#000";
|
||||
//shuqian_2.style.color = "#000";
|
||||
}
|
||||
}
|
||||
//字体
|
||||
if (intype == "font") {
|
||||
//alert(p);
|
||||
fontbig.style.backgroundColor = "";
|
||||
fontmiddle.style.backgroundColor = "";
|
||||
fontsmall.style.backgroundColor = "";
|
||||
if (p == "big") {
|
||||
fontbig.style.backgroundColor = checkbg;
|
||||
txt.style.fontSize = "30px";
|
||||
txt.style.lineHeight = "45px"
|
||||
}
|
||||
if (p == "middle") {
|
||||
fontmiddle.style.backgroundColor = checkbg;
|
||||
txt.style.fontSize = "24px";
|
||||
txt.style.lineHeight = "36px"
|
||||
}
|
||||
if (p == "small") {
|
||||
fontsmall.style.backgroundColor = checkbg;
|
||||
txt.style.fontSize = "18px";
|
||||
txt.style.lineHeight = "30px"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user