From 5229da60f1a6dd03ff1b3cc9fa2b23c5091a6eb4 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sun, 29 Sep 2019 10:06:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E9=A6=96=E9=A1=B5=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/PromoteController.class.php | 1049 +++++++++-------- .../Home/View/default/Promote/index.html | 232 +++- .../Home/View/default/Promote/msg_list.html | 36 + .../View/default/Promote/quick_menu_list.html | 68 ++ Application/Mobile/View/Ssg/index.html | 17 +- Data/update.sql | 60 + Public/Home/css/index/index.new.css | 132 +++ Public/Home/js/index/jquery.fxTab.js | 27 + 8 files changed, 1119 insertions(+), 502 deletions(-) create mode 100644 Application/Home/View/default/Promote/msg_list.html create mode 100644 Application/Home/View/default/Promote/quick_menu_list.html create mode 100644 Public/Home/css/index/index.new.css create mode 100644 Public/Home/js/index/jquery.fxTab.js diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 1ace92bfa..8c84c8e48 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -10,6 +10,7 @@ namespace Home\Controller; use OT\DataDictionary; +use function Sodium\add; use User\Api\PromoteApi; use User\Api\UserApi; use Org\WeixinSDK\Weixin; @@ -40,40 +41,70 @@ class PromoteController extends BaseController $this->redirect("Home/Index/index"); } - $today = $this->total(1); - $month = $this->total(3); - $total = $this->total(); - $yesterday = $this->total(5); - $lastmonth = $this->total(6); - $this->assign("today", $today); - $this->assign("month", $month); - $this->assign("total", $total); - $this->assign("lastmonth", $lastmonth); - $this->assign("yesterday", $yesterday); - - $document = D('Document'); - $row = 10; - $list = $document->listspage(56,$p,$row,'level desc,id desc'); - - $count = $document->listCount(56); - - if($count > $row){ - $page = new \Think\Page($count, $row); - $list=array_slice($spend,$page->firstRow,$page->listRows); - $page->setConfig('theme','%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%'); - $this->assign('_page',$page->show()); - } - - $this->assign('list',$list); - - - $url = "http://" . $_SERVER['HTTP_HOST'] . __ROOT__ . "/media.php/member/preg/pid/" . get_pid(); - $this->assign("url", $url); + $quick_menu_list = M("quick_menu qmn","tab_") + ->join("tab_promote_quick_menu as pqmn on qmn.id=pqmn.quick_menu_id and promote_id=".get_pid()) + ->field("qmn.*") + ->where("qmn.status=0") + ->order("create_time desc") + ->limit("0,10") + ->select(); + + $game_list = M("game","tab_")->field("id,game_name")->order("id desc")->select(); + $gg_list = M("document","sys_")->limit('0,5')->where("category_id=56 and status=1")->order("update_time desc")->select(); //游戏公告 + $zx_list = M("document","sys_")->limit('0,5')->where("category_id=51 and status=1")->order("update_time desc")->select(); //游戏咨询 + $xx_list = null; + + $today_start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); + $today_end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1; + $today_open_server_list = M("server as sv","tab_")->where( + array("sv.start_time"=>array("BETWEEN", array($today_start, $today_end)), + "sv.show_status"=>1)) + ->join("left join tab_game gm on gm.id=sv.game_id") + ->field('sv.*,gm.icon') + ->order("sv.start_time desc") + //->page(1, 20) + ->select(); + + + $user_count = M("user","tab_")->where("promote_id=".get_pid())->count(); + $total_money = $this->pay_total(0,0); + $today_add_user_money = $this->pay_total(1); + $month_add_user_money = $this->pay_total(3); + + $yesterday_start = mktime(0, 0, 0, date('m'), date('d') - 1, date('Y')); + $yesterday_end = mktime(0, 0, 0, date('m'), date('d'), date('Y')); + $yesterday_user_regist_count = M("user","tab_")->where( + array("promote_id"=>get_pid(), + "register_time"=>array("BETWEEN", array($yesterday_start, $yesterday_end)))) + ->count(); + $yesterday_total_money = $this->pay_total(5,0); + $yesterday_regist_user_count = M("user","tab_") + ->where(array("promote_id"=>get_pid(), + "register_time"=>array("BETWEEN", array($yesterday_start, $yesterday_end)))) + ->count(); + + $yesterday_total_money = $this->pay_total(1,0); + + $this->assign("user_count",$user_count); + $this->assign("total_money", $total_money); + $this->assign("today_add_user_money", $today_add_user_money); + $this->assign("month_add_user_money", $month_add_user_money); + $this->assign("yesterday_user_regist_count",$yesterday_user_regist_count); + $this->assign("yesterday_total_money",$yesterday_total_money); + $this->assign("yesterday_regist_user_count",$yesterday_regist_user_count); + $this->assign("yesterday_total_money",$yesterday_total_money); + + $this->assign("menu_list", $quick_menu_list); + $this->assign("gg_list", $gg_list); + $this->assign("zx_list", $zx_list); + $this->assign("xx_list", $xx_list); + $this->assign("today_open_server_list", $today_open_server_list); + $this->assign("game_list",$game_list); $this->meta_title = "首页"; $this->display(); } - private function total($type=0) + private function pay_total($type=0,$newadd=1) { if ($_REQUEST['promote_id'] === null || $_REQUEST['promote_id'] === '0') { $map['parent_id'] = get_pid(); @@ -87,9 +118,9 @@ class PromoteController extends BaseController } else { $ids = array($_REQUEST['promote_id']); } - $where['promote_id'] = array('in', $ids); - $where['pay_status'] = 1; - $where['is_check'] = array('NEQ', 2); + $where['spend.promote_id'] = array('in', $ids); + $where['spend.pay_status'] = 1; + $where['spend.is_check'] = array('NEQ', 2); switch ($type) { case 1: { // 今天 $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); @@ -126,9 +157,17 @@ class PromoteController extends BaseController ; } if (isset($start) && isset($end)) { - $where['pay_time'] = array("BETWEEN", array($start, $end)); + $where['spend.pay_time'] = array("BETWEEN", array($start, $end)); + if($newadd==1){ + $where['user.register_time'] = array("BETWEEN", array($start, $end)); + } + } + if($newadd==1){ + $total = M('spend as spend', "tab_")->field("SUM(spend.pay_amount) as amount")->join("right join tab_user user on user.id=spend.user_id")->where($where)->select(); + }else{ + $total = M('spend as spend', "tab_")->field("SUM(spend.pay_amount) as amount")->where($where)->select(); } - $total = M('spend', "tab_")->field("SUM(pay_amount) as amount")->where($where)->select(); + $total = $this->huanwei($total[0]['amount']); return $total; } @@ -153,6 +192,86 @@ class PromoteController extends BaseController } + public function home_read_data(){ + $type = I("type","0"); + $game_id = I("game_id"); + $start = mktime(0, 0, 0, date('m'), date('d'), date('Y')); + $end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1; + if($game_id){ + $map['game_id'] = $game_id; + } + if($type>0){ + $map['sv.start_time']=array("GT", $end); + }else{ + $map['sv.start_time']=array("BETWEEN", array($start, $end)); + } + $map['sv.show_status'] = 1; + + $open_server_list = M("server as sv","tab_")->where($map) + ->join("left join tab_game gm on gm.id=sv.game_id") + ->field('sv.*,gm.icon') + ->order("sv.start_time desc") + //->page(1, 20) + ->select();; + + $this->ajaxReturn(['status'=>1,'info'=>'调用成功','data'=>$open_server_list],"JSON"); + } + + + public function quick_menu_list(){ + $data_list = M("quick_menu qmn","tab_") + ->join("left join tab_promote_quick_menu as pqmn on qmn.id=pqmn.quick_menu_id and promote_id=".get_pid()) + ->field("qmn.*,pqmn.id as exist_id") + ->where("qmn.status=0") + ->order("qmn.id asc") + ->select(); + $this->assign("data_list",$data_list); + $this->meta_title = "快捷菜单"; + $this->display(); + } + + + public function quick_menu_set(){ + $menu_id = I("menu_id"); + $info = M("promote_quick_menu ","tab_") + ->where( + array("quick_menu_id"=>$menu_id, + "promote_id"=>get_pid()) + ) + ->find(); + if($info){ + M("promote_quick_menu ","tab_")->where( + array("quick_menu_id"=>$menu_id, + "promote_id"=>get_pid()) + )->delete(); + $this->ajaxReturn(['status'=>1,'info'=>'移除成功'],"JSON"); + }else{ + M("promote_quick_menu ","tab_")->add( + array("quick_menu_id"=>$menu_id, + "promote_id"=>get_pid(), + "create_time"=>time()) + ); + $this->ajaxReturn(['status'=>1,'info'=>'添加成功'],"JSON"); + } + } + + + // 消息列表 + public function msg_list($type=56){ + if($type==51){ + $data_list = M("document","sys_")->limit('0,50')->where("category_id=51 and status=1")->order("update_time desc")->select(); //游戏咨询 + }elseif ($type==50){ + $data_list = null; + }else{ + $data_list = M("document","sys_")->limit('0,50')->where("category_id=56 and status=1")->order("update_time desc")->select(); //游戏公告 + } + $this->meta_title = "公告列表"; + $this->assign("type", $type); + $this->assign("data_list", $data_list); + $this->display(); + } + + /** * 我的基本信息 */ @@ -368,7 +487,7 @@ class PromoteController extends BaseController $this->meta_title = "基本信息"; $this->assign("data", $data); - $this->wxQrcode($data); + $this->wxQrcode($data); $this->display(); } @@ -429,7 +548,7 @@ class PromoteController extends BaseController 'parentPromotes' => [], ]; } - + $parentList = $promote->field(['id', 'account'])->where(['id' => ['in', $parentIds]])->select(); $parentPromotes = []; foreach($parentList as $parent) { @@ -591,7 +710,7 @@ class PromoteController extends BaseController $this->ajaxReturn(array('status'=>-1,'msg'=>'身份证格式错误')); } } - + $res = $user->promote_add($_POST); if (is_numeric($res)) { $ba = new \Admin\Model\BusinessAffairsModel(); @@ -723,7 +842,7 @@ class PromoteController extends BaseController } $pattern = "/^([0-9A-Za-z\\-_\\.]+)@([0-9a-z]+\\.[a-z]{2,3}(\\.[a-z]{2})?)$/i"; - if ( !preg_match( $pattern, $_REQUEST['email'] ) ){ + if ( !preg_match( $pattern, $_REQUEST['email'] ) ){ $this->error('您输入的电子邮箱地址不合法', U('Promote/edit_chlid',array('id'=>$id,'type'=>I('type',0)))); }; @@ -786,7 +905,7 @@ class PromoteController extends BaseController } - /** + /** * @param int $level * @param int $size */ @@ -800,243 +919,243 @@ class PromoteController extends BaseController echo $object->png(base64_decode(base64_decode($url)), false, $errorCorrectionLevel, $matrixPointSize, 2); } - public function checkAccount($account){ - $user = get_promote_entity($account, true); - if($user){ - $this->ajaxReturn(array('status'=>1)); - }else{ - $this->ajaxReturn(array('status'=>0)); - } + public function checkAccount($account){ + $user = get_promote_entity($account, true); + if($user){ + $this->ajaxReturn(array('status'=>1)); + }else{ + $this->ajaxReturn(array('status'=>0)); } - public function balance() { - if (IS_POST) { + } + public function balance() { + if (IS_POST) { - $real_amount = $amount = I('amount'); + $real_amount = $amount = I('amount'); - if(!is_numeric($amount)){ - $res_msg = '充值金额不是数字'; - $this->show_balance(); - echo "; + if(!is_numeric($amount)){ + $res_msg = '充值金额不是数字'; + $this->show_balance(); + echo "; return false;"; - $this->redirect('balance', array('status'=>1), 3, ''); - } - if($amount<0) { - $res_msg = '充值金额不正确'; - $this->show_balance(); - echo "; + $this->redirect('balance', array('status'=>1), 3, ''); + } + if($amount<0) { + $res_msg = '充值金额不正确'; + $this->show_balance(); + echo "; return false;"; - $this->redirect('balance', array('status'=>1), 3, ''); - } - $amount = abs($amount); - // $amount = 0.01;//测试金额 - if (empty($_REQUEST['account'])) { - $user = get_promote_entity(PID); - } else { - $user = get_promote_entity($_REQUEST['account'], true); - } - - $order_no = "TB_" . date('Ymd') . date('His') . sp_random_string(4); - $create['amount'] = $amount; - $create['pay_order_number'] = $order_no; - - $vo = new \Think\Pay\PayVo(); - $vo->setBody("账户余额") - ->setFee($amount)//支付金额 - ->setTitle("余额充值") - ->setOrderNo($order_no) - ->setSignType("MD5") - ->setPayMethod("direct_tb") - ->setTable("balance") - ->setUserId($user['id']) - ->setAccount($user['account']) - ->setPromoteId(PID) - ->setPromoteName(PROMOTE_ACCOUNT) - ->setMoney($user['balance_coin']); - - switch (I('pay_type')) { - case 'swiftpass': - //判断是否开启微信充值 - if (pay_set_status('wei_xin') == 0 && pay_set_status('weixin') == 0) { - $this->error("网站未开启微信充值", '', 1); - exit(); - } - if (get_wx_type() == 0) { - $weixn = new Weixin(); - $is_pay = json_decode($weixn->weixin_pay("余额充值", $order_no, $real_amount), true); - if ($is_pay['status'] === 1) { - $json_['out_trade_no'] = $order_no; - $json_['amount'] = $amount; - $json_['pay_money'] = $real_amount; - $json_['code_img_url'] = U('qrcode', array('level' => 3, 'size' => 4, 'url' => base64_encode(base64_encode($is_pay['url'])))); - } - $create['pay_way'] = 2; - $this->add_balance($user, $create); - - $this->show_balance(); - echo ""; - } else { - $vo->setService("pay.weixin.native") - ->setPayWay(2); - $pay = new \Think\Pay('swiftpass', C('weixin')); - $all = $pay->buildRequestForm($vo); - $all['amount'] = $vo->getMoney(); - $this->show_balance(); - echo ""; - } - break; - case 'goldpig': - - if (pay_set_status('goldpig') == 0) { - $this->error("网站未开启金猪充值", '', 1); - exit(); - } - - if(empty(C('goldpig.partner'))||empty(C('goldpig.wooolid'))) { - $this->error("网站未配置金猪充值", '', 1); - exit(); - } - if($amount<1) { - $this->error("单笔金额不小于1", '', 1); - exit(); + $this->redirect('balance', array('status'=>1), 3, ''); + } + $amount = abs($amount); + // $amount = 0.01;//测试金额 + if (empty($_REQUEST['account'])) { + $user = get_promote_entity(PID); + } else { + $user = get_promote_entity($_REQUEST['account'], true); + } + + $order_no = "TB_" . date('Ymd') . date('His') . sp_random_string(4); + $create['amount'] = $amount; + $create['pay_order_number'] = $order_no; + + $vo = new \Think\Pay\PayVo(); + $vo->setBody("账户余额") + ->setFee($amount)//支付金额 + ->setTitle("余额充值") + ->setOrderNo($order_no) + ->setSignType("MD5") + ->setPayMethod("direct_tb") + ->setTable("balance") + ->setUserId($user['id']) + ->setAccount($user['account']) + ->setPromoteId(PID) + ->setPromoteName(PROMOTE_ACCOUNT) + ->setMoney($user['balance_coin']); + + switch (I('pay_type')) { + case 'swiftpass': + //判断是否开启微信充值 + if (pay_set_status('wei_xin') == 0 && pay_set_status('weixin') == 0) { + $this->error("网站未开启微信充值", '', 1); + exit(); + } + if (get_wx_type() == 0) { + $weixn = new Weixin(); + $is_pay = json_decode($weixn->weixin_pay("余额充值", $order_no, $real_amount), true); + if ($is_pay['status'] === 1) { + $json_['out_trade_no'] = $order_no; + $json_['amount'] = $amount; + $json_['pay_money'] = $real_amount; + $json_['code_img_url'] = U('qrcode', array('level' => 3, 'size' => 4, 'url' => base64_encode(base64_encode($is_pay['url'])))); } + $create['pay_way'] = 2; + $this->add_balance($user, $create); - $sign=think_encrypt(md5($real_amount.$order_no)); - $create['pay_way'] = 8; + $this->show_balance(); + echo ""; + } else { + $vo->setService("pay.weixin.native") + ->setPayWay(2); + $pay = new \Think\Pay('swiftpass', C('weixin')); + $all = $pay->buildRequestForm($vo); + $all['amount'] = $vo->getMoney(); + $this->show_balance(); + echo ""; + } + break; + case 'goldpig': - $this->add_balance($user, $create); - file_put_contents("./Application/Home/OrderNo/".$order_no.'.txt',json_encode($create)); - redirect(U('goldpig_pay',array('userid'=>$user['id'],'account' =>$user['account'],'pay_amount'=>$real_amount,'sign'=>$sign,'pay_order_number'=>$order_no))); - break; - default: - //判断是否开启支付宝充值 - if (pay_set_status('alipay') == 0) { - $this->error("网站未开启支付宝充值", '', 1); - exit(); - } - $vo->setService("create_direct_pay_by_user") - ->setPayWay(1); - $pay = new \Think\Pay('alipay', C('alipay')); - echo $pay->buildRequestForm($vo); - break; - } + if (pay_set_status('goldpig') == 0) { + $this->error("网站未开启金猪充值", '', 1); + exit(); + } + if(empty(C('goldpig.partner'))||empty(C('goldpig.wooolid'))) { + $this->error("网站未配置金猪充值", '', 1); + exit(); + } + if($amount<1) { + $this->error("单笔金额不小于1", '', 1); + exit(); + } + $sign=think_encrypt(md5($real_amount.$order_no)); + $create['pay_way'] = 8; - } else { - $model = M('Promote', 'tab_'); - $data = $model->find(session("promote_auth.pid")); - $data['bank_area'] = explode(',', $data['bank_area']); - $this->assign('data',$data); - $this->meta_title = '账户余额'; - $this->display(); - } + $this->add_balance($user, $create); + file_put_contents("./Application/Home/OrderNo/".$order_no.'.txt',json_encode($create)); + redirect(U('goldpig_pay',array('userid'=>$user['id'],'account' =>$user['account'],'pay_amount'=>$real_amount,'sign'=>$sign,'pay_order_number'=>$order_no))); + break; + default: + //判断是否开启支付宝充值 + if (pay_set_status('alipay') == 0) { + $this->error("网站未开启支付宝充值", '', 1); + exit(); + } + $vo->setService("create_direct_pay_by_user") + ->setPayWay(1); + $pay = new \Think\Pay('alipay', C('alipay')); + echo $pay->buildRequestForm($vo); + break; + } - } - public function balance_recharge() { - if (IS_POST) { - $real_amount = $amount = I('amount',0,'intval'); + } else { + $model = M('Promote', 'tab_'); + $data = $model->find(session("promote_auth.pid")); + $data['bank_area'] = explode(',', $data['bank_area']); + $this->assign('data',$data); + $this->meta_title = '账户余额'; + $this->display(); + } - //$real_amount = $amount = 0.01; + } - if(!is_numeric($amount)){ + public function balance_recharge() { + if (IS_POST) { - $this->ajaxReturn(['status'=>0,'info'=>'充值金额不是数字']); + $real_amount = $amount = I('amount',0,'intval'); - } - if($amount<0){ + //$real_amount = $amount = 0.01; - $this->ajaxReturn(['status'=>0,'info'=>'充值金额错误']); + if(!is_numeric($amount)){ + + $this->ajaxReturn(['status'=>0,'info'=>'充值金额不是数字']); + + } + if($amount<0){ + + $this->ajaxReturn(['status'=>0,'info'=>'充值金额错误']); + + } + + if (empty($_REQUEST['account'])) { + $user = get_promote_entity(PID); + } else { + $user = get_promote_entity($_REQUEST['account'], true); + } + + $order_no = "TB_" . date('Ymd') . date('His') . sp_random_string(4); + $create['amount'] = $amount; + $create['pay_order_number'] = $order_no; + + $vo = new \Think\Pay\PayVo(); + $vo->setBody("账户余额") + ->setFee($amount)//支付金额 + ->setTitle("余额充值") + ->setOrderNo($order_no) + ->setSignType("MD5") + ->setPayMethod("direct_tb") + ->setTable("balance") + ->setUserId($user['id']) + ->setAccount($user['account']) + ->setPromoteId(PID) + ->setPromoteName(PROMOTE_ACCOUNT) + ->setMoney($user['balance_coin']); + + switch (I('pay_type')) { + case 'swiftpass': + //判断是否开启微信充值 + if (pay_set_status('wei_xin') == 0 && pay_set_status('weixin') == 0) { + $this->ajaxReturn(['status'=>0,'info'=>'网站未开启微信充值']); + } + if (get_wx_type() == 0) { + $weixn = new Weixin(); + $is_pay = json_decode($weixn->weixin_pay("余额充值", $order_no, $real_amount), true); + if ($is_pay['status'] === 1) { + $json_['out_trade_no'] = $order_no; + $json_['amount'] = $amount; + $json_['pay_money'] = $real_amount; + $json_['code_img_url'] = U('qrcode', array('level' => 3, 'size' => 4, 'url' => base64_encode(base64_encode($is_pay['url'])))); + } + $create['pay_way'] = 2; + $this->add_balance($user, $create); + + $this->ajaxReturn(['status'=>1,'info'=>'','data'=>$json_]); + + } else { + $vo->setService("pay.weixin.native") + ->setPayWay(2); + $pay = new \Think\Pay('swiftpass', C('weixin')); + $all = $pay->buildRequestForm($vo); + $all['amount'] = $vo->getMoney(); + + $this->ajaxReturn(['status'=>1,'info'=>'','data'=>$all]); + + } + break; + default: + //判断是否开启支付宝充值 + if (pay_set_status('alipay') == 0) { + $this->ajaxReturn(['status'=>0,'info'=>'网站未开启支付宝充值']); + } + $vo->setService("create_direct_pay_by_user") + ->setPayWay(1); + $pay = new \Think\Pay('alipay', C('alipay')); + $url = $pay->buildRequestForm($vo); + $this->ajaxReturn(['status'=>1,'info'=>'','url'=>$url]); + } - } - if (empty($_REQUEST['account'])) { - $user = get_promote_entity(PID); - } else { - $user = get_promote_entity($_REQUEST['account'], true); - } - - $order_no = "TB_" . date('Ymd') . date('His') . sp_random_string(4); - $create['amount'] = $amount; - $create['pay_order_number'] = $order_no; - - $vo = new \Think\Pay\PayVo(); - $vo->setBody("账户余额") - ->setFee($amount)//支付金额 - ->setTitle("余额充值") - ->setOrderNo($order_no) - ->setSignType("MD5") - ->setPayMethod("direct_tb") - ->setTable("balance") - ->setUserId($user['id']) - ->setAccount($user['account']) - ->setPromoteId(PID) - ->setPromoteName(PROMOTE_ACCOUNT) - ->setMoney($user['balance_coin']); - - switch (I('pay_type')) { - case 'swiftpass': - //判断是否开启微信充值 - if (pay_set_status('wei_xin') == 0 && pay_set_status('weixin') == 0) { - $this->ajaxReturn(['status'=>0,'info'=>'网站未开启微信充值']); - } - if (get_wx_type() == 0) { - $weixn = new Weixin(); - $is_pay = json_decode($weixn->weixin_pay("余额充值", $order_no, $real_amount), true); - if ($is_pay['status'] === 1) { - $json_['out_trade_no'] = $order_no; - $json_['amount'] = $amount; - $json_['pay_money'] = $real_amount; - $json_['code_img_url'] = U('qrcode', array('level' => 3, 'size' => 4, 'url' => base64_encode(base64_encode($is_pay['url'])))); - } - $create['pay_way'] = 2; - $this->add_balance($user, $create); - - $this->ajaxReturn(['status'=>1,'info'=>'','data'=>$json_]); - - } else { - $vo->setService("pay.weixin.native") - ->setPayWay(2); - $pay = new \Think\Pay('swiftpass', C('weixin')); - $all = $pay->buildRequestForm($vo); - $all['amount'] = $vo->getMoney(); - - $this->ajaxReturn(['status'=>1,'info'=>'','data'=>$all]); - - } - break; - default: - //判断是否开启支付宝充值 - if (pay_set_status('alipay') == 0) { - $this->ajaxReturn(['status'=>0,'info'=>'网站未开启支付宝充值']); - } - $vo->setService("create_direct_pay_by_user") - ->setPayWay(1); - $pay = new \Think\Pay('alipay', C('alipay')); - $url = $pay->buildRequestForm($vo); - $this->ajaxReturn(['status'=>1,'info'=>'','url'=>$url]); - } - - - - } else { - $this->ajaxReturn(['status'=>0,'info'=>'请求有误']); - } - - } - - - /** + + } else { + $this->ajaxReturn(['status'=>0,'info'=>'请求有误']); + } + + } + + + /** * 金猪支付 * @return [type] [description] * @author cb <[email address]> */ public function goldpig_pay(){ - if(IS_POST){ -SafeFilter($_POST); + if(IS_POST){ + SafeFilter($_POST); $msign=think_encrypt(md5($_POST['amount'].$_POST['pay_order_number'])); if($msign!==$_POST['sign']){ $this->error('验证失败',U('promote/balance'));exit; @@ -1044,24 +1163,24 @@ SafeFilter($_POST); if($_POST['amount']<=0){ $this->error('金额有误'); } - $url="./Application/Home/OrderNo/".$_POST['pay_order_number'].'.txt'; + $url="./Application/Home/OrderNo/".$_POST['pay_order_number'].'.txt'; if(!file_exists($url) ){ - $this->error('操作有误',U('promote/balance'));exit; + $this->error('操作有误',U('promote/balance'));exit; } - $user = M('Promote','tab_')->field('id,account')->where(['account'=>$_POST['UserName']])->find(); + $user = M('Promote','tab_')->field('id,account')->where(['account'=>$_POST['UserName']])->find(); if (empty($user)) { - $this->error("账号不存在"); - exit(); + $this->error("账号不存在"); + exit(); } - $baseurl = 'http://api.357p.com/?'; + $baseurl = 'http://api.357p.com/?'; - $url = $baseurl . "UserName={$_POST['UserName']}&Price={$_POST['amount']}&shouji={$_POST['shouji']}&PayID={$_POST['PayID']}&userid={$_POST['userid']}&wooolID={$_POST['wooolID']}&jinzhua={$_POST['pay_order_number']}&jinzhub={$_POST['jinzhub']}&jinzhuc={$_POST['jinzhuc']}&jinzhue={$_POST['pay_order_number']}"; + $url = $baseurl . "UserName={$_POST['UserName']}&Price={$_POST['amount']}&shouji={$_POST['shouji']}&PayID={$_POST['PayID']}&userid={$_POST['userid']}&wooolID={$_POST['wooolID']}&jinzhua={$_POST['pay_order_number']}&jinzhub={$_POST['jinzhub']}&jinzhuc={$_POST['jinzhuc']}&jinzhue={$_POST['pay_order_number']}"; - redirect($url);exit; + redirect($url);exit; }else{ $this->display(); @@ -1071,16 +1190,16 @@ SafeFilter($_POST); } - public function show_balance() { - $model = M('Promote', 'tab_'); - $data = $model->find(session("promote_auth.pid")); - $data['bank_area'] = explode(',', $data['bank_area']); - $this->assign('data',$data); - $this->meta_title = '账户余额'; - $this->display('balance'); - } + public function show_balance() { + $model = M('Promote', 'tab_'); + $data = $model->find(session("promote_auth.pid")); + $data['bank_area'] = explode(',', $data['bank_area']); + $this->assign('data',$data); + $this->meta_title = '账户余额'; + $this->display('balance'); + } - public function checkOrder($order_number){ + public function checkOrder($order_number){ $map['pay_order_number'] = $order_number; $data = M('Balance','tab_') ->where($map) @@ -1094,7 +1213,7 @@ SafeFilter($_POST); } - public function add_balance($promote,$data){ + public function add_balance($promote,$data){ $balance = M("Balance","tab_"); $balance_data['order_number'] = ""; $balance_data['pay_order_number'] = $data['pay_order_number']; @@ -1113,234 +1232,234 @@ SafeFilter($_POST); } - public function wxQrcode($promote='') { - if (C('wechat.status')>0) { - $appid = C('wechat.appid'); - $appsecret = C('wechat.appsecret'); - $token = session("token"); - if($token){ - $auth = new WechatAuth($appid, $appsecret, $token); - } else { - $auth = new WechatAuth($appid, $appsecret); - $token = $auth->getAccessToken(); + public function wxQrcode($promote='') { + if (C('wechat.status')>0) { + $appid = C('wechat.appid'); + $appsecret = C('wechat.appsecret'); + $token = session("token"); + if($token){ + $auth = new WechatAuth($appid, $appsecret, $token); + } else { + $auth = new WechatAuth($appid, $appsecret); + $token = $auth->getAccessToken(); - session(array('expire' => $token['expires_in'])); - session("token", $token['access_token']); - } - if (empty($promote)) { - $promote = D('promote')->detail(); - } - - $sign = $promote['weixin_openid_sign']?$promote['weixin_openid_sign']:rand(1,99999); - - $ticket = $auth->qrcodeCreate($sign,604800); - - $this->assign('wxQrcodeUrl',$ticket['url']); - - } else { - $this->assign('wxQrcodeUrl',null); - } - } - - public function wxQrcodeRedirect() { - - $xml_str = $GLOBALS['HTTP_RAW_POST_DATA']; - - $this->logger($xml_str); - - if(!empty($xml_str)){ - libxml_disable_entity_loader(true); - - $request_xml = simplexml_load_string($xml_str, 'SimpleXMLElement', LIBXML_NOCDATA); - - switch ($request_xml->MsgType){ - case 'event': - $this->_setOpenid($request_xml); - break; - } - } else { - die(''); - } - - } - - - public function _setOpenid($data,$type) { - $event = strtolower($data->Event); - $openid = $data->FromUserName; // 用户 - $auth = new WechatAuth(C('wechat.appid'), C('wechat.appsecret')); - $model = D('Promote'); - $promote = $model->detail(); - $data = array('id'=>$promote['id']); - $user = $auth->userInfo($openid); - switch($event) { - case 'subscribe':{ - // 关注事件 - if (!empty($promote['weixin_openid'])) { - $auth->setText($openid,date('Y-m-d H:i:s').' 请先解绑微信');exit; - } - if (str_replace('qrscene_', '', $data['EventKey']) != $promote['weixin_openid_sign']) { - $auth->setText($openid,date('Y-m-d H:i:s').' 页面错误,请刷新页面重试');exit; - } - $data['weixin_account']=emoji_encode($user['nickname']); - $data['weixin_openid']=$openid; - $res = $model->update($data); - if ($res) { - $auth->sendText($openid,date('Y-m-d H:i:s').' 微信绑定成功'); - } else { - $auth->sendText($openid,date('Y-m-d H:i:s').' 微信绑定失败'); - } - };break; - case 'scan':{ - // 关注以后 - if ($user['subscribe'] != 1) {$auth->setText($openid,date('Y-m-d H:i:s').' 你未关注微信');exit;} - if (empty($promote['weixin_openid'])) { - $auth->setText($openid,date('Y-m-d H:i:s').' 请先绑定微信');exit; - } - - - };break; - case 'unsubscribe':{ - // 取消关注 - if ($promote['weixin_openid'] != $openid) { - $auth->setText($openid,date('Y-m-d H:i:s').' 对不起,你没有权限');exit; - } - if (str_replace('qrscene_', '', $data['EventKey']) != $promote['weixin_openid_sign']) { - $auth->setText($openid,date('Y-m-d H:i:s').' 页面错误,请刷新页面重试');exit; - } - if (empty($promote['weixin_openid'])) { - $auth->setText($openid,date('Y-m-d H:i:s').' 暂未绑定微信');exit; - } - $data['weixin_account']=''; - $data['weixin_openid']=''; - $res = $model->update($data); - if ($res) { - $auth->sendText($openid,date('Y-m-d H:i:s').' 微信解绑成功'); - } else { - $auth->sendText($openid,date('Y-m-d H:i:s').' 微信解绑失败'); - } - - };break; - } - } - - - public function logger($log_content) { - $fg_str="\n============================================================\n"; - $max_size = 500000; - $log_filename = __ROOT__."/Uploads/Logs/log".date('Ymd').".xml"; - if(file_exists($log_filename) and (abs(filesize($log_filename)) > $max_size)){ - unlink($log_filename); + session(array('expire' => $token['expires_in'])); + session("token", $token['access_token']); + } + if (empty($promote)) { + $promote = D('promote')->detail(); } - if(is_array($log_content)){ - file_put_contents($log_filename, date('Y-m-d H:i:s')."\n".json_encode($log_content).$fg_str, FILE_APPEND); - }else{ - file_put_contents($log_filename, date('Y-m-d H:i:s')."\n".$log_content.$fg_str, FILE_APPEND); + $sign = $promote['weixin_openid_sign']?$promote['weixin_openid_sign']:rand(1,99999); - } + $ticket = $auth->qrcodeCreate($sign,604800); + $this->assign('wxQrcodeUrl',$ticket['url']); + + } else { + $this->assign('wxQrcodeUrl',null); } + } - public function promoteList($p=1){ + public function wxQrcodeRedirect() { - switch ($_GET['type']) { - case '': - case 1: - $this->promoteLists($p); - break; - default: - $this->siteApplyList($p); + $xml_str = $GLOBALS['HTTP_RAW_POST_DATA']; + + $this->logger($xml_str); + + if(!empty($xml_str)){ + libxml_disable_entity_loader(true); + + $request_xml = simplexml_load_string($xml_str, 'SimpleXMLElement', LIBXML_NOCDATA); + + switch ($request_xml->MsgType){ + case 'event': + $this->_setOpenid($request_xml); break; } + } else { + die(''); } -// 推广员列表 - const model_name = 'Promote'; - public function promoteLists($p){ - $map = []; - $map['_string'] = 'id='. session('promote_auth.pid') - . ' or parent_id=' . session('promote_auth.pid') - . ' or grand_id=' . session('promote_auth.pid'); + } - $selectMap = $map; - if(isset($_REQUEST['promote_id'])){ - $promoteid = $_REQUEST['promote_id']; - unset($_REQUEST['promote_id']); - if(isset($_REQUEST['parent_id'])) { + public function _setOpenid($data,$type) { + $event = strtolower($data->Event); + $openid = $data->FromUserName; // 用户 + $auth = new WechatAuth(C('wechat.appid'), C('wechat.appsecret')); + $model = D('Promote'); + $promote = $model->detail(); + $data = array('id'=>$promote['id']); + $user = $auth->userInfo($openid); + switch($event) { + case 'subscribe':{ + // 关注事件 + if (!empty($promote['weixin_openid'])) { + $auth->setText($openid,date('Y-m-d H:i:s').' 请先解绑微信');exit; + } + if (str_replace('qrscene_', '', $data['EventKey']) != $promote['weixin_openid_sign']) { + $auth->setText($openid,date('Y-m-d H:i:s').' 页面错误,请刷新页面重试');exit; + } + $data['weixin_account']=emoji_encode($user['nickname']); + $data['weixin_openid']=$openid; + $res = $model->update($data); + if ($res) { + $auth->sendText($openid,date('Y-m-d H:i:s').' 微信绑定成功'); + } else { + $auth->sendText($openid,date('Y-m-d H:i:s').' 微信绑定失败'); + } + };break; + case 'scan':{ + // 关注以后 + if ($user['subscribe'] != 1) {$auth->setText($openid,date('Y-m-d H:i:s').' 你未关注微信');exit;} + if (empty($promote['weixin_openid'])) { + $auth->setText($openid,date('Y-m-d H:i:s').' 请先绑定微信');exit; + } - $parent_id = $_REQUEST['parent_id']; - unset($_REQUEST['parent_id']); - if($promoteid == $parent_id) { - $map['id'] = $promoteid; - } else { - $maps['parent_id'] = $parent_id; - $maps['grand_id'] = $parent_id; - $maps['_logic'] = 'or'; - $pro = M('promote','tab_')->field('id,account')->where([array('id'=>$promoteid),$maps])->select(); - if (!empty($pro_ids)){ - $map['id'] = array('eq',-1); - } + };break; + case 'unsubscribe':{ + // 取消关注 + if ($promote['weixin_openid'] != $openid) { + $auth->setText($openid,date('Y-m-d H:i:s').' 对不起,你没有权限');exit; + } + if (str_replace('qrscene_', '', $data['EventKey']) != $promote['weixin_openid_sign']) { + $auth->setText($openid,date('Y-m-d H:i:s').' 页面错误,请刷新页面重试');exit; + } + if (empty($promote['weixin_openid'])) { + $auth->setText($openid,date('Y-m-d H:i:s').' 暂未绑定微信');exit; + } + $data['weixin_account']=''; + $data['weixin_openid']=''; + $res = $model->update($data); + if ($res) { + $auth->sendText($openid,date('Y-m-d H:i:s').' 微信解绑成功'); + } else { + $auth->sendText($openid,date('Y-m-d H:i:s').' 微信解绑失败'); + } - } + };break; + } + } - } else { + + public function logger($log_content) { + $fg_str="\n============================================================\n"; + $max_size = 500000; + $log_filename = __ROOT__."/Uploads/Logs/log".date('Ymd').".xml"; + if(file_exists($log_filename) and (abs(filesize($log_filename)) > $max_size)){ + unlink($log_filename); + } + if(is_array($log_content)){ + file_put_contents($log_filename, date('Y-m-d H:i:s')."\n".json_encode($log_content).$fg_str, FILE_APPEND); + + }else{ + file_put_contents($log_filename, date('Y-m-d H:i:s')."\n".$log_content.$fg_str, FILE_APPEND); + + } + + } + + public function promoteList($p=1){ + + switch ($_GET['type']) { + case '': + case 1: + $this->promoteLists($p); + break; + default: + $this->siteApplyList($p); + break; + } + } + +// 推广员列表 + const model_name = 'Promote'; + public function promoteLists($p){ + $map = []; + $map['_string'] = 'id='. session('promote_auth.pid') + . ' or parent_id=' . session('promote_auth.pid') + . ' or grand_id=' . session('promote_auth.pid'); + + $selectMap = $map; + + if(isset($_REQUEST['promote_id'])){ + $promoteid = $_REQUEST['promote_id']; + unset($_REQUEST['promote_id']); + if(isset($_REQUEST['parent_id'])) { + + $parent_id = $_REQUEST['parent_id']; + unset($_REQUEST['parent_id']); + if($promoteid == $parent_id) { $map['id'] = $promoteid; - /* $maps['parent_id'] = $promoteid; - $maps['grand_id'] = $promoteid; + } else { + $maps['parent_id'] = $parent_id; + $maps['grand_id'] = $parent_id; $maps['_logic'] = 'or'; - $pro = M('promote','tab_')->field('id,account')->where($maps)->select(); - $pro_ids = array_column($pro,'id'); - $pro_ids[] = $promoteid; - if (!empty($pro_ids)){ - $map['id'] = ['in',$pro_ids]; - }else{ - $map['id'] = array('eq',-1); - } */ + $pro = M('promote','tab_')->field('id,account')->where([array('id'=>$promoteid),$maps])->select(); + + if (!empty($pro_ids)){ + $map['id'] = array('eq',-1); + } } + } else { - if (isset($_REQUEST['parent_id'])) { - if ($_REQUEST['parent_id']=='全部') { - unset($_REQUEST['parent_id']); - } - $zid=get_zi_promote_id($_REQUEST['parent_id']); - if($zid){ - $zid=$zid.','.$_REQUEST['parent_id']; - }else{ - $zid=$_REQUEST['parent_id']; - } - $map['id']=array('in',$zid); + $map['id'] = $promoteid; + /* $maps['parent_id'] = $promoteid; + $maps['grand_id'] = $promoteid; + $maps['_logic'] = 'or'; + $pro = M('promote','tab_')->field('id,account')->where($maps)->select(); + $pro_ids = array_column($pro,'id'); + $pro_ids[] = $promoteid; + if (!empty($pro_ids)){ + $map['id'] = ['in',$pro_ids]; + }else{ + $map['id'] = array('eq',-1); + } */ + + } + } else { + if (isset($_REQUEST['parent_id'])) { + if ($_REQUEST['parent_id']=='全部') { unset($_REQUEST['parent_id']); } - } - if(isset($_REQUEST['admin_id'])){ - if($_REQUEST['admin_id']=="全部"){ - unset($_REQUEST['admin']); + $zid=get_zi_promote_id($_REQUEST['parent_id']); + if($zid){ + $zid=$zid.','.$_REQUEST['parent_id']; }else{ - $map['ba_id']=$_REQUEST['admin_id']; + $zid=$_REQUEST['parent_id']; } + $map['id']=array('in',$zid); + unset($_REQUEST['parent_id']); } - - if(I('promote_level') == 1){ - $map['parent_id'] = 0; - }elseif(I('promote_level') == 2){ - $map['parent_id'] = ['neq',0]; - $map['grand_id'] = 0; - }elseif (I('promote_level') == 3) { - $map['parent_id'] = ['neq',0]; - $map['grand_id'] = ['neq',0]; + } + if(isset($_REQUEST['admin_id'])){ + if($_REQUEST['admin_id']=="全部"){ + unset($_REQUEST['admin']); + }else{ + $map['ba_id']=$_REQUEST['admin_id']; } + } - $model = new PromoteModel(); - $promotes = $model->field(['id', 'account'])->where($selectMap)->select(); - - $this->assign('promotes', $promotes); - self::order_lists(self::model_name, $p, $map); + if(I('promote_level') == 1){ + $map['parent_id'] = 0; + }elseif(I('promote_level') == 2){ + $map['parent_id'] = ['neq',0]; + $map['grand_id'] = 0; + }elseif (I('promote_level') == 3) { + $map['parent_id'] = ['neq',0]; + $map['grand_id'] = ['neq',0]; } + $model = new PromoteModel(); + $promotes = $model->field(['id', 'account'])->where($selectMap)->select(); + + $this->assign('promotes', $promotes); + self::order_lists(self::model_name, $p, $map); + } + /** * [数组分页,二维数组字段排序] * @param [type] $model [description] @@ -1384,7 +1503,7 @@ SafeFilter($_POST); $fields[] = $array[0]; } } - + $fields[] = 'grand_id'; // 过滤重复字段信息 @@ -1561,7 +1680,7 @@ SafeFilter($_POST); } if (15==strlen($id)) { $regx = "/^(\d{6})+(\d{2})+(\d{2})+(\d{2})+(\d{3})$/"; - + @preg_match($regx, $id, $arr_split); //检查生日日期是否正确 $dtm_birth = "19".$arr_split[2] . '/' . $arr_split[3]. '/' .$arr_split[4]; diff --git a/Application/Home/View/default/Promote/index.html b/Application/Home/View/default/Promote/index.html index a7908ae1d..ac3d8b9e8 100644 --- a/Application/Home/View/default/Promote/index.html +++ b/Application/Home/View/default/Promote/index.html @@ -1,44 +1,204 @@ - + -
-
    -
  • 今日充值

    ¥{$today}
  • -
  • 昨日充值

    ¥{$yesterday}
  • -
  • 本月充值

    ¥{$month}
  • -
  • 上月充值

    ¥{$lastmonth}
  • -
  • 总计充值

    ¥{$total}
  • -
