diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php index 816d6e72a..44c5293c7 100644 --- a/Application/Admin/Controller/AuthManagerController.class.php +++ b/Application/Admin/Controller/AuthManagerController.class.php @@ -438,4 +438,62 @@ class AuthManagerController extends AdminController{ } } + public function dataempower() { + + $auth_group = M('AuthGroup')->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) ) + ->getfield('id,id,title,rules'); +// var_dump($auth_group);die(); + $empower_type = M('AuthGroup')->field('data_empower_type')->where(array('id'=>$_GET['group_id']))->find(); +// var_dump($empower_type);die(); + $this->assign('data_empower_type', $empower_type['data_empower_type']); + $this->assign('auth_group', $auth_group); + $this->display(); + + } + + public function dataEmpowerSave() { + $mid = I('id'); + $gid = I('group_id'); + $data_empower_type = I('data_empower_type'); + $promoteData = I('promote_data'); + +// dump(json_decode($promoteData,true)); +// var_dump($promoteData);die(); +// str_replace("'valuie'","'id'"); + + if( empty($gid)||empty($data_empower_type) ){ + $this->error('参数有误'); + } + $AuthGroup = D('AuthGroup'); + if( !$AuthGroup->find($gid)){ + $this->error('用户组不存在'); + } + + if( $mid && !$AuthGroup->checkModelId($mid)){ + $this->error($AuthGroup->error); + } + + if ($data_empower_type == 2) { + $promoteData = implode(',',array_column(json_decode($promoteData,true),'value')); + } else { + $promoteData = ''; + } + + if ($AuthGroup->where("id = {$gid}")->save(array('data_empower_type'=>$data_empower_type,'data_president'=>$promoteData))) { + $this->success('操作成功',U('AuthManager/index')); + } else { + $this->error('操作失败'); + } + + } + + function getRootPromote() { + $promoteData = M('promote','tab_')->field('id as value,account as title')->where(array('level'=>1,'chain'=>'/'))->select(); + $data_president = M('AuthGroup')->field('data_president')->where(array('id'=>$_REQUEST['group_id']))->find(); + + $returnData = array('data_president'=>$data_president['data_president'],'list'=>$promoteData); + + $this->ajaxReturn(json_encode($returnData)); + } + } diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 27234fe1a..66c38481f 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -200,7 +200,7 @@ class PromoteController extends ThinkController if (C('PROMOTE_AUTO_AUDIT') == 1) { $status = 1; } - $data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,'admin_id'=>$admin,'status'=>$status,'ba_id'=>$ba_id); + $data = array('account'=>$account,'password'=>$password,'second_pwd'=>$second_pwd,'real_name'=>$real_name,'email'=>$email,'mobile_phone'=>$mobile_phone,'bank_name'=>$bank_name,'bank_card'=>$bank_card,'admin_id'=>session('user_auth')['uid'],'status'=>$status,'ba_id'=>$ba_id); if (preg_match('/^[a-zA-Z0-9]{6,15}$/', $account)==false) { $this->error('账号只能是6-15位字母或数字'); diff --git a/Application/Admin/Controller/SuperSignController.class.php b/Application/Admin/Controller/SuperSignController.class.php new file mode 100644 index 000000000..1911c5a6d --- /dev/null +++ b/Application/Admin/Controller/SuperSignController.class.php @@ -0,0 +1,81 @@ + + */ +class SuperSignController extends ThinkController +{ + public function lists($p = 1) { + + + + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + $map =[]; + if (I('account')) { + $map['tab_user.account'] = I('account'); + } + + if (I('order_id')) { + $map['order_id'] = I('order_id'); + } + + if (I('start')&&I('end')) { + $map['pay_time'] = ['between',[strtotime(I('start')),strtotime(I('end'))]]; + } else if(I('start')&&!I('end')) { + $map['pay_time'] = ['egt',strtotime(I('start'))]; + } else if (!I('start')&&I('end')) { + $map['pay_time'] = ['elt',strtotime(I('end'))]; + } + + if (I('game_name')) { + $map['game_name'] = ['like',I('game_name').'%']; + } + + if (I('promote_id')||I('promote_id')=='0') { + $map['tab_user.promote_id'] = I('promote_id'); + } + + $map['tab_game_supersign.pay_status'] = 1; + + $data = M('game_supersign','tab_') + ->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price,pay_way") + ->join("left join tab_user on tab_game_supersign.user_id = tab_user.id") + ->join("left join tab_game on tab_game_supersign.game_id = tab_game.id") + ->page($p, $row) + ->order("pay_time DESC") + ->where($map) + ->select(); + + foreach ($data as $key => $Value) { + $data[$key]['pay_time'] = date('Y-m-d H:i:s',$Value['pay_time']); + if ($Value['pay_way']==1) { + $data[$key]['pay_way'] = '支付宝'; + } else if ($Value['pay_way']==2) { + $data[$key]['pay_way'] = '微信'; + } else { + $data[$key]['pay_way'] = '未知'; + } + } + + $count = M('game_supersign','tab_') + ->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price") + ->join("left join tab_user on tab_game_supersign.user_id = tab_user.id") + ->join("left join tab_game on tab_game_supersign.game_id = tab_game.id")->where($map)->count(); + + $page = set_pagination($count, $row); + if ($page) { + $this->assign('_page', $page); + } + $this->meta_title = '超级签订单'; + $this->assign('data',$data); + $this->display(); + + } +} diff --git a/Application/Admin/Controller/TestWhiteListController.class.php b/Application/Admin/Controller/TestWhiteListController.class.php new file mode 100644 index 000000000..da0f11cc7 --- /dev/null +++ b/Application/Admin/Controller/TestWhiteListController.class.php @@ -0,0 +1,193 @@ + + */ +class TestWhiteListController extends ThinkController +{ + public function lists($p = 1) { + + $page = intval($p); + $page = $page ? $page : 1; //默认显示第一页数据 + $row=10; + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + $map =[]; + if (I('account')) { + $map['account'] = array('like',I('account').'%'); + } + + $data = M('test_white_list','tab_') + ->page($p, $row) + ->where($map) + ->order('create_ime DESC') + ->select(); + + foreach ($data as $key => $Value) { +// $data[$key]['show_status'] = $data[$key]['show_status']?'显示':'锁定'; + $data[$key]['create_ime'] = date('Y-m-d H:i:s',$Value['create_ime']); + } + + $count = M('test_white_list','tab_') + ->where($map) + ->count(); + + $page = set_pagination($count, $row); + if ($page) { + $this->assign('_page', $page); + } + $this->meta_title = '测试白名单'; + $this->assign('data',$data); + $this->display(); + + } + + public function add() { + $this->meta_title = '测试白名单添加'; + $this->assign('title','新增'); + $this->display(); + } + + public function edit() { + $this->meta_title = '测试白名单编辑'; + $this->assign('title','编辑'); + $this->display("add"); + } + + public function edit_user() { + $data = I(''); + + if (!$data['user_id']) { + $this->error('请填写测试账号'); + } + + $userData['account'] = $data['account']; + + $user = M('user','tab_')->where(array('id'=>$data['user_id']))->find(); + + if (!$user) { + $this->error('账号不存在'); + } + $userData['check_status'] = $data['status']?$data['status']:0; + + $userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData); + if ($userAdd) { + $whitedata['show_status'] = $data['status']?$data['status']:0; + $whitedata['account'] = $data['account']; + + $whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata); +// echo M('test_white_list','tab_')->_sql();die(); + + if($whiteList) { + $this->success('修改白名单成功',U('TestWhiteList/lists')); + } else { + $this->error('修改白名单失败'); + } + + } else { + $this->error('修改用户失败'); + } + } + + public function edit_user1() { + $data = $_GET; + + if (!$data['user_id']) { + $this->ajaxReturn(['status'=>0,'msg'=>"请填写测试账号"]); + } + + $userData['account'] = $data['account']; + + $user = M('user','tab_')->where(array('id'=>$data['user_id']))->find(); + + if (!$user) { + $this->ajaxReturn(['status'=>0,'msg'=>"账号不存在"]); + } + $userData['check_status'] = $data['status']?$data['status']:0; + + $userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData); + if ($userAdd) { + $whitedata['show_status'] = $data['status']?$data['status']:0; + $whitedata['account'] = $data['account']; + + $whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata); +// echo M('test_white_list','tab_')->_sql();die(); + + if($whiteList) { + $this->ajaxReturn(['status'=>1,'msg'=>"修改白名单成功"]); + } else { + $this->ajaxReturn(['status'=>0,'msg'=>"修改白名单成功"]); + } + + } else { + $this->ajaxReturn(['status'=>0,'msg'=>"修改用户失败"]); + } + } + + public function add_user() { + $data = I(''); + + if (!$data['account']) { + $this->error('请填写测试账号'); + } + + $userData['account'] = $data['account']; + + $user = M('user','tab_')->where($userData)->find(); + + if ($user) { + $this->error('账号已经存在'); + } + + $userData['password'] = md5(sha1('123456') . UC_AUTH_KEY); + $userData['promote_id'] = 0; + $userData['promote_account'] = '官方渠道'; + $userData['register_time'] = time(); + $userData['check_status'] = $data['status']?$data['status']:0; + + $userAdd = M('user','tab_')->add($userData); + if ($userAdd) { + $data['user_id'] = $userAdd; + $data['show_status'] = $data['status']?$data['status']:0; + $data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username']; + $data['create_ime'] = time(); + + $whiteList = M('test_white_list','tab_')->add($data); + if($whiteList) { + $this->success('添加白名单成功',U('TestWhiteList/lists')); + } else { + $this->error('添加白名单失败'); + } + + } else { + $this->error('添加用户失败'); + } + + } + + public function freezeSupport() { + $supportId = I('status'); + + $data = [ + 'check_status' => $supportId + ]; + + $isFreeze = M('user','tab_')->where("id=".$supportId)->save($data); + + if ($supportId == 1) { + $msg = '启用'; + } else if ($supportId == 0) { + $msg = '锁定'; + } + + if ($isFreeze) { + $this->ajaxReturn(['status'=>1, 'msg'=> $msg.'成功']); + } else { + $this->ajaxReturn(['status'=>0, 'msg'=> $msg.'失败']); + } + } + +} diff --git a/Application/Admin/Controller/device_data_foldline.txt b/Application/Admin/Controller/device_data_foldline.txt index 480ca25d3..acbc2d6b9 100644 --- a/Application/Admin/Controller/device_data_foldline.txt +++ b/Application/Admin/Controller/device_data_foldline.txt @@ -1 +1 @@ -{"average":{"news":0,"active":0},"sum":{"news":0,"active":0},"news":[{"time":"2019-11-11 00:00","count":0,"version":"ios"},{"time":"2019-11-11 01:00","count":0,"version":"ios"},{"time":"2019-11-11 02:00","count":0,"version":"ios"},{"time":"2019-11-11 03:00","count":0,"version":"ios"},{"time":"2019-11-11 04:00","count":0,"version":"ios"},{"time":"2019-11-11 05:00","count":0,"version":"ios"},{"time":"2019-11-11 06:00","count":0,"version":"ios"},{"time":"2019-11-11 07:00","count":0,"version":"ios"},{"time":"2019-11-11 08:00","count":0,"version":"ios"},{"time":"2019-11-11 09:00","count":0,"version":"ios"},{"time":"2019-11-11 10:00","count":0,"version":"ios"},{"time":"2019-11-11 11:00","count":0,"version":"ios"},{"time":"2019-11-11 12:00","count":0,"version":"ios"},{"time":"2019-11-11 13:00","count":0,"version":"ios"},{"time":"2019-11-11 14:00","count":0,"version":"ios"},{"time":"2019-11-11 15:00","count":0,"version":"ios"},{"time":"2019-11-11 16:00","count":0,"version":"ios"},{"time":"2019-11-11 17:00","count":0,"version":"ios"},{"time":"2019-11-11 18:00","count":0,"version":"ios"},{"time":"2019-11-11 19:00","count":0,"version":"ios"},{"time":"2019-11-11 20:00","count":0,"version":"ios"},{"time":"2019-11-11 21:00","count":0,"version":"ios"},{"time":"2019-11-11 22:00","count":0,"version":"ios"},{"time":"2019-11-11 23:00","count":0,"version":"ios"},{"time":"2019-11-11 00:00","count":0,"version":"android"},{"time":"2019-11-11 01:00","count":0,"version":"android"},{"time":"2019-11-11 02:00","count":0,"version":"android"},{"time":"2019-11-11 03:00","count":0,"version":"android"},{"time":"2019-11-11 04:00","count":0,"version":"android"},{"time":"2019-11-11 05:00","count":0,"version":"android"},{"time":"2019-11-11 06:00","count":0,"version":"android"},{"time":"2019-11-11 07:00","count":0,"version":"android"},{"time":"2019-11-11 08:00","count":0,"version":"android"},{"time":"2019-11-11 09:00","count":0,"version":"android"},{"time":"2019-11-11 10:00","count":0,"version":"android"},{"time":"2019-11-11 11:00","count":0,"version":"android"},{"time":"2019-11-11 12:00","count":0,"version":"android"},{"time":"2019-11-11 13:00","count":0,"version":"android"},{"time":"2019-11-11 14:00","count":0,"version":"android"},{"time":"2019-11-11 15:00","count":0,"version":"android"},{"time":"2019-11-11 16:00","count":0,"version":"android"},{"time":"2019-11-11 17:00","count":0,"version":"android"},{"time":"2019-11-11 18:00","count":0,"version":"android"},{"time":"2019-11-11 19:00","count":0,"version":"android"},{"time":"2019-11-11 20:00","count":0,"version":"android"},{"time":"2019-11-11 21:00","count":0,"version":"android"},{"time":"2019-11-11 22:00","count":0,"version":"android"},{"time":"2019-11-11 23:00","count":0,"version":"android"}],"active":[{"time":"2019-11-11 00:00","count":0,"version":"ios"},{"time":"2019-11-11 01:00","count":0,"version":"ios"},{"time":"2019-11-11 02:00","count":0,"version":"ios"},{"time":"2019-11-11 03:00","count":0,"version":"ios"},{"time":"2019-11-11 04:00","count":0,"version":"ios"},{"time":"2019-11-11 05:00","count":0,"version":"ios"},{"time":"2019-11-11 06:00","count":0,"version":"ios"},{"time":"2019-11-11 07:00","count":0,"version":"ios"},{"time":"2019-11-11 08:00","count":0,"version":"ios"},{"time":"2019-11-11 09:00","count":0,"version":"ios"},{"time":"2019-11-11 10:00","count":0,"version":"ios"},{"time":"2019-11-11 11:00","count":0,"version":"ios"},{"time":"2019-11-11 12:00","count":0,"version":"ios"},{"time":"2019-11-11 13:00","count":0,"version":"ios"},{"time":"2019-11-11 14:00","count":0,"version":"ios"},{"time":"2019-11-11 15:00","count":0,"version":"ios"},{"time":"2019-11-11 16:00","count":0,"version":"ios"},{"time":"2019-11-11 17:00","count":0,"version":"ios"},{"time":"2019-11-11 18:00","count":0,"version":"ios"},{"time":"2019-11-11 19:00","count":0,"version":"ios"},{"time":"2019-11-11 20:00","count":0,"version":"ios"},{"time":"2019-11-11 21:00","count":0,"version":"ios"},{"time":"2019-11-11 22:00","count":0,"version":"ios"},{"time":"2019-11-11 23:00","count":0,"version":"ios"},{"time":"2019-11-11 00:00","count":0,"version":"android"},{"time":"2019-11-11 01:00","count":0,"version":"android"},{"time":"2019-11-11 02:00","count":0,"version":"android"},{"time":"2019-11-11 03:00","count":0,"version":"android"},{"time":"2019-11-11 04:00","count":0,"version":"android"},{"time":"2019-11-11 05:00","count":0,"version":"android"},{"time":"2019-11-11 06:00","count":0,"version":"android"},{"time":"2019-11-11 07:00","count":0,"version":"android"},{"time":"2019-11-11 08:00","count":0,"version":"android"},{"time":"2019-11-11 09:00","count":0,"version":"android"},{"time":"2019-11-11 10:00","count":0,"version":"android"},{"time":"2019-11-11 11:00","count":0,"version":"android"},{"time":"2019-11-11 12:00","count":0,"version":"android"},{"time":"2019-11-11 13:00","count":0,"version":"android"},{"time":"2019-11-11 14:00","count":0,"version":"android"},{"time":"2019-11-11 15:00","count":0,"version":"android"},{"time":"2019-11-11 16:00","count":0,"version":"android"},{"time":"2019-11-11 17:00","count":0,"version":"android"},{"time":"2019-11-11 18:00","count":0,"version":"android"},{"time":"2019-11-11 19:00","count":0,"version":"android"},{"time":"2019-11-11 20:00","count":0,"version":"android"},{"time":"2019-11-11 21:00","count":0,"version":"android"},{"time":"2019-11-11 22:00","count":0,"version":"android"},{"time":"2019-11-11 23:00","count":0,"version":"android"}]} \ No newline at end of file +{"average":{"news":0,"active":0},"sum":{"news":0,"active":0},"news":[{"time":"2019-12-11 00:00","count":0,"version":"ios"},{"time":"2019-12-11 01:00","count":0,"version":"ios"},{"time":"2019-12-11 02:00","count":0,"version":"ios"},{"time":"2019-12-11 03:00","count":0,"version":"ios"},{"time":"2019-12-11 04:00","count":0,"version":"ios"},{"time":"2019-12-11 05:00","count":0,"version":"ios"},{"time":"2019-12-11 06:00","count":0,"version":"ios"},{"time":"2019-12-11 07:00","count":0,"version":"ios"},{"time":"2019-12-11 08:00","count":0,"version":"ios"},{"time":"2019-12-11 09:00","count":0,"version":"ios"},{"time":"2019-12-11 10:00","count":0,"version":"ios"},{"time":"2019-12-11 11:00","count":0,"version":"ios"},{"time":"2019-12-11 12:00","count":0,"version":"ios"},{"time":"2019-12-11 13:00","count":0,"version":"ios"},{"time":"2019-12-11 14:00","count":0,"version":"ios"},{"time":"2019-12-11 15:00","count":0,"version":"ios"},{"time":"2019-12-11 16:00","count":0,"version":"ios"},{"time":"2019-12-11 17:00","count":0,"version":"ios"},{"time":"2019-12-11 18:00","count":0,"version":"ios"},{"time":"2019-12-11 19:00","count":0,"version":"ios"},{"time":"2019-12-11 20:00","count":0,"version":"ios"},{"time":"2019-12-11 21:00","count":0,"version":"ios"},{"time":"2019-12-11 22:00","count":0,"version":"ios"},{"time":"2019-12-11 23:00","count":0,"version":"ios"},{"time":"2019-12-11 00:00","count":0,"version":"android"},{"time":"2019-12-11 01:00","count":0,"version":"android"},{"time":"2019-12-11 02:00","count":0,"version":"android"},{"time":"2019-12-11 03:00","count":0,"version":"android"},{"time":"2019-12-11 04:00","count":0,"version":"android"},{"time":"2019-12-11 05:00","count":0,"version":"android"},{"time":"2019-12-11 06:00","count":0,"version":"android"},{"time":"2019-12-11 07:00","count":0,"version":"android"},{"time":"2019-12-11 08:00","count":0,"version":"android"},{"time":"2019-12-11 09:00","count":0,"version":"android"},{"time":"2019-12-11 10:00","count":0,"version":"android"},{"time":"2019-12-11 11:00","count":0,"version":"android"},{"time":"2019-12-11 12:00","count":0,"version":"android"},{"time":"2019-12-11 13:00","count":0,"version":"android"},{"time":"2019-12-11 14:00","count":0,"version":"android"},{"time":"2019-12-11 15:00","count":0,"version":"android"},{"time":"2019-12-11 16:00","count":0,"version":"android"},{"time":"2019-12-11 17:00","count":0,"version":"android"},{"time":"2019-12-11 18:00","count":0,"version":"android"},{"time":"2019-12-11 19:00","count":0,"version":"android"},{"time":"2019-12-11 20:00","count":0,"version":"android"},{"time":"2019-12-11 21:00","count":0,"version":"android"},{"time":"2019-12-11 22:00","count":0,"version":"android"},{"time":"2019-12-11 23:00","count":0,"version":"android"}],"active":[{"time":"2019-12-11 00:00","count":0,"version":"ios"},{"time":"2019-12-11 01:00","count":0,"version":"ios"},{"time":"2019-12-11 02:00","count":0,"version":"ios"},{"time":"2019-12-11 03:00","count":0,"version":"ios"},{"time":"2019-12-11 04:00","count":0,"version":"ios"},{"time":"2019-12-11 05:00","count":0,"version":"ios"},{"time":"2019-12-11 06:00","count":0,"version":"ios"},{"time":"2019-12-11 07:00","count":0,"version":"ios"},{"time":"2019-12-11 08:00","count":0,"version":"ios"},{"time":"2019-12-11 09:00","count":0,"version":"ios"},{"time":"2019-12-11 10:00","count":0,"version":"ios"},{"time":"2019-12-11 11:00","count":0,"version":"ios"},{"time":"2019-12-11 12:00","count":0,"version":"ios"},{"time":"2019-12-11 13:00","count":0,"version":"ios"},{"time":"2019-12-11 14:00","count":0,"version":"ios"},{"time":"2019-12-11 15:00","count":0,"version":"ios"},{"time":"2019-12-11 16:00","count":0,"version":"ios"},{"time":"2019-12-11 17:00","count":0,"version":"ios"},{"time":"2019-12-11 18:00","count":0,"version":"ios"},{"time":"2019-12-11 19:00","count":0,"version":"ios"},{"time":"2019-12-11 20:00","count":0,"version":"ios"},{"time":"2019-12-11 21:00","count":0,"version":"ios"},{"time":"2019-12-11 22:00","count":0,"version":"ios"},{"time":"2019-12-11 23:00","count":0,"version":"ios"},{"time":"2019-12-11 00:00","count":0,"version":"android"},{"time":"2019-12-11 01:00","count":0,"version":"android"},{"time":"2019-12-11 02:00","count":0,"version":"android"},{"time":"2019-12-11 03:00","count":0,"version":"android"},{"time":"2019-12-11 04:00","count":0,"version":"android"},{"time":"2019-12-11 05:00","count":0,"version":"android"},{"time":"2019-12-11 06:00","count":0,"version":"android"},{"time":"2019-12-11 07:00","count":0,"version":"android"},{"time":"2019-12-11 08:00","count":0,"version":"android"},{"time":"2019-12-11 09:00","count":0,"version":"android"},{"time":"2019-12-11 10:00","count":0,"version":"android"},{"time":"2019-12-11 11:00","count":0,"version":"android"},{"time":"2019-12-11 12:00","count":0,"version":"android"},{"time":"2019-12-11 13:00","count":0,"version":"android"},{"time":"2019-12-11 14:00","count":0,"version":"android"},{"time":"2019-12-11 15:00","count":0,"version":"android"},{"time":"2019-12-11 16:00","count":0,"version":"android"},{"time":"2019-12-11 17:00","count":0,"version":"android"},{"time":"2019-12-11 18:00","count":0,"version":"android"},{"time":"2019-12-11 19:00","count":0,"version":"android"},{"time":"2019-12-11 20:00","count":0,"version":"android"},{"time":"2019-12-11 21:00","count":0,"version":"android"},{"time":"2019-12-11 22:00","count":0,"version":"android"},{"time":"2019-12-11 23:00","count":0,"version":"android"}]} \ No newline at end of file diff --git a/Application/Admin/View/AuthManager/category.html b/Application/Admin/View/AuthManager/category.html index 8992ba6c7..7c0f31a39 100644 --- a/Application/Admin/View/AuthManager/category.html +++ b/Application/Admin/View/AuthManager/category.html @@ -14,6 +14,7 @@ + + + +
+ +
+ 数据授权 + +
+ +
+ + + + + + + +
数据授权类型: + + + + + + + + +
+
+ + + + + +
+
+ +
+ + + 返回 + +
+
+
+
+ + + + +
+ +
+ + +
+ 已添加添加至常用设置 +
+ + + + + + + + + + + + + diff --git a/Application/Admin/View/AuthManager/index.html b/Application/Admin/View/AuthManager/index.html index d798765d4..a033d8a2b 100644 --- a/Application/Admin/View/AuthManager/index.html +++ b/Application/Admin/View/AuthManager/index.html @@ -46,6 +46,7 @@ 访问授权 分类授权 成员授权 + 数据授权 {:get_status_title($vo['status'])} diff --git a/Application/Admin/View/AuthManager/managergroup.html b/Application/Admin/View/AuthManager/managergroup.html index cfacb7b47..b06238a2d 100644 --- a/Application/Admin/View/AuthManager/managergroup.html +++ b/Application/Admin/View/AuthManager/managergroup.html @@ -14,6 +14,7 @@ "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)});layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['"].join("")),s=g.find("."+o),u=function(){var e=r.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+a)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),n=i.attr("lay-type");"top"===n&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var n=this,a="function"==typeof e,o=new Date(t).getTime(),r=new Date(!e||a?(new Date).getTime():e).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=e);var g=setTimeout(function(){n.countdown(t,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(t).getTime();return a>6912e5?(a=new Date(t),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),e||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=12e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var n=t.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(t,n,a){n=i.event[t]=e.extend(!0,i.event[t],n)||{},e("body").on(a||"click","*["+t+"]",function(){var i=e(this),a=i.attr(t);n[a]&&n[a].call(this,i)})}};!function(t,e,i){"$:nomunge";function n(){a=e[l](function(){o.each(function(){var e=t(this),i=e.width(),n=e.height(),a=t.data(this,g);(i!==a.w||n!==a.h)&&e.trigger(c,[a.w=i,a.h=n])}),n()},r[s])}var a,o=t([]),r=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";r[s]=250,r[u]=!0,t.event.special[c]={setup:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===o.length&&n()},teardown:function(){if(!r[u]&&this[l])return!1;var e=t(this);o=o.not(e),e.removeData(g),o.length||clearTimeout(a)},add:function(e){function n(e,n,o){var r=t(this),l=t.data(this,g)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[u]&&this[l])return!1;var a;return t.isFunction(e)?(a=e,n):(a=e.handler,void(e.handler=n))}}}(e,window),t("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
','
'+f+"
",'
','',"
","
"].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

"),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

"),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

    ','
  • ','','
    ','',"
    ","
  • ",'
  • ','','
    ','",'","
    ","
  • ",'
  • ','','',"
  • ","
"].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
  • '+e+'
  • ')}),'
      '+t.join("")+"
    "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
      ','
    • ','','
      ','","
      ","
    • ",'
    • ','','
      ','',"
      ","
    • ",'
    • ','','',"
    • ","
    "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
    1. '+o.replace(/[\r\t\n]+/g,"
    2. ")+"
    "),c.find(">.layui-code-h3")[0]||c.prepend('

    '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

    ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/Public/static/layui-v2.5.5/layui.js b/Public/static/layui-v2.5.5/layui.js new file mode 100644 index 000000000..4615b5775 --- /dev/null +++ b/Public/static/layui-v2.5.5/layui.js @@ -0,0 +1,2 @@ +/** layui-v2.5.5 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,o={modules:{},status:{},timeout:10,event:{}},n=function(){this.v="2.5.5"},r=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,o=t.scripts,n=o.length-1,r=n;r>0;r--)if("interactive"===o[r].readyState){e=o[r].src;break}return e||o[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),i=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},a="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",transfer:"modules/transfer",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};n.prototype.cache=o,n.prototype.define=function(e,t){var n=this,r="function"==typeof e,i=function(){var e=function(e,t){layui[e]=t,o.status[e]=!0};return"function"==typeof t&&t(function(n,r){e(n,r),o.callback[n]=function(){t(e)}}),this};return r&&(t=e,e=[]),!layui["layui.all"]&&layui["layui.mobile"]?i.call(n):(n.use(e,i),n)},n.prototype.use=function(e,n,l){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[f]=t,d.removeChild(v),function r(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void(o.status[f]?c():setTimeout(r,4))}())}function c(){l.push(layui[f]),e.length>1?y.use(e.slice(1),n,l):"function"==typeof n&&n.apply(layui,l)}var y=this,p=o.dir=o.dir?o.dir:r,d=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(y.each(e,function(t,o){"jquery"===o&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var f=e[0],m=0;if(l=l||[],o.host=o.host||(p.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[f]||!layui["layui.all"]&&layui["layui.mobile"]&&u[f])return c(),y;if(o.modules[f])!function g(){return++m>1e3*o.timeout/4?i(f+" is not a valid module"):void("string"==typeof o.modules[f]&&o.status[f]?c():setTimeout(g,4))}();else{var v=t.createElement("script"),h=(u[f]?p+"lay/":/^\{\/\}/.test(y.modules[f])?"":o.base||"")+(y.modules[f]||f)+".js";h=h.replace(/^\{\/\}/,""),v.async=!0,v.charset="utf-8",v.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),d.appendChild(v),!v.attachEvent||v.attachEvent.toString&&v.attachEvent.toString().indexOf("[native code")<0||a?v.addEventListener("load",function(e){s(e,h)},!1):v.attachEvent("onreadystatechange",function(e){s(e,h)}),o.modules[f]=h}return y},n.prototype.getStyle=function(t,o){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](o)},n.prototype.link=function(e,n,r){var a=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof n&&(r=n);var s=(r||e).replace(/\.|\//g,""),c=u.id="layuicss-"+s,y=0;return u.rel="stylesheet",u.href=e+(o.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(c)||l.appendChild(u),"function"!=typeof n?a:(function p(){return++y>1e3*o.timeout/100?i(e+" timeout"):void(1989===parseInt(a.getStyle(t.getElementById(c),"width"))?function(){n()}():setTimeout(p,100))}(),a)},o.callback={},n.prototype.factory=function(e){if(layui[e])return"function"==typeof o.callback[e]?o.callback[e]:null},n.prototype.addcss=function(e,t,n){return layui.link(o.dir+"css/"+e,t,n)},n.prototype.img=function(e,t,o){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,"function"==typeof t&&t(n)},void(n.onerror=function(e){n.onerror=null,"function"==typeof o&&o(e)}))},n.prototype.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},n.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),n.prototype.extend=function(e){var t=this;e=e||{};for(var o in e)t[o]||t.modules[o]?i("模块名 "+o+" 已被占用"):t.modules[o]=e[o];return t},n.prototype.router=function(e){var t=this,e=e||location.hash,o={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),o.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),o.search[t[0]]=t[1]}():o.path.push(t)}),o):o},n.prototype.data=function(t,o,n){if(t=t||"layui",n=n||localStorage,e.JSON&&e.JSON.parse){if(null===o)return delete n[t];o="object"==typeof o?o:{key:o};try{var r=JSON.parse(n[t])}catch(i){var r={}}return"value"in o&&(r[o.key]=o.value),o.remove&&delete r[o.key],n[t]=JSON.stringify(r),o.key?r[o.key]:r}},n.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},n.prototype.device=function(t){var o=navigator.userAgent.toLowerCase(),n=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(o.match(t)||[])[1],e||!1},r={os:function(){return/windows/.test(o)?"windows":/linux/.test(o)?"linux":/iphone|ipod|ipad|ios/.test(o)?"ios":/mac/.test(o)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((o.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:n("micromessenger")};return t&&!r[t]&&(r[t]=n(t)),r.android=/android/.test(o),r.ios="ios"===r.os,r},n.prototype.hint=function(){return{error:i}},n.prototype.each=function(e,t){var o,n=this;if("function"!=typeof t)return n;if(e=e||[],e.constructor===Object){for(o in e)if(t.call(e[o],o,e[o]))break}else for(o=0;oi?1:r