├── player
├── count.dat
├── img
│ ├── full.png
│ ├── move.png
│ ├── sign.png
│ ├── alphay.ico
│ ├── loading.gif
│ ├── loading.png
│ ├── fulloff.webp
│ ├── loading2.gif
│ ├── loading2.png
│ ├── loading3.gif
│ ├── pagefull.png
│ └── background.jpg
├── css
│ └── alphaY.ttf
├── js
│ ├── theme
│ │ └── default
│ │ │ ├── icon.png
│ │ │ ├── layer.css░╫
│ │ │ └── layer.css
│ ├── setting - cookie.js
│ ├── layer.js
│ └── setting.js
├── tj.php
└── index.php
├── admin
├── js
│ ├── alphay.ico
│ ├── style.css
│ ├── upload.js
│ ├── jquery.dragsort-0.4.min.js
│ └── config.js
├── config.php
├── api.php
├── post.php
├── data.php
├── login.php
└── index.php
├── dmku
├── install
│ ├── sql.db
│ └── index.php
├── class
│ ├── ed.class.php
│ ├── sqlite3.class.php
│ ├── mysqli.class.php
│ ├── danmu.class.php
│ └── pdo.class.php
├── config.inc.php
├── dm_rule.html
├── index.php
├── bilibili
│ └── index.php
└── init.php
├── screenshot
├── admin.png
├── login.png
├── playing.png
├── configDB.png
├── playNoUrl.png
└── playLoading.png
├── LICENSE
└── README.md
/player/count.dat:
--------------------------------------------------------------------------------
1 | 159.75.199.24,1648391716
2 | 42.193.132.129,1648391745
3 |
--------------------------------------------------------------------------------
/admin/js/alphay.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/admin/js/alphay.ico
--------------------------------------------------------------------------------
/dmku/install/sql.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/dmku/install/sql.db
--------------------------------------------------------------------------------
/player/img/full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/full.png
--------------------------------------------------------------------------------
/player/img/move.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/move.png
--------------------------------------------------------------------------------
/player/img/sign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/sign.png
--------------------------------------------------------------------------------
/player/css/alphaY.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/css/alphaY.ttf
--------------------------------------------------------------------------------
/player/img/alphay.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/alphay.ico
--------------------------------------------------------------------------------
/player/img/loading.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/loading.gif
--------------------------------------------------------------------------------
/player/img/loading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/loading.png
--------------------------------------------------------------------------------
/screenshot/admin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/screenshot/admin.png
--------------------------------------------------------------------------------
/screenshot/login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/screenshot/login.png
--------------------------------------------------------------------------------
/screenshot/playing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/screenshot/playing.png
--------------------------------------------------------------------------------
/player/img/fulloff.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/fulloff.webp
--------------------------------------------------------------------------------
/player/img/loading2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/loading2.gif
--------------------------------------------------------------------------------
/player/img/loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/loading2.png
--------------------------------------------------------------------------------
/player/img/loading3.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/loading3.gif
--------------------------------------------------------------------------------
/player/img/pagefull.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/pagefull.png
--------------------------------------------------------------------------------
/screenshot/configDB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/screenshot/configDB.png
--------------------------------------------------------------------------------
/screenshot/playNoUrl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/screenshot/playNoUrl.png
--------------------------------------------------------------------------------
/player/img/background.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/img/background.jpg
--------------------------------------------------------------------------------
/screenshot/playLoading.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/screenshot/playLoading.png
--------------------------------------------------------------------------------
/player/js/theme/default/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/superggfun/alphaYplayer/HEAD/player/js/theme/default/icon.png
--------------------------------------------------------------------------------
/admin/config.php:
--------------------------------------------------------------------------------
1 | 'cj5277',//后台密码
4 | 'tips' => //出场弹幕提示
5 | array (
6 | 'time' => '6',
7 | 'color' => '#fb7299',
8 | 'text' => '请大家遵守弹幕礼仪',
9 | ),
10 | 'ok' => '0', //接口防窥
11 | );
12 |
--------------------------------------------------------------------------------
/admin/api.php:
--------------------------------------------------------------------------------
1 | 1,
15 | 'data' => $yzm
16 | ];
17 | die(json_encode($json));
18 |
19 |
20 | //$config = file_get_contents('config.json');
21 |
22 | //echo $config;
23 |
--------------------------------------------------------------------------------
/dmku/class/ed.class.php:
--------------------------------------------------------------------------------
1 | set_charset('utf8');
6 |
7 | $cid = $_POST['cid'];
8 | $id = $_POST['id'];
9 | $text = $_POST['text'];
10 | $videotime = $_POST['videotime'];
11 | $ip = $_POST['ip'];
12 | $time = $_POST['time'];
13 | // 更新数据
14 | mysql_query("UPDATE danmaku_report SET text='$text' WHERE cid=$cid", $link) or die('修改数据出错:' . mysql_error());
15 | mysql_query("UPDATE danmaku_list SET text='$text' WHERE cid=$cid", $link) or die('修改数据出错:' . mysql_error());
16 |
--------------------------------------------------------------------------------
/dmku/config.inc.php:
--------------------------------------------------------------------------------
1 | 'alphay',
4 | '后台密码' => '123456',
5 | 'tips' => [
6 | 'time' => '6',
7 | 'color' => '#fb7299',
8 | 'text' => '请大家遵守弹幕礼仪,文明发送弹幕',
9 | ],
10 | '防窥' => '0',
11 | '数据库' => [
12 | '类型' => 'mysql',
13 | '方式' => 'pdo',
14 | '地址' => 'localhost',
15 | '用户名' => '',
16 | '密码' => '',
17 | '名称' => '',
18 | ],
19 |
20 | 'is_cdn' => 0, //是否用了cdn
21 | '限制时间' => 60, //单位s
22 | '限制次数' => 20, //在限制时间内可以发送多少条弹幕
23 | '允许url' => [], //跨域 格式['https://abc.com','http://cba.com'] 要加协议
24 | '安装' => 0
25 | ];
26 |
--------------------------------------------------------------------------------
/admin/post.php:
--------------------------------------------------------------------------------
1 | ")) {
15 | echo "{code:1,msg:保存成功}";
16 | } else {
17 | echo "";
18 | }
19 | $yzm = $data;
20 | }
21 |
--------------------------------------------------------------------------------
/admin/data.php:
--------------------------------------------------------------------------------
1 | 'on',
4 | 'color' => '#00a1d6',
5 | 'logo' => 'https://cdn.jsdelivr.net/gh/superggfun/push/blog/alphay.ico',
6 | 'trytime' => '#',
7 | 'waittime' => '10',
8 | 'sendtime' => '1',
9 | 'dmrule' => '../dmku/dm_rule.html',
10 | 'pbgjz' => '草,操,妈,逼,滚,网址,网站,支付宝,企,关注,wx,微信,qq,QQ',
11 | 'ads' =>
12 | array (
13 | 'set' =>
14 | array (
15 | 'state' => '2',
16 | 'group' => 'null',
17 | 'pic' =>
18 | array (
19 | 'time' => '3',
20 | 'img' => '#',
21 | 'link' => '#',
22 | ),
23 | 'vod' =>
24 | array (
25 | 'url' => '#',
26 | 'link' => '#',
27 | ),
28 | ),
29 | 'pause' =>
30 | array (
31 | 'pic' => '#',
32 | 'link' => '#',
33 | ),
34 | ),
35 | );
36 | ?>
--------------------------------------------------------------------------------
/player/tj.php:
--------------------------------------------------------------------------------
1 | time())) {
15 |
16 | array_push($temp, $entry[0] . "," . $entry[1] . "\n"); //取出其他浏览者的信息,并去掉超时者,保存进$temp
17 |
18 | }
19 | }
20 | array_push($temp, getenv('REMOTE_ADDR') . "," . (time() + ($timeout)) . "\n"); //更新浏览者的时间
21 | $users_online = count($temp); //计算在线人数
22 | $entries = implode("", $temp);
23 |
24 | //写入文件
25 | $fp = fopen($online_log, "w");
26 | flock($fp, LOCK_EX); //flock() 不能在NFS以及其他的一些网络文件系统中正常工作
27 | fputs($fp, $entries);
28 | flock($fp, LOCK_UN);
29 | fclose($fp);
30 | echo "$users_online";
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 ggfun
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 修改说明
2 | 原作者:京都一只喵
3 |
4 | # 播放器说明
5 | 播放器可以播放mp3、mp4、flv、m3u8等常见格式,不支持MP4 H265格式的视频。
6 | 
7 | 
8 | 
9 | 
10 |
11 | # 使用方法
12 | 1. 请使用 PHP7.X版本,并在 PHP7.4 环境测试通过。请勿使用PHP8.X版本,在这个版本中可能会运行失败!
13 | 2. 解压到网站根目录
14 | 3. 登录 你的域名/dmku 进行配置数据库 (网页链接)
15 | 4. 修改播放器后台密码 dmku/config.inc.php(请注意这里不是网页链接,是在电脑文件夹里修改)
16 | 5. 登录后台 你的域名/admin 密码为第3步修改的密码 (网页链接)
17 | 6. 设置播放器的后台功能
18 |
19 | # 参数说明(player/index.php)
20 | ```
21 | "av":'',//B站av号,用于调用弹幕
22 | "url":"",//视频链接
23 | "id":"",//视频id
24 | "sid":"",//集数id
25 | "pic":"",//视频封面
26 | "title":"",//视频标题
27 | "next":"",//下一集链接
28 | "user": '',//用户名
29 | "group": "",//用户组
30 | ```
31 | # 请求示例
32 | 播放器:https://localhost/player/?url=你的视频地址这样就可以播放视频了。
33 |
34 | 测试mp4:https://localhost/player/?url=http://vfx.mtime.cn/Video/2019/03/19/mp4/190319222227698228.mp4
35 |
36 | 测试m3u8:https://localhost/player/?url=https://vod1.bdzybf7.com/20220226/9KUhKiAs/index.m3u8
37 |
38 | #### 高级
39 | 除了 url 参数,其他都可以省略
40 |
41 | http://localhost/player/?url=https://cdn.jsdelivr.net/gh/xxx/Video-Bed/Your.Name/playlist.m3u8&next=https://cdn.jsdelivr.net/gh/xxx/Video-Bed/Your.Name/playlist.m3u8&sid=1&pic=https://img.xx.com/1.png&user=游客&group=1&name=测试
42 |
43 | # 感谢
44 | 感谢uihp大佬对我修改的支持
45 |
--------------------------------------------------------------------------------
/dmku/dm_rule.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ",
4 | inputFileName: "inputFile",
5 | inputFileClass: "inputFile",
6 | uploadButtonValue: "Upload",
7 | uploadButtonClass: "uploadButton",
8 | browseButtonValue: "Browse",
9 | browseButtonClass: "browseButton",
10 | deleteButtonValue: "Delete image",
11 | deleteButtonClass: "deleteButton",
12 | automaticUpload: false,
13 | formClass: "controlForm",
14 | hideFileInput: true,
15 | hideDeleteButton: false,
16 | hover: true,
17 | addClass: "jQuery-image-upload"
18 | };
19 | $.fn.imageUpload = function(f) {
20 | var g = this;
21 | if(!g.length) {
22 | return g
23 | }
24 | var i = $.extend(s, f);
25 | if(g.length > 1) {
26 | g.each(function() {
27 | $(this).imageUpload(i)
28 | });
29 | return g
30 | }
31 | if(g.data("imageUpload")) {
32 | g.trigger("imageUpload.reload");
33 | return g
34 | }
35 | g.addClass(i.addClass);
36 | g.data("imageUpload", f);
37 | if(!i.formAction) {
38 | throw new Error("Form action was not provided. Please provide it: $(...).imageUpload({formAction: '...'})")
39 | }
40 | if(!i.hover) {
41 | g.wrap(i.wrapContent)
42 | }
43 | var j = $("
286 |
287 |
291 |
295 |
296 |
338 |
339 |
340 |
341 |
--------------------------------------------------------------------------------
/player/js/layer.js:
--------------------------------------------------------------------------------
1 | /*! layer-v3.1.1 Web弹层组件 MIT License http://layer.layui.com/ By 贤心 */
2 | ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
'+(f?r.title[0]:r.title)+"
":"";return r.zIndex=s,t([r.shade?'
':"",'
'+(e&&2!=r.type?"":u)+'
'+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
'+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t
'+r.btn[t]+"";return''+e+"
"}():"")+(r.resize?'':"")+""],u,i('
')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"http://layer.layui.com","auto"];t.content='
';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'
',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;a
f&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(e){s=e.find(".layui-layer-input"),s.focus(),"function"==typeof f&&f(e)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:''+function(){var e=t.length,i=1,a="";if(e>0)for(a='- '+(t[0].content||"no content")+"
";i'+(t[i].content||"no content")+"";return a}()+"
",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]!['+(u[d].alt||]('+u[d].src+')
",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常