+
+
    +
  • 推广总用户

    {$user_count}
  • +
  • 推广总充值

    ¥{$total_money}
  • +
  • 当日新增用户充值

    ¥{$today_add_user_money}
  • +
  • 当月新增用户充值

    ¥{$month_add_user_money}
  • +
+
    +
  • 昨日注册用户

    {$yesterday_user_regist_count}
  • +
  • 昨日充值金额

    ¥{$yesterday_total_money}
  • +
  • 今日注册用户

    {$yesterday_regist_user_count}
  • +
  • 今日充值金额

    ¥{$yesterday_total_money}
  • +
+
+
+
    +
  • +
    +
    快捷菜单自定义>
    +
    + + 暂无数据 + + + +
    +
    +
  • +
  • +
    +
    公告 消息 游戏活动查看更多>
    +
    + + 暂无公告 + + +

    + {$gg.title} + {$gg.update_time|date="Y/m/d",###} +

    +
    +
    +
    +
    + + 暂无消息 + + +

    + {$xx.title} + {$xx.update_time|date="Y/m/d",###} +

    +
    +
    +
    +
    + + 暂无活动信息 + + +

    + {$zx.title} + {$zx.update_time|date="Y/m/d",###} +

    +
    +
    +
    +
    +
  • +
+
+
+
开服信息
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
游戏ICON游戏名称平台开服时间服务器信息

暂无数据

{$data.game_name}安卓、IOS安卓IOS{$data.start_time|date="m-d H:i",###}}{$data.server_name}
+
+
+ {$_page} +
-
-
新闻公告
-
- -
{$_page}
-
-
- + + + + } + \ No newline at end of file diff --git a/Application/Home/View/default/Promote/msg_list.html b/Application/Home/View/default/Promote/msg_list.html new file mode 100644 index 000000000..99636880f --- /dev/null +++ b/Application/Home/View/default/Promote/msg_list.html @@ -0,0 +1,36 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Application/Home/View/default/Promote/quick_menu_list.html b/Application/Home/View/default/Promote/quick_menu_list.html new file mode 100644 index 000000000..37f8f1bcf --- /dev/null +++ b/Application/Home/View/default/Promote/quick_menu_list.html @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Application/Mobile/View/Ssg/index.html b/Application/Mobile/View/Ssg/index.html index 890599afd..88d83addd 100644 --- a/Application/Mobile/View/Ssg/index.html +++ b/Application/Mobile/View/Ssg/index.html @@ -108,6 +108,21 @@
- + + \ No newline at end of file diff --git a/Data/update.sql b/Data/update.sql index e69de29bb..fd9690007 100644 --- a/Data/update.sql +++ b/Data/update.sql @@ -0,0 +1,60 @@ + +-- 推广员后台首页快捷菜单 ZCL + +DROP TABLE IF EXISTS `tab_quick_menu`; +CREATE TABLE `tab_quick_menu` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '文档ID', + `name` varchar(50) NOT NULL DEFAULT '' COMMENT '菜单名称', + `url` varchar(255) NOT NULL DEFAULT '' COMMENT '链接地址', + `icon` varchar(50) DEFAULT '0' COMMENT '菜单ICON', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态', + PRIMARY KEY (`id`), + KEY `status` (`status`) +) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; + +-- ---------------------------- +-- Records of tab_quick_menu +-- ---------------------------- +INSERT INTO `tab_quick_menu` VALUES ('1', '账户信息', '/index.php?s=/Home/Promote/base_info.html', '11', '0'); +INSERT INTO `tab_quick_menu` VALUES ('2', '组长管理', '/index.php?s=/Home/Promote/mychlid.html', '12', '0'); +INSERT INTO `tab_quick_menu` VALUES ('3', '推广员管理', '/index.php?s=/Home/Promote/mygrand.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('4', '数据汇总', '/index.php?s=/Home/Query/summary.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('5', '充值明细', '/index.php?s=/Home/Query/recharge.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('6', '注册明细', '/index.php?s=/Home/Query/register.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('7', 'ARPU统计', '/index.php?s=/Home/Query/arpu_analysis.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('8', '留存统计', '/index.php?s=/Home/Query/retention_analysis.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('9', '角色查询', '/index.php?s=/Home/Query/userPlayers.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('10', '专服管理', '/index.php?s=/Home/Apply/index.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('11', '扶持申请', '/index.php?s=/Home/Support/index.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('12', '扶持记录', '/index.php?s=/Home/Support/lists.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('13', '扶持额度', '/index.php?s=/Home/Support/quota.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('14', '我的平台币', '/index.php?s=/Home/PromoteCoin/myCoin.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('15', '平台币转移', '/index.php?s=/Home/PromoteCoin/record.html', '0', '0'); +INSERT INTO `tab_quick_menu` VALUES ('16', '平台币充值', '/index.php?s=/Home/CoinOrder/order_list.html', '0', '0'); + +-- 推广员后台首页快捷菜单关联表 ZCL + +DROP TABLE IF EXISTS `tab_promote_quick_menu`; +CREATE TABLE `tab_promote_quick_menu` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `promote_id` int(11) DEFAULT NULL COMMENT '推广员ID', + `quick_menu_id` int(11) DEFAULT NULL COMMENT '快捷菜单ID', + `create_time` int(11) DEFAULT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1; + +-- ---------------------------- +-- Records of tab_promote_quick_menu +-- ---------------------------- +INSERT INTO `tab_promote_quick_menu` VALUES ('4', '1', '3', '1569719823'); +INSERT INTO `tab_promote_quick_menu` VALUES ('6', '1', '5', '1569719828'); +INSERT INTO `tab_promote_quick_menu` VALUES ('7', '1', '6', '1569719830'); +INSERT INTO `tab_promote_quick_menu` VALUES ('8', '1', '7', '1569719832'); +INSERT INTO `tab_promote_quick_menu` VALUES ('9', '1', '14', '1569719835'); +INSERT INTO `tab_promote_quick_menu` VALUES ('10', '1', '15', '1569719839'); +INSERT INTO `tab_promote_quick_menu` VALUES ('11', '1', '12', '1569719849'); +INSERT INTO `tab_promote_quick_menu` VALUES ('12', '1', '13', '1569719852'); +INSERT INTO `tab_promote_quick_menu` VALUES ('14', '1', '8', '1569719866'); +INSERT INTO `tab_promote_quick_menu` VALUES ('15', '1', '9', '1569719870'); +INSERT INTO `tab_promote_quick_menu` VALUES ('16', '1', '10', '1569719877'); +INSERT INTO `tab_promote_quick_menu` VALUES ('18', '1', '1', '1569720739'); diff --git a/Public/Home/css/index/index.new.css b/Public/Home/css/index/index.new.css new file mode 100644 index 000000000..c6dcaccd1 --- /dev/null +++ b/Public/Home/css/index/index.new.css @@ -0,0 +1,132 @@ +/* index */ +.promote-index-overview ul{width: 100%;float:left;} +.promote-index-overview li {background:#FFF;border-radius:3px;float:left;width:23.33%;height:120px;position: relative;border: 1px solid #E3E8EC;} +.promote-index-overview li~li{margin-left:2%;} +.promote-index-overview .index-user {text-align:center;} +.promote-index-overview .index-user img {border-radius:100%;width:66px;height:66px;padding-top:12px;} +.promote-index-overview .index-user p {margin:8px 0 0;} + +.promote-index-overview .icon {width:40px;height:40px;position:absolute;top:50%;margin-top:-34px;left: 22%;} +.promote-index-overview .icon img{width: 100%;height: 100%;} +.promote-index-overview .text {font-size:16px;color:#555;/* text-align:center; */padding-top:33px;padding-left: 140px;} +.promote-index-overview .text p {margin-bottom:6px;color: #6A7082;} +.promote-index-overview .text span {font-size:18px;color: #99B1CB;} + +.promote-index-list{background: #fff;margin-top: 2.4vh;border-radius: 3px;padding: 10px;height: auto;position: relative;border: 1px solid #E3E8EC;} +.promote-index-list .trunk-title-main{font-size: 16px;color: #6A7082;font-weight: 600;height: 40px;border-bottom: 1px solid #ddd;} +.promote-index-list .trunk-title-main span{vertical-align: middle;} +.promote-index-list .trunk-content{padding-top: 1%;} +.promote-index-list .trunk-content ul{min-height: 44vh;} +.promote-index-list .trunk-content ul li{border-top: 1px solid #F3F5F9;padding: 1vh;} +.promote-index-list .trunk-content ul li:nth-child(2n-1){background: #FAFAFC;} + +.index-tab-list ul{width: 100%;position: relative;column-count:1;margin-top: 20px;} +.index-tab-list li {background:#FFF;border-radius:3px;width:48.8%;height:350px;position: relative;border: 1px solid #E3E8EC;display: inline-block;vertical-align: middle} +.index-tab-list li:last-child{margin-left:1.7%;} + +.trunk-content article {margin-top:0!important;} +.trunk-content{margin-top: 0!important;} +.qcl-box{font-size: 14px;} +.qcl-box-hand{height: 45px;line-height: 35px;margin: 10px;border-bottom: 1px solid #ddd} +.qcl-tit{font-size: 16px;color: #6A7082;font-weight: 600} +.qcl-bnt{text-align: center;margin-top: -10px} +.qcl-bnt ul{width: 100%;float:left;} +.qcl-bnt li {background:#FFF;border-radius:3px;float:left;width:17%;height:115px;position: relative;border: 0;margin-bottom: 20px} +.qcl-bnt li{margin-left:2%;} +.qcl-bnt li span{display: block;} +.qcl-bnt li span:first-child{height: 80px;width: 80px;margin: auto} +.qcl-bnt li span:first-child img{height: 80px;width: 80px} +.qcl-bnt li span:last-child{height: 30px;line-height: 30px} + +.more{display: block;float: right;padding-top: 10px;font-size: 14px;color: #4A90F0} +.more:hover{color:#26C7DB} +.fxui-tab {font-size: 14px;} +.fxui-tab-hand{height: 45px;line-height: 35px;margin: 10px;border-bottom: 1px solid #ddd} +.fxui-tab-tit {display: block;float: left;font-size: 14px;height: 28px;line-height: 28px;padding: 2px 20px ;cursor: pointer;border: 1px solid #ddd} +.fxui-tab-tit:first-child{border-bottom-left-radius:3px;border-top-left-radius: 3px} +.fxui-tab-tit:last-child{border-bottom-right-radius:3px;border-top-right-radius: 3px} +.fxui-tab-hand .curr {background: #26C7DB;color: #fff;border: 1px solid #26C7DB} +.fxui-tab-nav {padding: 15px;height: 280px;margin-top: -10px} +.fxui-tab-nav p{height: 50px;line-height: 50px;border-bottom: 1px solid #ddd} +.fxui-tab-nav p span:first-child{width: 80%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;display: inline-block} +.fxui-tab-nav p span:last-child{float: right;width: 15%;display: inline-block} + + +/*.article-type{vertical-align: middle;padding-right: 10px;} +.article-title{width: 400px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;vertical-align: middle;color: #515974;font-size: 13px;} +.article-title:hover{color: #26c7db;} +.article-time{vertical-align: middle;font-size: 13px;color: #a5a6bb;}*/ +.page-overview{width: 100%;} + +@media screen and (max-width: 1440px) { + .promote-index-overview .icon {left: 12%;} + .promote-index-overview li{width:23.33%;} +} + +@media screen and (max-width: 1430px) { + .promote-index-overview .icon {left: 12%;} + .promote-index-overview li{width:48.7%;;margin-bottom: 20px} + .promote-index-overview li:nth-of-type(odd){ margin-left: 0;margin-right: 2%} + .promote-index-overview li:nth-of-type(even){margin-left: 0;margin-right: 0} + .promote-index-overview li:nth-child(3){margin-bottom: 0} + .promote-index-overview li:nth-child(4){margin-bottom: 0} +} + +@media screen and (max-width: 900px) { + .promote-index-overview .icon {left: 12%;} + .promote-index-overview li{width:48.7%;margin-bottom: 20px} + .promote-index-overview li:nth-of-type(odd){ margin-left: 0;margin-right: 2%} + .promote-index-overview li:nth-of-type(even){margin-left: 0;margin-right: 0} + .promote-index-overview li:nth-child(3){margin-bottom: 20px!important;} + .promote-index-overview li:nth-child(4){margin-bottom: 0} +} + +.promote-index-overview ul{width: 100%;float:left;} +.promote-index-overview li {background:#FFF;border-radius:3px;float:left;width:23.33%;height:120px;position: relative;border: 1px solid #E3E8EC;} +.promote-index-overview li~li{margin-left:2%;} + +.page-list .trunk-search .tab a{display: inline-block;width: 140px;height: 40px;text-align: center;line-height: 40px;font-size: 14px;background:#F6F7F9;color: #535875;} +.tab-bnt{clear:both;display: flex;} +.tab-bnt div{width: 100px;height: 35px;line-height: 35px;display: inline-block;border: 1px solid #ddd;text-align: center;cursor:pointer} +.tab-bnt div:first-child{border-top-left-radius: 3px;border-bottom-left-radius: 3px;} +.tab-bnt div:last-child{border-top-right-radius: 3px;border-bottom-right-radius: 3px;} +.tab-bnt .curr{background: #26C7DB;color: #fff;border: 1px solid #26C7DB;} + + +.page-list .trunk-search .tab td {border:1px solid #ddd;display: inline-block;margin-right: -5px;} +.page-list .trunk-search .tab td.first_border{border-top-left-radius: 3px;border-bottom-left-radius: 3px;} +.page-list .trunk-search .tab td.last_border{border-top-right-radius: 3px;border-bottom-right-radius: 3px;} +.page-list .trunk-search .tab td.current {border-color:#26C7DB;} +.page-list .trunk-search .tab td.current a{background: #26C7DB;color:#FFF;} +.page-list .tabpan {display:none;} +.page-list .tabpan.current {display:block;} +.baseInfo{margin-top: 1%;} +.trunk-list .table2 tr{height: 54px;} +.trunk-list .table2 .l {text-align:right;color: #8B8CA0;width: 95px;} +.trunk-list .table2 .l .req {color:red;display:inline-block;width:10px;text-align:center;} +.trunk-list .table2 .r {padding-left:15px;color: #535875;} +.trunk-list .table2 .r .formtxt {padding:0 10px;} +.trunk-list .table2 .r input[type=text] {width: 230px;height: 32px;padding-left: 10px; border: 1px solid #E5E5E5;border-radius: 4px;line-height: 32px;color: #535875;} +.trunk-list .table2 .r input[type=password] {width: 230px;height: 32px;padding-left: 10px; border: 1px solid #E5E5E5;border-radius: 4px;line-height: 32px;color: #535875;} +.trunk-list .table2 .r .radio-item {margin-right: 10px;} +.trunk-list .table2 .r .tj{width: 118px;height: 36px;line-height:36px;background: #26C7DB;color: #fff;border-radius: 4px;border: none;padding: 0;} +.trunk-list .table2 .r .tj:hover{background: #2bd8ed;} +.trunk-list .table2 .r .tj.disabled {background:#CCC;} +.trunk-list .table2 .r .back_btn{width: 118px;height: 36px;line-height:36px;background: #E5E5E5;color: #8B8CA0;border-radius: 4px;display: inline-block;text-align: center;margin-left: 20px;} +.table2 .form-radio label {position:relative;margin-right:20px;cursor:pointer;} +.table2 .form-radio input {cursor:pointer;width:14px;height:14px;display:inline-block;position:absolute;top:0;left:0;margin:0;margin-top:2px;opacity:0;} +.table2 .form-radio i {width:14px;height:14px;display:inline-block;vertical-align:middle;margin-top:-2px;margin-right:5px;background:url(../../images/20180207/icon_normal_weixuanze.png) ;} +.table2 .form-radio i.current {background-image:url(../../images/20180207/icon_xuanze.png);} + + + +.page-list .trunk-search {padding-bottom: 20px;} +.promote-mychlid-list form a.btn {display:inline-block;width:135px;height:36px;line-height: 36px; text-align:center;background: #3A97FF;color: #fff;border-radius: 4px;} +.promote-mychlid-list form a.btn:hover{background: #449DFF;} +.promote-mychlid-list form a .add_qudao{width: 20px;height: 20px;display: inline-block;vertical-align: middle;margin-right: 5px;background: url(../../images/20180207/icon_normal_tianjia.png) no-repeat;} +.promote-mychlid-list .form-group .txt{width: 180px;height: 34px;} +.border_normal{border-top: 1px dashed #E3E3E3;} +.border_normal .desccontent span{color: #6a7082;} +.border_normal .desccontent p{color: #ADAEC2;padding-top: 1.5%;} +.promote-mychlid-list .table .editbtn {color:#4A90F0;} +.promote-mychlid-list .table .editbtn:hover {color:#4ACDDF;} \ No newline at end of file diff --git a/Public/Home/js/index/jquery.fxTab.js b/Public/Home/js/index/jquery.fxTab.js new file mode 100644 index 000000000..80acae560 --- /dev/null +++ b/Public/Home/js/index/jquery.fxTab.js @@ -0,0 +1,27 @@ +/* + Author : guosheng + QQ : 9169775 + Email: cff20@sina.com + Date : 2013-07-25 +*/ +$.fn.extend({ + fxuiTab:function(opt){ + //做插件首先是传进来的对象,也就是this进行each,这样子一个页面上多个区块都可以使用啦! + return this.each(function() { + //说说Var的事,变量之前肯定是用var的,这样子就不会变成全局变量,和别的方法冲突了,然后最只用一个Var,然后用","分开即可。 + var t = $(this),//t就是$(this),因为Jquery里$(this)很多,我们可以把这个t选存起来,后面好多地方可以用。 + o = opt || {}, //如果使用者没有参,给o设一个空的对象。 + tit = o.tit || t.find('.fxui-tab-tit'), //标签点击的对象。 + nav = o.nav || t.find('.fxui-tab-nav'), //内容显示的对象。 + evt = o.evt || 'click',//事件可以为click,hover或是mouseover。 + eq = o.eq || 0; //初始化的时候可以默认显示第几块。不传值显示第一个。 + tit.bind(evt,function(){ //通过bind 传这个evt,事件就可以变动了,不一定只是click事件了。 + $(this).addClass('curr').siblings(tit).removeClass('curr');//处理标签头:加当前的Class,样式通过css改变 + nav.eq(tit.index($(this))).show().siblings('.fxui-tab-nav').hide();//内容块显示。 + }).hover(function(){ + $(this).addClass('fxui-tab-hover').siblings(tit).removeClass('fxui-tab-hover'); //标签的tit移上去的时候加一个样式,这样子这个标签头可以有默认,hover和curr三种状态。 + }); + evt === 'click' ? tit.eq(eq).click() :tit.eq(eq).mouseover(); //初始化,当前是第几个 + }) + } +}); \ No newline at end of file